/* ═══════════════════════════════════════════════════════════════
   editor.css — the brand editor's components, shared by the app's brand page
   (app/brand.html) and the public calculator (calculator.html) so the two look
   the same by construction. Moved out of app/app.css section 13 on 2026-10-13.
   app/brand.html loads this file BEFORE app.css (the cascade order those rules
   had inside app.css); calculator.html loads it after shared.css. Class names and
   ids are the pages' JS and test contract. tests/calc-editor-verify.mjs pins the
   two pages to the same computed styles.
   ═══════════════════════════════════════════════════════════════ */

/* Actions menu (was the editor half of app.css section 9's shared dropdown rules) */
.brand-actions-menu {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  padding: 6px;
}
.brand-actions-menu button, .brand-actions-menu a {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 12px;
  border-radius: var(--r);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.brand-actions-menu button:hover, .brand-actions-menu a:hover { background: var(--paper); }
.brand-actions-menu .danger { color: var(--red-700); }
.brand-actions-menu .danger:hover { background: var(--red-100); }
.brand-actions-menu .lock { display: inline-flex; align-items: center; vertical-align: -1px; color: var(--muted); margin-left: 4px; }
.brand-actions-menu .lock svg { width: 12px; height: 12px; }
.brand-actions-menu .divider { height: 1px; background: var(--hair); margin: 6px 4px; }

/* ═══════════════════════════════════════════════
   13. BRAND EDITOR (moved from brand.html's inline <style> in batch 10b;
   class names and ids are the page's JS / test contract)
═══════════════════════════════════════════════ */

/* Tooltip trigger (the "?" after a label / column header; a11y-verify pins
   .tip-icon tabindex + aria-label; the tip-box is replaced by #tooltip-portal) */
.tip { position: relative; display: inline-flex; align-items: center; gap: 3px; cursor: help; }
.tip-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--hair);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
}
.tip:hover .tip-icon, .tip-icon:focus-visible { background: var(--teal-100); color: var(--teal-700); }
.tip-icon:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 1px; }
.tip-box { display: none !important; }
.table-outer thead .tip { display: block; cursor: help; }
.table-outer thead .tip-icon { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.table-outer thead .tip small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 1px; }
#tooltip-portal {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  display: none;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: var(--r);
  width: 240px;
  box-shadow: var(--shadow-lg);
  white-space: normal;
  letter-spacing: 0;
}
#tooltip-portal strong { color: #7FD6CB; font-weight: 600; }
#tooltip-portal::after {
  content: '';
  position: absolute; top: 100%;
  left: var(--arrow-left, 50%); transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
#tooltip-portal.tip-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }

/* Sticky editor head: identity row + actions row, one white block */
.brand-header {
  position: sticky;
  top: 0;
  z-index: 110;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.brand-identity {
  display: flex;
  align-items: flex-end;
  gap: 20px 24px;
  padding: 20px 40px 0;
  flex-wrap: wrap;
}
.brand-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  margin-top: 16px;
  border-top: 1px solid var(--hair);
  flex-wrap: wrap;
}
.brand-actions-bar .bar-div { width: 1px; height: 24px; background: var(--hair-strong); flex-shrink: 0; margin: 0 4px; }
.brand-toolbar-spacer { flex: 1; }
.brand-actions-bar .btn-sm { padding: 9px 14px; }
.brand-actions-bar .btn .ic { width: 15px; height: 15px; }
/* publish state + save status sit between the two button groups */
.brand-state { margin-left: auto; display: flex; align-items: center; gap: 16px; padding: 0 8px; }
.brand-publish-btn, .share-btn { background: #fff; color: var(--ink); border-color: var(--hair-strong); }
.brand-publish-btn:hover, .share-btn:hover { border-color: var(--ink); }
.brand-actions-wrap { position: relative; }
.brand-actions-menu { top: calc(100% + 6px); right: 0; min-width: 220px; }
.brand-actions-menu.open { display: block; }

.brand-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 10px;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.brand-back:hover { color: var(--ink); }

/* Fields: 13px label over an underline control */
.brand-field { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.brand-field-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}
.brand-field-input, .market-select, .market-inline-name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  border-radius: 0;
  padding: 6px 0 7px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.brand-field-input:hover, .market-select:hover, .market-inline-name:hover { border-bottom-color: var(--ink); }
.brand-field-input:focus-visible, .market-select:focus-visible, .market-inline-name:focus-visible { border-bottom-color: var(--teal-600); box-shadow: 0 1px 0 var(--teal-600); }
.brand-field-input::placeholder, .market-inline-name::placeholder { color: var(--muted); }
/* the brand name is a serif underline field */
.brand-field-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  width: 260px;
  padding: 0 0 5px;
}
.brand-field-market { width: 140px; }
.market-select-wrap { display: flex; align-items: center; gap: 12px; }
.market-select, .brand-field-category {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6774' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 14px 14px;
}
.market-select { min-width: 110px; max-width: 220px; }
.market-inline-name { width: 140px; }
.market-count-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--r-full);
  background: var(--teal-100);
  color: var(--teal-700);
  white-space: nowrap;
}
.btn-market-add {
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--teal-700);
  background: #fff;
  border: 1px solid var(--hair-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}
