/* Price Matrix: styles for this app only. Kit tokens (var(--accent), var(--r-md)…), never raw colours,
   except --ph, a product's placeholder colour, which comes from the data. */

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hr { border: 0; border-top: 1px solid var(--hair); margin: 14px 0; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 8px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; white-space: pre-wrap; overflow-wrap: anywhere; }
.card.flush { padding: 0; overflow: hidden; }
.danger-txt { color: var(--bad) !important; display: inline-flex; gap: 6px; align-items: center; }
.good-txt { color: var(--good); }
.warn-txt { color: var(--warn); font-weight: 650; }
.progress.sm { height: 4px; margin: 6px 0 0; max-width: 240px; }
.btn.icon-only { padding: 0 10px; }

/* placeholder picture: the brand's initials */
.ph { display: grid; place-items: center; color: #fff; background: var(--ph, var(--navy-2)); font: 700 12px/1 var(--font-display); letter-spacing: .04em; padding-top: 2px; border: 0; }
.thumb.ph { font-size: 13px; background: var(--ph, var(--navy-2)); }
.mx-thumb.ph { background: var(--ph, var(--navy-2)); }

/* margin and POR pills */
.mtag { display: inline-block; min-width: 52px; text-align: right; font: 650 12.5px/1 var(--font); font-variant-numeric: tabular-nums; padding: 5px 7px; border-radius: 6px; color: var(--ink-2); }
.mtag.bad { background: var(--bad-bg); color: var(--bad); }
.mtag.warn { background: var(--warn-bg); color: var(--warn); }

/* radio-button segments (Settings) */
.seg label { flex: 1; text-align: center; color: var(--muted); font: 600 14px var(--font); padding: 10px 6px; border-radius: 9px; cursor: pointer; transition: background .25s var(--ease), color .2s; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 19, 34, .12), 0 4px 12px -6px rgba(16, 19, 34, .25); }
.seg label:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.suffix { position: relative; display: flex; align-items: center; }
.suffix input { padding-right: 46px; }
.suffix i { position: absolute; right: 12px; font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.suffix.sm { flex: none; width: 128px; }
.suffix.sm input { min-height: 42px; padding: 6px 70px 6px 10px; }
input.mini { display: inline-block; width: 96px; min-height: 0; padding: 2px 6px; font-size: 12.5px; border-radius: 5px; }

/* ---------- the matrix ---------- */
#app main.matrix { max-width: none; }
@media (min-width: 1000px) { #app.with-side main.matrix { max-width: none; padding: 20px 24px 40px; } }
.mx-hero { padding-bottom: 14px; }
.mx-hero .hero-top { align-items: center; }
.mx-hero h2 { margin-bottom: 12px; }
.mx-hero .hero-top .btn { flex: none; }
.mx-hero .hero-sub { margin: 4px 0 0; max-width: 70ch; font-size: 13.5px; }
@media (min-width: 1000px) {
  .mx-hero { padding: 20px 24px 16px; }
  .mx-hero h2 { font-size: 28px; margin: 6px 0 10px; }
  .mx-hero .figures { max-width: 640px; margin-bottom: 6px; }
  .mx-hero .figure b { font-size: 28px; }
}
.mx-controls { display: grid; gap: 10px; margin-bottom: 12px; }
.mx-chans .chip small { opacity: .65; font-weight: 600; }
.mx-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mx-bar .seg { margin: 0; flex: 1 1 280px; max-width: 380px; }
.mx-bar .seg button { padding: 8px 6px; font-size: 13.5px; }
.mx-search { flex: 2 1 260px; min-width: 0; }
.mx-search .search-row input { min-height: 44px; }
.mx-tools { display: flex; gap: 8px; margin: 0; flex: none; }
.mx-hint { margin: 0 4px 8px; }

.mx-wrap { position: relative; overflow: auto; max-height: calc(100vh - var(--header-h) - 120px); min-height: 320px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--lift); outline: 1.5px solid var(--edge); outline-offset: -1.5px; overscroll-behavior: contain; }
.mx { border-collapse: separate; border-spacing: 0; font-size: 13.5px; min-width: 100%; }
.mx th, .mx td { border-bottom: 1px solid var(--hair); padding: 0; white-space: nowrap; text-align: left; vertical-align: middle; height: 40px; }
.mx td + td, .mx th + td, .mx thead th + th { border-left: 1px solid var(--hair); }
.mx thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 10px 10px 9px; font: 700 10.5px/1.15 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--line); user-select: none; -webkit-user-select: none; }
.mx thead th.drag { cursor: grab; touch-action: pan-x pan-y; }
.mx thead th.drag:hover { color: var(--ink); background: var(--surface-2); }
.mx thead th.n { text-align: right; }
.mx thead th.is-calc { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.mx thead th.kcol { color: var(--accent-ink); }
.mx thead th.mx-src { opacity: .35; }
.mx-sort { margin-left: 4px; font-size: 9px; color: var(--accent-ink); }
.th-btn { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
/* first column stays put while the rest scrolls */
.mx .mx-name { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 260px; max-width: 340px; box-shadow: 1px 0 0 var(--line); }
.mx thead .mx-name { z-index: 4; padding-left: 14px; }
.mx tbody .mx-name { padding: 0 10px 0 0; font-weight: 550; }
.mx tbody .mx-name a { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 12px; color: inherit; text-decoration: none; white-space: normal; line-height: 1.25; font-size: 13.5px; }
.mx tbody .mx-name a:hover span { text-decoration: underline; }
.mx tbody .mx-name .tag { margin-left: 4px; font-size: 10.5px; padding: 2px 6px; }
.mx tbody .mx-name { display: table-cell; }
.mx-thumb { flex: none; width: 30px; height: 30px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--hair); }
.mx-thumb.ph { font-size: 10px; }
.mx td { padding: 0 10px; font-variant-numeric: tabular-nums; }
.mx td.n { text-align: right; }
.mx td.mono { font-family: var(--font-mono); font-size: 12.5px; }
.mx td:not(.ed) { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); color: var(--ink-2); }
.mx td.ed { padding: 0; position: relative; }
.mx td.ed input { display: block; width: 100%; min-width: 72px; height: 39px; min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 0 10px; font: 500 13.5px var(--font); font-variant-numeric: tabular-nums; color: var(--ink); box-shadow: none; }
.mx td.ed.n input { text-align: right; }
.mx td.ed.mono input { font-family: var(--font-mono); font-size: 12.5px; }
.mx td.ed input:hover { background: var(--accent-tint); }
.mx td.ed input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface); position: relative; z-index: 1; }
.mx td.ed input.auto { font-style: italic; color: var(--muted); }
.mx td.kcol input, .mx td.kcol { font-weight: 650; }
.mx td.is-bad input, .mx td.is-bad { color: var(--bad); }
.bc-bad { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--bad); pointer-events: none; display: inline-flex; }
.mx td:not(.ed) .bc-bad { position: static; transform: none; margin-left: 4px; vertical-align: -3px; }
.bc-bad svg { width: 16px; height: 16px; }
.mx td.is-bad.ed input { padding-right: 24px; }
.mx-group td { background: var(--surface-2) !important; color: var(--ink-2); font: 700 11.5px/1 var(--font-display); letter-spacing: .09em; text-transform: uppercase; height: 30px; padding: 8px 0 6px; }
.mx-group .g { position: sticky; left: 0; display: inline-block; padding-left: 14px; }
.mx-group td small { font: 500 12px var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 6px; }
.mx-empty { padding: 40px !important; text-align: center !important; color: var(--muted); white-space: normal !important; }
.mx tr.is-delist .mx-name a { opacity: .6; }
/* low margins: a red / amber stripe and tint across the row */
.mx tr.lvl-bad .mx-name { box-shadow: inset 4px 0 0 var(--bad), 1px 0 0 var(--line); }
.mx tr.lvl-warn .mx-name { box-shadow: inset 4px 0 0 var(--c5), 1px 0 0 var(--line); }
.mx tr.lvl-bad td:not(.ed), .mx tr.lvl-bad .mx-name { background: color-mix(in srgb, var(--bad-bg) 55%, var(--surface)); }
.mx tr.lvl-warn td:not(.ed), .mx tr.lvl-warn .mx-name { background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface)); }
.mx tbody tr:hover td.ed input:not(:focus) { background: color-mix(in srgb, var(--accent-tint) 50%, transparent); }
/* dragging a column */
.mx-ghost { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; padding: 8px 12px; border-radius: 8px; background: var(--navy); color: #fff; font: 700 11px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 14px 30px -12px rgba(16, 19, 34, .6); }
.mx-drop { position: fixed; z-index: 299; width: 4px; border-radius: 2px; background: var(--accent); pointer-events: none; }

/* phone cards */
.pcard { gap: 12px; }
.pcard .t { white-space: normal; line-height: 1.25; }
.pcard .px { flex: none; display: grid; justify-items: end; gap: 3px; text-align: right; }
.pcard .px b { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pcard .px small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pcard .px .mtag { min-width: 0; font-size: 11.5px; padding: 3px 6px; }
.pcard.lvl-bad { box-shadow: inset 4px 0 0 var(--bad); }
.pcard.lvl-warn { box-shadow: inset 4px 0 0 var(--c5); }

/* columns sheet */
.col-list { display: grid; gap: 2px; }
.col-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--hair); }
.col-row .grow { font-weight: 550; }
.col-row .step { width: 38px; height: 38px; font-size: 20px; }
.col-row .step:disabled { opacity: .3; }

