/* Back office, in the shop's branding (styles.css): ink, bone and relic purple. */

/* 🎤 speak into any text box (and the advisor) */
.field-mic { position: absolute; z-index: 95; width: 30px; height: 30px; padding: 0; border: 1px solid #cfc8d8; border-radius: 50%; background: #fff; font-size: 15px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.field-mic:hover { border-color: #9014bc; }
.field-mic.on, .adv-mic.on { background: #c62828; border-color: #c62828; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 7px rgba(198,40,40,.18); } }
.field-mic-note { position: absolute; z-index: 95; padding: 6px 10px; border-radius: 6px; background: #16131a; color: #fff; font: 600 12.5px/1.4 var(--body); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.field-mic-note[hidden], .field-mic[hidden] { display: none; }
input.has-mic, textarea.has-mic { padding-right: 40px !important; }
.adv-mic { flex: none; width: 46px; border: 1px solid #cfc8d8; border-radius: 8px; background: #fff; font-size: 20px; cursor: pointer; }
.adv-mic:hover { border-color: #9014bc; }
.adv-voice { margin: 0; padding: 0 16px; font-size: 12.5px; color: #7a10a3; font-weight: 600; }
.adv-voice:empty { display: none; }
.adv-voice:not(:empty) { padding-top: 8px; }

/* the phone app: tab bar, More menu, install page */
.tabbar, .app-hint { display: none; }
.more-sheet { position: fixed; inset: 0; z-index: 88; background: rgba(11,10,13,.5); display: flex; align-items: flex-end; }
.more-sheet[hidden] { display: none; }
.more-card { width: 100%; max-height: 82vh; overflow-y: auto; background: #fff; color: #16131a; border-radius: 18px 18px 0 0; padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
.more-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .more-head b { font: 400 18px/1 var(--display); text-transform: uppercase; }
.more-grid { display: grid; gap: 14px; }
.more-grid h3 { margin: 0 0 4px; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6e6678; }
.more-grid a { display: block; padding: 11px 4px; border-bottom: 1px solid #efebf3; color: #16131a; text-decoration: none; font-weight: 600; font-size: 15.5px; }
.more-grid a:active { background: #f6f1fa; }
.install-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 10px; background: var(--surface-2); }
.install-tabs button { padding: 9px 16px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 700 14px/1 var(--body); cursor: pointer; }
.install-tabs [aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.isteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.istep { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.inum { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 800; }
.istep b { font-size: 16px; } .istep p { margin: 4px 0 8px; color: var(--muted); line-height: 1.5; }
.iqr { display: inline-grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin: 4px 0 6px; }
.iqr svg { width: 170px; height: 170px; } .iqr small { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.notice-ok { padding: 12px 16px; border-radius: var(--r); background: #e5f6ea; color: #17803a; font-weight: 700; }
.fin-note-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); line-height: 1.5; font-size: 14.5px; }

/* business life cycle (growth plan) */
.phases { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.phases span { font: 600 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 4px; }
.phases .grow, .stage.grow .stage-n { background: #e8f0fe; color: #1f4fa8; }
.phases .prime, .stage.prime .stage-n { background: #e5f6ea; color: #17803a; }
.phases .decline, .stage.decline .stage-n { background: #fff1e6; color: #b45309; }
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.stage { position: relative; display: grid; align-content: start; gap: 4px; padding: 14px; text-align: left; border: 1px solid var(--line); border-top: 4px solid #9db8ec; border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stage.prime { border-top-color: #6cc48a; } .stage.decline { border-top-color: #f0a868; }
.stage:hover { border-color: var(--purple); }
.stage.on { border-color: var(--purple); border-top-color: var(--purple); background: #faf5fd; box-shadow: 0 4px 18px rgba(144,20,188,.14); }
.stage-n { justify-self: start; font: 800 12px/1 var(--mono); padding: 4px 7px; border-radius: 4px; }
.stage em { position: absolute; top: 12px; right: 12px; font: 700 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; font-style: normal; color: #fff; background: var(--purple); padding: 4px 7px; border-radius: 4px; }
.stage > b { font-size: 16px; margin-top: 4px; } .stage > i { font-size: 13px; color: var(--purple); font-style: normal; font-weight: 600; }
.stage p { margin: 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.stage small { font-size: 12.5px; line-height: 1.45; color: var(--muted); } .stage small b { color: var(--text); }
.stage-now { margin: 0; font-size: 14px; line-height: 1.5; }
#growth > .panel, #growth > .fin-grid { margin-bottom: 16px; }
/* growth check-ins and progress */
.checkin-bar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; border-left: 4px solid var(--purple); }
.ck-date { display: grid; gap: 4px; } .ck-date input { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; color: var(--text); font: inherit; color-scheme: light; }
.ck-info { flex: 1; min-width: 240px; font-size: 14px; color: var(--muted); line-height: 1.5; } .ck-info .due { color: #b45309; font-weight: 700; }
.ph3 { font: 700 16px/1.3 var(--body); color: var(--text); margin: 28px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.ph3.first { margin-top: 4px; padding-top: 0; border-top: 0; }
.ph3 small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ptile { position: relative; display: grid; align-content: start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.plabel { font-size: 13px; font-weight: 600; color: var(--muted); }
.ptile > b { font: 800 22px/1.25 var(--body); }
.pdelta { font-size: 13px; font-weight: 700; } .pdelta small { font-weight: 400; color: var(--faint); }
.pdelta.good { color: var(--ok); } .pdelta.bad { color: var(--low); } .pdelta.neutral { color: var(--muted); font-weight: 600; }
.spark { position: relative; margin-top: 8px; }
.spark svg { display: block; width: 100%; height: 64px; overflow: visible; outline-offset: 2px; }
.spark-grid { stroke: #e7e3ec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark-line { fill: none; stroke: #9014bc; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-end, .spark-hover { fill: #9014bc; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-axis { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--faint); margin-top: 2px; }
.spark-range { font-size: 11px; color: var(--faint); text-align: center; }
.spark-tip { position: absolute; top: -6px; padding: 4px 8px; border-radius: 6px; background: #16131a; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; }
.spark-tip b { font-weight: 700; }
.spark-empty { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); }
.ptable { margin-top: 14px; } .ptable summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--lilac); }
.ptable table { margin-top: 8px; font-size: 13px; } .ptable th, .ptable td { white-space: nowrap; }
.growth-save { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 60px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: #faf7fc; }
.growth-save span { flex: 1; min-width: 240px; font-size: 13.5px; color: var(--muted); }
.growth-save .btn { padding: 14px 26px; font-size: 16px; }
.ck-modal { position: fixed; inset: 0; z-index: 85; background: rgba(22,19,26,.45); display: grid; place-items: center; padding: 16px; }
.ck-modal[hidden] { display: none; }
.ck-sheet { width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; color: #16131a; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
.ck-sheet header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #e7e3ec; background: #faf7fc; }
.ck-sheet header div { flex: 1; } .ck-sheet header b { display: block; font-size: 17px; color: #5c0d80; } .ck-sheet header small { color: #6e6678; font-size: 12.5px; }
.ck-body { overflow-y: auto; padding: 16px 18px 22px; }
.ck-body h4 { margin: 18px 0 6px; font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6e6678; }
.ck-text { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.ck-acts { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; } .ck-acts li.done { color: #6e6678; } .ck-acts small { color: #6e6678; }
/* advisor: suggested actions → growth plan */
.adv-acts { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid #e0d3ea; border-radius: 10px; background: #fff; }
.adv-acts > b { font-size: 13.5px; color: #5c0d80; }
.adv-acts label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.adv-acts input { width: 17px; height: 17px; margin-top: 2px; accent-color: #9014bc; flex: none; }
.adv-acts small { display: block; font-size: 12px; color: #6e6678; }
.adv-acts .btn { justify-self: start; }
.adv-added { margin: 0; font-size: 13.5px; font-weight: 700; color: #17803a; }
#growth > .panel + .panel { margin-top: 0; }
.adm-wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.adm-head { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 1px solid var(--line); }
.adm-head-row { display: flex; align-items: center; gap: 24px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.adm-head .brand img { width: 44px; height: 44px; }
.adm-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.adm-nav a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-weight: 600; }
.adm-nav a:hover { background: var(--surface-2); color: var(--text); }
.adm-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--purple); }
.ai-pill { margin-left: auto; font: 600 12px/1 var(--mono); padding: 7px 10px; border-radius: 20px; border: 1px solid var(--line-strong); color: var(--faint); cursor: help; }
.ai-pill.on { border-color: var(--ok); color: var(--ok); }
.ai-pill.off { border-color: var(--warn); color: var(--warn); }

.adm-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding: 28px 0 20px; }
.adm-title h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 36px); margin: 0; }
.adm-title p { margin: 6px 0 0; color: var(--muted); }
.toolbar-a { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-a input, .toolbar-a select { height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; }
.toolbar-a input { min-width: 260px; flex: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.stats div { background: var(--surface); padding: 14px 16px; }
.stats b { display: block; font: 400 26px/1.1 var(--display); }
.stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }

.ltable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ltable th { text-align: left; font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px 8px; border-bottom: 1px solid var(--line-strong); }
.ltable td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ltable tr:hover td { background: var(--surface); }
.ltable .th { width: 52px; height: 52px; overflow: hidden; background: var(--surface-2); border-radius: 3px; }
.ltable .th img { width: 100%; height: 100%; object-fit: cover; }
.ltable .t b { display: block; }
.ltable .t small { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.pill { display: inline-block; font: 600 11px/1 var(--mono); padding: 4px 7px; border-radius: 3px; text-transform: uppercase; white-space: nowrap; letter-spacing: .04em; }
.pill.new { background: var(--purple); color: #fff; }
.pill.relic { background: var(--bone); color: var(--ink); }
.pill.pre { background: var(--ink); color: var(--lilac); border: 1px solid var(--purple); }
.pill.out { border: 1px solid var(--low); color: var(--low); }
.pill.draft, .pill.sold { border: 1px solid var(--line-strong); color: var(--faint); }
.pill.sample { border: 1px dashed var(--line-strong); color: var(--faint); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); }
.stepper button { width: 30px; height: 30px; border: 0; background: none; color: var(--text); }
.stepper button:hover { background: var(--surface-2); }
.stepper span { min-width: 34px; text-align: center; font-family: var(--mono); }
.stepper.zero span { color: var(--low); }
.var-stock { font: 500 12px/1.5 var(--mono); color: var(--muted); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 4px; font-size: 14px; }
.link-btn:hover { color: var(--lilac); }
.link-btn.danger { color: var(--low); }
@media (max-width: 800px) { .ltable .hide-sm { display: none; } }

/* editor */
.editor { display: grid; grid-template-columns: 420px 1fr; gap: 32px; padding-bottom: 120px; }
@media (max-width: 1000px) { .editor { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 17px; letter-spacing: .02em; margin: 0 0 14px; }
.panel h2 small { font: 400 13px/1 var(--body); text-transform: none; letter-spacing: 0; color: var(--faint); margin-left: 6px; }
.dropzone {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r);
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--purple-hi); background: rgba(144, 20, 188, .08); }
.dropzone b { font-size: 16px; color: var(--text); }
.dropzone small { color: var(--faint); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ph { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); border-radius: 3px; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .main { position: absolute; left: 4px; top: 4px; font: 600 10px/1 var(--mono); background: var(--purple); color: #fff; padding: 3px 5px; text-transform: uppercase; border-radius: 2px; }
.ph .acts { position: absolute; inset: auto 0 0 0; display: flex; background: rgba(11,10,13,.88); opacity: 0; transition: opacity .15s; }
.ph:hover .acts, .ph:focus-within .acts { opacity: 1; }
.ph .acts button { flex: 1; height: 28px; border: 0; background: none; color: var(--text); font-size: 13px; }
.ph .acts button:hover { background: var(--surface-2); }
.ph.loading { display: grid; place-items: center; color: var(--faint); }
#photos .ph img[data-lb] { cursor: zoom-in; }
#photos .ph img[data-lb]:focus-visible { outline: 2px solid #b48cff; outline-offset: -2px; }
@media (hover: none) { #photos .ph .acts { opacity: 1; } } /* touch: a tap on the photo opens it large, so keep the buttons showing */
/* photo lightbox: always dark, whatever the page theme */
.lb { position: fixed; inset: 0; z-index: 130; background: rgba(6,5,8,.96); color: #f3f0f7; color-scheme: dark; }
.lb:focus { outline: none; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 64px 24px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 50% 50%; cursor: zoom-in; -webkit-touch-callout: none; }
.lb-img.lb-anim { transition: transform .2s ease; }
.lb.zoomed .lb-img { cursor: grab; } .lb.zoomed .lb-img:active { cursor: grabbing; }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 16px; background: linear-gradient(rgba(6,5,8,.85), rgba(6,5,8,0)); pointer-events: none; }
.lb-n { flex: 1; font: 600 13px/1 var(--mono, monospace); letter-spacing: .06em; color: #cfc8d8; }
.lb button { pointer-events: auto; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(30,27,35,.8); color: #fff; font: 400 24px/1 var(--body, sans-serif); cursor: pointer; }
.lb button:hover { background: rgba(70,62,80,.9); }
.lb button:focus-visible { outline: 2px solid #b48cff; outline-offset: 2px; }
.lb button.lb-nav { position: absolute; top: 50%; z-index: 1; margin-top: -22px; width: 44px; height: 44px; font-size: 30px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (max-width: 640px) { .lb-stage { padding: 56px 0 16px; } .lb button.lb-nav { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); margin: 0; } .lb-prev { left: 16px; } .lb-next { right: 16px; } }
.ai-box { margin-top: 14px; display: grid; gap: 8px; }
.ai-box input { height: 40px; padding: 0 12px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; }
.btn-ai { background: linear-gradient(90deg, var(--purple), var(--purple-hi)); color: #fff; }
.btn-ai:hover { background: var(--purple-hi); color: #fff; }
.btn-ai[disabled] { opacity: .6; }
.ai-result { font-size: 14px; padding: 12px 14px; border-left: 3px solid var(--purple-hi); background: var(--ink); color: var(--muted); border-radius: 0 var(--r) var(--r) 0; }
.ai-result b { color: var(--text); }
.ai-result.err { border-left-color: var(--low); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }

.f { display: grid; gap: 14px; }
.f label { display: grid; gap: 5px; font-size: 13.5px; color: var(--muted); }
.f label > span { font-weight: 600; color: #d6cfde; }
.f label small { color: var(--faint); font-size: 12px; font-weight: 400; }
.f label.check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; }
.f input:not([type=checkbox]):not([type=radio]), .f select, .f textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit;
}
.f textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--lilac); outline: none; }
.f input:disabled { opacity: .55; }
.f .ai-filled { border-color: var(--purple-hi) !important; box-shadow: 0 0 0 3px rgba(169, 42, 216, .2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: minmax(0, 1fr); } }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg.seg4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .seg.seg4 { grid-template-columns: repeat(2, 1fr); } .seg.seg4 label:nth-child(3) span { border-left: 0; } .seg.seg4 label:nth-child(n+3) span { border-top: 1px solid var(--line-strong); } }
.seg label { display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 11px 6px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--line-strong); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--purple); color: #fff; }
.seg input[value=relic]:checked + span { background: var(--bone); color: var(--ink); }
.seg input[value=pre]:checked + span { background: var(--ink); color: var(--lilac); box-shadow: inset 0 0 0 1px var(--purple); }
.seg input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: -2px; }
.grading { border-color: #5a4f66; background: linear-gradient(180deg, #1d1823, var(--surface)); }
.grade-help { font-size: 13px; color: var(--faint); min-height: 1.4em; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.checks input { accent-color: var(--purple); width: 17px; height: 17px; }
.vrows { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: 2fr 1.6fr 1fr .8fr 1fr 1.2fr auto; gap: 8px; align-items: center; }
.vrow input { min-height: 38px !important; }
.vhead { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 640px) { .vrow { grid-template-columns: 1fr 1fr; } .vhead { display: none; } }
.preview-title { font: 700 17px/1.35 var(--body); padding: 12px 14px; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); }
.preview-title small { display: block; font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase; margin-bottom: 6px; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(11,10,13,.96); border-top: 1px solid var(--line); }
.savebar .adm-wrap { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.savebar .status { margin-right: auto; font-size: 14px; color: var(--faint); }
.savebar select { height: 44px; padding: 0 10px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; }

.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.order header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.order header b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.order ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.notice-a { padding: 14px 16px; border: 1px solid var(--low); border-radius: var(--r); color: #ffd0d2; background: var(--surface); margin-top: 24px; }

/* back-office-only fields */
.backoffice { margin-top: 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: rgba(11,10,13,.5); }
.bo-tag { margin: 0 0 10px; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
/* orders */
.order header { align-items: center; }
.order-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; margin: 10px 0 6px; }
@media (max-width: 800px) { .order-grid { grid-template-columns: 1fr; } }
.olabel { margin: 0 0 6px; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.shipto { margin: 0; line-height: 1.5; }
.parcel { display: flex; gap: 10px; flex-wrap: wrap; }
.parcel label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.parcel select, .parcel input { height: 36px; padding: 0 8px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 14px; }
.parcel input { width: 70px; }
.parcel .dims { display: flex; gap: 4px; } .parcel .dims input { width: 52px; }
.otable { margin-top: 6px; font-size: 14px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; }
.oacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oacts input { height: 36px; width: 150px; padding: 0 10px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 14px; }

/* per-order money breakdown */
.stats-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .stats-5 { grid-template-columns: 1fr 1fr; } }
.order-money { display: flex; flex-direction: column; align-items: flex-end; margin-top: 12px; }
.order-money dl { display: grid; grid-template-columns: auto 150px; gap: 6px 20px; margin: 0; font-size: 14px; align-items: center; }
.order-money dt { color: var(--muted); text-align: right; }
.order-money dd { margin: 0; text-align: right; font-family: var(--mono); }
.order-money .net { border-top: 1px solid var(--line-strong); padding-top: 8px; font-size: 15px; color: var(--text); font-weight: 700; }
.postage-in { display: inline-flex; align-items: center; gap: 4px; }
.postage-in input { width: 100px; height: 34px; padding: 0 8px; text-align: right; background: var(--ink); border: 1px solid var(--purple); border-radius: var(--r); color: var(--text); font: inherit; }
.money-note { margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }

/* sales report */
.report-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--purple); border-radius: var(--r); }
.report-box > div:first-child { max-width: 520px; }
.report-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-controls select, .report-controls input { height: 36px; padding: 0 10px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 14px; color-scheme: dark; }
#rcustom { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
#rcustom[hidden] { display: none; }

/* PROFIT: green when 0 or more, red when it's a loss */
.pl { font-weight: 700; white-space: nowrap; }
.pl.up { color: var(--ok); }
.pl.down { color: var(--low); }
.stats .pl-big, .stats .pl-big .pl { font: 800 22px/1.15 var(--body); white-space: normal; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--faint); cursor: help; }
.order-money dl { grid-template-columns: auto 190px; }
.stats-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .stats-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .stats-6 { grid-template-columns: 1fr 1fr; } }

/* posted / to-pack status */
.order { border-left: 4px solid var(--purple); transition: background .2s, border-color .2s; }
.order.is-posted { border-color: rgba(127, 212, 154, .45); border-left-color: var(--ok); background: linear-gradient(90deg, rgba(127, 212, 154, .10), rgba(127, 212, 154, .03) 40%, var(--surface)); }
.status { font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; white-space: nowrap; }
.status.topack { background: var(--purple); color: #fff; }
.status.posted { background: var(--ok); color: #0b2414; }
.posted-check { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; padding: 6px 12px 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--text); user-select: none; }
.posted-check:hover { border-color: var(--ok); }
.posted-check input { width: 20px; height: 20px; accent-color: #3fa866; cursor: pointer; margin: 0; }
.order.is-posted .posted-check { border-color: var(--ok); background: rgba(127, 212, 154, .12); color: var(--ok); }

/* order item photos */
.otable td.oimg { width: 84px; padding-right: 4px; }
.otable td.oimg img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface-2); display: block; transition: transform .15s; }
.otable td.oimg a:hover img { transform: scale(1.06); border-color: var(--lilac); }
.otable td.oimg .noimg { display: grid; place-items: center; width: 72px; height: 72px; border: 1px dashed var(--line-strong); border-radius: 4px; font-size: 11px; color: var(--faint); text-align: center; }
.otable td { vertical-align: middle; }

/* compact order cards */
.order { padding: 12px 16px; margin-bottom: 10px; }
.order header { margin-bottom: 4px; }
.order .order-grid { margin: 4px 0 2px; gap: 16px; }
.order .olabel { margin-bottom: 4px; }
.order .shipto { font-size: 14px; line-height: 1.45; }
.order .parcel label { font-size: 12px; gap: 2px; }
.order .parcel select, .order .parcel input { height: 32px; }
.otable { margin-top: 4px; }
.otable th { padding: 6px 8px; }
.otable td { padding: 5px 8px; }
.otable td.oimg { width: 58px; }
.otable td.oimg img, .otable td.oimg .noimg { width: 46px; height: 46px; }
.order-bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.obar-money { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.obar-money b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.obar-money label { display: inline-flex; align-items: center; gap: 6px; }
.obar-money .postage-in input { width: 84px; height: 32px; }
.obar-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obar-acts input { height: 32px; width: 130px; padding: 0 10px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 13.5px; }
.obar-acts .btn-sm { padding: 6px 12px; }
.obar-profit { margin-left: auto; display: flex; align-items: baseline; gap: 10px; font-size: 17px; }
.obar-profit small { font: 600 11px/1 var(--mono); letter-spacing: .1em; color: var(--faint); }
@media (max-width: 800px) { .obar-profit { margin-left: 0; width: 100%; justify-content: flex-end; } }

/* members + club settings */
.mhist td { background: var(--ink); }
.mh { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 4px 0; font-size: 13.5px; color: var(--muted); }
.mh .pos { color: var(--ok); } .mh .neg { color: var(--lilac); }
.pts-chip { font: 700 12px/1 var(--mono); padding: 5px 8px; border-radius: 20px; background: rgba(253, 218, 92, .14); color: #fdda5c; border: 1px solid rgba(253, 218, 92, .45); white-space: nowrap; }
.set-rows { display: grid; gap: 8px; }
.set-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: 8px; align-items: end; }
.set-row.offer-row { grid-template-columns: 1.1fr .9fr .7fr 1.6fr 1.1fr auto auto; }
.set-row label { display: grid; gap: 4px; font-size: 12px; color: var(--faint); }
.set-row label.chk { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; color: var(--text); font-size: 13.5px; }
@media (max-width: 800px) { .set-row, .set-row.offer-row { grid-template-columns: 1fr 1fr; } }

/* sell requests */
.sreq.st-new { border-left-color: #f4bd40; }
.sreq.st-bought { border-left-color: var(--ok); } .sreq.st-declined { opacity: .65; border-left-color: var(--line-strong); }
.sreq-desc { margin: 8px 0; padding: 10px 12px; background: var(--ink); border-radius: var(--r); color: #ddd5e5; font-size: 14.5px; white-space: pre-wrap; }
.sreq-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sreq-photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-strong); }
.sreq-notes { flex: 1; min-width: 220px; height: 32px; padding: 0 10px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 13.5px; }
.sreq select { height: 32px; padding: 0 8px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; margin-left: auto; }

.jp-tick { display: flex !important; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; color: #fdda5c !important; cursor: pointer; }
.jp-tick input { width: 17px; height: 17px; accent-color: #f4bd40; }
.jp-tick small { color: var(--faint); font-weight: 400; }
.jp-tick { white-space: nowrap; }

/* phone pairing */
.phone-btn { margin-top: 10px; }
.phone-pair { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; padding: 14px; border-radius: var(--r); border: 1px solid #f4bd40; background: rgba(244, 189, 64, .06); }
.phone-pair[hidden] { display: none !important; }
.phone-pair .qr { flex: none; width: 150px; height: 150px; padding: 8px; background: #fff; border-radius: 8px; }
.phone-pair .qr svg { width: 100%; height: 100%; display: block; }
.phone-pair p { margin: 6px 0; font-size: 13.5px; color: var(--muted); } .phone-pair b { color: var(--text); }
.phone-url { font-family: var(--mono); font-size: 12px !important; color: #fdda5c !important; word-break: break-all; }
.login-box { max-width: 380px; margin: 60px auto; } .login-box h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.login-box p { color: var(--muted); }

.drafts-banner { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid #f4bd40; background: rgba(244, 189, 64, .08); }
.drafts-banner b { color: #fdda5c; } .drafts-banner span { color: var(--muted); font-size: 14px; flex: 1; min-width: 220px; }
.draft-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: rgba(244, 189, 64, .08); border-left: 3px solid #f4bd40; font-size: 13.5px; color: var(--muted); }
.draft-note b { color: #fdda5c; }
.phone-pair + .phone-pair { margin-top: 12px; }

/* price check */
.price-check { margin-top: 14px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: rgba(11,10,13,.5); }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pc-head span { flex: 1 1 220px; font-size: 13px; color: var(--muted); }
#pc-out:not(:empty) { margin-top: 12px; }
.pc-est { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 26px; padding: 12px 14px; border-radius: var(--r); background: var(--ink); border-left: 3px solid #dca33c; }
.pc-est small { display: block; font-size: 12px; color: var(--muted); }
.pc-est b { font-size: 22px; }
.pc-est b.gold { color: #f3c25f; }
.pc-est .btn { margin-left: auto; }
.pc-meta, .pc-discogs, .pc-why, .pc-fine, .pc-none { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.pc-meta .hi { color: var(--low); } .pc-meta .lo { color: #f3c25f; }
.pc-why b, .pc-discogs b { color: var(--text); }
.pc-fine { font-size: 12px; }
.price-check h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.price-check h4 small { color: var(--muted); }
.pc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pc-table td { padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.pc-table td.num { text-align: right; white-space: nowrap; font-weight: 700; }
.pc-table small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.pc-table tr.other { opacity: .6; }
.pc-table em { font-style: normal; font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
.pc-table a, .pc-discogs a { color: #f3c25f; }
.pc-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); }
.pc-tag.sold { border-color: #2f9e5b; color: #6fd39a; }

.dg-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--ink); font-size: 13.5px; color: var(--muted); }
.dg-box p { margin: 6px 0 0; } .dg-box b { color: var(--text); }
.dg-top a { color: #f3c25f; font-weight: 700; } .dg-top small { display: block; margin-top: 2px; }
.dg-grades { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dg-grades span { display: flex; flex-direction: column; min-width: 64px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); font-weight: 700; }
.dg-grades span small { font-weight: 400; color: var(--muted); font-size: 11px; }
.dg-grades span.on { border-color: #dca33c; background: rgba(220,163,60,.14); color: #f3c25f; }
.dg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .dg-acts select { flex: 1 1 260px; }

.pc-est .op { font-size: 20px; color: var(--muted); align-self: center; }
.dg-grades span em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.dg-list { margin-top: 14px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r); }
.dg-list .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dg-list .row2 { margin-top: 12px; }
.dg-state { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.dg-state a { color: #f3c25f; } .dg-state .ok { color: #6fd39a; } .dg-state .bad { color: var(--low); }
.dg-state .btn { margin-left: 8px; }
.pill.dg { border: 1px solid #dca33c; color: #f3c25f; }
.pill.sh { border: 1px solid #5fb36a; color: #8fd99a; }


/* header drop-down menu (Finance) */
.nav-drop { position: relative; }
.nav-drop-btn { padding: 8px 12px; border: 0; border-radius: var(--r); background: none; color: var(--muted); font: 600 16px/1.6 var(--body); cursor: pointer; }
.nav-drop-btn:hover, .nav-drop-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.nav-drop-btn[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--purple); }
.nav-drop-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 300px; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: grid; }
.nav-drop-menu[hidden] { display: none; }
.adm-nav .nav-drop-menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 7px; color: #16131a; text-decoration: none; }
.adm-nav .nav-drop-menu a:hover { background: #f3eef8; color: #16131a; }
.nav-drop-menu b { font-size: 15px; } .nav-drop-menu small { font-size: 12.5px; color: #6e6678; font-weight: 400; }
@media (max-width: 600px) { .nav-drop-menu { position: fixed; left: 12px; right: 12px; top: auto; width: auto; } }

/* finance pages are white: same layout and components, light colours (the header bar stays in the shop's branding) */
body.page-light { background: #fff; }
body.page-light #view, body.page-light .savebar, body.page-light .toast {
  --ink: #ffffff; --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f2f7; --line: #e7e3ec; --line-strong: #cfc8d8;
  --text: #16131a; --muted: #4f4859; --faint: #6e6678; --lilac: #7a10a3; --bone: #16131a;
  --ok: #17803a; --warn: #9a5b00; --low: #c62828; color: var(--text);
}
body.page-light #view a:not(.btn) { color: var(--lilac); }
body.page-light .f label > span, body.page-light .lbl { color: #2b2531; }
body.page-light .panel { box-shadow: 0 1px 2px rgba(22,19,26,.04); }
body.page-light .savebar { background: rgba(250,245,253,.98); border-top: 3px solid var(--purple); box-shadow: 0 -6px 20px rgba(22,19,26,.10); } /* tinted with a purple edge so the Save bar stands out from the white page */
body.page-light .toast { background: #16131a; color: #fff; }
body.page-light .ai-result { background: #f7f2fb; }
body.page-light .btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
body.page-light .seg input:checked + span { color: #fff; }
body.page-light .report-controls select, body.page-light .report-controls input { color-scheme: light; }
body.page-light input[type=date] { color-scheme: light; }
/* every back office page is white now (listing editor, orders, sell requests, members, settings, sign-in):
   light form controls, and light versions of the colours that were made for the dark back office */
body.page-light #view, body.page-light .savebar { color-scheme: light; }
body.page-light .seg input[value=relic]:checked + span { background: #ece6dc; color: #16131a; box-shadow: inset 0 0 0 1px #b8ab97; }
body.page-light .seg input[value=pre]:checked + span { background: #f7f2fb; color: #5c0d80; box-shadow: inset 0 0 0 2px var(--purple); }
body.page-light .seg input[value=draft]:checked + span { color: var(--text); }
body.page-light .grading { border-color: var(--line); background: linear-gradient(180deg, #f7f2fb, #fff 140px); }
body.page-light .backoffice, body.page-light .price-check { background: #faf8fc; }
body.page-light .dg-box, body.page-light .pc-est { border: 1px solid var(--line); }
body.page-light .pc-est { border-left: 3px solid #dca33c; }
body.page-light .ph .acts button { color: #fff; }
body.page-light .ph .acts button:hover { background: rgba(255,255,255,.18); }
body.page-light .jp-tick, body.page-light .phone-url { color: #8a5a00 !important; }
body.page-light .draft-note b, body.page-light .pc-est b.gold, body.page-light .pc-meta .lo { color: #8a5a00; }
body.page-light .pc-tag.sold { border-color: var(--ok); color: var(--ok); }
body.page-light .dg-state .ok { color: var(--ok); }
body.page-light .dg-grades span.on { border-color: #b7791f; background: #fff4d6; color: #8a5a00; }
body.page-light .notice-a { color: #a01d1d; background: #fdecec; border-color: #f1a7a7; }
body.page-light .sreq-desc { background: var(--surface-2); color: var(--text); }
body.page-light .pts-chip { background: #fff4d6; color: #8a5a00; border-color: #e0a526; }
body.page-light .status.posted { color: #fff; }
body.page-light .order.is-posted { border-color: #b9e2c6; border-left-color: var(--ok); background: linear-gradient(90deg, #eef8f1, #f8fcf9 40%, var(--surface)); }
body.page-light .mhist td { background: var(--surface-2); }

/* finance layout */
.fin-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.fin-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; } /* wraps onto a second line rather than hiding pages off the edge */
.fin-tabs a { padding: 9px 13px; text-decoration: none; color: var(--muted) !important; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fin-tabs a:hover { color: var(--text) !important; }
.fin-tabs a[aria-current="page"] { color: var(--text) !important; border-bottom-color: var(--purple); }
.fin-sub { font-size: 13px; color: var(--muted); }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fin-grid > div > .panel + .panel { margin-top: 16px; }
.fin-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.fin-three .panel + .panel, .fin-grid .panel + .panel { margin-top: 0; }
#fbody > .panel + .panel, #fbody > .panel { margin-bottom: 16px; }
@media (max-width: 900px) { .fin-grid, .fin-three { grid-template-columns: minmax(0, 1fr); } }
.fin-h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 17px; margin: 28px 0 12px; }
.fin-h2 small { font: 400 13px/1 var(--body); text-transform: none; color: var(--faint); margin-left: 6px; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fin-table td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.fin-table td:not(:first-child) { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 12px; }
.fin-table td small { color: var(--faint); font-size: 12px; margin-left: 4px; font-family: var(--body); }
.fin-table tr.h td { padding-top: 14px; font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: left; }
.fin-table tr.i td:first-child { padding-left: 14px; color: var(--muted); }
.fin-table tr.dim td { color: var(--faint) !important; }
.fin-table tr.t td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.fin-table tr.big td { font-size: 17px; border-top: 2px solid var(--text); border-bottom: 0; padding-top: 10px; }
.fin-table thead td { font: 600 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding-bottom: 8px; }
.fin-note, .fin-hint { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--faint); }
.fin-hint { margin: 6px 0 0; color: var(--warn); }
.fin-hint:empty { display: none; }
.fin-warn { margin: 6px 0 0; font-size: 13.5px; color: var(--warn); grid-column: 1 / -1; }
.fin-checks { padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--r); background: #fffaf0; font-size: 14px; }
.fin-checks b { color: var(--warn); }
.fin-checks ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.fin-scroll { overflow-x: auto; }
.fin-months td, .fin-months th { white-space: nowrap; }
.ltable .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.pill.inc { border: 1px solid var(--ok); color: var(--ok); }
.pill.exp { border: 1px solid var(--line-strong); color: var(--muted); }
.amt-in { color: var(--ok); }
.fin-ltot { text-align: right; padding: 12px 8px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.fin-sale { font-size: 15px; color: var(--muted); margin: 0; }
.eq-ok { color: var(--ok); font-weight: 700; } .eq-bad { color: var(--low); font-weight: 700; }
.chk-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.toolbar-a .chk-inline input { min-width: 0; flex: none; width: 18px; height: 18px; padding: 0; accent-color: var(--purple); }

/* Rosetta Stone dashboard */
.equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 16px; }
.equation > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.equation > div:nth-of-type(1) { border-top: 4px solid #1f6feb; } .equation > div:nth-of-type(2) { border-top: 4px solid #c2410c; } .equation > div:nth-of-type(3) { border-top: 4px solid var(--purple); }
.equation span { font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.equation b { display: block; font: 400 clamp(22px, 3vw, 30px)/1.2 var(--display); margin: 6px 0 2px; }
.equation small { color: var(--muted); font-size: 13px; }
.equation i { font: 400 28px/1 var(--display); font-style: normal; color: var(--faint); }
.equation p { grid-column: 1 / -1; margin: 0; font-size: 14px; }
@media (max-width: 700px) { .equation { grid-template-columns: 1fr; } .equation i { text-align: center; } }
.rosetta { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.rosetta th, .rosetta td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.rosetta td { font-family: var(--mono); }
.rosetta th[scope=row] { text-align: left; font-weight: 600; }
.rosetta thead th { font: 600 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rosetta thead tr:first-child th { font-size: 12px; color: var(--text); border-bottom: 2px solid currentColor; }
.rosetta .g-a { background: rgba(31,111,235,.05); } .rosetta thead .g-a { color: #1f6feb; }
.rosetta .g-l { background: rgba(194,65,12,.05); } .rosetta thead .g-l { color: #c2410c; }
.rosetta .g-e { background: rgba(144,20,188,.05); } .rosetta thead .g-e { color: var(--purple); }
.rosetta tr.edge th, .rosetta tr.edge td { font-weight: 700; background-color: var(--surface-2); }
.rosetta tr.end th, .rosetta tr.end td { border-top: 2px solid var(--text); }
.rosetta td.ok { color: var(--ok); text-align: center; background: none; }
.stmt { text-decoration: none; color: inherit !important; display: block; transition: border-color .15s, box-shadow .15s; }
.stmt:hover { border-color: var(--purple); box-shadow: 0 4px 18px rgba(144,20,188,.1); }
.stmt .more { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--lilac); }
.ratios { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ratio { padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--r); }
.ratio.good { border-left-color: var(--ok); } .ratio.watch { border-left-color: #d08a00; } .ratio.risk { border-left-color: var(--low); }
.ratio .r-name { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ratio b { display: block; font: 800 24px/1.2 var(--body); margin: 6px 0; }
.ratio.good b { color: var(--ok); } .ratio.watch b { color: #9a5b00; } .ratio.risk b { color: var(--low); }
.ratio p { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); line-height: 1.45; } .ratio small { font-size: 12px; color: var(--faint); }
.drivers { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.drivers div { padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); }
.drivers b { display: block; font: 800 22px/1.2 var(--body); } .drivers span { display: block; font-weight: 600; font-size: 14px; }
.drivers small { color: var(--faint); font-size: 12.5px; }

/* receipts */
.snap { display: grid; justify-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--purple); border-radius: 12px; background: #faf5fd; text-align: center; cursor: pointer; transition: background .15s; }
.snap:hover, .snap.over { background: #f3e8fa; }
.snap-icon { font-size: 38px; line-height: 1; } .snap b { font-size: 19px; } .snap small { color: var(--muted); }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rcard { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit !important; }
.rcard:hover { border-color: var(--purple); }
.rthumb { width: 76px; height: 96px; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--faint); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rinfo { display: grid; align-content: start; gap: 2px; min-width: 0; } .rinfo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rinfo span { font-size: 13px; color: var(--muted); } .rinfo strong { font-family: var(--mono); font-size: 16px; }
.rpills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.receipt-prev { margin-top: 12px; display: grid; gap: 6px; justify-items: start; }
.receipt-prev img { max-width: 100%; max-height: 560px; border: 1px solid var(--line-strong); border-radius: var(--r); display: block; }
.receipt-pdf { display: inline-block; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); text-decoration: none; }
.lbl { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg3 span { font-size: 13.5px; padding: 10px 6px; }
.lines-head, .line { display: grid; grid-template-columns: 96px minmax(0, 2fr) minmax(0, 1.4fr) 92px 28px; gap: 8px; align-items: center; }
.lines-head.with-gst, #lines.with-gst .line { grid-template-columns: 96px minmax(0, 2fr) minmax(0, 1.4fr) 92px 80px 28px; }
.lines-head { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
#lines { display: grid; gap: 8px; }
.line input, .line select { height: 38px; padding: 0 9px; background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--text); font: inherit; font-size: 14px; min-width: 0; }
.line input.num { text-align: right; font-family: var(--mono); }
.line .biz { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ok); cursor: pointer; }
.line .biz input { width: 18px; height: 18px; accent-color: var(--purple); }
.line.personal input:not([type=checkbox]), .line.personal select { opacity: .55; text-decoration: line-through; }
.line.personal .biz { color: var(--faint); }
.line .ai-filled { border-color: var(--purple-hi) !important; box-shadow: 0 0 0 3px rgba(169, 42, 216, .15); }
@media (max-width: 760px) {
  .lines-head { display: none; }
  .line, #lines.with-gst .line { grid-template-columns: 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); }
  .line .biz { grid-column: 1; } .line [data-del] { grid-column: 2; justify-self: end; grid-row: 1; }
  .line input[data-k=description] { grid-column: 1 / -1; } .line select { grid-column: 1 / -1; }
}
.totals { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
#sums { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 16px; }
#sums div span { display: block; font-size: 12.5px; color: var(--faint); } #sums div b { font-family: var(--mono); font-size: 16px; }
@media (max-width: 600px) { .totals { grid-template-columns: 1fr; } }

/* expenses & balance sheet */
.catchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.catchip { display: grid; text-align: left; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.catchip:hover { border-color: var(--purple); } .catchip span { font-size: 12.5px; color: var(--muted); } .catchip b { font-family: var(--mono); }
.ltable tr.is-personal td { color: var(--faint); }
.bills { border-left: 4px solid #d08a00; }
.fin-table.bs td:nth-child(2) { color: var(--faint); }

/* print the finance pages as clean statements */
@media print {
  body.page-light .adm-head, body.page-light .fin-tabs, body.page-light .report-controls, body.page-light .fin-acts, body.page-light .savebar, body.page-light .btn { display: none !important; }
  body.page-light .panel { break-inside: avoid; box-shadow: none; }
}

/* listings pages on white: brighten the colours made for the dark back office */
body.page-light .drafts-banner { background: #fff8e8; border-color: #e0a526; }
body.page-light .drafts-banner b { color: #8a5a00; }
body.page-light .pill.dg { border-color: #b7791f; color: #8a5a00; }
body.page-light .pill.sh { border-color: #2e7d3a; color: #1f6b2b; }
body.page-light .pill.relic { background: #ece6dc; color: #16131a; }
body.page-light .pill.pre { background: #fff; color: var(--purple); }
body.page-light .ltable .th { background: #f4f2f7; }
body.page-light .stepper.zero span { color: var(--low); }
.mono-s { font-family: var(--mono); font-size: 13px; }
.src-line, .sub-line { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; font-family: var(--body) !important; }
/* where a listing is for sale */
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ch { display: inline-block; font: 600 11px/1 var(--mono); padding: 5px 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--faint); background: none; text-decoration: none !important; white-space: nowrap; cursor: default; }
button.ch, a.ch { cursor: pointer; }
.ch.on.web { background: var(--purple); border-color: var(--purple); color: #fff !important; }
.ch.on.ebay { background: #fff4d6; border-color: #e5a600; color: #6b4a00 !important; }
.ch.on.dg { background: #16131a; border-color: #16131a; color: #fff !important; }
.ch.on.instore, .ch.on.other { background: var(--surface-2); color: var(--text) !important; }
.ch.draft { border-style: dashed; color: var(--muted) !important; }
.ch.add { border-style: dashed; color: var(--faint) !important; }
.ch.add:hover { border-color: var(--purple); color: var(--purple) !important; }
.ch.off { text-decoration: line-through !important; }
/* stock overview */
.ov-advice, .ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.ov-grid .panel + .panel, .ov-advice .panel + .panel { margin-top: 0; }
@media (max-width: 900px) { .ov-advice, .ov-grid { grid-template-columns: minmax(0, 1fr); } }
#view > .panel { margin-bottom: 16px; }
.ov-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ov-list small { color: var(--faint); }
.sig { display: inline-block; font: 700 11px/1 var(--mono); padding: 4px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.sig.buy { background: #e5f6ea; color: #17803a; } .sig.restock { background: #fde8e8; color: #c62828; } .sig.slow { background: #fff4d6; color: #8a5a00; }
.ltable.ov td, .ltable.ov th { padding: 8px; }
.matrix td.zero { color: var(--line-strong); }
/* sold items */
.ltable.sold td { vertical-align: top; }
.ltable.sold .th img { width: 100%; height: 100%; object-fit: cover; }
/* suppliers & sources */
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.scard { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit !important; background: var(--surface); }
.scard:hover { border-color: var(--purple); box-shadow: 0 4px 18px rgba(144,20,188,.08); }
.scard.inactive { opacity: .6; }
.scard-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; } .scard-top b { font-size: 17px; }
.scard-line { margin: 0; font-size: 13.5px; color: var(--muted); }
.scard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 2px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.scard-stats b { display: block; font-family: var(--mono); font-size: 15px; } .scard-stats span { font-size: 12px; color: var(--faint); }
.stars { color: #e5a600; letter-spacing: 1px; white-space: nowrap; } .stars span { color: var(--line-strong); }
.contact-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ✦ Ask AI: the business advisor panel (always white) */
.ask-ai { margin-left: auto; padding: 8px 14px; border: 0; border-radius: 20px; background: linear-gradient(90deg, var(--purple), var(--purple-hi)); color: #fff; font: 700 14px/1 var(--body); cursor: pointer; white-space: nowrap; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.ask-ai:hover { filter: brightness(1.1); }
.ask-ai + .ai-pill { margin-left: 8px; }
.advisor { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column; background: #fff; color: #16131a; box-shadow: -12px 0 40px rgba(0,0,0,.35); font-size: 15px; }
.advisor[hidden] { display: none; }
.advisor header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid #e7e3ec; background: #faf7fc; }
.advisor header div { flex: 1; min-width: 0; } .advisor header b { display: block; font-size: 16px; color: #5c0d80; } .advisor header small { font-size: 12px; color: #6e6678; }
.adv-new, .adv-x { border: 1px solid #cfc8d8; background: #fff; color: #16131a; border-radius: 6px; padding: 6px 10px; font: 600 13px/1 var(--body); cursor: pointer; }
.adv-x { padding: 6px 9px; }
.adv-body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 12px; align-content: start; }
.adv-intro p { margin: 0 0 12px; color: #4f4859; line-height: 1.5; }
.adv-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adv-starters button { display: flex; gap: 8px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid #e7e3ec; border-radius: 8px; background: #fff; color: #16131a; font: 600 13.5px/1.3 var(--body); cursor: pointer; }
.adv-starters button:hover { border-color: #9014bc; background: #faf5fd; }
.adv-msg { padding: 12px 14px; border-radius: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.adv-msg.you { justify-self: end; max-width: 85%; background: #9014bc; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.adv-msg.ai { background: #f6f3f9; border-bottom-left-radius: 4px; }
.adv-msg.ai h4 { margin: 10px 0 4px; font-size: 15px; color: #5c0d80; } .adv-msg.ai h4:first-child { margin-top: 0; }
.adv-msg.ai p { margin: 0 0 8px; } .adv-msg.ai p:last-child, .adv-msg.ai ul:last-child, .adv-msg.ai ol:last-child { margin-bottom: 0; }
.adv-msg.ai ul, .adv-msg.ai ol { margin: 0 0 8px; padding-left: 20px; } .adv-msg.ai li { margin: 3px 0; }
.adv-msg.ai code { font-family: var(--mono); font-size: 13px; background: #ece6f2; padding: 1px 4px; border-radius: 3px; }
.adv-msg.ai hr { border: 0; border-top: 1px solid #e7e3ec; margin: 10px 0; }
.adv-table { overflow-x: auto; margin: 6px 0 8px; } .adv-table table { border-collapse: collapse; font-size: 13.5px; }
.adv-table th, .adv-table td { padding: 5px 8px; border-bottom: 1px solid #e0d9e7; text-align: left; vertical-align: top; } .adv-table th { font-weight: 700; }
.adv-msg.thinking { display: flex; gap: 10px; align-items: center; color: #6e6678; }
.adv-msg.err { background: #fdecec; color: #a01d1d; }
.adv-more summary { cursor: pointer; font-size: 13px; color: #7a10a3; font-weight: 600; margin-bottom: 8px; }
.adv-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #e7e3ec; background: #fff; }
.adv-form textarea { flex: 1; resize: none; padding: 10px 12px; border: 1px solid #cfc8d8; border-radius: 8px; font: inherit; color: #16131a; background: #fff; }
.adv-form textarea:focus { outline: none; border-color: #9014bc; }
@media (max-width: 520px) { .adv-starters { grid-template-columns: 1fr; } }

/* growth plan */
.grow3 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1.1fr; gap: 10px; align-items: center; }
.grow3 > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; } .grow3 > div.tot { border-color: var(--purple); background: #faf5fd; }
.grow3 span, .grow-out span { font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.grow3 b { display: block; font: 800 24px/1.2 var(--body); margin: 6px 0 2px; } .grow3 small { font-size: 12.5px; color: var(--muted); }
.grow3 i { font: 400 24px/1 var(--display); font-style: normal; color: var(--faint); }
@media (max-width: 900px) { .grow3 { grid-template-columns: 1fr 1fr; } .grow3 i { display: none; } }
.grow-targets { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.grow-targets label { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; }
.presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .presets .lbl { margin: 0 4px 0 0; }
.pct { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pct input { width: 72px; height: 36px; padding: 0 8px; text-align: right; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--ink); color: var(--text); font: inherit; }
.grow-out { margin-left: auto; text-align: right; } .grow-out b { display: block; font: 800 26px/1.2 var(--body); color: var(--ok); } .grow-out small { color: var(--muted); font-size: 12.5px; }
.forces { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.force { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.force-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; } .force-top b { font-size: 14px; }
.score { display: inline-flex; align-items: center; gap: 6px; flex: none; } .score input { width: 110px; accent-color: var(--purple); }
.score output { width: 22px; text-align: right; font: 800 16px/1 var(--body); color: var(--purple); }
.force > input, .act input, .act select { height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--ink); color: var(--text); font: inherit; font-size: 14px; min-width: 0; }
.act { display: grid; grid-template-columns: 22px minmax(0, 1fr) 96px 90px 150px 24px; gap: 8px; align-items: center; margin-bottom: 8px; }
.act.head { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.act input[type=checkbox] { width: 18px; height: 18px; padding: 0; border: 0; background: none; appearance: auto; accent-color: var(--ok); }
.act.done input[data-a=text] { text-decoration: line-through; color: var(--faint); }
.act.late input[type=date] { border-color: var(--low); color: var(--low); }
@media (max-width: 760px) { .act { grid-template-columns: 22px 1fr 1fr; } .act.head { display: none; } .act input[data-a=text] { grid-column: 2 / -1; } .act [data-adel] { justify-self: end; } }

/* phone layout (last, so it overrides the desktop rules above) */
@media (max-width: 760px) {
  .adm-head { padding-top: env(safe-area-inset-top); }
  .adm-head-row { flex-wrap: nowrap; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .adm-nav, .ai-pill { display: none; }
  .adm-head .brand img { width: 36px; height: 36px; }
  .ask-ai { padding: 9px 14px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: rgba(11,10,13,.97); border-top: 1px solid #2f2a36; padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; border: 0; background: none; color: #b3abbd; font: 600 11px/1.1 var(--body); text-decoration: none; cursor: pointer; }
  .tabbar span { font-size: 21px; line-height: 1; filter: grayscale(.4); }
  .tabbar [aria-current="page"], .tabbar [aria-expanded="true"] { color: #fff; } .tabbar [aria-current="page"] span { filter: none; }
  .tabbar [data-tab="capture"] span { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: linear-gradient(180deg, #a92ad8, #9014bc); box-shadow: 0 4px 14px rgba(144,20,188,.5); filter: none; font-size: 20px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .savebar { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .app-hint { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #faf5fd; color: #16131a; font-size: 14px; border-bottom: 1px solid #e7dcef; }
  .app-hint span { flex: 1; } .app-hint a { color: #7a10a3; font-weight: 700; } .app-hint button { border: 0; background: none; font-size: 15px; color: #6e6678; }
  .advisor { bottom: 0; width: 100vw; padding-top: env(safe-area-inset-top); }
}

/* the square 1:1 camera (phones) */
html.sqcam-open, html.sqcam-open body { overflow: hidden; }
.sqcam { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)); background: #000; color: #fff; }
.sqcam-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font: 600 14px/1 var(--body); color: #d6cfde; }
.sqcam-done { padding: 9px 18px; border: 0; border-radius: 20px; background: #fff; color: #16131a; font: 800 15px/1 var(--body); }
.sqcam-view { position: relative; width: min(100%, calc(100vh - 290px)); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #111; }
.sqcam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sqcam-grid { position: absolute; inset: 0; pointer-events: none; border: 2px solid rgba(244,189,64,.85); border-radius: 14px;
  background: linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)) 33.3% 0 / 1px 100% no-repeat, linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)) 66.6% 0 / 1px 100% no-repeat,
              linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)) 0 33.3% / 100% 1px no-repeat, linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2)) 0 66.6% / 100% 1px no-repeat; }
.sqcam-msg { position: absolute; inset: auto 12px 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(11,10,13,.85); font-size: 14px; line-height: 1.45; }
.sqcam-msg[hidden] { display: none; }
.sqcam.flash .sqcam-view::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .65; }
.sqcam-strip { width: 100%; min-height: 56px; display: flex; gap: 6px; overflow-x: auto; }
.sqcam-thumb { position: relative; flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid #4a4352; }
.sqcam-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sqcam-thumb.busy img { opacity: .5; } .sqcam-thumb.ok { border-color: #7fd49a; } .sqcam-thumb.bad { border-color: #ff8a8f; }
.sqcam-bar { width: 100%; max-width: 420px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.sqcam-side { justify-self: center; width: 50px; height: 50px; border-radius: 50%; border: 1px solid #4a4352; background: #1f1b24; color: #fff; font-size: 22px; }
.sqcam-shutter { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: linear-gradient(180deg, #fdda5c, #d39724); box-shadow: 0 0 0 3px #000, 0 6px 20px rgba(211,151,36,.4); }
.sqcam-shutter:active { transform: scale(.94); } .sqcam-shutter:disabled { opacity: .4; }
.sqcam-tip { margin: 0; max-width: 420px; text-align: center; font-size: 13px; color: #b3abbd; }

/* listing editor: Live/Draft on the page, and a plain save button at the bottom (no fixed bar) */
.seg.seg2 { grid-template-columns: 1fr 1fr; }
.seg input[value=draft]:checked + span { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ed-save { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ed-save .btn { padding: 15px 30px; font-size: 16px; }
.ed-save span { flex: 1; min-width: 200px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) { .ed-save .btn { width: 100%; } }

/* phone: Home button in the header (all listings & drafts) */
.home-btn { display: none; }
@media (max-width: 760px) {
  .adm-head .home-btn { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 8px 13px; border: 1px solid #4a4352; border-radius: 20px; color: #f2ede6; font: 700 14px/1 var(--body); text-decoration: none; white-space: nowrap; }
  .adm-head .home-btn span { font-size: 17px; line-height: 1; }
  .adm-head .home-btn + .ask-ai { margin-left: 0; }
}

/* All listings: Make live / Back to draft above Edit · View · Delete, so the column stays narrow */
.ls-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ls-acts .btn-sm { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.ls-links { display: flex; gap: 10px; white-space: nowrap; }
@media (max-width: 1000px) { .ltable.cards .hide-sm { display: none; } } /* every column needs about 930px: narrower windows drop SKU, type, grade and profit */

/* phone: listings as cards (photo · title · price & stock · where it's listed · Edit View Delete), so nothing runs off the screen */
.c-lbl { display: none; }
@media (max-width: 760px) {
  .ltable.cards, .ltable.cards tbody { display: block; width: 100%; }
  .ltable.cards thead { display: none; }
  .ltable.cards tr { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "th t t" "th price stock" "th ch ch" "th acts acts"; gap: 6px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ltable.cards tr:hover td { background: none; }
  .ltable.cards td { display: block; padding: 0; border: 0; min-width: 0; }
  .ltable.cards td.hide-sm { display: none; }
  .ltable.cards .c-th { grid-area: th; align-self: start; } .ltable.cards .c-th .th { width: 64px; height: 64px; }
  .ltable.cards .c-t { grid-area: t; } .ltable.cards .c-t b { overflow-wrap: anywhere; }
  .ltable.cards .c-price { grid-area: price; text-align: left; font-weight: 700; }
  .ltable.cards .c-stock { grid-area: stock; justify-self: end; }
  .ltable.cards .c-ch { grid-area: ch; } .ltable.cards .c-ch:empty { display: none; }
  .ltable.cards .c-acts { grid-area: acts; white-space: normal !important; display: flex; gap: 4px 14px; flex-wrap: wrap; }
  .ltable.cards .c-acts .link-btn { padding: 6px 0; font-size: 15px; }
  .ltable.cards .ls-acts { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .ltable.cards .ls-links { gap: 14px; }
  .ltable.cards .c-lbl { display: inline; color: var(--faint); font-family: var(--body); font-size: 13px; }
  .ltable.cards td.empty { grid-column: 1 / -1; }
  .ltable.cards .stepper button { width: 38px; height: 34px; }
}

/* tables that are wider than a phone scroll sideways inside their own box (the page stays put) */
.tscroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  .tscroll > table, .fin-scroll > table { min-width: 100%; }
  .tscroll .ltable th, .tscroll .ltable td { white-space: nowrap; }
  .tscroll .ltable td.t { white-space: normal; min-width: 180px; }
}

/* All listings: draft (red), live (green), live but needs attention (orange) */
.ltable tr.ls-draft > td:first-child { box-shadow: inset 4px 0 0 #c62828; }
.ltable tr.ls-live > td:first-child { box-shadow: inset 4px 0 0 #17803a; }
.ltable tr.ls-attn > td:first-child { box-shadow: inset 4px 0 0 #e07b00; }
.ltable tr.ls-draft > td { background: rgba(198,40,40,.05); }
.ltable tr.ls-live > td { background: rgba(23,128,58,.04); }
.ltable tr.ls-attn > td { background: rgba(224,123,0,.07); }
.ltable tr.ls-draft .c-t > b { color: #b42318; }
.ltable tr.ls-live .c-t > b { color: #146c31; }
.ltable tr.ls-attn .c-t > b { color: #a65400; }
.pill.st-draft { background: #c62828; color: #fff; }
.pill.st-live { background: #17803a; color: #fff; }
.pill.st-attn { background: #e07b00; color: #fff; }
.pill.st-issue { border: 1px solid #e07b00; color: #a65400; background: #fff7ed; text-transform: none; letter-spacing: 0; white-space: normal; line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; } /* a long Discogs error wraps instead of widening the table */
.ls-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.ls-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ls-key .k-draft::before { background: #c62828; } .ls-key .k-live::before { background: #17803a; } .ls-key .k-attn::before { background: #e07b00; }
@media (max-width: 760px) {
  .ltable.cards tr.ls-draft, .ltable.cards tr.ls-live, .ltable.cards tr.ls-attn { padding-left: 10px; padding-right: 8px; border-radius: 8px; margin-bottom: 8px; border-bottom: 0; }
  .ltable.cards tr.ls-draft { background: rgba(198,40,40,.06); box-shadow: inset 4px 0 0 #c62828; }
  .ltable.cards tr.ls-live { background: rgba(23,128,58,.05); box-shadow: inset 4px 0 0 #17803a; }
  .ltable.cards tr.ls-attn { background: rgba(224,123,0,.08); box-shadow: inset 4px 0 0 #e07b00; }
  .ltable.cards tr > td:first-child { box-shadow: none; }
  .ltable.cards tr > td { background: none; }
}

/* finance: start here */
.gflow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gnode { flex: 1 1 160px; display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit !important; background: var(--surface); }
.gnode:hover { border-color: var(--purple); } .gnode.main { border: 2px solid var(--purple); background: #faf5fd; }
.gnode b { font-size: 16px; } .gnode span { font-size: 13px; color: var(--muted); }
.gflow i { font: 400 22px/1 var(--body); font-style: normal; color: var(--purple); }
.glink { font-size: 12.5px; color: var(--muted); max-width: 120px; text-align: center; line-height: 1.35; }
@media (max-width: 900px) { .gflow { flex-direction: column; align-items: stretch; } .gflow i { transform: rotate(90deg); align-self: center; } .glink { max-width: none; } .gnode { flex: none; } }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; margin-top: 16px; }
.gcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit !important; transition: border-color .15s, box-shadow .15s; }
.gcard:hover { border-color: var(--purple); box-shadow: 0 6px 22px rgba(144,20,188,.1); }
.gcard-top { display: flex; gap: 12px; align-items: flex-start; } .gicon { font-size: 26px; line-height: 1; }
.gcard-top b { display: block; font: 400 18px/1.2 var(--display); text-transform: uppercase; } .gq { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--purple); }
.gcard ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.gwatch { margin: 0; font-size: 13.5px; color: var(--muted); padding: 8px 10px; border-radius: 6px; background: #fffaf0; } .gwatch b { color: #8a5a00; }
.gfig { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14.5px; } .gfig b { font-family: var(--mono); }
.gopen { font-size: 13px; font-weight: 700; color: var(--lilac); }
.groutine { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; color: var(--muted); } .groutine b { color: var(--text); }
.gloss { margin: 0; display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 14px; font-size: 14px; }
.gloss dt { font-weight: 700; } .gloss dd { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .gloss { grid-template-columns: 1fr; gap: 2px; } .gloss dd { margin-bottom: 8px; } }

/* growth plan: the 7 Forces as cards, one force open at a time */
.fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.fcard { position: relative; display: grid; align-content: start; gap: 6px; padding: 16px; text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fcard:hover { border-color: var(--purple); box-shadow: 0 6px 20px rgba(144,20,188,.1); }
.fcard.low { border-top-color: #c62828; } .fcard.mid { border-top-color: #d08a00; } .fcard.high { border-top-color: #17803a; }
.fnum { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--purple); color: #fff; font: 800 14px/1 var(--body); }
.fcard b { font-size: 15.5px; line-height: 1.3; }
.fscore { font: 800 20px/1.2 var(--body); } .fcard.low .fscore { color: #c62828; } .fcard.mid .fscore { color: #9a5b00; } .fcard.high .fscore { color: #17803a; } .fcard.none .fscore { color: var(--faint); font-size: 15px; }
.fcard small { font-size: 12.5px; color: var(--muted); }
.fgo { font-size: 13px; font-weight: 700; color: var(--lilac); }
.fdetail { display: grid; gap: 16px; }
.fd-nav, .fd-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fd-title { display: flex; align-items: center; gap: 10px; margin: 0; font: 400 clamp(19px, 2.4vw, 24px)/1.2 var(--display); text-transform: uppercase; }
.fd-title .fnum { flex: none; width: 34px; height: 34px; font-size: 16px; }
.fd-about { margin: -6px 0 0; color: var(--muted); max-width: 75ch; line-height: 1.55; }
.fd-score { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: end; padding: 14px; border-radius: 10px; background: var(--surface-2); }
.fd-score .score input { width: 180px; } .fd-score .score output { font-size: 20px; width: 28px; }
.fd-score input[data-note] { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; color: var(--text); font: inherit; }
@media (max-width: 600px) { .fd-score { grid-template-columns: 1fr; } .fd-score .score input { width: 100%; } }
.fd-stage { display: grid; gap: 8px; }
.fd-qs textarea { line-height: 1.5; }
.fd-acts { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.fd-alist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; } .fd-alist li.done { color: var(--faint); text-decoration: line-through; } .fd-alist small { color: var(--faint); }
.fd-add { display: grid; grid-template-columns: minmax(0, 1fr) 100px 150px auto; gap: 8px; }
.fd-add input { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; color: var(--text); font: inherit; font-size: 14px; min-width: 0; }
@media (max-width: 600px) { .fd-add { grid-template-columns: 1fr 1fr; } .fd-add input:first-child { grid-column: 1 / -1; } }
.ck-q { margin: 8px 0 2px; font-size: 13px; font-weight: 700; color: #4f4859; }
#forces { scroll-margin-top: 150px; }
@media (max-width: 760px) { #forces { scroll-margin-top: 70px; } }
/* Settings: shop helper on/off switch */
.helper-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.helper-row h2 { margin-bottom: 6px; }
.helper-row p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.helper-usage { margin: 12px 0 0; font-size: 13.5px; color: var(--faint); }
.switch { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; cursor: pointer; padding-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #4a4352; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.175,.885,.32,1.275); }
.switch input:checked + .switch-ui { background: #17803a; }
.switch input:checked + .switch-ui::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--lilac); outline-offset: 3px; }
.switch b { min-width: 26px; font-size: 15px; }
@media (max-width: 560px) { .helper-row { flex-direction: column; gap: 12px; } }
.mt-help { margin: 0; align-self: center; font-size: 13px; line-height: 1.45; color: var(--faint); }

/* marketing (admin/marketing.js) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.obi-sel { margin-top: 6px; }
.obi-sel[hidden] { display: none; }
.f label.chk-inline { display: inline-flex; grid-template-columns: none; }
.stats span small { color: var(--faint); }
.mk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mk-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text) !important; text-decoration: none; }
.mk-card:hover { border-color: var(--purple); }
.mk-card b { display: block; font-size: 15px; } .mk-card small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.mk-card p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-cthumb { position: relative; display: block; width: 72px; height: 72px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.mk-cthumb img, .mk-cthumb video { width: 100%; height: 100%; object-fit: cover; }
.mk-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--lilac); }
.mk-state.bad { color: var(--low); }
.mk-list { display: grid; gap: 6px; }
.mk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); color: var(--text) !important; text-decoration: none; }
.mk-row:hover { border-color: var(--purple); }
.mk-row .mk-cthumb { width: 48px; height: 48px; }
.mk-row b { display: block; } .mk-row small { display: block; color: var(--faint); font-size: 12.5px; }
.mk-row:not(:has(.mk-cthumb)) { grid-template-columns: minmax(0, 1fr); }
.mk-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mk-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; border: 2px dashed var(--line-strong); border-radius: var(--r); }
.mk-drop.over { border-color: var(--purple); background: #f7f2fb; }
.mk-drop p { margin: 0; } .mk-drop small { flex-basis: 100%; color: var(--faint); }
.mk-up { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 13px; } .mk-up progress { flex: 1; }
.mk-media .ph video { width: 100%; height: 100%; object-fit: cover; }
.mk-vid { position: absolute; left: 4px; bottom: 4px; font: 600 10px/1 var(--mono); background: rgba(11,10,13,.8); color: #fff; padding: 3px 5px; border-radius: 2px; }
.mk-pick { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 30px; height: 30px; background: rgba(255,255,255,.92); border-radius: 4px; cursor: pointer; }
.mk-pick input { width: 18px; height: 18px; accent-color: var(--purple); }
.mk-facts { margin: 0; padding: 12px; background: var(--surface-2); border-radius: var(--r); font: 13.5px/1.6 var(--mono); white-space: pre-wrap; }
.mk-count { color: var(--faint); font-size: 12.5px; } .mk-count.over { color: var(--low); font-weight: 700; }
.mk-note { margin: 0 0 12px; }
.mk-link { overflow-wrap: anywhere; }
@media (max-width: 760px) { .mk-row { grid-template-columns: auto minmax(0, 1fr); } .mk-tags { grid-column: 2; justify-content: flex-start; } }
.mk-step h2 { display: flex; align-items: center; gap: 10px; }
.mk-step.over { outline: 2px dashed var(--purple); }
.mk-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; font: 800 14px/1 var(--body); }
.mk-src { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mk-big { display: grid !important; justify-items: center; gap: 4px; height: auto !important; padding: 18px 12px !important; font-size: 17px; }
.mk-big small { font-weight: 400; font-size: 12.5px; opacity: .85; }
.mk-x { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(11,10,13,.8); color: #fff; font-size: 14px; cursor: pointer; }
.mk-find { width: 100%; height: 46px; padding: 0 12px; margin-bottom: 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
button.mk-row { width: 100%; background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.mk-sel { border-color: var(--purple); background: #f7f2fb; }
.mk-step input[type=checkbox], .chk-inline input[type=checkbox] { color-scheme: light; accent-color: #9014bc; width: 18px; height: 18px; }
.mk-kind { margin-bottom: 14px; }
.mk-kind label.on { border-color: var(--purple); background: #f7f2fb; color: var(--text); box-shadow: inset 0 0 0 1px var(--purple); }
.mk-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-topic { display: inline-flex !important; cursor: pointer; }
.mk-topic input { position: absolute; opacity: 0; pointer-events: none; }
.mk-topic span { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 600; color: var(--text) !important; }
.mk-topic input:checked + span { border-color: var(--purple); background: var(--purple); color: #fff !important; }
.mk-topic input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.mk-test { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); background: #fff7e0; color: #7a4d00; font-weight: 600; font-size: 14px; }
.mk-status { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-st-published { color: var(--ok); font-weight: 600; } .mk-st-failed, .mk-st-partial { color: var(--low); font-weight: 600; }
.mk-result { margin: 0; font-weight: 600; font-size: 14px; } .mk-result.ok { color: var(--ok); } .mk-result.bad { color: var(--low); }
.mk-sendbox .btn-block { justify-content: center; }
.mk-or { text-align: center; color: var(--faint); font-size: 13px; margin: 2px 0; }
.mk-sendbox input[type=datetime-local] { color-scheme: light; }
.mk-pls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mk-pl { font: 600 11.5px/1 var(--mono); padding: 4px 6px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--faint); }
.mk-pl.ok { border-color: #9fd3ae; color: var(--ok); } .mk-pl.bad { border-color: #f1a7a7; color: var(--low); }
.mk-nums { display: flex; gap: 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.mk-nums b { color: var(--text); }
.mk-conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mk-conn { padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.mk-conn b { display: block; } .mk-conn small { color: var(--faint); font-size: 12.5px; }
.mk-conn.ok b { color: var(--ok); } .mk-conn.bad b { color: var(--low); } .mk-conn.off { border-style: dashed; } .mk-conn.off b { color: var(--faint); }
.mk-mode label.on { border-color: var(--purple); background: #f7f2fb; color: var(--text); box-shadow: inset 0 0 0 1px var(--purple); }
.mk-mode label.mk-off { opacity: .55; cursor: not-allowed; }
.mk-pstats { margin-bottom: 16px; }
@media (max-width: 760px) { .mk-nums { grid-column: 2; } .stats-5 { grid-template-columns: repeat(2, 1fr); } }
.mk-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mk-result.del { color: var(--faint); }
.mk-del { margin-left: auto; }
.mk-inapp { padding: 12px; border-radius: var(--r); background: #f7f2fb; font-size: 14px; }
.mk-inapp p { margin: 0 0 8px; line-height: 1.5; }
.mk-pl.del { color: var(--faint); text-decoration: line-through; }
.mk-st-deleted { color: var(--faint); font-weight: 600; }
.mk-sold { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r); background: #fdf3e1; border: 1px solid #e9c98d; font-size: 14px; }
.mk-sold b { color: #8a5a00; }
.mk-pl.sold { border-color: #e9c98d; background: #fdf3e1; color: #8a5a00; }
.mk-soldbox summary { cursor: pointer; list-style: none; display: grid; gap: 4px; }
.mk-soldbox summary::-webkit-details-marker { display: none; }
.mk-soldbox summary h2 { margin: 0; } .mk-soldbox summary h2::after { content: " ▾"; color: var(--faint); font-size: 14px; }
.mk-soldbox[open] summary h2::after { content: " ▴"; }
.mk-soldbox summary small { color: var(--faint); font-size: 13px; }
.mk-soldbox[open] { display: grid; gap: 14px; }
#mk-existing + .mk-src { margin-top: 12px; }
.mk-ad { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.mk-ad > div:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-ad small { color: var(--faint); font-size: 12.5px; } .mk-ad small b { color: var(--text); }
.mk-ad .btn { justify-self: start; margin-top: 4px; }
.mk-spend { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.mk-spend span { display: block; height: 100%; background: var(--purple); }
.mk-bad { color: var(--low) !important; font-weight: 600; }
.mk-max { margin: 0; font-size: 14px; }
.mk-alarm { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: #fdecec; border: 1px solid #f1a7a7; color: #a11c1c; font-weight: 700; }
.mk-roi td small { color: var(--faint); }
.mk-roi td:last-child { text-align: right; }
body.mk-off .mk-only { display: none !important; }
.mk-sw { padding: 12px 0; border-top: 1px solid var(--line); } .mk-sw:first-of-type { border-top: 0; padding-top: 0; }
.mk-sw b { font-size: 15px; } .mk-sw p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.mk-offnote { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-size: 14px; }
.mk-st-paused { color: var(--warn); font-weight: 600; }

/* stock sync: alert banner (every page) and the Stock sync page */
.alertbar { background: #b71c1c; color: #fff; padding: 10px 16px; font-size: 14.5px; line-height: 1.4; text-align: center; }
.alertbar a { color: #fff; font-weight: 700; margin-left: 8px; white-space: nowrap; }
.sy-ok { color: var(--ok); font-weight: 700; } .sy-bad { color: var(--low); font-weight: 700; } .sy-off { color: var(--faint); }
.stats b.sy-ok, .stats b.sy-bad, .stats b.sy-off { font: 700 17px/1.25 var(--body); }
.sy-list { list-style: none; margin: 0; padding: 0; }
.sy-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sy-list li:last-child { border-bottom: 0; }
.sy-alert { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.sy-alert p { margin: 6px 0 4px; }
details.panel summary { cursor: pointer; }
details.panel[open] summary { margin-bottom: 8px; }
.sy-mail { white-space: pre-wrap; font: 13px/1.45 var(--mono); background: var(--surface-2); padding: 8px 10px; border-radius: 3px; margin: 6px 0 0; }
@media (max-width: 760px) { .sy-alert { flex-direction: column; gap: 8px; } }

/* find the pressing (listing editor) */
.pf-list { list-style: none; margin: 10px 0 0; padding: 0; }
.pf-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pf-list img, .pf-noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; background: var(--surface-2); display: block; }
.pf-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 13px; }
.pf-badges { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.pf-b { font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--faint); text-transform: uppercase; }
.pf-b.ok { border-color: var(--ok); color: var(--ok); } .pf-b.warn { border-color: var(--warn); color: var(--warn); } .pf-b.low { border-color: var(--low); color: var(--low); }
.pf-diffs { margin: 0; padding-left: 18px; } .pf-diffs li { margin: 3px 0; }
#pf textarea { min-height: 0; }
@media (max-width: 760px) { .pf-list li { grid-template-columns: 48px 1fr; } .pf-acts { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }

/* guided grading (listing editor) */
#gg-go { margin: 0 0 12px; }
#gg h3 { font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 16px 0 8px; }
.gg-q { border: 0; padding: 0; margin: 0 0 12px; }
.gg-q legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.gg-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.gg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; font-size: 13.5px; }
.gg-opt input { margin: 0; width: auto; }
.gg-opt small { color: var(--faint); font-size: 11.5px; }
.gg-opt.on { border-color: var(--purple); background: var(--surface-2); }
.gg-notes { white-space: pre-wrap; font: 13px/1.5 var(--mono); background: var(--surface-2); padding: 8px 10px; border-radius: 3px; margin: 6px 0 10px; }

/* pricing page */
.pz-bar { display: inline-block; width: 60px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.pz-bar i { display: block; height: 100%; background: var(--purple); }
.pz-above { color: var(--warn); font-weight: 700; }
.pz-acts { white-space: nowrap; }
.pz-step { grid-template-columns: 1fr 1fr; }

/* Markdown defaults dialog (Pricing page) */
.pz-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.pz-head h2 { margin-bottom: 10px; }
.mdl-back { position: fixed; inset: 0; z-index: 60; background: rgba(22,19,26,.45); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.mdl { background: #fff; color: #16131a; width: min(920px, 100%); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.mdl-top { display: flex; gap: 16px; align-items: center; padding: 26px 28px 20px; border-bottom: 1px solid var(--line); }
.mdl-top > div { flex: 1; }
.mdl-top h2 { margin: 0; font: 700 26px/1.2 var(--body); text-transform: none; letter-spacing: 0; }
.mdl-top p { margin: 4px 0 0; color: var(--muted); }
.mdl-x { background: none; border: 0; font-size: 22px; cursor: pointer; color: #16131a; padding: 4px 8px; }
.mdl-auto { display: inline-flex; gap: 10px; align-items: center; background: #f4f2f7; padding: 8px 12px; border-radius: 12px; font-weight: 600; cursor: pointer; }
.mdl-auto input { position: absolute; opacity: 0; pointer-events: none; }
.mdl-sw { width: 44px; height: 24px; border-radius: 12px; background: #cfc8d8; position: relative; transition: background .15s; }
.mdl-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.mdl-auto input:checked + .mdl-sw { background: var(--purple); }
.mdl-auto input:checked + .mdl-sw::after { left: 23px; }
.mdl-auto input:focus-visible + .mdl-sw { outline: 2px solid var(--purple); outline-offset: 2px; }
.mdl-auto-sm { background: none; padding: 0; }
.mdl-body { padding: 22px 28px; }
.mdl-preview { background: #f7f5fa; border-radius: 18px; padding: 18px 20px; margin-bottom: 22px; }
.mdl-pv-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mdl-ex { font-size: 13px; color: var(--muted); }
.mdl-ex input { width: 70px; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
.mdl-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.mdl-cell { border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px;
  background: color-mix(in srgb, var(--purple) calc(var(--k, 0) * 22%), #fff); }
.mdl-cell small { color: var(--purple); font-size: 12.5px; }
.mdl-cell b { font-size: 19px; }
.mdl-cell.now { background: #efecf3; } .mdl-cell.now small { color: var(--muted); }
.mdl-cell.more { justify-content: center; color: var(--purple); }
.mdl-cell.last { background: var(--purple); color: #fff; } .mdl-cell.last small { color: #f1e6fb; }
.mdl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mdl-lbl { font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.mdl-i { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--muted); border-radius: 50%; font: 700 11px/1 var(--body); text-transform: none; cursor: help; }
.mdl-card { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 20px; }
.mdl-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); }
.mdl-row:first-child { border-top: 0; }
.mdl-row b { display: block; font-size: 16px; }
.mdl-row small { color: var(--muted); font-size: 13.5px; }
.mdl-in { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px 12px; min-width: 130px; }
.mdl-in input { border: 0; width: 60px; font: 600 16px/1.2 var(--body); background: none; color: inherit; padding: 2px 0; }
.mdl-in input:focus { outline: none; } .mdl-in:focus-within { border-color: var(--purple); }
.mdl-in i { font-style: normal; color: var(--muted); margin-left: auto; }
.mdl-row select { border: 1px solid var(--line-strong); border-radius: 12px; padding: 8px 12px; font: 600 15px/1.2 var(--body); background: #fff; color: inherit; min-width: 160px; }
.mdl-seg { display: inline-flex; background: #f4f2f7; border-radius: 12px; padding: 3px; }
.mdl-seg button { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font: 600 14px/1 var(--body); color: var(--muted); cursor: pointer; }
.mdl-seg button.on { background: #fff; color: var(--purple); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.mdl-step { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px; }
.mdl-step button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #f4f2f7; font-size: 18px; cursor: pointer; color: #16131a; }
.mdl-step b { min-width: 22px; text-align: center; }
.mdl-applies { background: #f7f5fa; border-radius: 16px; padding: 14px 18px; }
.mdl-foot { display: flex; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line); }
.mdl-foot span { flex: 1; }
@media (max-width: 760px) {
  .mdl-back { padding: 0; } .mdl { border-radius: 0; min-height: 100%; }
  .mdl-top, .mdl-body, .mdl-foot { padding-left: 16px; padding-right: 16px; }
  .mdl-cols { grid-template-columns: 1fr; gap: 0; }
  .mdl-row { flex-wrap: wrap; }
  .mdl-strip { grid-template-columns: repeat(2, 1fr); }
}

/* buy calculator */
.bl-offer b { color: var(--purple); }
.bl-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bl-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.bl-table select { max-width: 220px; }
.bl-qty { width: 52px; text-align: right; } .bl-val { width: 80px; margin-top: 4px; text-align: right; }

/* only in the installed phone app (html.is-app): e.g. the camera for valuing a lot */
html:not(.is-app) .app-only { display: none !important; }

/* purchase receipts: seller details, declaration and the signature pad */
.pr { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.pr-decl { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 10px 14px; margin: 0; }
.pr-decl legend { font-weight: 700; padding: 0 6px; } .pr-decl legend small { font-weight: 400; color: var(--faint); }
.pr-decl p { margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.pr-decl .chk-inline { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.pr-sign span { display: block; font-weight: 700; margin-bottom: 6px; }
.pr-pad { width: 100%; max-width: 560px; aspect-ratio: 900 / 260; display: block; background: #fff; border: 2px dashed var(--line-strong); border-radius: 10px; touch-action: none; cursor: crosshair; }
.pr-err { color: var(--low); font-weight: 600; margin: 0; } .pr-err:empty { display: none; }

/* orders: Discogs label address and customs */
.sf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sf-grid input, .sf-grid select { padding: 6px 8px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 4px; min-width: 0; }
.customs { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
@media (max-width: 760px) { .sf-grid { grid-template-columns: 1fr 1fr; } }

/* finance: asset listing on Business expenses */
.asset-list { margin-top: 8px; }
.asset-note { margin: -4px 0 12px; max-width: 760px; }
.asset-table th:nth-child(2), .asset-table td:nth-child(2) { width: 160px; }
.asset-table th:nth-child(3), .asset-table td:nth-child(3) { width: 130px; }
.asset-table .asset-acts { white-space: nowrap; text-align: right; width: 1%; }
.asset-table tr.asset-rcpt td { color: var(--muted); }
.asset-table tr.asset-rcpt td b { color: var(--text); }
.asset-table tr.asset-edit td { background: var(--surface-2); }
.asset-in { width: 100%; min-width: 0; padding: 7px 9px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 4px; }
.asset-in:focus { border-color: var(--lilac); outline: none; }
.asset-in.asset-cost { text-align: right; font-family: var(--mono); }
.asset-in.asset-paid { margin-top: 6px; font-size: 12.5px; padding: 5px 6px; text-align: left; }
.asset-table .asset-foot td { border-bottom: 0; font-weight: 700; }
.asset-table .asset-foot .fin-ltot small { font-weight: 400; color: var(--faint); }
.asset-table .asset-total { padding: 12px 8px; }
.asset-add { margin: 12px 0 0; }
@media (max-width: 640px) {
  .asset-table th:nth-child(2), .asset-table td:nth-child(2) { width: auto; }
  .asset-table th:nth-child(3), .asset-table td:nth-child(3) { width: auto; }
  .asset-table tr.asset-edit td { display: block; width: auto; border: 0; padding: 4px 8px; }
  .asset-table tr.asset-edit td:last-child { text-align: left; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .asset-table .asset-acts { white-space: normal; }
}

/* footer on every back office page: dark, like the header bar; it sits at the bottom of the window on short pages */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > #view { width: 100%; flex: 1 0 auto; }
.adm-foot { margin-top: 56px; background: var(--ink); border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.adm-foot-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.adm-foot-brand img { width: 56px; height: 56px; margin-bottom: 12px; }
.adm-foot-brand p { margin: 0; max-width: 30ch; } .adm-foot-brand b { color: var(--text); }
.adm-foot h3 { margin: 0 0 10px; font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.adm-foot section a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; }
.adm-foot a:hover, .adm-foot .link-btn:hover { color: var(--text); }
.adm-foot-base { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.adm-foot-base p { margin: 0; display: flex; gap: 18px; flex-wrap: wrap; } .adm-foot-base p:first-child { display: block; }
.adm-foot-base a { color: var(--muted); }
.adm-foot .link-btn { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
body:has(#view .savebar) .adm-foot { padding-bottom: 72px; } /* clear of the editor's fixed Save bar */
@media (max-width: 1000px) { .adm-foot-grid { grid-template-columns: repeat(3, 1fr); } .adm-foot-brand { grid-column: 1 / -1; } }
@media (max-width: 760px) { /* phone: the tab bar's More menu has these links, so just the brand and the base line */
  .adm-foot { margin-top: 40px; } .adm-foot-grid { padding-top: 28px; padding-bottom: 20px; } .adm-foot-grid section { display: none; }
  body { padding-bottom: 0; } /* the footer makes the room for the tab bar instead, so no white strip under it */
  .adm-foot { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  body:has(#view .savebar) .adm-foot { padding-bottom: calc(126px + env(safe-area-inset-bottom)); }
}
@media print { .adm-foot { display: none !important; } }

/* every block gets its own colour on the white pages, so neighbouring blocks never look the same:
   tones rotate through the shop's colours (relic purple, Underground gold, ink and bone, plum) in page order (admin.js toneBlocks) */
body.page-light #view [data-tone="0"] { --tone: #9014bc; --tone-ink: #5c0d80; --tone-tint: #f5ecfb; }
body.page-light #view [data-tone="1"] { --tone: #dca33c; --tone-ink: #7a4f00; --tone-tint: #fdf3dc; }
body.page-light #view [data-tone="2"] { --tone: #16131a; --tone-ink: #16131a; --tone-tint: #efebe4; }
body.page-light #view [data-tone="3"] { --tone: #b4236e; --tone-ink: #7d1450; --tone-tint: #fcebf3; }
body.page-light .panel[data-tone]:not(.grading) {
  border-color: color-mix(in srgb, var(--tone) 24%, #e7e3ec); border-top: 4px solid var(--tone);
  background: linear-gradient(180deg, var(--tone-tint) 0, #fff 110px);
}
body.page-light .panel[data-tone] h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 0; color: var(--tone-ink); font-size: 19px; }
body.page-light .panel[data-tone] h2::before { content: ""; flex: none; align-self: center; width: 10px; height: 10px; margin-right: 10px; border-radius: 2px; background: var(--tone); }
body.page-light .panel[data-tone] h2 small { color: #6e6678; }
body.page-light .panel[data-tone] h3 { color: var(--tone-ink); }
/* cards (suppliers & sources, receipts), category totals, section titles and tables that sit on the page by themselves */
body.page-light .scard[data-tone], body.page-light .rcard[data-tone] {
  border-color: color-mix(in srgb, var(--tone) 24%, #e7e3ec); border-top: 4px solid var(--tone);
  background: linear-gradient(180deg, var(--tone-tint) 0, #fff 90px);
}
body.page-light .scard[data-tone]:hover, body.page-light .rcard[data-tone]:hover { border-color: var(--tone); box-shadow: 0 4px 18px color-mix(in srgb, var(--tone) 16%, transparent); }
body.page-light .scard[data-tone] .scard-top b, body.page-light .rcard[data-tone] .rinfo > b:first-child { color: var(--tone-ink); }
body.page-light .scard[data-tone] .scard-stats { border-color: color-mix(in srgb, var(--tone) 22%, #e7e3ec); }
body.page-light .catchip[data-tone] { border-color: color-mix(in srgb, var(--tone) 30%, #e7e3ec); border-left: 4px solid var(--tone); background: var(--tone-tint); }
body.page-light .catchip[data-tone] b { color: var(--tone-ink); }
body.page-light .catchip[data-tone]:hover { border-color: var(--tone); }
body.page-light .fin-h2[data-tone] { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 0; color: var(--tone-ink); font-size: 19px; padding-bottom: 8px; border-bottom: 3px solid var(--tone); }
body.page-light .fin-h2[data-tone]::before { content: ""; flex: none; align-self: center; width: 10px; height: 10px; margin-right: 10px; border-radius: 2px; background: var(--tone); }
body.page-light .fin-h2[data-tone] small { color: #6e6678; }
body.page-light .tscroll[data-tone] { border: 1px solid color-mix(in srgb, var(--tone) 24%, #e7e3ec); border-top: 4px solid var(--tone); border-radius: var(--r); background: #fff; }
body.page-light .fin-h2[data-tone] + * .tscroll[data-tone], body.page-light .fin-h2[data-tone] ~ .tscroll[data-tone] { border-top-width: 1px; }
body.page-light .tscroll[data-tone] .ltable th { background: var(--tone-tint); color: var(--tone-ink); border-bottom-color: color-mix(in srgb, var(--tone) 35%, #e7e3ec); }
body.page-light .tscroll[data-tone] .ltable tr:last-child td { border-bottom: 0; }
/* listing tables (they turn into cards on the phone, so they aren't boxed): coloured header row */
body.page-light table.ltable.cards[data-tone] th { background: var(--tone-tint); color: var(--tone-ink); border-top: 4px solid var(--tone); border-bottom-color: color-mix(in srgb, var(--tone) 35%, #e7e3ec); }
/* stat tiles: a coloured top edge per tile */
body.page-light .stats div { border-top: 3px solid #9014bc; }
body.page-light .stats div:nth-child(4n+2) { border-top-color: #dca33c; }
body.page-light .stats div:nth-child(4n+3) { border-top-color: #16131a; }
body.page-light .stats div:nth-child(4n+4) { border-top-color: #b4236e; }
@media print {
  body.page-light .panel[data-tone]:not(.grading) { background: #fff; border-top-width: 1px; }
  body.page-light .panel[data-tone] h2::before, body.page-light .fin-h2[data-tone]::before { display: none; }
  body.page-light .scard[data-tone], body.page-light .rcard[data-tone], body.page-light .catchip[data-tone] { background: #fff; }
}

/* stock dashboard (#/listings/dashboard): items purple, value deep gold, slow sell-through in the red status colour with a label */
#view { --dv-items: #9014bc; --dv-value: #b8862b; --dv-slow: #d03b3b; }
.dv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 16px; }
.dv-seg { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dv-seg > span, .dv-sel > span { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.dv-seg button { height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font: 600 13.5px/1 var(--body); cursor: pointer; }
.dv-seg button:hover { border-color: var(--dv-items); }
.dv-seg button[aria-checked="true"] { background: var(--dv-items); border-color: var(--dv-items); color: #fff; }
.dv-sel { display: inline-flex; align-items: center; gap: 4px; }
.dv-sel select { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 14px; }
.stats b.dv-snap { font: 700 17px/1.25 var(--body); }
.dv-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; transition: opacity .15s; }
.dv-layout.dv-loading { opacity: .55; }
.dv-charts { display: grid; gap: 16px; min-width: 0; }
.dv-charts .panel + .panel { margin-top: 0; }
@media (max-width: 1000px) { .dv-layout { grid-template-columns: minmax(0, 1fr); } }
.dv-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 6px; font-size: 13px; color: var(--muted); }
.dv-legend span { display: inline-flex; align-items: center; gap: 7px; }
.k-rect { width: 12px; height: 12px; border-radius: 3px; } .k-line { width: 16px; height: 2px; border-radius: 1px; }
.k-est { width: 14px; height: 12px; border-radius: 2px; background: #f1eef4; border: 1px dashed #cfc8d8; }
.dv-items-k { background: var(--dv-items); } .dv-value-k { background: var(--dv-value); }
.dv-chart { position: relative; width: 100%; min-height: 300px; }
.dv-svg { display: block; width: 100%; height: auto; fill: none; stroke: none; overflow: visible; outline-offset: 4px; font-family: var(--body); } /* not the shop's 22px icon svgs */
.dv-grid { stroke: #ece8f0; stroke-width: 1; } .dv-base { stroke: #cfc8d8; stroke-width: 1; }
.dv-tick { fill: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dv-axis { font-size: 12px; font-weight: 700; fill: var(--muted); }
.dv-cat { fill: var(--text); font-size: 12.5px; font-weight: 600; }
.dv-lbl { fill: var(--muted); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dv-items { fill: var(--dv-items); } .dv-value { fill: var(--dv-value); }
.dv-zero { stroke-width: 2; } .dv-zero.dv-items { stroke: var(--dv-items); } .dv-zero.dv-value { stroke: var(--dv-value); }
.dv-hit { fill: transparent; }
.dv-group.on .dv-hit { fill: #f6f2f9; }
.dv-group.on .dv-items, .dv-group.on .dv-value { filter: brightness(1.12); }
.dv-est { fill: #f6f4f8; }
.dv-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dv-items-line { stroke: var(--dv-items); } .dv-value-line { stroke: var(--dv-value); }
.dv-dot { stroke: #fff; stroke-width: 2; } .dv-items-dot { fill: var(--dv-items); } .dv-value-dot { fill: var(--dv-value); }
.dv-dot.est { fill: #fff; stroke-width: 1.5; } .dv-dot.est.dv-items-dot { stroke: var(--dv-items); } .dv-dot.est.dv-value-dot { stroke: var(--dv-value); }
.dv-hov { stroke: #fff; stroke-width: 2; pointer-events: none; }
.dv-cross { stroke: #9a92a6; stroke-width: 1; pointer-events: none; }
.dv-tip { position: absolute; z-index: 20; min-width: 150px; padding: 8px 10px; border-radius: 8px; background: #16131a; color: #fff; font-size: 12.5px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.2); pointer-events: none; }
.dv-tip-h { color: #cfc8d8; font-size: 12px; margin-bottom: 4px; }
.dv-tip-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; } .dv-tip-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.dv-tip-row i { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.dv-tip-f { margin-top: 4px; color: #cfc8d8; font-size: 11.5px; }
.dv-table { margin-top: 10px; } .dv-table summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--lilac); }
.dv-table table { margin-top: 8px; }
.dv-st-all { display: grid; gap: 2px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.dv-st-all b { font: 400 34px/1 var(--display); } .dv-st-all span { font-size: 13px; color: var(--muted); }
.dv-st-list { list-style: none; margin: 0; padding: 0; display: grid; }
.dv-st-list li { display: grid; gap: 5px; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 6px; outline-offset: -2px; }
.dv-st-list li:hover { background: #faf7fc; }
.dv-st-list li.slow { background: #fdf1f1; }
.dv-st-top { display: flex; align-items: center; gap: 8px; } .dv-st-top b { font-size: 14.5px; }
.dv-st-rate { margin-left: auto; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.dv-st-list li.none .dv-st-rate { font-weight: 500; font-size: 13px; color: var(--faint); }
.dv-st-list li.slow .dv-st-rate { color: #b3261e; }
.dv-st-list small { font-size: 12.5px; color: var(--muted); }
.dv-track { position: relative; height: 8px; border-radius: 4px; background: #efebf3; }
.dv-track i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--dv-items); min-width: 2px; }
.dv-st-list li.slow .dv-track i { background: var(--dv-slow); }
.dv-track em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #6e6678; border-radius: 1px; }
.sig.dv-slow { background: #fde8e8; color: #b3261e; }