.btn-market-add:hover { border-color: var(--teal-700); }
.btn-market-manage {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-700);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.btn-market-manage:hover { text-decoration: underline; }
/* Margin fields: mono value, underline; the wrapper carries the focus state
   (a11y-verify reads its border colour on :focus-within) */
.margin-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  /* no transition: a11y-verify reads the focused border colour at once */
}
.margin-input-wrap:hover { border-bottom-color: var(--ink); }
.margin-input-wrap:focus-within { border-color: var(--teal-600); box-shadow: 0 1px 0 var(--teal-600); }
.margin-input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  width: 100%;
  padding: 6px 22px 7px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  -moz-appearance: textfield;
}
.margin-input::-webkit-inner-spin-button, .margin-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.margin-pct { position: absolute; right: 2px; font-family: var(--font-sans); font-size: 13px; color: var(--muted); pointer-events: none; }

/* Publish state + save status: dot + text, no pills */
.brand-pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.pub-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hair-strong); flex-shrink: 0; }
.brand-pub-badge.draft .pub-dot { background: var(--amber-700); }
.brand-pub-badge.published .pub-dot { background: var(--green-700); }
.brand-save-status {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--green-700);
  opacity: 0;
  transition: opacity .3s;
  white-space: nowrap;
}
.brand-save-status.visible { opacity: 1; }
.brand-save-status.saving { color: var(--muted); }
.brand-save-status.error { color: var(--red-700); }

/* Editor body */
#brandEditor { padding: 24px 40px 64px; }