/* ---------- product ---------- */
.pd-hero .hero-top { align-items: flex-start; gap: 16px; }
.pd-pic { flex: none; width: 96px; height: 96px; border-radius: 12px; border: 0; padding: 0; background: #fff; display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer; overflow: hidden; color: var(--navy); font: 600 11.5px var(--font); }
.pd-pic img { width: 96px; height: 96px; object-fit: contain; display: block; }
.pd-pic svg { width: 26px; height: 26px; }
.pd-hero h2.plain { font-size: 24px; margin: 6px 0 10px; }
@media (min-width: 700px) { .pd-pic, .pd-pic img { width: 132px; height: 132px; } .pd-hero h2.plain { font-size: 30px; } }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pd-prices th[scope="row"] { font-weight: 600; white-space: nowrap; }
.pd-prices th[scope="row"] small { font-weight: 500; }
.pd-prices sup { font-size: 9.5px; color: var(--muted); margin-left: 3px; font-style: italic; }
.pd-prices tr.lvl-bad th[scope="row"] { box-shadow: inset 3px 0 0 var(--bad); }
.pd-prices tr.lvl-warn th[scope="row"] { box-shadow: inset 3px 0 0 var(--c5); }
.pd-prices th, .pd-prices td { padding-left: 14px; }
.pd-why { margin: 0; padding: 10px 16px 14px; }
.rd-num { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pd-kv { font-size: 14px; }

.fgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin-bottom: 14px; }
.ftile { margin: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--lift); outline: 1.5px solid var(--edge); outline-offset: -1.5px; overflow: hidden; display: flex; flex-direction: column; }
.fimg { display: grid; place-items: center; aspect-ratio: 1; width: 100%; border: 0; padding: 8px; background: #fff; cursor: zoom-in; }
.fimg img { width: 100%; height: 100%; object-fit: contain; }
.fdoc { cursor: default; color: var(--navy); gap: 6px; text-align: center; font-size: 12.5px; overflow-wrap: anywhere; }
.fdoc svg { width: 38px; height: 38px; }
.ftile figcaption { display: grid; gap: 6px; padding: 10px; }
.ftile figcaption select { min-height: 38px; padding: 6px 10px; font-size: 13.5px; }
.ftools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ftools .btn { flex: 1 1 auto; }
.ftile-add { min-height: 200px; margin: 0; }

.pd-form .card > h2 { margin-bottom: 14px; }
.dgrid { align-items: start; }
.more-prices { margin-top: 6px; border-top: 1px solid var(--hair); padding-top: 12px; }
.more-prices summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.pv { margin: 4px 0 6px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.pv-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pv-c { display: grid; gap: 3px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.pv-c b { font: 700 11px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pv-c.lvl-bad { box-shadow: inset 3px 0 0 var(--bad); }
.pv-c.lvl-warn { box-shadow: inset 3px 0 0 var(--c5); }
.pv-c .mtag { min-width: 0; padding: 2px 5px; }
.pd-form .dock { justify-content: stretch; padding: 8px; }
.pd-form .dock .btn { flex: 1; }

/* ---------- settings ---------- */
.ch-list { display: grid; gap: 2px; }
.ch-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.ch-row .grow > input { min-height: 40px; padding: 6px 10px; font-weight: 600; }
.ch-row .grow small { display: block; margin-top: 4px; }
.ch-row .grow > input:disabled { background: transparent; padding-left: 0; color: var(--ink); opacity: 1; }
@media (max-width: 520px) { .ch-row { flex-wrap: wrap; } .ch-row .grow { flex-basis: 100%; } .suffix.sm { flex: 1; width: auto; } }

/* ---------- one-pager (prints on one A4 page) ---------- */
.one { max-width: 820px; margin: 0 auto; }
.one-opts { display: grid; gap: 10px; }
.one-opts .btn-row { margin: 0; }
.one-cover h2 span { color: #ffb38f; }
.one-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 8px; }
@media (min-width: 640px) { .one-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.one-img { background: #fff; border-radius: var(--r-lg); box-shadow: var(--lift); aspect-ratio: 1; display: grid; place-items: center; padding: 18px; overflow: hidden; }
.one-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.one-noimg { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.one-noimg svg { width: 44px; height: 44px; }
.one-side { display: grid; gap: 10px; align-content: start; }
.one-price, .one-rrp, .one-promo { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--lift); padding: 16px 18px; }
.one-price { background: var(--navy); color: #fff; }
.one-price .eyebrow { color: rgba(255, 255, 255, .7); }
.one-price b { display: block; font-size: 40px; font-weight: 650; letter-spacing: -0.04em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.one-price span { color: rgba(255, 255, 255, .8); font-size: 13.5px; }
.one-rrp { display: flex; gap: 24px; }
.one-rrp b, .one-promo b { display: block; font-size: 22px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.one-promo { box-shadow: inset 4px 0 0 var(--accent), var(--lift); }
.one-promo b { font-size: 17px; }
.one-usp { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.one-kv { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--lift); padding: 16px 18px; }
.one-p { margin: 0 4px; white-space: pre-wrap; }
.one-foot { margin: 22px 4px 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--hair); padding-top: 10px; }
@media print {
  .one { max-width: none; }
  .one-grid { grid-template-columns: 1.1fr 1fr; }
  .one-img { max-height: 105mm; }
  .one-price, .one-rrp, .one-promo, .one-kv, .one-img { box-shadow: none; border: 1px solid #d6dae2; break-inside: avoid; }
  .one-price { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .one .sub { margin-top: 14px; }
}
@media (max-width: 599px) { .mx-hero .hero-top .btn { display: none; } .mx-hero h2 { font-size: 26px; margin-bottom: 12px; } }
.dtable tbody th[scope="row"] { font: 600 14px/1.3 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink); border-bottom: 1px solid var(--hair); padding-top: 10px; padding-bottom: 10px; }
.dtable tbody tr:last-child th[scope="row"] { border-bottom: 0; }
.pd-hero .hero-top { margin-bottom: 16px; }
.pd-actions { --n: 3; }
@media (max-width: 599px) {
  .pd-hero .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .pd-hero .figure:nth-child(3) { padding-left: 0; border-left: 0; }
  .pd-hero .figure b { font-size: 28px; }
  .pd-hero h2.plain { font-size: 21px; }
  .pd-pic, .pd-pic img { width: 76px; height: 76px; }
  .pd-actions .btn { padding: 0 8px; font-size: 14px; }
}
a.chip { text-decoration: none; display: inline-flex; align-items: center; }
.item.multi .s { white-space: normal; }
@media (max-width: 700px) { .mx .mx-name { min-width: 180px; max-width: 220px; } }
.one-name { font: 600 19px/1.25 var(--font); letter-spacing: -0.015em; color: #fff; margin-top: -4px; max-width: 34ch; }
@media print { #toasts { display: none !important; } }

/* ---------- new line forms ---------- */
.nl-forms { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 12px; }
.nl-form { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: var(--r-lg); border: 1.5px solid var(--hair); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--lift); }
.nl-form b { font-size: 15.5px; }
.nl-form span { font-size: 12.5px; color: var(--muted); }
.nl-form.on { border-color: var(--sel); box-shadow: inset 0 0 0 1.5px var(--sel), var(--lift); }
.nl-form.on b::after { content: " ✓"; color: var(--accent-ink); }
.flabel { display: block; font: 700 11.5px/1.2 var(--font-display); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
div.f { margin-bottom: 14px; }
label.chip { cursor: pointer; }
.nl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--hair); }
.nl-bar > div:first-child { flex: 2 1 220px; min-width: 0; }
.nl-bar select { flex: 1 1 160px; width: auto; min-height: 44px; }
.nl-bar .seg { margin: 0; flex: 1 1 240px; }
.nl-bar .seg button { padding: 8px 6px; font-size: 13.5px; }
.nl-list { max-height: 420px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--hair); cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick input { flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
.pick .thumb { width: 38px; height: 38px; }
.pick b { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.pick small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick.on { background: var(--accent-tint); }
.nl-files { display: grid; gap: 10px; }
.nl-file { margin: 0; padding: 14px 16px; }
.nl-file b { overflow-wrap: anywhere; }
.nl-file .xl { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--good-bg); color: var(--good); }
.nl-file .xl svg { width: 20px; height: 20px; }
.nl-lines { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 4px; font-size: 13.5px; }
.nl-lines li span.grow { font-weight: 550; }
.nl-lines li { padding-left: 2px; }
.nl-lines li .small { color: var(--muted); margin-left: 6px; }
#nl-prev .note { margin-top: 12px; }
#nl-prev .note ul { margin-top: 6px; }
#nl-prev .note a { color: inherit; font-weight: 600; }
.mfa-qr { display: grid; place-items: center; padding: 12px; margin: 12px 0; background: #fff; border-radius: var(--r-md); }
.mfa-qr img { width: 200px; height: 200px; }
.mfa-key { display: inline-block; font-family: var(--font-mono); font-size: 12.5px; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); overflow-wrap: anywhere; user-select: all; }

.mx-chgroups { display: grid; gap: 6px; }
.mx-chrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mx-chlabel { flex: none; width: 92px; font: 700 10.5px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.mx-chrow .chips { flex: 1; min-width: 0; }
@media (max-width: 599px) { .mx-chrow { display: grid; gap: 4px; } .mx-chlabel { width: auto; } }
select.mini-sel { flex: none; width: auto; min-height: 40px; padding: 6px 28px 6px 10px; font-size: 13px; }

.drs-cell { text-align: center !important; padding: 0 !important; }
.drs-btn { width: 100%; height: 39px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.drs-btn:hover { background: var(--accent-tint); }
.drs-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.drs-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.drs-mark svg { width: 15px; height: 15px; stroke-width: 2.6; }
.drs-mark.yes { background: var(--good-bg); color: var(--good); }
.drs-mark.no { background: var(--bad-bg); color: var(--bad); }
.drs-tag { display: inline-flex; align-items: center; gap: 4px; }
.drs-tag svg { width: 13px; height: 13px; stroke-width: 2.6; }
.hero .tag.good { background: var(--good-bg); color: var(--good); }
.hero .tag.bad { background: var(--bad-bg); color: var(--bad); }
.pd-barcodes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 14px; }
.pd-barcodes span { display: grid; gap: 2px; }
.pd-barcodes small { font: 700 10px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.pd-barcodes b { font: 500 13.5px var(--font-mono); color: #fff; }
.pd-barcodes b.bad-bc { color: #ffb0a8; }

.mtag.good { background: var(--good-bg); color: var(--good); }
small.capped { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.mk-card .mk-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; margin-bottom: 12px; }
.mk-card .mk-head div { display: grid; gap: 2px; }
.mk-card .mk-head b { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mk-card .mk-head span { font-size: 12.5px; color: var(--muted); }
.mk-verdict { padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 12px; }
.mk-verdict.ok { background: var(--good-bg); color: var(--good); }
.mk-verdict.over { background: var(--bad-bg); color: var(--bad); }
.mk-verdict b { font-weight: 650; }
/* against the shops: every shop's price × our RRPs */
.mk-table th small { display: block; font: 500 11px var(--font); color: var(--muted); text-transform: none; letter-spacing: 0; white-space: normal; max-width: 120px; margin-left: auto; }
.mk-table .mk-rrp { font-variant-numeric: tabular-nums; }
.mk-table tbody th { min-width: 150px; font-weight: 600; }
.mk-table tbody th .small { font-weight: 400; margin-top: 2px; }
.mk-table .mk-bench { background: var(--sel-bg, color-mix(in srgb, var(--sel) 6%, transparent)); }
.mk-table .mk-avg th, .mk-table .mk-avg td { border-top: 1px solid var(--hair); color: var(--muted); }
.mk-table tbody th { max-width: 260px; }
.mk-benchtxt { color: var(--ink-2); font-weight: 600; }
.mk-table tbody th a { color: inherit; }
.mk-shop { font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; padding: 0; }
.mk-look { display: grid; gap: 6px; }
.mk-look .chip { text-decoration: none; padding: 6px 11px; font-size: 12.5px; }
.shops-cell small { font-size: 11px; }
.mk-table tbody th, .mk-table tbody th .small { white-space: normal; }
@media (max-width: 600px) { .mk-table tbody th { min-width: 120px; max-width: 160px; } }
/* shop prices found by the weekly check */
.find-banner { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; margin: 12px 0; padding: 14px 16px; border-left: 4px solid var(--accent, var(--sel)); }
.find-banner .grow { display: grid; gap: 2px; }
.find-banner svg { width: 20px; height: 20px; flex: none; }
.find-tabs { display: flex; margin: 0 0 12px; }
.find-tabs a { flex: 1; text-align: center; text-decoration: none; color: inherit; }
.find-tabs a.on { background: var(--sel); color: var(--surface); }
.find-demo { background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.find-card { padding: 0; overflow: hidden; }
.find-prod { display: flex; gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--hair); }
.find-prod .grow { display: grid; gap: 2px; min-width: 0; }
.find-prod .thumb { width: 40px; height: 40px; border-radius: 8px; flex: none; object-fit: cover; }
.find-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.find-row:last-child { border-bottom: 0; }
.find-shop { display: grid; gap: 2px; }
.find-price { font: 650 18px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.find-price s { color: var(--muted); font-weight: 450; font-size: 14px; }
.find-title { font-size: 14px; min-width: 0; }
.find-title .mtag { min-width: 0; margin-right: 4px; }
.find-acts { display: flex; gap: 8px; }
.mk-auto { color: var(--ink-2); }
@media (max-width: 600px) { .find-row { grid-template-columns: 1fr; } .find-acts .btn { flex: 1; } }
.mk-verdict.warn { background: var(--warn-bg); color: var(--warn); }
.mk-verdict b { font-weight: 650; }
/* settings: sections and lined-up fields */
.set-form .grid2, .set-form .grid3 { align-items: start; }
.set-form .set-h { font: 700 12px/1.2 var(--font-display); letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid var(--hair); }
.set-form h2 + .set-h, .set-form h2 + p + .set-h { border-top: 0; padding-top: 0; margin-top: 6px; }
.set-form .set-row { border-top: 0; padding: 8px 0 10px; }
.set-form .set-note { margin: 8px 2px 4px; }
.set-form .seg { margin-bottom: 4px; }
.set-form > .btn.block { margin-top: 18px; }
.cat-table { display: grid; gap: 8px; margin: 14px 0 0; }
.cat-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; }
.cat-headrow span { font: 700 11px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 2px; }
.cat-name { display: grid; gap: 1px; }
.cat-name b { font-weight: 650; }
.cat-name small { font-size: 12px; color: var(--muted); }
.cat-row .suffix input { width: 100%; }
.cat-cell { display: block; margin: 0; }
.cat-cell .suffix { display: flex; }
.cat-l { display: none; font: 700 10.5px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 2px 5px; }
@media (max-width: 560px) {
  .cat-headrow { display: none; }
  .cat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 0; border-top: 1px solid var(--hair); }
  .cat-row .cat-name { grid-column: 1 / -1; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
  .cat-l { display: block !important; }
}
/* people: names keep their room, the role picker stays compact */
.people-list .item { gap: 12px; }
.people-list .grow { min-width: 0; }
.people-list .grow .t, .people-list .grow .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-list select { width: auto; flex: none; max-width: 48%; }
@media (max-width: 560px) { .cat-row { align-items: end; } }
.set-form .set-h { margin-bottom: 14px; font-size: 13px; }
@media (max-width: 560px) {
  .people-list .item { flex-wrap: wrap; }
  .people-list .grow { flex: 1 1 calc(100% - 60px); }
  .people-list select { flex: 1 1 100%; max-width: none; margin-left: 52px; }
}