/* Summary strip: the dashboard band, smaller, values in tier colour */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 20px 4px;
}
.sum-card { padding: 2px 20px; min-width: 0; }
.sum-card + .sum-card { border-left: 1px solid var(--hair-strong); }
.sum-label { font-family: var(--font-sans); font-size: 13px; font-weight: 500; line-height: 1; color: var(--muted); margin-bottom: 10px; }
.sum-val {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.sum-val.blue { color: var(--ink); }
.sum-val.green { color: var(--teal-700); }
.sum-val.amber { color: var(--amber-700); }
.sum-sub { font-size: 13px; color: var(--muted); margin-top: 7px; }

/* The SKU table: 18 columns sized by the page's <colgroup> (sum 1118px, which
   fits the 1440 content column: 1440 - 240 sidebar - 80 gutters), paper head
   with two sticky rows, hairline rows, editable cells as paper wells, computed
   cells white in their tier colour. Below 1118px of room the wrapper scrolls
   both ways and the SKU column pins left. Every rule is scoped to .table-outer
   so it cannot leak to other tables. */
.table-wrap { position: relative; margin-top: 24px; }
.table-outer {
  overflow: auto;
  max-height: calc(100vh - 150px);
  background: #fff;
  border-radius: var(--r-md);
}
.scroll-fade { display: none; }
.scroll-fade-left { left: 0; }
.scroll-fade-right { right: 0; }
.scroll-hint {
  display: none; /* shown by JS when the table overflows */
  position: absolute;
  /* bottom right: centred it sat on the Add SKU link wherever the table scrolls (phones) */
  bottom: 14px; right: 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-full);
  z-index: 11;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
  animation: hintPulse 1.8s ease-in-out infinite;
  white-space: nowrap;
}
.scroll-hint .ic { width: 14px; height: 14px; vertical-align: -3px; }
@keyframes hintPulse { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

.table-outer table {
  min-width: 1118px;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table-outer caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.table-outer thead th {
  position: sticky;
  z-index: 60;
  background: var(--paper);
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
/* group row: Product + Supplier → Distributor on paper in ink,
   Distributor → Retailer in teal, Retail shelf in amber */
.table-outer thead tr:first-child th {
  top: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 0;
}
.table-outer thead tr:first-child th:first-child { border-top-left-radius: var(--r-md); }
.table-outer thead tr:first-child th:last-child { border-top-right-radius: var(--r-md); }
.table-outer thead .gl { display: inline-flex; align-items: center; gap: 6px; }
.table-outer thead .gl .ic { width: 13px; height: 13px; }
.table-outer thead tr:first-child th.g-dist { background: var(--teal-100); color: var(--teal-700); }
.table-outer thead tr:first-child th.g-sup { color: var(--ink); }
.table-outer thead tr:first-child th.g-ret { background: var(--amber-100); color: var(--amber-700); }
/* column row: label, with the unit on a second line where it is not per case */
.table-outer thead tr:last-child th {
  top: 32px;
  font-size: 13px;
  line-height: 1.25;
  padding: 6px 4px 9px;
  white-space: normal;
  vertical-align: bottom;
  border-bottom: 1px solid var(--hair-strong);
}
.table-outer thead tr:last-child th .th-inner { display: block; padding: 0; }
.table-outer thead th.n { text-align: right; }
/* the row-actions header spans both head rows */
.table-outer thead th.th-actions { top: 0; border-bottom: 1px solid var(--hair-strong); }
.table-outer .div-l { box-shadow: inset 1px 0 var(--hair-strong); }
/* the SKU column pins left while the wrapper scrolls sideways */
.table-outer thead tr:last-child th.c-name { left: 0; z-index: 61; }
.table-outer tbody td.c-name { position: sticky; left: 0; z-index: 5; }

/* body rows: 44px, hairline */
.table-outer tbody td {
  height: 44px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--hair);
  vertical-align: middle;
  background: #fff;
  color: var(--ink);
}
/* editable wells: the input fills the cell less a 2px inset, so neighbouring
   wells sit 4px apart */
.table-outer td.editable { position: relative; }
.table-outer td.editable input, .table-outer td.editable select {
  display: block;
  width: calc(100% + 4px);
  margin: 0 -2px;
  height: 30px;
  padding: 0 7px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 6px;
  outline: none;
  cursor: text;
  transition: box-shadow var(--dur) var(--ease);
}
.table-outer td.editable input[type="number"], .table-outer td.editable select { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table-outer td.editable input[type="number"] { text-align: right; padding: 0 5px; -moz-appearance: textfield; } /* "144.00" fits a 62px well */
.table-outer td.editable input::-webkit-inner-spin-button, .table-outer td.editable input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.table-outer td.editable input:hover, .table-outer td.editable select:hover { box-shadow: inset 0 0 0 1px var(--hair-strong); }
/* solid 2px teal-600 ring for keyboard users (a11y-verify pins its colour) */
.table-outer td.editable input:focus-visible, .table-outer td.editable select:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 0;
  box-shadow: none;
}
.table-outer td.editable select { -webkit-appearance: none; appearance: none; cursor: pointer; padding: 0 14px 0 6px; }
.table-outer .sel-arr {
  position: absolute; right: 5px; top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-50%);
  line-height: 0;
  color: var(--muted);
  pointer-events: none;
}
.table-outer .sel-arr .ic { width: 12px; height: 12px; display: block; }
/* the target shelf price (reverse mode) is the row's input on the retail side */
.table-outer td.editable input.target { font-weight: 600; color: var(--amber-700); }
/* a reverse-mode row shows the solved FOB on white, in the sell-in colour,
   with a "target" mark under it; infeasible = red + the warning icon */
.table-outer td.editable .cv {
  display: block;
  padding: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--teal-700);
  text-align: right;
  white-space: nowrap;
}
.table-outer td.editable .cv.infeasible { color: var(--red-700); }
.table-outer .cv .cv-warn { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.table-outer .cv-mark { display: block; font-family: var(--font-sans); font-size: 13px; font-weight: 500; line-height: 1; color: var(--teal-700); text-align: right; margin-top: 3px; }
.table-outer td.editable .cv.infeasible + .cv-mark { color: var(--red-700); }

/* computed cells */
.table-outer td.computed .cv {
  display: block;
  padding: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  text-align: right;
}
.table-outer td.computed.blue .cv { color: var(--ink); }
.table-outer td.computed.green .cv, .table-outer td.computed.green-gp .cv { color: var(--teal-700); }
.table-outer td.computed.amber .cv { color: var(--amber-700); }
.table-outer td.computed.dim .cv { color: var(--muted); font-weight: 400; }

/* mode toggle (Fwd / Rev): a borderless segmented control, active = ink */
.table-outer td.mode-cell { padding: 7px 3px; text-align: center; }
.table-outer .mode-toggle { display: inline-flex; border-radius: 6px; overflow: hidden; vertical-align: middle; }
.table-outer .mode-toggle button {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  height: 30px;
  padding: 0 4px;
  background: var(--paper);
  border: 0;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.table-outer .mode-toggle button + button { border-left: 1px solid var(--hair-strong); }
.table-outer .mode-toggle button:hover { color: var(--ink); }
.table-outer .mode-toggle button.active { background: var(--ink); color: #fff; }
.table-outer .mode-toggle button:focus-visible { outline: 2px solid var(--teal-600); outline-offset: -2px; }

/* row actions: duplicate + delete as icon buttons (named by aria-label) */
.table-outer td.row-actions { padding: 7px 1px; }
.table-outer .row-btns { display: flex; justify-content: center; }
.table-outer .row-btns button {
  width: 24px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.table-outer .row-btns button .ic { width: 15px; height: 15px; }
.table-outer .row-btns button:hover { background: var(--paper); color: var(--ink); }
.table-outer .row-btns .btn-del:hover { color: var(--red-700); }
.table-outer .row-btns button:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 0; }

/* empty state */
.table-outer td.empty-row-cell { text-align: center; padding: 56px 16px; font-size: 14px; color: var(--muted); }
.table-outer td.empty-row-cell strong { color: var(--ink); font-weight: 600; }

/* add row */
.table-outer tfoot td.add-row-cell { background: #fff; border-bottom: 0; padding: 4px 2px; }
.table-outer .add-row-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-700);
  background: none;
  border: 0;
  padding: 12px 8px;
  border-radius: var(--r);
  cursor: pointer;
  text-align: left;
  transition: background var(--dur) var(--ease);
}
.table-outer .add-row-btn:hover { background: var(--teal-100); }
.table-outer .add-row-btn .ic { width: 16px; height: 16px; }
.table-legend { margin-top: 12px; }

/* Under 1440 the identity row and the action bar tighten so each stays on one
   line down to 1280; the table itself scrolls inside .table-outer */
@media (max-width: 1439px) {
  .brand-identity { gap: 16px 16px; }
  .brand-field-name { width: 200px; }
  .brand-field-category { max-width: 130px; }
  .brand-actions-bar { gap: 6px; }
  .brand-actions-bar .btn-sm { padding: 9px 10px; }
  .brand-state { gap: 12px; padding: 0 4px; }
}
/* Phones: section 15 lifts the row buttons and mode toggle to 44px targets, so
   the columns size to their content there instead of the fixed colgroup */
@media (max-width: 768px) {
  .table-outer table { table-layout: auto; }
}

@keyframes rowIn { from { opacity: 0; background: var(--teal-100); } to { opacity: 1; } }
.table-outer .new-row { animation: rowIn .3s ease both; }

/* Read-only states (viewing a version / comparing) */
body.viewing-version td.editable input,
body.viewing-version td.editable select { pointer-events: none; opacity: .7; }
body.viewing-version .row-btns,
body.viewing-version .add-row-cell,
body.viewing-version .brand-publish-btn,
body.viewing-version .brand-save-status,
body.viewing-version #publishBtn,
body.viewing-version .mode-toggle button,
body.viewing-version .brand-actions-bar .btn-primary,
body.viewing-version #importBtn,
body.viewing-version .btn-market-add,
body.viewing-version .btn-market-manage,
body.viewing-version #brandType { pointer-events: none; opacity: .5; }
body.viewing-version #compareBtn { pointer-events: none; opacity: .5; }
body.viewing-compare td.editable input,
body.viewing-compare td.editable select { pointer-events: none; opacity: .7; }
body.viewing-compare .row-btns,
body.viewing-compare .add-row-cell,
body.viewing-compare .brand-publish-btn,
body.viewing-compare .brand-save-status,
body.viewing-compare #publishBtn,
body.viewing-compare #compareBtn,
body.viewing-compare .mode-toggle button { pointer-events: none; opacity: .5; }
body.viewing-compare #historyBtn { pointer-events: none; opacity: .5; }

/* ── RESPONSIVE (was the editor half of app.css section 15) ── */
@media (max-width: 1360px) {
  .summary-strip { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .sum-card:nth-child(3n+1) { border-left: 0; }
}
@media (max-width: 1200px) {
  .sum-card { padding: 2px 16px; }
  .sum-val { font-size: 24px; }
}
@media (max-width: 768px) {
  .summary-strip { grid-template-columns: 1fr 1fr; padding: 20px 4px; }
  .sum-card { padding: 2px 16px; }
  .sum-card:nth-child(odd) { border-left: 0; }
  .sum-card:nth-child(even) { border-left: 1px solid var(--hair-strong); }
  .brand-identity { padding: 64px 20px 0; gap: 16px 20px; }
  .brand-actions-bar { padding: 12px 20px; gap: 8px; }
  .brand-field-name { width: 100%; font-size: 24px; }
  .brand-field-market, .market-inline-name { width: 120px; }
  #brandEditor { padding: 16px 20px 48px; }
  .table-outer { max-height: none; -webkit-overflow-scrolling: touch; }
  /* shared.css lifts every input/select to 16px on phones: give the wells
     the 8px the 76px Size column no longer has for "12 oz" */
  .table-outer td.editable { padding: 7px 4px; }
  .table-outer td.editable input, .table-outer td.editable select { padding: 0 5px; }
  .table-outer td.editable select { padding: 0 14px 0 5px; }
  .table-outer .sel-arr { right: 7px; }
  .table-outer .row-btns button { min-height: 44px; min-width: 44px; }
  .table-outer .mode-toggle button { min-height: 44px; padding: 8px 10px; }
  .brand-pub-badge { display: none; }
}
@media (max-width: 480px) {
  .summary-strip { grid-template-columns: 1fr; }
  .sum-card { border-left: 0 !important; }
}

/* ── MOTION + PRINT (was the editor half of app.css section 16) ── */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
}
@media print {
  .brand-header, .row-btns, .add-row-cell, .scroll-hint,
  .table-outer .mode-toggle button:not(.active) { display: none !important; }
  .summary-strip { border: 1px solid var(--hair-strong); margin-bottom: 16px; }
  .table-outer { max-height: none; overflow: visible; border: 0; }
  .table-outer table { min-width: 0; font-size: 13px; }
  .table-outer thead tr:first-child th, .table-outer thead tr:last-child th { position: static; }
  .sum-val { font-size: 18px; }
}
