/* MMG Commerce portal, in the MMG brand kit (Brand Guideline Sheet 12.24).
   Authority Black #100f0e, Standout Gold #daa620, White Balance #ffffff,
   Studio Gray #615f5a (lines only), Strategy Silver #d0cec5 (muted text on dark).
   Futura Condensed Extra Bold for titles, Helvetica for everything else,
   Tequila and Tacos as a rare accent. Dark is the default; Light is an option
   set on <html data-theme="light"> from the account menu. */

@font-face { font-family: 'Futura XBC'; src: url('/fonts/futura-xbc.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Tequila and Tacos'; src: url('/fonts/tequila.woff2') format('woff2'); font-display: swap; }

/* Dark (default). .scope-dark keeps brand surfaces (sidebar, sign-in, dashboard band) dark in both themes. */
:root, .scope-dark {
  --paper: #100f0e;
  --paper-2: #23211e;
  --bench: #0a0908;
  --surface: #1a1917;
  --surface-2: #22201d;
  --field: #121110;
  --ink: #ffffff;
  --ink-2: #d0cec5;
  --muted: #aeaca4;
  --faint: #94928b;
  --line: #46443f;
  --line-2: #2e2c29;
  --line-strong: #6e6c66;
  --heading: #daa620;

  --accent: #daa620;
  --accent-hover: #e8b836;
  --accent-ink: #100f0e;
  --accent-soft: #2f2817;
  --accent-text: #daa620;

  --ok: #6fd296; --ok-solid: #4fbf7a; --ok-soft: #1f2e23; --ok-line: #2f5a3d;
  --warn: #f0c070; --warn-dot: #e5a83b; --warn-soft: #302818; --warn-line: #6a5023;
  --bad: #f2928b; --bad-solid: #e0574f; --bad-soft: #352120; --bad-line: #6e3530;
  --info: #9cc8f2; --info-soft: #222b34; --info-line: #34506c;
  --test-a: #d0cec5; --test-b: #a9a79e; --test-ink: #100f0e;
  --danger-bg: #e0574f; --danger-ink: #100f0e;

  --toast-bg: #24221f; --toast-ink: #ffffff; --toast-line: #4a4843;
  --overlay: rgba(5, 5, 4, .72);
  --focus: 0 0 0 3px rgba(218, 166, 32, .5);
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 36px -8px rgba(0, 0, 0, .75);
  --shadow-modal: 0 30px 80px -12px rgba(0, 0, 0, .85);
  --sel: rgba(218, 166, 32, .32);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --font: 'Helvetica LT Pro', Helvetica, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Futura XBC', Futura, 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --script: 'Tequila and Tacos', 'Helvetica LT Pro', Helvetica, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --topbar: 64px;
  --tabbar: 64px;
  color-scheme: dark;
}

html[data-theme='light'] {
  --paper: #f6f4ef;
  --paper-2: #ece9e1;
  --bench: #e4e1d8;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --field: #ffffff;
  --ink: #100f0e;
  --ink-2: #3a3834;
  --muted: #5f5d58;
  --faint: #67655f;
  --line: #dedad0;
  --line-2: #ebe8e0;
  --line-strong: #8f8c83;
  --heading: #100f0e;

  --accent: #daa620;
  --accent-hover: #c9961a;
  --accent-ink: #100f0e;
  --accent-soft: #fbf2d8;
  --accent-text: #765608;

  --ok: #1a6e3f; --ok-solid: #2f9a5d; --ok-soft: #e3f3e9; --ok-line: #a6d6b8;
  --warn: #8c5a00; --warn-dot: #d9921a; --warn-soft: #fcf1dc; --warn-line: #ebc97f;
  --bad: #b3261e; --bad-solid: #b3261e; --bad-soft: #fbe8e6; --bad-line: #efb5ae;
  --info: #1f5e9c; --info-soft: #e5effa; --info-line: #a9c6e6;
  --test-a: #d6d3ca; --test-b: #bdbab0; --test-ink: #100f0e;
  --danger-bg: #b3261e; --danger-ink: #ffffff;

  --toast-bg: #100f0e; --toast-ink: #ffffff; --toast-line: #100f0e;
  --overlay: rgba(16, 15, 14, .55);
  --focus: 0 0 0 3px rgba(184, 134, 11, .45);
  --shadow-pop: 0 1px 2px rgba(16, 15, 14, .06), 0 12px 32px -6px rgba(16, 15, 14, .22);
  --shadow-modal: 0 2px 6px rgba(16, 15, 14, .08), 0 28px 70px -12px rgba(16, 15, 14, .35);
  --sel: rgba(218, 166, 32, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html.has-overlay body { overflow: hidden; }
#app { min-height: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--sel); }
code { font-family: var(--mono); font-size: .88em; background: var(--paper-2); padding: 1px 4px; border-radius: 4px; }
address { font-style: normal; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.center-pad { display: flex; justify-content: center; padding: 32px; }
.tone-accent { color: var(--accent-text); }
.tone-warn { color: var(--warn); }
.tone-bad { color: var(--bad); }
.tone-ok { color: var(--ok); }
.tone-muted { color: var(--muted); }
.mono-num { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; font-size: 1.12em; text-transform: uppercase; }
.mono-input { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- brand type ---------- */
.title-font { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -.02em; }
.label-caps { font-family: var(--font); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.script { font-family: var(--script); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent-text); }

/* ---------- icons, spinner ---------- */
.icon { flex: none; display: block; }
.spinner { display: inline-block; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- brand mark ---------- */
.crown { display: block; width: auto; height: 26px; flex: none; }
.logo { display: block; width: auto; height: 52px; max-width: 100%; flex: none; object-fit: contain; }
.brand-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; background: #100f0e; border: 1px solid #3d3b37; }
.brand-tile .crown { height: 22px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-family: var(--font); font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background-color .12s, border-color .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:not(:disabled):hover { background: var(--surface-2); border-color: var(--accent); }
.btn-secondary.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:not(:disabled):hover { background: var(--paper-2); color: var(--ink); }
.btn-danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-bg); }
.btn-danger:not(:disabled):hover { filter: brightness(.92); }
.danger-text { color: var(--bad) !important; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11.5px; gap: 6px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 13.5px; letter-spacing: .08em; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: transparent;
  color: var(--muted); cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent;
}
.icon-btn:not(:disabled):hover { background: var(--paper-2); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.danger-hover:not(:disabled):hover { color: var(--bad); background: var(--bad-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font-weight: 600; text-align: left; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- inputs ---------- */
.input {
  display: block; width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .12s, box-shadow .12s; appearance: none;
}
.input::placeholder { color: var(--faint); }
.input:hover:not(:disabled) { border-color: var(--ink-2); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input:disabled { background: var(--paper-2); color: var(--muted); }
.input[aria-invalid='true'], .input.is-invalid, .is-invalid > .input { border-color: var(--bad); }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.input-lg { min-height: 48px; font-size: 16px; }
/* iPhones zoom the whole page into any field under 16px, so phones and touch screens get 16px. */
@media (max-width: 860px), (pointer: coarse) { .input, .input-sm, .affix .input { font-size: 16px; } }
.textarea { resize: vertical; line-height: 1.55; min-height: 64px; }
input[type='date'].input { min-height: 42px; }
input[type='search'].input::-webkit-search-cancel-button { cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap select.input { padding-right: 34px; cursor: pointer; }
select.input option, select.input optgroup { background: var(--surface); color: var(--ink); }
.select-wrap > .icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--field); transition: border-color .12s, box-shadow .12s; }
.affix:hover { border-color: var(--ink-2); }
.affix:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.affix.is-invalid { border-color: var(--bad); }
.affix > .input { border: 0; box-shadow: none !important; min-width: 0; background: transparent; }
.affix-pre, .affix-post-label { display: flex; align-items: center; padding: 0 0 0 11px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.affix-post-label { padding: 0 11px 0 0; }
.affix-pre + .input { padding-left: 4px; }

.search { position: relative; min-width: 0; }
.search > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search > .input { padding-left: 36px; }
.grow { flex: 1 1 260px; }

.field { margin-bottom: 18px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.field-label { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field-label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.req-star { color: var(--bad); }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.field-error { display: flex; align-items: flex-start; gap: 6px; color: var(--bad); font-size: 13px; font-weight: 500; margin-top: 6px; }
.field-error .icon { margin-top: 2px; }
.counter { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 500; }
.counter.is-near { color: var(--warn); }
.counter.is-over { color: var(--bad); font-weight: 700; }
.form-error, .form-notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; margin: 4px 0 14px; }
.form-error { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad-line); }
.form-notice { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.form-error .icon, .form-notice .icon { margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field { margin-bottom: 16px; }
.span-2 { grid-column: 1 / -1; }

/* toggle */
.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 6px 0; min-height: 44px; }
.toggle + .toggle { margin-top: 4px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line-strong); position: relative; transition: background-color .15s; margin-top: 1px; }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { background: #100f0e; }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--focus); }
.toggle.is-disabled { opacity: .55; cursor: not-allowed; }
.toggle-text { display: flex; flex-direction: column; gap: 1px; }
.toggle-label { font-weight: 700; font-size: 14.5px; }
.toggle-text .help { margin-top: 0; }

/* segmented + tabs */
.segmented { display: inline-flex; padding: 3px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; gap: 2px; max-width: 100%; }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.segmented button:hover { color: var(--ink); }
.segmented button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 0 0 1px var(--line-strong); }
.segmented button.is-on .icon { color: var(--accent-text); }
.segmented-sm button { min-height: 30px; padding: 0 9px; }
.seg-count { font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 7px; letter-spacing: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.is-on { color: var(--ink); }
.tabs button.is-on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; background: var(--accent); border-radius: 2px 2px 0 0; }
.tab-count { font-size: 11px; background: var(--paper-2); color: var(--ink-2); border-radius: 999px; padding: 1px 7px; letter-spacing: 0; }
.tabs button.is-on .tab-count { background: var(--accent); color: var(--accent-ink); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.badge-neutral { background: var(--paper-2); color: var(--ink-2); border-color: var(--line); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.badge-test { background: repeating-linear-gradient(-45deg, var(--test-a) 0 6px, var(--test-b) 6px 8px); color: var(--test-ink); letter-spacing: .1em; font-weight: 700; font-size: 10.5px; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; line-height: 1; }
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.light-ok { background: var(--ok-solid); box-shadow: 0 0 0 3px var(--ok-soft); }
.light-warn { background: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-soft); }
.light-bad { background: var(--bad-solid); box-shadow: 0 0 0 3px var(--bad-soft); }
.light-neutral { background: var(--faint); box-shadow: 0 0 0 3px var(--paper-2); }
.dot-warn { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); flex: none; }

/* thumbs */
.thumb { display: inline-grid; place-items: center; border-radius: 6px; overflow: hidden; background: var(--paper-2); color: var(--faint); flex: none; border: 1px solid var(--line-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* skeletons */
.skel { height: 14px; border-radius: 5px; background: linear-gradient(90deg, var(--paper-2) 25%, var(--line-2) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skel-lines { display: grid; gap: 12px; }
.table-skel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table-skel-row { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; gap: 16px; padding: 17px 16px; border-bottom: 1px solid var(--line-2); }
.table-skel-row:last-child { border-bottom: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty / error */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; gap: 8px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 4px; }
.empty-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -.01em; font-size: 22px; color: var(--heading); }
.empty-body { color: var(--muted); max-width: 42ch; font-size: 14px; }
.empty .btn { margin-top: 10px; }
.error-state { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--bad-line); background: var(--bad-soft); color: var(--bad); border-radius: var(--r-md); flex-wrap: wrap; }
.error-state > div { flex: 1 1 200px; }
.error-title { font-weight: 700; }
.error-body { color: var(--ink-2); font-size: 14px; }
.error-state.is-compact { padding: 12px; }

/* banners */
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 18px; font-size: 14px; flex-wrap: wrap; }
.banner > span { flex: 1 1 220px; }
.banner > div { flex: 1 1 260px; }
.banner-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--ink); }
.banner-warn > .icon { color: var(--warn); }
.banner-big { padding: 16px; align-items: flex-start; }
.banner-big > .icon { margin-top: 2px; }
.banner-test { background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--ink-2); padding: 8px 12px; }
.offline-bar { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 8px 16px; background: var(--danger-bg); color: var(--danger-ink); font-size: 13.5px; font-weight: 700; }

/* ---------- boot + auth ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.boot-loading { display: flex; flex-direction: column; align-items: center; gap: 22px; color: var(--accent-text); }
.boot-loading .crown { height: 40px; }
.boot-card { max-width: 420px; width: 100%; display: grid; gap: 14px; justify-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }

/* Sign in: full-bleed marble, darkened so the form reads. Always dark. */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 480px); align-items: center; gap: 48px; padding: 48px clamp(24px, 6vw, 96px); background: #100f0e; color: #ffffff; overflow: hidden; isolation: isolate; }
.auth::before { content: ''; position: absolute; inset: 0; z-index: -2; background: #100f0e url('/brand/marble-bg.jpg') center / cover no-repeat; opacity: .55; }
.auth::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(16, 15, 14, .35) 0%, rgba(16, 15, 14, .55) 45%, rgba(16, 15, 14, .9) 75%), radial-gradient(ellipse at 20% 80%, rgba(16, 15, 14, 0), rgba(16, 15, 14, .5)); }
.auth-side { display: flex; flex-direction: column; gap: 28px; max-width: 560px; }
.auth-side .logo { height: clamp(96px, 11vw, 150px); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)); }
.auth-tagline { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(40px, 4.6vw, 68px); line-height: .92; color: #ffffff; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.auth-tagline .script { display: block; font-size: .8em; line-height: 1.05; margin-top: 10px; color: #daa620; text-shadow: none; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #d0cec5; font-size: 15px; }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.auth-points .icon { color: #daa620; }
.auth-foot { position: absolute; left: clamp(24px, 6vw, 96px); bottom: 22px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(208, 206, 197, .72); }
.auth-main { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 440px; background: rgba(26, 25, 23, .94); border: 1px solid rgba(97, 95, 90, .62); border-radius: 18px; padding: 34px 32px 28px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.auth-mobile-brand { display: none; }
.auth-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -.02em; font-size: 40px; line-height: 1; color: #daa620; margin-bottom: 8px; }
.auth-sub { color: var(--muted); margin-bottom: 22px; }
.auth-card form { margin-top: 18px; }
.auth-card .btn-block { margin-top: 8px; }
.auth-alt { display: block; margin: 16px auto 0; }
.demo-logins { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.demo-title { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.demo-title .icon { color: var(--accent-text); }
.demo-login {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 11px 14px; min-height: 44px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--ink); cursor: pointer;
}
.demo-login:hover { border-color: var(--accent); }
.demo-label { font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.demo-who { grid-row: 2; font-size: 13px; color: var(--muted); }
.demo-email { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.shell.is-editor { grid-template-columns: 64px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px 14px; border-right: 1px solid var(--line); background: var(--paper); color: var(--ink); isolation: isolate; overflow: hidden; }
.sidebar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/brand/marble-bg.jpg') 30% 40% / 900px auto no-repeat; opacity: .16; pointer-events: none; }
html[data-theme='light'] .sidebar::before { display: none; }
.sidebar-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 10px 22px; margin-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.sidebar-brand .logo { height: 54px; }
.sidebar-brand-text { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-top: 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-weight: 700; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; text-decoration: none !important; position: relative; }
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item.is-on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav-item.is-on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.is-on .icon { color: var(--accent-text); }
.nav-label { flex: 1; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); padding: 20px 10px 6px; }
.sidebar-foot { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.sidebar.is-rail { padding: 14px 10px; align-items: center; }
.sidebar.is-rail .sidebar-brand { padding: 4px 0 16px; align-items: center; border-bottom: 0; }
.sidebar-brand .crown { height: 24px; }
.sidebar.is-rail .sidebar-brand-text, .sidebar.is-rail .nav-label, .sidebar.is-rail .sidebar-foot, .sidebar.is-rail .nav-group { display: none; }
.sidebar.is-rail::before { opacity: .1; }
.sidebar.is-rail .nav-item { width: 44px; height: 44px; justify-content: center; padding: 0; }
.sidebar.is-rail .nav-item .count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; font-size: 10.5px; padding: 0 4px; }
.sidebar.is-rail .nav-item.is-on::before { left: -10px; }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-mark { display: flex; align-items: center; text-decoration: none !important; padding-right: 12px; border-right: 1px solid var(--line); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); }
.site-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-name-btn { border: 0; background: none; padding: 8px 10px; margin-left: -10px; border-radius: 7px; cursor: pointer; min-height: 40px; }
.site-name-btn:hover { background: var(--paper-2); }
.site-name-btn .icon { color: var(--accent-text); }
.site-switch { min-width: 0; }
.live-link { color: var(--ink-2); }
.live-link .icon { color: var(--accent-text); }
.avatar-btn { border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #100f0e; border: 1px solid #615f5a; overflow: hidden; }
.avatar .crown { height: 15px; }
.avatar-letter { font-weight: 700; font-size: 14px; color: #daa620; }
.avatar-btn:hover .avatar { border-color: var(--accent); }
.main { flex: 1; min-width: 0; outline: none; }

/* menus */
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 220px; max-width: min(320px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 6px; animation: pop .12s ease-out; }
.menu-right { right: 0; }
.menu-left { left: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); font-size: 14.5px; cursor: pointer; text-align: left; text-decoration: none !important; }
.menu-item.is-on .icon { color: var(--accent-text); }
.menu-item .menu-check { margin-left: auto; color: var(--accent-text); }
.menu-item:hover { background: var(--paper-2); }
.menu-item .icon { color: var(--muted); }
.menu-item.is-danger, .menu-item.is-danger .icon { color: var(--bad); }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.menu-who strong { color: var(--ink); font-size: 14.5px; }
.menu-role { margin-top: 4px; font-size: 10.5px; color: var(--accent-text); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.menu-label { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 8px 10px 4px; }
.menu-sep { height: 1px; background: var(--line-2); margin: 6px 0; }
.menu-scroll { max-height: 50vh; overflow-y: auto; }

/* tab bar (mobile) */
.tabbar { display: none; }

/* ---------- pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head-main { min-width: 0; }
.page-title { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: .95; text-transform: uppercase; letter-spacing: -.02em; color: var(--heading); }
.page-sub { color: var(--muted); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; background: none; border: 0; padding: 4px 0; cursor: pointer; min-height: 32px; }
.back-link:hover { color: var(--ink); text-decoration: none; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar-tabs { align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 12px 20px; }
.toolbar-tabs .tabs { border-bottom: 0; flex: 1 1 auto; }
.toolbar-tabs .search { flex: 0 1 300px; margin-bottom: 8px; }
.toolbar .select-wrap { flex: 0 0 auto; }

.card, .panel, .form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.card { padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.card-title { font-weight: 700; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.card-note { background: var(--warn-soft); border-color: var(--warn-line); }

/* ---------- home ---------- */
.home-hero { position: relative; isolation: isolate; overflow: hidden; margin: 0 0 16px; padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #100f0e; color: #ffffff; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/brand/marble-bg.jpg') 70% 35% / 1100px auto no-repeat; opacity: .42; }
.home-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(16, 15, 14, .92) 0%, rgba(16, 15, 14, .6) 55%, rgba(16, 15, 14, .25) 100%); }
.home-hero .page-head { margin-bottom: 0; }
.home-hero .page-title { color: #ffffff; font-size: 52px; }
.home-hero .page-title .greet-word { white-space: nowrap; }
.home-hero .page-title .script { display: inline-block; color: #daa620; font-size: 1.55em; line-height: .7; margin: 0 .04em 0 .14em; -webkit-text-stroke: .018em #daa620; transform: rotate(-4deg) translateY(.06em); }
.home-hero .page-sub { color: rgba(208, 206, 197, .85); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 10px; }
.status-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px;
}
.status-card.is-pending { border-color: var(--warn-line); box-shadow: inset 4px 0 0 var(--warn-dot); }
.status-card.is-live { box-shadow: inset 4px 0 0 var(--ok-solid); }
.status-card-main { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 340px; }
.status-card-main .light { margin-top: 8px; }
.status-card-title { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: -.015em; }
.status-card-sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.status-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 20px; overflow: hidden; }
.stat { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 18px; color: var(--ink); text-decoration: none !important; border-right: 1px solid var(--line-2); min-width: 0; }
.stat:last-child { border-right: 0; }
a.stat:hover { background: var(--surface-2); }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { font-family: var(--display); font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.stat-go { position: absolute; right: 14px; top: 16px; color: var(--faint); }
a.stat:hover .stat-go { color: var(--accent-text); }
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { min-width: 0; display: flex; flex-direction: column; }
.panel-activity { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-title { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; color: var(--heading); }
.panel-link { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.panel .empty { padding: 28px 16px; }
.rows { list-style: none; margin: 0; padding: 4px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; min-height: 56px; color: var(--ink); text-decoration: none !important; }
.row:hover { background: var(--surface-2); }
.row-main { min-width: 0; }
.row-title { display: flex; gap: 8px; align-items: baseline; overflow: hidden; white-space: nowrap; }
.row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row-title .muted { overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.row-meta { font-size: 13px; color: var(--muted); }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.row-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex-direction: row; }
.feed { list-style: none; margin: 0; padding: 8px 18px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.feed-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--paper-2); color: var(--muted); }
.feed-item.tone-ok .feed-icon { background: var(--ok-soft); color: var(--ok); }
.feed-item.tone-accent .feed-icon { background: var(--accent-soft); color: var(--accent-text); }
.feed-item.tone-info .feed-icon { background: var(--info-soft); color: var(--info); }
.feed-item.tone-bad .feed-icon { background: var(--bad-soft); color: var(--bad); }
.feed-body { display: flex; flex-direction: column; min-width: 0; font-size: 14px; color: var(--ink); }
.feed-body a { color: var(--ink); }
.feed-time { font-size: 12.5px; color: var(--faint); }
.feed-wide { grid-template-columns: 1fr; padding: 4px 0; }
.feed-site { font-weight: 700; color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.table-wrap.is-stale { opacity: .6; transition: opacity .2s; }
.list-more { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.row-link.is-unread .cell-title { font-weight: 700; }
.row-link.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.cell-title { font-weight: 700; color: var(--ink); }
.cell-title:hover { color: var(--accent-text); }
.cell-strong { font-weight: 600; }
.cell-sub { font-size: 13px; color: var(--muted); display: block; }
.cell-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.cell-badges:empty { display: none; }
.cell-actions { text-align: right; width: 1%; white-space: nowrap; }
.cell-error { font-size: 12px; color: var(--bad); margin-top: 3px; }
.col-thumb { width: 64px; padding-right: 0 !important; }
.show-sm { display: none !important; }
.feat { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--accent-text); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.code-btn { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); letter-spacing: .03em; font-size: 14px; }

/* ---------- forms (product, settings) ---------- */
.page-form { padding-bottom: 120px; }
.form-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.form-main, .form-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.form-side { position: sticky; top: calc(var(--topbar) + 16px); }
.form-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.form-card-title { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; color: var(--heading); }
.form-card-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.form-card-body { padding: 14px 20px 20px; }
.form-card-body > .segmented { margin-bottom: 4px; }
.page-settings .form-card { margin-bottom: 16px; }
.url-preview { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.save-bar {
  position: relative; bottom: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 20px -32px -64px; padding: 12px 32px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.save-bar.is-dirty { position: sticky; }
.save-bar-actions { display: flex; gap: 8px; margin-left: auto; }
.save-bar-error { display: flex; align-items: center; gap: 6px; color: var(--bad); font-weight: 600; font-size: 14px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.row-actions.right { justify-content: flex-end; }
.option-row, .line-row, .spec-row, .tax-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.option-name { flex: 0 0 34%; }
.option-values { flex: 1; }
.line-list { list-style: none; padding: 0; margin: 0; }
.line-row .input { flex: 1; }
.spec-rows { margin-bottom: 8px; }
.spec-row .input:first-child { flex: 0 0 38%; }
.spec-row .input:nth-child(2) { flex: 1; }
.variants-wrap { position: relative; overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table-variants { font-size: 14px; min-width: 520px; }
.table-variants th { background: none; padding: 6px 6px; border-bottom: 1px solid var(--line-2); }
.table-variants td { padding: 6px; border-bottom: 0; vertical-align: top; }
.table-variants .input { min-height: 40px; }
.table-variants .affix .input { min-height: 38px; }
.variant-name { font-weight: 600; padding-top: 15px !important; white-space: nowrap; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.img-grid-item { position: relative; display: flex; flex-direction: column; gap: 4px; }
.img-grid-item .thumb { border-radius: 8px; }
.img-grid-item.is-main .thumb { box-shadow: 0 0 0 2px var(--accent); }
.img-main-tag { position: absolute; top: 6px; left: 6px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; }
.img-grid-tools { display: flex; justify-content: center; }
.img-grid-tools .icon-btn { width: 32px; height: 32px; }
.img-fp-tag { background: var(--ok-solid); color: #fff; }
.img-grid-tools .icon-btn.is-on { color: var(--ok-solid); }
.img-grid-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 96px; height: 96px; border: 1.5px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.img-grid-lg .img-grid-add { width: 120px; height: 120px; }
.img-grid-add:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.ship-classes { display: grid; gap: 12px; margin-bottom: 18px; }
.ship-class { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: var(--surface-2); }
.ship-class .ship-label { background: var(--field); }
.ship-class-head { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ship-label { flex: 1 1 200px; font-weight: 600; min-height: 36px; padding: 6px 10px; }
.ship-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ship-rates .field { margin-bottom: 0; }
.sub-block { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 8px; }
.tax-rows { margin: 14px 0 0; }
.tax-state { flex: 0 0 80px; text-transform: uppercase; text-align: center; font-weight: 600; }
.tax-row .affix { flex: 0 1 140px; }
.team-help { margin-top: 14px; }
.kv { margin: 0; display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.kv-stack { margin: 14px 0; }
.kv-creds { margin: 14px 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; }
.temp-pass { font-size: 17px; font-weight: 700; color: var(--accent-text); }

/* ---------- orders detail ---------- */
.detail-sub { font-size: 14px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: -10px 0 16px; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.detail-side .card + .card, .detail-main .card + .card { margin-top: 14px; }
.line-items { list-style: none; margin: 0; padding: 0; }
.line-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.line-item-main { min-width: 0; }
.line-item-main a { color: var(--ink); }
.line-item-qty { color: var(--muted); font-size: 14px; white-space: nowrap; }
.line-item-total { font-weight: 600; text-align: right; min-width: 80px; }
.totals { margin: 12px 0 0 auto; max-width: 340px; display: grid; gap: 6px; font-size: 14.5px; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 700; font-size: 15px; align-items: baseline; }
.totals-total dt { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.totals-total dd { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: -.01em; color: var(--heading); }
.totals-total dt { color: var(--ink); }
.code { font-family: var(--mono); font-size: 12px; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.contact-links { display: grid; gap: 4px; margin-top: 8px; }
.contact-link { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; overflow-wrap: anywhere; }
.address { line-height: 1.55; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 12px; padding: 0 0 14px; position: relative; font-size: 14px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.tl-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); margin-top: 5px; }
.tl-dot.is-ok { border-color: var(--ok-solid); background: var(--ok-solid); }

/* ---------- requests ---------- */
.drawer-sub-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.org-line { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 14px; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.contact-actions .btn { flex: 1 1 140px; }
.drawer-section { margin-top: 20px; }
.drawer-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.message { margin: 0; padding: 12px 14px; background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 15px; }
.req-products { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.req-products a, .req-products span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- MMG ---------- */
.health { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.mmg-feed { margin-top: 28px; }
.mmg-feed .tabs { margin-bottom: 14px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.req-card.is-new { box-shadow: inset 3px 0 0 var(--accent); }
.req-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.req-site { font-weight: 700; color: var(--ink); }
.req-head time { margin-left: auto; }
.req-body { font-size: 15px; }
.req-quote { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.req-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- more (mobile) ---------- */
.more-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.more-list li + li { border-top: 1px solid var(--line-2); }
.more-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 64px; color: var(--ink); text-decoration: none !important; }
.more-item:hover { background: var(--surface-2); }
.more-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.more-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.more-label { font-weight: 700; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; }
.more-sub { font-size: 13px; color: var(--muted); }
.more-foot { margin-top: 24px; display: grid; gap: 10px; justify-items: start; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; top: var(--vv-top, 0px); bottom: auto; height: var(--vv-h, 100%); z-index: 80; background: var(--overlay); display: grid; place-items: center; padding: 24px; animation: fade .15s ease-out; overscroll-behavior: contain; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-height: min(88vh, 900px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); outline: none; animation: rise .18s cubic-bezier(.2, .8, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 820px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--line-2); }
.modal-title { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; text-transform: uppercase; letter-spacing: -.015em; color: var(--heading); }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.foot-note { margin-right: auto; }
.confirm-body { color: var(--ink-2); }
.overlay-drawer { place-items: stretch end; padding: 0; grid-template-rows: minmax(0, 1fr); }
.drawer { width: min(520px, 100vw); height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-modal); outline: none; animation: slide .2s cubic-bezier(.2, .8, .3, 1); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 16px 14px 22px; border-bottom: 1px solid var(--line-2); }
.drawer-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.drawer-body { padding: 18px 22px 28px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 20px; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 8px 11px 14px; border-radius: var(--r-md); background: var(--toast-bg); color: var(--toast-ink); border: 1px solid var(--toast-line); box-shadow: var(--shadow-pop); font-size: 14.5px; animation: rise .2s ease-out; }
.toast-ok .icon:first-child { color: #4fbf7a; }
.toast-info .icon:first-child { color: #daa620; }
.toast-error { background: #3a1a18; border-color: #e0574f; color: #ffffff; }
.toast-error .icon:first-child { color: #f2928b; }
.toast-msg { flex: 1; }
.toast-action { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 8px; }
.toast-x { border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; }
.toast-x:hover { opacity: 1; }

/* publish */
.publish-summary > p { margin-bottom: 8px; }
.publishing { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--r-sm); margin-bottom: 14px; }
.publishing .spinner { margin-top: 3px; color: var(--accent-text); }
.publish-note-box { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 14px 0 18px; }
.publish-note-box .icon { margin-top: 2px; color: var(--muted); }
.publish-done { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 8px 0; }
.publish-done-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-bottom: 6px; }
.changes { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 300px; overflow-y: auto; }
.change { padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.change:last-child { border-bottom: 0; }
.change-label { font-weight: 700; margin-bottom: 2px; }
.crumb-sec { color: var(--muted); font-weight: 500; }
.change-vals { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; color: var(--ink-2); }
.change-before { text-decoration: line-through; text-decoration-color: var(--bad-solid); color: var(--muted); overflow-wrap: anywhere; }
.change-after { color: var(--ink); overflow-wrap: anywhere; }
.change-arrow { color: var(--faint); align-self: center; }
.change-more { color: var(--muted); font-style: italic; }
.change-img { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.change-img .thumb { border-radius: 5px; }
.change-before .change-img .thumb { opacity: .55; }
.changes.is-compact { max-height: none; border: 0; }
.changes.is-compact .change { padding: 7px 0; }

/* media picker */
.media-modal .modal-body { min-height: 380px; }
.media-modal .tabs { margin-bottom: 16px; }
.upload-pane { display: grid; gap: 12px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 220px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; padding: 20px; position: relative; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { box-shadow: var(--focus); }
.dropzone.has-file { padding: 10px; }
.dropzone-preview { max-height: 260px; width: auto; border-radius: 6px; }
.dropzone-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--accent-text); border: 1px solid var(--line); margin-bottom: 4px; }
.dropzone-title { font-weight: 700; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; }
.library-pane .search { margin-bottom: 14px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; border-radius: 8px; }
.media-thumb { width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: 8px; }
.media-tile:hover .media-thumb { box-shadow: 0 0 0 2px var(--accent); }
.media-tile.is-on .media-thumb { box-shadow: 0 0 0 3px var(--accent); }
.media-cap { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-check { position: absolute; top: 6px; right: 6px; box-shadow: 0 0 0 2px #100f0e; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.pick-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 6px 10px; min-height: 52px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; }
.pick-row:hover { background: var(--surface-2); }
.pick-row.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.pick-row.is-disabled { opacity: .5; cursor: not-allowed; }
.pick-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pick-name { flex: 1; font-weight: 500; }
.pick-pos { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

/* ---------- website editor ---------- */
.editor { display: flex; flex-direction: column; height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); min-height: 520px; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--paper); }
.editor-head .page-title { line-height: 1; }
.editor-title { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex-wrap: wrap; }
.editor-title .page-title { font-size: 34px; }
.editor-actions { display: flex; align-items: center; gap: 8px; }
.editor-sub { display: flex; align-items: center; gap: 8px; padding: 7px 20px; background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); color: var(--ink); font-size: 13.5px; }
.save-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 500; min-width: 0; }
.save-status.is-saved .icon { color: var(--ok-solid); }
.save-status.is-error { color: var(--bad); }
.save-status.is-error .link-btn { color: var(--bad); font-weight: 600; }
.editor-panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(340px, 440px) minmax(0, 1fr); }
.editor.has-chat .editor-panes { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
.pane { min-height: 0; overflow-y: auto; }
.pane-sections { border-right: 1px solid var(--line); padding: 12px 10px; background: var(--paper); }
.pane-form { border-right: 1px solid var(--line); background: var(--surface); padding: 0 22px 60px; scroll-padding: 80px; }
.pane-chat { border-right: 1px solid var(--line); background: var(--surface); overflow: hidden; display: flex; }
.pane-preview { background: var(--bench); overflow: hidden; display: flex; }
.sections ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.section-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.section-btn:hover { background: var(--paper-2); color: var(--ink); }
.section-btn.is-on { background: var(--accent-soft); color: var(--ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.section-btn.is-on .section-icon { color: var(--accent-text); }
.section-icon { color: var(--muted); display: flex; }
.section-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.section-help { font-size: 13px; color: var(--muted); font-weight: 400; }
.section-flag { display: flex; color: var(--warn); }
.section-flag.is-error { color: var(--bad); }
.section-go { color: var(--faint); }
.form-head { position: sticky; top: 0; z-index: 5; background: var(--surface); padding: 18px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.form-title { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: -.015em; color: var(--heading); }
.form-help { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.section-form { min-width: 0; }
.section-form > .field, .section-form > .group, .section-form > .list-field { margin-bottom: 22px; }
.list-items { grid-template-columns: minmax(0, 1fr); }
.group { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.group-legend { font-family: var(--font); font-weight: 700; font-size: 12.5px; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; padding: 0; margin-bottom: 14px; display: flex; gap: 8px; align-items: baseline; color: var(--accent-text); }
.group-legend .counter { letter-spacing: 0; }
.group-help { margin: -6px 0 12px; }
.group-body { padding-left: 14px; border-left: 2px solid var(--line); min-width: 0; }
.group .group .group-legend { font-size: 11.5px; color: var(--ink-2); }
.list-field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.list-items { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.list-item { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.list-item.is-open { border-color: var(--line-strong); }
.list-item.has-error { border-color: var(--bad-line); }
.list-item-head { display: flex; align-items: center; gap: 2px; padding-right: 4px; }
.list-item-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 4px 6px 10px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.list-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--paper-2); font-family: var(--display); font-size: 15px; font-weight: 400; color: var(--accent-text); flex: none; }
.list-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.list-item-toggle .icon { color: var(--faint); }
.list-item-tools { display: flex; }
.list-item-tools .icon-btn { width: 34px; height: 34px; }
.list-item-body { padding: 4px 12px 14px; border-top: 1px solid var(--line-2); }
.list-item-body .field { margin-bottom: 14px; margin-top: 10px; }
.list-empty { margin-bottom: 10px; }
.list-add { margin-top: 2px; }
.rt-hint { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.field-bool { margin-bottom: 14px; }
.img-field { display: flex; gap: 14px; align-items: flex-start; }
.img-field-thumb { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.img-field-thumb .thumb { border-radius: 8px; }
.img-field-thumb:hover .thumb { box-shadow: 0 0 0 2px var(--accent); }
.img-field-side { flex: 1; min-width: 0; display: grid; gap: 8px; }
.img-field-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.chip-row { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-height: 44px; }
.chip-row.is-missing { border-color: var(--warn-line); background: var(--warn-soft); }
.chip-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-tools { display: flex; }
.chip-tools .icon-btn { width: 32px; height: 32px; }
[data-path].flash { animation: flash 1.6s ease-out; border-radius: 8px; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); } 100% { box-shadow: 0 0 0 4px transparent; background: transparent; } }

/* preview */
.preview { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.preview-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.preview-page { flex: 0 1 260px; min-width: 0; }
.preview-bar .segmented { margin-left: auto; }
.preview-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); font-size: 14px; flex-wrap: wrap; }
.preview-banner strong { text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; }
.preview-banner > span:nth-child(2) { flex: 1 1 180px; }
.preview-banner-actions { display: flex; gap: 6px; }
.preview-banner .btn-ghost { color: var(--accent-ink); }
.preview-banner .btn-ghost:hover { background: rgba(16, 15, 14, .12); color: var(--accent-ink); }
.preview-banner .btn-primary { background: #100f0e; color: #daa620; border-color: #100f0e; }
.preview-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; padding: 0; }
.preview-stage.is-phone { padding: 18px 0; display: flex; justify-content: center; overflow: hidden; }
.preview-frame-wrap { position: relative; height: 100%; overflow: hidden; background: #fff; margin: 0 auto; }
.preview-frame-wrap.is-phone { width: 390px; border-radius: 22px; box-shadow: 0 0 0 8px #100f0e, 0 0 0 9px #3d3b37, 0 20px 50px -18px rgba(0, 0, 0, .7); }
.preview-frame { position: absolute; top: 0; left: 0; border: 0; background: #fff; visibility: hidden; }
.preview-frame.is-active { visibility: visible; }
.preview-msg { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; color: var(--ink-2); background: var(--bench); }
.preview-msg-over { background: color-mix(in srgb, var(--bench) 92%, transparent); }
.preview-msg .muted { max-width: 36ch; }

/* chat */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line-2); }
.chat-head-title { display: flex; align-items: center; gap: 10px; }
.chat-head h2 { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; color: var(--heading); }
.chat-glyph { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-intro { display: grid; gap: 10px; }
.chat-intro-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.chat-examples { display: grid; gap: 8px; margin-top: 8px; }
.chat-example { text-align: left; padding: 11px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; font-size: 14.5px; color: var(--ink); }
.chat-example:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.chat-example:disabled { opacity: .55; cursor: not-allowed; }
.chat-offline { display: flex; gap: 10px; padding: 12px 14px; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-md); font-size: 14px; }
.chat-offline .icon { color: var(--warn); margin-top: 2px; }
.msg { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.msg-user { align-items: flex-end; }
.bubble { padding: 10px 13px; border-radius: 12px; font-size: 14.5px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-user .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg-ai .bubble { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble-error { display: flex; gap: 8px; background: var(--bad-soft) !important; color: var(--bad) !important; }
.bubble-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--muted) !important; }
.mmg-note { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); font-weight: 600; }
.mmg-note .crown { height: 14px; }
.proposal { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface); }
.proposal.is-pending { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.proposal.is-dismissed { opacity: .6; }
.proposal-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 4px; }
.proposal-state { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.proposal-state.ok { color: var(--ok); }
.proposal-state.live { color: var(--accent-text); font-weight: 600; }
.proposal-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
.chat-input { resize: none; min-height: 44px; max-height: 140px; }
.chat-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.chat-send:disabled { opacity: .4; cursor: not-allowed; }
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.version { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.version.is-live { border-color: var(--ok-line); box-shadow: inset 3px 0 0 var(--ok-solid); }
.version-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.version-when { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.version-note { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.version-changes { margin-top: 8px; font-size: 13.5px; }
.version-changes summary { cursor: pointer; color: var(--accent-text); font-weight: 600; min-height: 32px; display: flex; align-items: center; }

/* mobile editor */
.editor.is-mobile { height: auto; min-height: 0; }
.editor-mobile { padding: 0 0 24px; }
.editor-mobile .pane-form { border: 0; padding: 0 16px 40px; background: var(--paper); }
.editor-mobile .form-head { background: var(--paper); top: var(--topbar); }
.editor-mobile .sections { padding: 8px 16px; }
.editor-mobile .section-btn { min-height: 60px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; padding: 10px 12px; }
.mobile-preview-cta { padding: 12px 16px 4px; }
.mobile-preview { position: fixed; inset: 0; z-index: 70; background: var(--bench); display: flex; flex-direction: column; animation: fade .15s; }
.mobile-preview .preview-bar { padding-top: calc(10px + env(safe-area-inset-top)); }
.mobile-preview .preview-page { flex: 1 1 auto; }
.mobile-preview .preview-frame-wrap { width: 100% !important; }
.sheet-overlay { position: fixed; inset: 0; z-index: 75; background: var(--overlay); display: flex; align-items: flex-end; animation: fade .15s; }
.sheet { width: 100%; height: min(88dvh, 760px); background: var(--surface); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: up .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-preview-cta { padding: 0 14px 10px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .editor-panes { grid-template-columns: 196px minmax(320px, 380px) minmax(0, 1fr); }
  .form-cols, .detail-cols { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .feed { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .home-hero { margin: 0 0 14px; padding: 20px 16px 18px; border-radius: var(--r-md); }
  .home-hero .page-title { font-size: 40px; line-height: 1.1; }
  .home-hero .page-title .script { font-size: 1.4em; }
  .shell, .shell.is-editor { grid-template-columns: 1fr; }
  .shell-main { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 8px 0 16px; gap: 10px; }
  .topbar .crown { height: 22px; }
  .site-name { font-size: 21px; }
  .live-link { padding: 0 10px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--paper) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important; position: relative; -webkit-tap-highlight-color: transparent; }
  .tab.is-on { color: var(--accent-text); }
  .tab.is-on::before { content: ''; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tab-icon { position: relative; display: flex; }
  .tab-icon .count { position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; box-shadow: 0 0 0 2px var(--paper); }
  .page { padding: 18px 16px 40px; }
  .page-head { margin-bottom: 16px; align-items: flex-start; }
  .page-title { font-size: 38px; }
  .page-actions { width: 100%; }
  .page-actions > .btn, .page-actions > a.btn { flex: 1; }
  .toolbar > .segmented { width: 100%; }
  .toolbar > .segmented button { flex: 1; }
  .toolbar .select-wrap { flex: 1 1 160px; }
  .toolbar-tabs { border-bottom: 0; }
  .toolbar-tabs .tabs { border-bottom: 1px solid var(--line); width: 100%; margin: 0 -16px; padding: 0 8px; flex-basis: calc(100% + 32px); }
  .toolbar-tabs .search { flex: 1 1 100%; margin: 4px 0 0; }
  .hide-sm { display: none !important; }
  .show-sm { display: block !important; }
  .table td, .table th { padding: 11px 10px; }
  .table td:first-child, .table th:first-child { padding-left: 12px; }
  .table td:last-child, .table th:last-child { padding-right: 12px; }
  .table-wrap { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .col-thumb { width: 54px; }
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: clamp(30px, 9vw, 40px); }
  .stat-go { right: 10px; top: 14px; }
  .status-card { padding: 16px; }
  .status-card-actions { width: 100%; }
  .status-card-actions > * { flex: 1; }
  .form-cols, .detail-cols { grid-template-columns: minmax(0, 1fr); }
  .form-side { position: static; order: -1; }
  .form-card-head { padding: 14px 16px 0; }
  .form-card-body { padding: 12px 16px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .save-bar { margin: 20px -16px -40px; padding: 10px 16px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .save-bar-actions { width: 100%; }
  .save-bar-actions .btn { flex: 1; }
  .page-form { padding-bottom: 60px; }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1 1 auto; }
  .line-item { grid-template-columns: auto 1fr auto; }
  .line-item-qty { grid-column: 2; grid-row: 2; }
  .line-item-total { grid-row: 1 / 3; grid-column: 3; }
  .totals { max-width: none; }
  .overlay { padding: 0; place-items: end stretch; }
  .modal { max-height: min(92dvh, calc(var(--vv-h, 100dvh) - 12px)); border-radius: 16px 16px 0 0; max-width: none !important; animation: up .22s cubic-bezier(.2, .8, .3, 1); }
  .modal-head { padding: 14px 10px 10px 18px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .foot-note { flex-basis: 100%; }
  .drawer { width: 100vw; }
  .toasts { left: 12px; right: 12px; width: auto; transform: none; bottom: auto; top: calc(var(--topbar) + 8px + env(safe-area-inset-top)); }
  .auth { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; padding: 28px 16px 64px; }
  .auth::after { background: linear-gradient(180deg, rgba(16, 15, 14, .45) 0%, rgba(16, 15, 14, .8) 40%, rgba(16, 15, 14, .92) 100%); }
  .auth-side { gap: 14px; align-items: center; text-align: center; margin: 0 auto; }
  .auth-side .logo { height: 76px; }
  .auth-tagline { font-size: 34px; }
  .auth-tagline .script { font-size: 24px; margin-top: 6px; }
  .auth-points { display: none; }
  .auth-card { padding: 24px 20px 20px; border-radius: 16px; }
  .auth-title { font-size: 34px; }
  .auth-foot { left: 0; right: 0; text-align: center; bottom: 18px; }
  .editor-head { padding: 8px 12px 8px 16px; position: sticky; top: var(--topbar); z-index: 12; flex-wrap: nowrap; gap: 8px; }
  .editor-title .page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .editor-head .btn { padding: 0 12px; }
  .editor-title { flex: 1 1 auto; min-width: 0; }
  .editor-actions { gap: 4px; flex: none; }
  .editor-actions .btn { padding: 0 12px; }
  .save-status.is-error { flex-wrap: wrap; font-size: 12.5px; }
  .editor-mobile .form-head { position: static; padding-top: 6px; }
  .editor-sub { padding: 6px 16px; }
  .media-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .option-row { flex-wrap: wrap; }
  .variants-wrap { overflow: visible; margin: 0; padding: 0; }
  .table-variants, .table-variants tbody { display: block; min-width: 0; }
  .table-variants thead { display: none; }
  .table-variants tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .table-variants tr:first-child { padding-top: 2px; }
  .table-variants tr:last-child { border-bottom: 0; }
  .table-variants td { display: block !important; padding: 0 !important; min-width: 0; }
  .table-variants td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
  .table-variants .variant-name { grid-column: 1; order: -1; align-self: center; font-size: 15px; }
  .table-variants td.variant-remove { grid-column: 2; order: -1; justify-self: end; }
  .option-name { flex: 1 1 100%; }
  .spec-row .input:first-child { flex: 0 0 40%; }
  .ship-rates { grid-template-columns: 1fr 1fr; }
  .preview-stage.is-phone { padding: 0; }
  .demo-email { display: none; }
  .demo-login { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .live-link span { display: none; }
  .stat-value { font-size: clamp(28px, 8.4vw, 36px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Sites without an online shop */
.stats.stats-2 { grid-template-columns: repeat(2, 1fr); }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .stats.stats-3 { grid-template-columns: 1fr 1fr; } .stats.stats-3 .stat:first-child { grid-column: 1 / -1; } }
.home-cols-noshop .panel-activity { grid-column: auto; }
@media (max-width: 960px) { .home-cols-noshop .panel-activity { grid-column: 1 / -1; } }

/* ---------- SEO add-on (portal/src/seo.js) ----------
   One marble band of at-a-glance numbers, quiet panels around it. Gold means
   progress or a win; everything else stays neutral. No points, no levels. */
.page-seo { --gold-metal: linear-gradient(180deg, #f7e4a3 0%, #daa620 48%, #a37a10 100%); }
.seo-ribbon { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 8px 10px 8px 8px; margin-bottom: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; }
.seo-ribbon .badge-test { flex: none; }
.seo-ribbon-text { flex: 1 1 260px; }
.seo-ribbon-proto { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.seo-ribbon-proto-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.seo-admin-note .btn { margin-left: auto; }
.seo-admin-note > .icon { color: var(--warn); }

.seo-top { margin-bottom: 20px; }
.seo-head { margin-bottom: 14px; align-items: flex-end; }

.seo-nav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seo-nav::-webkit-scrollbar { display: none; }
.seo-nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; text-decoration: none !important; border-radius: 6px 6px 0 0; }
.seo-nav a:hover { color: var(--ink); }
.seo-nav a.is-on { color: var(--ink); }
.seo-nav a.is-on .icon { color: var(--accent-text); }
.seo-nav a.is-on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--accent); border-radius: 2px 2px 0 0; }
.seo-nav a.is-on .tab-count { background: var(--accent); color: var(--accent-ink); }

.seo-section { margin-top: 30px; }
.seo-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.seo-h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; text-transform: uppercase; letter-spacing: -.02em; color: var(--heading); }
.seo-section-sub { color: var(--muted); font-size: 14px; margin-top: 5px; max-width: 70ch; }
.seo-intro { color: var(--ink-2); margin: 0 0 16px; max-width: 75ch; }

/* XP tag, movement, chips */
.seo-move { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 7px 0 5px; border-radius: 5px; font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seo-move.is-up { color: var(--accent-text); background: var(--accent-soft); }
.seo-move.is-down { color: var(--bad); background: var(--bad-soft); }
.seo-move.is-flat, .seo-move.is-new { color: var(--muted); background: var(--paper-2); padding: 0 7px; font-weight: 600; }
.seo-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 9px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.seo-chip .icon { color: var(--muted); }
.seo-chip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.seo-diff { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.seo-diff i { width: 3px; border-radius: 1px; background: var(--line-strong); }
.seo-diff i:nth-child(1) { height: 5px; } .seo-diff i:nth-child(2) { height: 8px; } .seo-diff i:nth-child(3) { height: 12px; }
.seo-diff-1 i:nth-child(-n+1), .seo-diff-2 i:nth-child(-n+2), .seo-diff-3 i { background: var(--accent); }

/* At a glance: four numbers on one marble band */
.seo-glance { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #3a3833; border-radius: var(--r-lg); background: #100f0e; color: #ffffff; }
.seo-glance::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/brand/marble-bg.jpg') 70% 35% / 1200px auto no-repeat; opacity: .36; }
.seo-glance::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(16, 15, 14, .86) 0%, rgba(16, 15, 14, .7) 60%, rgba(16, 15, 14, .55) 100%); }
.seo-glance-tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 18px 20px 18px; border: 0; border-right: 1px solid rgba(97, 95, 90, .55); background: none; color: #ffffff; font: inherit; text-align: left; }
.seo-glance-tile:last-child { border-right: 0; }
.seo-glance-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d0cec5; }
.seo-glance-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 56px; }
.seo-glance-big { font-family: var(--display); font-size: 54px; line-height: .88; letter-spacing: -.02em; color: #daa620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seo-glance-of { font-size: .4em; letter-spacing: 0; color: #d0cec5; }
.seo-glance-sub { display: block; font-size: 13px; line-height: 1.35; color: #d0cec5; }
.seo-glance-sub .icon { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.seo-glance-sub.is-good { color: #daa620; font-weight: 700; }
.seo-glance-sub.is-bad { color: #f2928b; font-weight: 700; }
.seo-glance-link { color: #daa620; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.seo-health-btn { cursor: pointer; transition: background-color .15s; }
.seo-health-btn:hover { background: rgba(218, 166, 32, .07); }
.seo-health-btn:focus-visible { box-shadow: inset 0 0 0 3px rgba(218, 166, 32, .6); }
.seo-pips-page { display: flex; align-items: flex-end; gap: 3px; height: 36px; flex: none; }
.seo-pips-page i { width: 6px; height: 100%; border-radius: 2px; background: #2e2c29; }
.seo-pips-page i.is-on { background: #daa620; }
.seo-glance-spark { flex: none; color: #daa620; }
.seo-glance .seo-spark-area { opacity: .18; }
.seo-glance .seo-ring { flex: none; }
.seo-ring-track { fill: none; stroke: #2e2c29; stroke-width: 9; }
.seo-ring-value { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1); }
.seo-stairs { flex: none; }
.seo-stairs rect { fill: #2e2c29; }
.seo-stairs rect.is-on { fill: #daa620; }

/* Missions + wins */
.seo-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.seo-missions { list-style: none; margin: 0; padding: 6px 0; }
.seo-mission { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.seo-mission + .seo-mission { border-top: 1px solid var(--line-2); }
.seo-mission-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--muted); }
.seo-mission.is-done .seo-mission-mark { background: var(--gold-metal); border-color: transparent; color: #100f0e; }
.seo-mission-main { flex: 1; min-width: 0; }
.seo-mission-title { font-weight: 700; font-size: 15px; }
.seo-mission.is-done .seo-mission-title { color: var(--muted); }
.seo-pips { display: flex; gap: 4px; margin: 7px 0 4px; max-width: 220px; }
.seo-pips i { flex: 1; height: 6px; border-radius: 3px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.seo-pips i.is-on { background: var(--accent); box-shadow: none; }
.seo-mission-meta { font-size: 12.5px; color: var(--muted); }
.seo-mission-side { display: flex; align-items: center; gap: 10px; flex: none; }
.seo-wins { list-style: none; margin: 0; padding: 6px 18px 10px; }
.seo-win { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; }
.seo-win + .seo-win { border-top: 1px solid var(--line-2); }
.seo-win-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--paper-2); color: var(--muted); }
.seo-win.is-rank .seo-win-icon, .seo-win.is-badge .seo-win-icon, .seo-win.is-mission .seo-win-icon { background: var(--accent-soft); color: var(--accent-text); }
.seo-win-body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.seo-win-time { font-size: 12.5px; color: var(--faint); }

/* Keyword quests */
.seo-quests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.seo-quests > li { min-width: 0; display: flex; }
.seo-quest { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none !important; transition: border-color .15s; }
.seo-quest:hover { border-color: var(--accent); }
.seo-quest.is-reached { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: inset 0 3px 0 var(--accent); }
.seo-quest-top { display: flex; align-items: center; gap: 10px; }
.seo-quest-pos { font-family: var(--display); font-size: 52px; line-height: .9; letter-spacing: -.03em; color: var(--heading); font-variant-numeric: tabular-nums; }
.seo-pos-hash { font-size: .5em; vertical-align: .62em; margin-right: 1px; color: var(--muted); }
.seo-quest-none { font-size: 34px; color: var(--muted); }
.seo-quest-top .seo-move { align-self: flex-start; margin-top: 4px; }
.seo-quest-top .seo-spark { margin-left: auto; color: var(--accent-text); }
.seo-quest-kw { font-weight: 700; font-size: 16px; line-height: 1.3; margin-top: 12px; overflow-wrap: anywhere; }
.seo-quest-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.seo-quest .seo-goal { margin-top: auto; padding-top: 14px; }
.seo-spark-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.seo-spark-area { fill: currentColor; opacity: .12; }
.seo-spark-dot { fill: currentColor; }
.seo-goal-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.seo-goal-row strong { color: var(--ink); }
.seo-goal.is-reached .seo-goal-left { color: var(--accent-text); font-weight: 700; }
.seo-goalbar { height: 6px; border-radius: 3px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.seo-goalbar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.seo-goal.is-reached .seo-goalbar i { background: var(--gold-metal); }
.seo-quest-add { align-items: flex-start; justify-content: center; border-style: dashed; border-color: var(--line-strong); background: transparent; min-height: 180px; }
.seo-quest-add .seo-quest-kw { margin-top: 12px; }
.seo-quest-add-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }

/* Trophy case */
.seo-badges { list-style: none; margin: 0; padding: 22px 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 22px 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }
.seo-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; min-width: 0; }
.seo-badge .seo-medal { margin-bottom: 8px; }
.seo-badge.is-earned .seo-medal { filter: drop-shadow(0 6px 12px rgba(16, 15, 14, .35)); }
.seo-badge-name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.seo-badge-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seo-badge.is-locked .seo-badge-name { color: var(--ink-2); }
.seo-medal-track { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 2 3; }
.seo-medal-arc { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.seo-medal-face { fill: var(--paper-2); }
.seo-medal-icon { stroke: var(--muted); }
.seo-medal-icon.is-earned { stroke: #daa620; }

/* Health drawer */
.seo-checks { list-style: none; margin: 0 0 16px; padding: 0; }
.seo-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.seo-check .light { margin-top: 6px; }
.seo-check-label { font-weight: 700; }
.seo-check-detail { color: var(--ink-2); font-size: 14px; }
.seo-drawer-cta { margin-top: 18px; }

/* Keyword picker */
.seo-slots { flex-direction: row; align-items: center; gap: 16px 28px; padding: 16px 20px; flex-wrap: wrap; }
.seo-slots-text { flex: 0 1 auto; }
.seo-slots-count { color: var(--muted); font-size: 14px; margin-top: 4px; }
.seo-slots-count strong { color: var(--ink); font-size: 16px; }
.seo-slotbar { flex: 1 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(25, 1fr); gap: 4px; }
.seo-slotbar i { height: 26px; border-radius: 3px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.seo-slotbar i.is-on { background: var(--gold-metal); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.seo-lookup { display: flex; gap: 8px; flex-wrap: wrap; max-width: 640px; }
.seo-lookup .search { flex: 1 1 280px; }
.seo-lookup + .field-error { margin-top: 8px; }
.seo-legend { margin: -4px 0 14px; font-size: 13.5px; }
.seo-legend summary { cursor: pointer; color: var(--accent-text); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.seo-legend dl { margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.seo-legend dt { font-weight: 700; }
.seo-legend dd { margin: 0; color: var(--ink-2); }
.seo-suggs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.seo-suggs-found { margin-top: 12px; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.seo-sugg { display: flex; align-items: center; gap: 12px 20px; padding: 16px 18px; }
.seo-sugg + .seo-sugg { border-top: 1px solid var(--line-2); }
.seo-sugg-main { flex: 1; min-width: 0; }
.seo-sugg-kw { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.seo-sugg-why { display: flex; gap: 7px; align-items: flex-start; color: var(--ink-2); font-size: 14px; margin: 4px 0 10px; }
.seo-sugg-why .icon { color: var(--accent-text); margin-top: 3px; }
.seo-sugg-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.seo-sugg-act { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.seo-sugg-act .btn { min-width: 96px; }
.seo-tracked-note { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-text); font-weight: 700; font-size: 13px; }
.seo-tracked { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.seo-tracked li + li { border-top: 1px solid var(--line-2); }
.seo-tracked-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 58px; color: var(--ink); text-decoration: none !important; }
.seo-tracked-row:hover { background: var(--surface-2); }
.seo-tracked-pos { flex: none; width: 58px; font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: -.02em; color: var(--heading); font-variant-numeric: tabular-nums; }
.seo-tracked-kw { flex: 1; min-width: 0; font-weight: 600; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.seo-tracked-sub { font-weight: 400; font-size: 13px; color: var(--muted); }

/* Keyword detail */
.seo-kw-head { margin: 2px 0 18px; }
.seo-kw-title { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: .98; text-transform: uppercase; letter-spacing: -.02em; color: var(--heading); margin-bottom: 12px; overflow-wrap: anywhere; }
.seo-kw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.seo-kw-main, .seo-kw-side { display: grid; gap: 16px; min-width: 0; }
.seo-chart-head { gap: 10px; flex-wrap: wrap; }
.seo-chart-wrap { padding: 10px 14px 4px 6px; }
.seo-chart { margin: 0; width: 100%; min-width: 0; }
.seo-chart svg { display: block; overflow: visible; }
.seo-chart-note { font-size: 12.5px; color: var(--muted); padding: 0 18px 14px; }
.seo-chart-grid { stroke: var(--line-2); stroke-width: 1; }
.seo-chart-tick { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.seo-chart-page1 { fill: var(--accent); opacity: .08; }
.seo-chart-band { fill: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font); }
.seo-chart-you { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.seo-chart-you-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.seo-chart-rival { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 4; }
.seo-chart-rival-dot { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.seo-chart-end { fill: var(--muted); font-size: 12px; font-weight: 700; font-family: var(--font); }
.seo-chart-end.is-you { fill: var(--accent-text); }
.seo-chart-bar { fill: var(--accent); opacity: .85; }
.seo-chart-bar:hover { opacity: 1; }
.seo-legend-keys { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.seo-key { display: inline-flex; align-items: center; gap: 6px; }
.seo-key::before { content: ''; width: 18px; height: 0; border-top: 3px solid var(--accent); border-radius: 2px; }
.seo-key.is-rival::before { border-top: 2px dashed var(--line-strong); }
.seo-actions { list-style: none; margin: 0; padding: 4px 0; }
.seo-action { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.seo-action + .seo-action { border-top: 1px solid var(--line-2); }
.seo-action-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); }
.seo-action-main { flex: 1; min-width: 0; }
.seo-action-label { font-weight: 700; }
.seo-action-why { font-size: 13.5px; color: var(--muted); }
.seo-action .btn { flex: none; }
.seo-now { padding: 16px 18px 18px; }
.seo-now-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.seo-now-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.seo-now-pos { font-family: var(--display); font-size: 84px; line-height: .85; letter-spacing: -.03em; color: var(--heading); margin-top: 6px; font-variant-numeric: tabular-nums; }
.seo-now-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.seo-now-best { font-size: 13px; color: var(--muted); }
.seo-reached { margin-top: 10px; }
.seo-reached .script { font-size: 30px; line-height: 1; }
.seo-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 16px 18px 6px; }
.seo-vs-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 6px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); min-width: 0; }
.seo-vs-side.is-ahead { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.seo-vs-name { font-size: 12.5px; font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; }
.seo-vs-side.is-you .seo-vs-name { color: var(--accent-text); }
.seo-vs-pos { font-family: var(--display); font-size: 40px; line-height: 1; letter-spacing: -.02em; color: var(--heading); }
.seo-vs-mid { font-family: var(--display); text-transform: uppercase; font-size: 20px; color: var(--faint); }
.seo-vs-note { padding: 8px 18px 16px; font-size: 14px; color: var(--ink-2); }
.seo-page-body { padding: 14px 18px 16px; display: grid; gap: 4px; justify-items: start; }
.seo-page-title { font-weight: 700; }
.seo-page-url { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; margin-bottom: 6px; }
.seo-page-body .btn { margin-left: -12px; }
.seo-stop { justify-self: start; color: var(--bad); font-weight: 600; font-size: 14px; min-height: 36px; padding: 0 2px; }
.seo-missing { padding-top: 4px; }

/* AI fixes */
.seo-fixes-wrap .tabs { margin-bottom: 16px; }
.seo-fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.seo-fix { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 16px 18px; min-width: 0; }
.seo-fix.is-pending { box-shadow: inset 3px 0 0 var(--accent); }
.seo-fix-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.seo-fix-kind { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); text-transform: uppercase; letter-spacing: -.01em; font-size: 20px; line-height: 1; color: var(--heading); }
.seo-fix-kind .icon { color: var(--accent-text); }
.seo-fix-page { font-size: 14px; color: var(--muted); }
.seo-fix-page strong { color: var(--ink); }
.seo-fix-help { font-size: 13.5px; color: var(--muted); margin: 6px 0 12px; }
.seo-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; align-items: start; }
.seo-ba-col { border-radius: var(--r-sm); padding: 12px 14px; min-width: 0; }
.seo-ba-col.is-before { background: var(--paper-2); border: 1px solid var(--line-2); }
.seo-ba-col.is-after { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.seo-ba-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.seo-ba-col.is-after .seo-ba-label { color: var(--accent-text); }
.seo-ba-text { font-size: 15px; overflow-wrap: anywhere; }
.seo-ba-col.is-before .seo-ba-text { color: var(--ink-2); }
.seo-ba-text.is-empty { font-style: italic; color: var(--muted) !important; }
.seo-ba-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.seo-serp { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-family: Arial, Helvetica, sans-serif; }
.seo-serp-url { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.seo-serp-title { font-size: 17px; line-height: 1.3; color: var(--info); margin-top: 2px; overflow-wrap: anywhere; }
.seo-serp-title.is-dim { opacity: .75; }
.seo-serp-desc { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.seo-article { padding: 14px 16px; border-radius: var(--r-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.seo-article .seo-ba-label { color: var(--accent-text); }
.seo-article-title { font-family: var(--display); text-transform: uppercase; letter-spacing: -.015em; font-size: 26px; line-height: 1.02; color: var(--ink); margin-bottom: 8px; }
.seo-article-excerpt { color: var(--ink-2); max-width: 75ch; }
.seo-article-outline { margin-top: 8px; font-size: 14px; }
.seo-article-outline summary { cursor: pointer; color: var(--accent-text); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.seo-article-outline ol { margin: 4px 0 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 3px; }
.seo-fix-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.seo-fix-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.seo-fix-state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.seo-fix-state.is-ok { color: var(--ok); font-weight: 600; }
.seo-fix.is-approved, .seo-fix.is-skipped { background: var(--surface); }
.seo-fix.is-skipped .seo-ba, .seo-fix.is-skipped .seo-article { opacity: .7; }
.seo-edit-help { margin-bottom: 14px; }

/* Search traffic */
.seo-gsc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.seo-gsc-stat { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px 18px; border-right: 1px solid var(--line-2); min-width: 0; }
.seo-gsc-stat:last-child { border-right: 0; }
.seo-gsc-value { font-family: var(--display); font-size: 46px; line-height: 1; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.seo-gsc-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seo-gsc-delta.is-good { color: var(--accent-text); }
.seo-gsc-delta.is-bad { color: var(--bad); }
.seo-gsc-help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.seo-queries { margin-top: 16px; }
.seo-queries .table th { background: none; }
.seo-table-scroll { overflow-x: auto; }
.seo-connect { display: grid; justify-items: start; gap: 12px; max-width: 640px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.seo-connect-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.seo-connect p { color: var(--ink-2); }
.seo-connect-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 8px; }
.seo-connect-list li { display: flex; gap: 10px; align-items: flex-start; }
.seo-connect-list .icon { color: var(--accent-text); margin-top: 3px; }

/* Locked (client without the add-on) */
.seo-locked { position: relative; isolation: isolate; overflow: hidden; display: flex; gap: 28px; align-items: flex-start; padding: 30px; border-radius: var(--r-lg); background: #100f0e; color: #ffffff; border: 1px solid #3a3833; }
.seo-locked::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/brand/marble-bg.jpg') 70% 40% / 1100px auto no-repeat; opacity: .22; }
.seo-locked-text { max-width: 560px; display: grid; gap: 12px; }
.seo-locked-title { font-family: var(--display); font-weight: 400; font-size: 52px; line-height: .95; text-transform: uppercase; letter-spacing: -.02em; color: #daa620; }
.seo-seal { flex: none; }
.seo-locked-text p { color: #d0cec5; }
.seo-locked .seo-connect-list li { color: #ffffff; }
.seo-locked .seo-connect-list .icon { color: #daa620; }
.seo-locked-ask { font-weight: 700; color: #ffffff !important; }

/* Gold check on approve and add (added to <body> by seo.js; never created with reduced motion) */
.seo-confirm { position: fixed; z-index: 120; width: 0; height: 0; pointer-events: none; }
.seo-confirm-disc { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #100f0e;
  background: linear-gradient(180deg, #f7e4a3 0%, #daa620 48%, #a37a10 100%); box-shadow: 0 0 0 3px rgba(16, 15, 14, .85), 0 10px 24px -6px rgba(0, 0, 0, .6); animation: seo-check .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.seo-confirm-disc path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: seo-draw .3s ease-out .12s forwards; }
.seo-confirm-ring { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #daa620; animation: seo-ring .7s ease-out .08s both; }
@keyframes seo-check { 0% { opacity: 0; transform: scale(.4); } 22% { opacity: 1; transform: scale(1.08); } 40% { transform: scale(1); } 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes seo-draw { to { stroke-dashoffset: 0; } }
@keyframes seo-ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

@media (max-width: 1100px) {
  .seo-kw-grid { grid-template-columns: minmax(0, 1fr); }
  .seo-kw-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .seo-stop { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  .seo-cols { grid-template-columns: minmax(0, 1fr); }
  .seo-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-glance-tile:nth-child(2) { border-right: 0; }
  .seo-glance-tile:nth-child(-n+2) { border-bottom: 1px solid rgba(97, 95, 90, .55); }
  .seo-gsc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-gsc-stat:nth-child(2) { border-right: 0; }
  .seo-gsc-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 860px) {
  .seo-ribbon { margin-bottom: 14px; }
  .seo-ribbon-proto { margin-left: 0; width: 100%; }
  .seo-ribbon-proto .segmented { flex: 1; }
  .seo-ribbon-proto .segmented button { flex: 1; }
  .seo-admin-note .btn { margin-left: 0; }
  .seo-nav { margin: 0 -16px; padding: 0 6px; }
  .seo-nav a { padding: 0 10px; }
  .seo-stairs { width: 76px; height: 48px; }
  .seo-glance { border-radius: var(--r-md); }
  .seo-glance-tile { padding: 14px 14px 16px; gap: 8px; }
  .seo-glance-main { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; min-height: 0; }
  .seo-glance-big { font-size: 42px; }
  .seo-glance-sub { font-size: 12.5px; }
  .seo-locked-title { font-size: 40px; }
  .seo-mission { flex-wrap: wrap; padding: 12px 16px; gap: 10px 12px; }
  .seo-mission-main { flex: 1 1 calc(100% - 52px); }
  .seo-mission-side { width: 100%; padding-left: 48px; }
  .seo-wins { padding: 4px 16px 8px; }
  .seo-h2 { font-size: 26px; }
  .seo-section { margin-top: 26px; }
  .seo-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 8px 14px; gap: 18px 6px; }
  .seo-badge .seo-medal { width: 60px; height: 60px; }
  .seo-badge-name { font-size: 12.5px; }
  .seo-slots { padding: 14px 16px; }
  .seo-slotbar { gap: 3px; }
  .seo-slotbar i { height: 22px; }
  .seo-sugg { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .seo-sugg-act { flex-direction: row; justify-content: space-between; }
  .seo-sugg-act .btn { flex: 1; max-width: 220px; }
  .seo-kw-title { font-size: 32px; }
  .seo-kw-side { grid-template-columns: minmax(0, 1fr); }
  .seo-chart-wrap { padding: 8px 8px 2px 2px; }
  .seo-action { flex-wrap: wrap; padding: 12px 16px; }
  .seo-action-main { flex: 1 1 calc(100% - 48px); }
  .seo-action .btn { margin-left: 48px; }
  .seo-ba { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .seo-fix { padding: 14px 14px 16px; }
  .seo-fix-actions .btn { flex: 1 1 auto; }
  .seo-fix-actions .btn-ghost { flex: 0 0 auto; }
  .seo-gsc-value { font-size: clamp(30px, 9vw, 40px); }
  .seo-gsc-stat { padding: 14px 14px 16px; }
  .seo-connect { padding: 20px 16px; }
  .seo-connect .btn-lg { width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding: 12px 16px; }
  .seo-locked { flex-direction: column; gap: 16px; padding: 22px 18px; border-radius: var(--r-md); }
}
@media (max-width: 400px) {
  .seo-nav a { padding: 0 8px; gap: 5px; letter-spacing: .04em; }
  .seo-nav a .icon { display: none; }
}

/* ---------- Inventory (dealer template: vehicles) ---------- */
.inv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.inv-stat { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-stat-n { font-family: var(--display); font-size: 22px; line-height: 1.1; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-stat-l { font-size: 12.5px; color: var(--muted); }
.table-vehicles .col-photo { width: 104px; padding-right: 0 !important; }
.veh-thumb { position: relative; display: grid; place-items: center; width: 92px; height: 69px; border-radius: 8px; overflow: hidden; background: #e9e9ea; color: var(--faint); border: 1px solid var(--line-2); }
.veh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.veh-thumb-n { position: absolute; right: 4px; bottom: 4px; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 5px; background: rgba(16, 15, 14, .78); color: #fff; }
.veh-price { font-family: var(--display); font-size: 17px; white-space: nowrap; }
.table-vehicles .col-act { width: 1%; white-space: nowrap; text-align: right; }
.vin-row { display: flex; gap: 8px; align-items: stretch; }
.vin-row .input { flex: 1; min-width: 0; }
.input-vin { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.vf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; margin-top: 4px; }
.vf-grid .vf-wide { grid-column: 1 / -1; }
.img-grid-wide .thumb, .img-grid-wide .img-grid-add { width: 132px !important; height: 99px !important; }
.page-vehicle .form-card + .form-card { margin-top: 0; }
@media (max-width: 1100px) { .vf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .inv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-vehicles .col-photo { width: 84px; }
  .veh-thumb { width: 76px; height: 57px; }
  .vin-row { flex-direction: column; }
  .img-grid-wide .thumb, .img-grid-wide .img-grid-add { width: calc(50vw - 40px) !important; height: calc((50vw - 40px) * .75) !important; }
}
@media (max-width: 520px) { .vf-grid { grid-template-columns: minmax(0, 1fr); } }
.vf-grid + .field { margin-top: 8px; }

/* ---------- Leads (dealer sites) ---------- */
.inv-stat.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.inv-stat.is-hot .inv-stat-n { color: var(--accent-text); }
.lead-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); }
.lead-hot-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lead-hot-item { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 4px 10px 4px 4px; border-radius: 10px; }
.lead-hot-item:hover { background: var(--paper-2); }
.lead-hot-n { font-size: 12.5px; color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.lead-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.lead-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line-2); cursor: pointer; }
.lead-list > li:first-child { border-top: 0; }
.lead-row:hover { background: var(--paper-2); }
.lead-row.is-unread { box-shadow: inset 3px 0 0 var(--accent); }
.lead-type { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); color: var(--muted); border: 1px solid var(--line-2); }
.lead-row.is-unread .lead-type { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.lead-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lead-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lead-name { font-weight: 700; font-size: 15.5px; color: var(--ink); text-decoration: none; }
.lead-name:hover { text-decoration: underline; }
.lead-kind { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lead-wait { font-size: 12.5px; font-weight: 700; color: var(--warn); }
.lead-wait.is-late { color: var(--bad); }
.lead-contact, .lead-detail { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-detail.clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.lead-side { display: grid; grid-template-columns: 250px auto 92px; align-items: center; gap: 12px; }
.lead-veh { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.lead-veh-img { flex: none; display: grid; place-items: center; width: 64px; height: 48px; border-radius: 7px; overflow: hidden; background: #e9e9ea; color: #6b6b6b; }
.lead-veh-img img { width: 100%; height: 100%; object-fit: cover; }
.lead-veh-text { display: flex; flex-direction: column; min-width: 0; }
.lead-veh-title { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-veh-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lead-actions { display: inline-flex; gap: 4px; }
.lead-act { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; display: grid; place-items: center; }
.lead-act:hover { border-color: var(--accent); color: var(--accent-text); }
.lead-ago { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.lead-veh-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper-2); }
.lead-veh-card .lead-veh-img { width: 96px; height: 72px; }
.lead-veh-card .lead-veh-title { font-size: 15px; white-space: normal; }
.lead-veh-links { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-fields > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.lead-source { margin-top: 8px; }
.lead-pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.lead-pipe-step { min-height: 44px; padding: 6px 4px; border: 1px solid var(--line); background: var(--field); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; border-radius: 8px; cursor: pointer; }
.lead-pipe-step:hover { color: var(--ink); border-color: var(--line-strong); }
.lead-pipe-step.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lead-pipe-step.is-on.is-won { background: var(--ok-solid); border-color: var(--ok-solid); color: #0d1a12; }
.lead-pipe-step.is-on.is-lost { background: var(--paper-2); border-color: var(--line-strong); color: var(--ink); }
.lead-pipe-step:focus-visible { outline: none; box-shadow: var(--focus); }
.lp-short { display: none; }
@media (max-width: 440px) { .lp-full { display: none; } .lp-short { display: inline; } }
@media (max-width: 1100px) { .lead-side { grid-template-columns: 210px auto; } .lead-ago { display: none; } }
@media (max-width: 860px) {
  .lead-row { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
  .lead-side { grid-column: 2; grid-template-columns: minmax(0, 1fr) auto; }
  .lead-ago { display: none; }
  .lead-hot-item { padding-right: 4px; }
}
.lead-stage-sel { display: none; }
.lead-veh, .lead-veh-text { overflow: hidden; }
.lead-veh-sub { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .lead-stage-seg { display: none; }
  .lead-stage-sel { display: block; width: 100%; }
  .lead-hot-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .lead-veh-none { display: none; }
  .lead-side { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Lead follow-up: salesperson, follow-up, appointment, call logging, activity */
.inv-stat-btn { font: inherit; text-align: left; cursor: pointer; color: inherit; }
.inv-stat-btn:not(:disabled):hover { border-color: var(--accent); }
.inv-stat-btn:disabled { cursor: default; }
.inv-stat-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.lead-today { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--surface); }
.lead-today-h { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.lead-today ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lead-today a { display: grid; grid-template-columns: 28px 76px minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; color: inherit; text-decoration: none; }
.lead-today a:hover { background: var(--paper-2); }
.lead-today-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--paper-2); color: var(--muted); }
.lead-today-ic.is-appt { background: var(--info-soft); color: var(--info); }
.lead-today-ic.is-due { background: var(--bad-soft); color: var(--bad); }
.lead-today-t { font-size: 13px; font-weight: 700; white-space: nowrap; }
.lead-today-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-today-s { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-today .link-btn { margin: 6px 0 0 6px; font-size: 13.5px; }
.lead-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.lead-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.lead-chip.is-appt { border-color: var(--info-line); background: var(--info-soft); color: var(--info); }
.lead-chip.is-due { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.lead-owner-dot { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 4px 4px 4px 0; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.log-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); animation: pop .15s ease-out; }
.log-prompt-q { font-weight: 700; }
.log-prompt-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lead-next { display: grid; gap: 12px; }
.lead-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lead-owner .select-wrap { flex: 1; min-width: 180px; max-width: 320px; }
.lead-next-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead-next-block { padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper-2); }
.lead-next-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lead-next-cur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.lead-next-cur > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lead-next-cur strong { font-size: 15px; }
.lead-next-cur span { font-size: 13.5px; color: var(--muted); }
.lead-next-cur.is-due strong { color: var(--bad); }
.lead-next-cur.is-past strong { color: var(--warn); }
.lead-next-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-next-edit { display: grid; gap: 8px; justify-items: start; }
.lead-next-edit > .input { width: 100%; }
.lead-next-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.lead-next-pick .input { flex: 1; min-width: 200px; max-width: 280px; }
.fu-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.fu-pick { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fu-pick:hover:not(:disabled), .fu-pick.is-on { border-color: var(--accent); color: var(--accent-text); }
.fu-pick:focus-visible { outline: none; box-shadow: var(--focus); }
.tax-seg .segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 520px; }
.tax-seg .segmented button { white-space: normal; text-align: center; line-height: 1.25; min-height: 40px; }
.tax-seg { margin-bottom: 12px; }
.deal-tax > .tax-seg + .deal-fields { margin-top: 0; }
.drawer-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--surface); }
.lead-foot { display: grid; gap: 8px; }
.lead-foot .log-prompt { margin: 0; }
.lead-foot-btns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.lead-foot-btns .btn { min-height: 46px; }
@media (max-width: 860px) { .lead-drawer .contact-actions { display: none; } .lead-drawer .drawer-body { padding-bottom: 20px; } }
.lead-deal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.act-log { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.act { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.act:first-child { border-top: 0; }
.act-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); color: var(--muted); }
.act-note .act-icon, .act.act-note .act-icon { background: var(--accent-soft); color: var(--accent-text); }
.act-deal .act-icon { background: var(--ok-soft); color: var(--ok); }
.act-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-text { font-size: 14px; font-weight: 600; }
.act-note { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.act-sub { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.act-meta { font-size: 12px; color: var(--muted); }
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hist-list a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; color: inherit; text-decoration: none; font-size: 14px; }
.hist-list a:hover { border-color: var(--accent); }
.hist-list span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) {
  .lead-today a { grid-template-columns: 28px 64px minmax(0, 1fr); }
  .lead-today-s { grid-column: 3; margin-top: -6px; }
  .lead-next-pick .input { max-width: none; }
}

/* ---------- Deals (dealer sites) ---------- */
.deal-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.deal-list > li + li { border-top: 1px solid var(--line-2); }
.deal-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; color: inherit; text-decoration: none; }
.deal-row:hover { background: var(--paper-2); }
.deal-row-img { display: grid; place-items: center; width: 72px; height: 54px; border-radius: 7px; overflow: hidden; background: #e9e9ea; color: #6b6b6b; }
.deal-row-img img { width: 100%; height: 100%; object-fit: cover; }
.deal-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.deal-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.deal-row-buyer { font-weight: 700; }
.deal-row-veh { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.deal-row-total { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.deal-row-meta { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.deal-row-meta .lead-owner-dot { width: 24px; height: 24px; font-size: 10px; margin: 0 6px 0 0; }
@media (max-width: 600px) {
  .deal-row { grid-template-columns: 56px minmax(0, 1fr); padding: 12px; }
  .deal-row-img { width: 56px; height: 42px; }
  .deal-row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .deal-row-total { font-size: 17px; }
}
.veh-pick .search { margin-bottom: 10px; }
.veh-pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: min(52vh, 460px); overflow-y: auto; }
.veh-pick-row { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.veh-pick-row:hover:not(:disabled) { border-color: var(--accent); }
.veh-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.veh-pick-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.veh-pick-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-deal .field-label { display: block; margin: 6px 0 8px; }

.deal-sub { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.deal-save { font-size: 13px; color: var(--muted); }
.deal-save.is-error { color: var(--bad); font-weight: 700; }
.deal-grid { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.deal-grid:disabled .deal-side-actions .btn-primary { display: none; }
.deal-forms { display: grid; gap: 16px; min-width: 0; }
.deal-forms .form-card { margin: 0; }
.deal-forms .form-card-head { align-items: center; flex-wrap: wrap; }
.deal-forms .form-card-head + .form-card-body:empty { display: none; }
.deal-forms .form-card:not(:has(.form-card-body)) { padding-bottom: 16px; }
.deal-side { position: sticky; top: calc(var(--topbar) + 16px); display: grid; gap: 12px; }
.deal-side-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.deal-side-actions > * { flex: 1; }
.deal-side-actions .menu-wrap, .deal-side-actions > div { display: flex; }
.deal-side-actions .btn { width: 100%; }
.deal-void { justify-self: start; font-size: 13.5px; color: var(--muted); }
.deal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.deal-fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.deal-span-2 { grid-column: span 2; }
.deal-span-all { grid-column: 1 / -1; }
.deal-statezip { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0 10px; }
.deal-subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.deal-cobuyer { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.deal-addons, .deal-tax { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.deal-addon { display: grid; grid-template-columns: minmax(0, 1fr) 150px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.deal-tax > .segmented { margin-bottom: 12px; max-width: 100%; flex-wrap: wrap; }
.deal-est { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 0 18px; }
.deal-est span { font-size: 13px; color: var(--muted); }
.deal-est strong { font-size: 18px; }
.deal-veh { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper-2); color: inherit; text-decoration: none; }
.deal-veh > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deal-veh:hover { border-color: var(--accent); }
.deal-veh-more { margin-top: 4px; border-top: 1px solid var(--line-2); }
.deal-veh-more > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 0; cursor: pointer; font-weight: 700; color: var(--accent-text); list-style: none; }
.deal-veh-more > summary::-webkit-details-marker { display: none; }
.deal-veh-more > summary::before { content: '+'; display: inline-block; width: 14px; }
.deal-veh-more[open] > summary::before { content: '−'; }
.deal-warn { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--warn); font-size: 13.5px; font-weight: 600; }
.deal-grid-pay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; }
.deal-term { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; cursor: pointer; }
.deal-term span { font-size: 12px; color: var(--muted); }
.deal-term strong { font-size: 16px; }
.deal-term.is-on { border-color: var(--accent); background: var(--accent-soft); }
.deal-term.is-on strong { color: var(--accent-text); }
.deal-term:focus-visible { outline: none; box-shadow: var(--focus); }
.deal-summary { padding: 16px 18px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--surface); }
.deal-summary-h { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1; text-transform: uppercase; color: var(--heading); }
.deal-summary dl { margin: 0; display: grid; gap: 0; }
.ds-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.ds-row dt { color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ds-row dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-row.is-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; font-weight: 700; font-size: 15px; }
.ds-row.is-total dt { color: var(--ink); }
.ds-pay { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.ds-pay > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.ds-pay strong { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.ds-pay small { font-size: 15px; margin-left: 2px; }
.ds-note { margin: 10px 0 0; }
.deal-live { display: none; }
@media (max-width: 1100px) {
  .deal-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .deal-fields-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .deal-side { position: static; }
  .page-deal .page-actions { display: none; }
  .deal-live { position: sticky; top: var(--topbar); z-index: 5; display: flex; align-items: center; gap: 14px; margin: -10px -16px 12px; padding: 8px 12px 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line-2); }
  .deal-live-num { display: flex; flex-direction: column; min-width: 0; }
  .deal-live-num > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .deal-live-num strong { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; white-space: nowrap; }
  .deal-live-num strong.is-sm { font-size: 16px; font-family: inherit; font-weight: 700; }
  .deal-live-acts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
  .deal-live-print { width: 40px; height: 40px; border: 1px solid var(--line-strong); }
}
@media (max-width: 520px) {
  .deal-fields, .deal-fields-4 { grid-template-columns: minmax(0, 1fr); }
  .deal-span-2 { grid-column: auto; }
  .deal-addon { grid-template-columns: minmax(0, 1fr) 120px 36px; }
  .deal-grid-pay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Deal paperwork: formal, black and white, US Letter */
.dp { display: flex; flex-direction: column; gap: .14in; padding: .45in .5in .42in; font-size: 9.5pt; line-height: 1.3; color: #111; }
.dp b { font-weight: 600; }
.dp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .3in; padding-bottom: .12in; border-bottom: 2px solid #111; }
.dp-dealer { display: flex; align-items: center; gap: .16in; min-width: 0; }
.dp-logo { display: block; max-width: 1.7in; max-height: .7in; object-fit: contain; object-position: left center; }
.dp-dealer-name { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 20pt; line-height: 1; }
.dp-dealer-lines { display: flex; flex-direction: column; font-size: 8.5pt; line-height: 1.35; }
.dp-dealer-lines strong { font-size: 10pt; }
.dp-title { text-align: right; flex: none; }
.dp-title h1 { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 19pt; line-height: 1; text-transform: uppercase; letter-spacing: .02em; }
.dp .dp-meta { display: grid; gap: 1px; margin-top: 6px; font-size: 8.5pt; }
.dp-meta > div { display: flex; justify-content: flex-end; gap: 6px; }
.dp-meta dt { color: #555; }
.dp-meta dd { font-weight: 600; }
.dp-two { display: grid; grid-template-columns: 1fr 1fr; gap: .16in; }
.dp-two-wide { grid-template-columns: 1fr 1.05fr; align-items: start; }
.dp-col { display: flex; flex-direction: column; gap: .12in; }
.dp-box { border: 1px solid #111; }
.dp-box-h { padding: 3px 7px; background: #111; color: #fff; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 9pt; letter-spacing: .06em; text-transform: uppercase; }
.dp-lines { padding: 2px 8px 6px; }
.dp-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: end; padding-top: 7px; }
.dp-line > span { font-size: 7.5pt; color: #555; white-space: nowrap; }
.dp-line > b { min-height: 1.25em; border-bottom: .75px solid #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-line-2 { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
.dp-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dp-cell { display: flex; flex-direction: column; gap: 1px; padding: 4px 7px 5px; border-right: 1px solid #bbb; border-top: 1px solid #bbb; min-width: 0; }
.dp-cell:nth-child(-n+4) { border-top: 0; }
.dp-cell:nth-child(4n) { border-right: 0; }
.dp-cell > span { font-size: 7pt; color: #555; text-transform: uppercase; letter-spacing: .04em; }
.dp-cell > b { min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-cell.is-vin > b { font-family: 'Courier New', monospace; font-weight: 700; letter-spacing: .04em; }
.dp-cell-wide { grid-column: span 2; }
.dp-numbers { padding-bottom: 4px; }
.dp-num { display: flex; justify-content: space-between; gap: 10px; padding: 3px 8px; font-size: 9.5pt; }
.dp-num b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-num.is-total { margin-top: 2px; border-top: 1px solid #111; padding-top: 5px; font-weight: 700; }
.dp-num.is-total b { font-weight: 800; }
.dp .dp-mo-notice { margin: 2px 8px 6px; padding: 4px 6px; border: 1.5px solid #111; font-size: 6.6pt; line-height: 1.3; font-weight: 700; text-decoration: underline; }
.dp .dp-ftc { padding: 6px 8px; border: 2px solid #111; font-size: 9pt; font-weight: 700; line-height: 1.35; }
.dp .dp-small { font-size: 7.5pt; line-height: 1.35; color: #333; padding: 4px 8px; }
.dp .dp-col > .dp-small { padding: 0; }
.dp-terms { font-size: 6.4pt; line-height: 1.32; color: #222; white-space: pre-line; max-height: 2.1in; overflow: hidden; column-count: 2; column-gap: .2in; }
.dp .dp-statement { font-size: 9.5pt; line-height: 1.45; }
.dp-sign { display: flex; flex-wrap: wrap; gap: .12in .3in; margin-top: auto; padding-top: .1in; }
.dp-sign-col { flex: 1 1 40%; display: grid; grid-template-columns: minmax(0, 1fr) 1.1in; column-gap: .14in; font-size: 7.5pt; color: #444; }
.dp-sign-line { height: .38in; border-bottom: 1px solid #111; }
.dp-sign-col > span:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.dp-sign-col > .dp-sign-date { grid-column: 2; grid-row: 1; }
.dp-sign-col > span:nth-of-type(2) { grid-column: 2; grid-row: 2; }
.dp-sign-in { margin: 0; padding: 0 8px 8px; }
.dp-sign + .dp-sign { margin-top: 0; }
.dp .dp-warning { padding: 7px 9px; border: 1.5px solid #111; font-size: 9pt; font-weight: 700; line-height: 1.35; }
.dp-odo { font-size: 11pt; line-height: 1.8; }
.dp-odo u { text-decoration: none; border-bottom: 1px solid #111; padding: 0 4px; font-weight: 700; }
.dp-odo-n { font-family: 'Courier New', monospace; font-size: 12pt; }
.dp-odo-checks { display: grid; gap: .1in; }
.dp-odo-checks p { display: flex; gap: .14in; align-items: flex-start; font-size: 10pt; line-height: 1.4; }
.dp-check { flex: none; width: .2in; height: .2in; border: 1.5px solid #111; margin-top: 1px; }
.dp-sheet-top { display: flex; gap: .2in; align-items: center; }
.dp-sheet-img { width: 2.3in; height: 1.55in; object-fit: cover; border: 1px solid #ccc; }
.dp-sheet-for { font-size: 9pt; color: #555; text-transform: uppercase; letter-spacing: .06em; }
.dp-sheet-veh h2 { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 22pt; line-height: 1.02; margin: 2px 0 4px; }
.dp-sheet-specs { font-size: 9pt; color: #333; }
.dp-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dp-pay { display: flex; flex-direction: column; align-items: center; padding: 7px 4px; border-right: 1px solid #bbb; border-bottom: 1px solid #bbb; font-size: 8pt; color: #555; min-width: 0; }
.dp-pay:nth-child(2n) { border-right: 0; }
.dp-pay:nth-last-child(-n+2) { border-bottom: 0; }
.dp-pay b { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 17pt; color: #111; line-height: 1.1; white-space: nowrap; }
.dp-pay.is-on { background: #eee; }
.dp-big { padding: 8px 10px; font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 26pt; }
.dp-sheet-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid #111; font-size: 8.5pt; text-align: center; }

/* Client icons (logo marks) in the client switcher and MMG clients */
.site-icon { flex: none; display: inline-grid; place-items: center; border-radius: 22%; overflow: hidden; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--line); font-family: var(--display); line-height: 1; letter-spacing: .02em; }
.site-icon.has-img { background: #141416; border-color: var(--line-2); }
.site-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-name { font-size: clamp(18px, 1.55vw, 24px); }
/* No negative margin on the switcher button (it shifts left with position
   instead): a negative margin made its wrapper 10px too narrow, so the client
   name was cut off even with room to spare. */
.site-name { gap: 10px; }
.site-name-btn { max-width: 100%; margin-left: 0; position: relative; left: -10px; }
.site-name .site-icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
@media (max-width: 860px) { .site-name .site-icon { width: 26px !important; height: 26px !important; } .site-name { gap: 8px; } }
.client-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-cell > div { min-width: 0; }
.menu-item .site-icon { margin-right: 2px; }
.icon-setting { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* SEO: live DataForSEO snapshot */
.seo-ribbon.is-live { border-style: solid; border-color: var(--ok-line); background: var(--ok-soft); color: var(--ink); }
.seo-ribbon.is-live .badge-ok { flex: none; font-weight: 700; letter-spacing: .04em; }
.seo-quest-pack { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.seo-now-local { display: grid; gap: 6px; margin: 12px 0 2px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.seo-now-local div { display: flex; justify-content: space-between; gap: 10px; }
.seo-now-local strong { color: var(--ink); }
.seo-source-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.seo-chart-grid.is-out { stroke-dasharray: 3 4; }
.seo-chart-you-dot.is-out { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.inv-hidden-note { margin: -4px 0 12px; }

/* ===================== VIN scanner ===================== */
.vin-btns { display: flex; gap: 8px; }
@media (max-width: 860px) { .vin-btns > * { flex: 1; } }
.vinscan { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #0b0b0a; color: #fff; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.vinscan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.vinscan-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.vinscan-x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.vinscan-view { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #000; display: grid; place-items: center; }
.vinscan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.vinscan-view.is-live video { opacity: 1; }
.vinscan-guide { position: absolute; left: 4%; right: 4%; top: 29%; bottom: 29%; border-radius: 10px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); outline: 2px solid #f2c230; }
.vinscan-guide i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #d7262e; box-shadow: 0 0 12px #d7262e; animation: vinscan-line 1.6s ease-in-out infinite alternate; }
@keyframes vinscan-line { from { transform: translateY(-36px); } to { transform: translateY(36px); } }
@media (prefers-reduced-motion: reduce) { .vinscan-guide i { animation: none; } }
.vinscan-msg { position: relative; display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: rgba(255, 255, 255, .8); font-size: 15px; }
.vinscan-msg p { margin: 0; }
.vinscan-help { min-height: 44px; margin: 12px 4px; font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .85); text-align: center; }
.vinscan-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.vinscan-actions .btn { min-height: 48px; }

/* ===================== Print screen ===================== */
@font-face { font-family: 'PB'; font-weight: 400; font-display: block; src: url(/print/fonts/barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'PB'; font-weight: 500; font-display: block; src: url(/print/fonts/barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'PB'; font-weight: 600; font-display: block; src: url(/print/fonts/barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'PBC'; font-weight: 700; font-display: block; src: url(/print/fonts/barlow-condensed-700.woff2) format('woff2'); }
@font-face { font-family: 'PBC'; font-weight: 800; font-display: block; src: url(/print/fonts/barlow-condensed-800.woff2) format('woff2'); }

.print-root { min-height: 100vh; background: var(--paper-2, #2a2825); }
.print-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.print-docs { display: flex; gap: 4px; flex-wrap: wrap; }
.print-docs a { padding: 8px 12px; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.print-docs a:hover { border-color: var(--line); color: var(--ink); }
.print-docs a.is-on { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.print-doc-short { display: none; }
.print-opts { display: flex; gap: 14px; margin-left: auto; }
.print-note { max-width: 860px; margin: 14px auto 6px; padding: 0 16px; color: var(--muted); font-size: 13.5px; text-align: center; }
.print-msg { max-width: 720px; margin: 32px auto; padding: 0 16px; }
.print-pages { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 10px 12px 56px; }
@media (max-width: 700px) {
  .print-doc-full { display: none; } .print-doc-short { display: inline; }
  .print-opts { margin-left: 0; order: 3; }
  .print-bar .btn-primary { margin-left: auto; }
}

/* A sheet of US Letter. Everything inside is sized in print units. */
.pp { position: relative; flex: none; width: 8.5in; height: 11in; overflow: hidden; box-sizing: border-box; background: #fff; color: #141416; font-family: 'PB', Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 1.25; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp h1, .pp h2, .pp p, .pp dl, .pp dd, .pp ul { margin: 0; padding: 0; }
.pp ul { list-style: none; }
.pl { display: block; object-fit: contain; object-position: left center; }
.pl-text { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 26pt; line-height: 1; }
.proad { position: relative; height: .17in; background: var(--pb-ink); }
.proad svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.proad line { stroke: var(--pb-accent2); stroke-width: 2.5; stroke-dasharray: 31 22; }
.pt-top { font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 17pt; color: #55565b; line-height: 1.05; }
.pt-model { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 38pt; line-height: .95; letter-spacing: 0; }
.pt-sub { margin-top: 4px; font-size: 12pt; color: #3b3c40; }
.p-h { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 13pt; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 3px; margin-bottom: 6px; border-bottom: 2.5px solid var(--pb-accent); }
.p-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.p-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border: 1px solid #d5d5d8; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 11pt; }
.p-chips li::before, .p-dash li::before { content: ''; flex: none; width: 10px; height: 3px; background: var(--pb-accent2); }
.p-dash li { display: flex; align-items: center; gap: 8px; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 14pt; line-height: 1.2; padding: 2px 0; }
.p-list li { position: relative; padding-left: 9px; break-inside: avoid; line-height: 1.25; margin-bottom: 1px; }
.p-list li::before { content: ''; position: absolute; left: 0; top: .5em; width: 3.5px; height: 3.5px; background: var(--pb-accent); }
.p-desc { white-space: pre-line; line-height: 1.38; }
.p-muted { color: #777; }
.p-disc { margin-top: .08in; font-size: 6.5pt; line-height: 1.3; color: #66676b; }
.pq { display: block; width: 1in; height: 1in; flex: none; }
.is-clipped { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }

/* Window sticker */
.ws { display: flex; flex-direction: column; padding: .42in .5in .38in; }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: .3in; padding-bottom: .14in; }
.ws-logo { max-width: 3.3in; max-height: .9in; }
.ws-contact { text-align: right; font-size: 9.5pt; line-height: 1.35; color: #3b3c40; }
.ws-phone { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 22pt; line-height: 1; color: var(--pb-accent); margin-bottom: 3px; }
.ws-title { padding: .18in 0 .14in; }
.ws-specs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #d8d8db; border-left: 1px solid #d8d8db; }
.ws-specs > div { padding: 5px 9px 6px; border-right: 1px solid #d8d8db; border-bottom: 1px solid #d8d8db; min-width: 0; }
.ws-specs > div.is-wide { grid-column: span 2; }
.ws-specs dt { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .07em; color: #6b6c70; }
.ws-specs dd { font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 13pt; line-height: 1.1; overflow-wrap: anywhere; }
.ws .p-chips { margin-top: .14in; }
.ws-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.5fr 1fr; gap: .3in; margin-top: .18in; }
.ws-col { display: flex; flex-direction: column; min-height: 0; }
.ws-fit { flex: 1; min-height: 0; overflow: hidden; }
.ws-equip .p-list { column-count: 2; column-gap: .22in; }
.ws-foot { display: flex; align-items: center; gap: .3in; margin-top: .16in; padding-top: .12in; border-top: 3px solid var(--pb-ink); }
.ws-price { flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .2in; }
.ws-price-l { font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 16pt; text-transform: uppercase; color: #55565b; }
.ws-price-n { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 56pt; line-height: 1; color: var(--pb-ink); }
.ws-price-n.is-ask { font-size: 28pt; }
.ws-was { font-size: 12pt; color: #6b6c70; text-decoration: line-through; }
.ws-qr { display: flex; align-items: center; gap: 8px; font-size: 9pt; line-height: 1.3; color: #3b3c40; }
.ws-qr .pq { width: 1.05in; height: 1.05in; }

/* Mirror hanger: two 4.25 x 11 in tags on one sheet */
.hp { display: flex; }
.hg { position: relative; width: 4.25in; height: 11in; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 .4in .45in; }
.hg + .hg { border-left: 1.5px dashed #9a9a9f; }
.hg-empty { padding: 0; }
.hg-hole { position: relative; width: 100%; height: 2.45in; flex: none; }
.hg-hole i { position: absolute; left: 50%; top: .5in; width: 1.75in; height: 1.75in; transform: translateX(-50%); border: 1.5px dashed #9a9a9f; border-radius: 50%; }
.hg-hole::before { content: ''; position: absolute; left: 50%; top: 0; height: .5in; border-left: 1.5px dashed #9a9a9f; }
.hg-logo { max-width: 3.2in; max-height: .95in; object-position: center; margin-bottom: .16in; }
.hg-title .pt-top { font-size: 20pt; }
.hg-title .pt-model { font-size: 40pt; margin: .03in 0; }
.hg-price { width: calc(100% + .5in); margin: .2in -.25in .06in; padding: .08in 0 .06in; background: var(--pb-accent); color: #fff; font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 50pt; line-height: 1; }
.hg-was { font-weight: 600; font-size: 11pt; color: var(--pb-accent); }
.hg-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: .14in 0 .12in; }
.hg-facts span { padding: 2px 8px; border: 1px solid #d5d5d8; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 12.5pt; }
.hg-points { align-self: stretch; padding: 0 .1in; }
.hg-foot { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: .16in; width: 100%; padding-top: .12in; border-top: 3px solid var(--pb-ink); }
.hg-qr.pq { width: .95in; height: .95in; }
.hg-call { text-align: left; }
.hg-phone { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 25pt; line-height: 1; }
.hg-web { font-size: 9.5pt; color: #3b3c40; margin-top: 3px; }
.hg-stock { font-size: 8.5pt; color: #6b6c70; margin-top: 2px; }

/* Vehicle ad */
.ad { display: flex; flex-direction: column; padding-bottom: .35in; }
.ad-head { display: flex; align-items: center; justify-content: space-between; gap: .3in; padding: .18in .45in; background: var(--pb-ink); color: #fff; }
.ad-logo { max-width: 3.2in; max-height: .78in; }
.ad .pl-text { color: #fff; }
.ad-call { text-align: right; }
.ad-call-l { display: block; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 11pt; text-transform: uppercase; letter-spacing: .08em; color: var(--pb-accent2); }
.ad-phone { display: block; font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 27pt; line-height: 1; }
.ad-text { display: block; font-size: 10pt; margin-top: 3px; opacity: .85; }
.ad-title { display: flex; align-items: flex-end; justify-content: space-between; gap: .3in; padding: .16in .45in .1in; }
.ad-title .pt-model { font-size: 34pt; }
.ad-price { text-align: right; flex: none; font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 42pt; line-height: 1; color: var(--pb-accent); }
.ad-price s { display: block; font-size: 13pt; font-weight: 700; color: #77787c; margin-top: 2px; }
/* Photos at their own 4:3 shape: main 5.05 x 3.78 in, two 2.47 x 1.85 in beside it. */
.ad-photos { display: grid; grid-template-columns: 5.05in 1fr; gap: .08in; height: 3.78in; margin: 0 .45in; }
.ad-main { display: block; width: 100%; height: 100%; object-fit: cover; background: #eee; }
.ad-photos.is-single { grid-template-columns: 1fr; }
.ad-photos.is-single .ad-main { object-fit: contain; background: #fff; }
.ad-side { display: grid; grid-template-rows: 1fr 1fr; gap: .08in; min-height: 0; }
.ad-side img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; background: #eee; }
.ad-nophoto { display: grid; place-items: center; color: #888; font-size: 14pt; }
.ad-body { display: grid; gap: .1in; padding: .14in .45in 0; }
.ad-equip { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: .14in .45in 0; }
.ad-equip-fit { flex: 1; min-height: 0; overflow: hidden; }
.ad-equip .p-list { column-count: 3; column-gap: .2in; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: .3in; margin: .12in .45in 0; padding-top: .1in; border-top: 3px solid var(--pb-ink); }
.ad-visit { display: flex; flex-direction: column; gap: 2px; font-size: 9.5pt; color: #3b3c40; }
.ad-visit strong { font-family: 'PBC', Arial, sans-serif; font-weight: 800; font-size: 15pt; color: #141416; }
.ad-qr { display: flex; align-items: center; gap: 8px; font-size: 9pt; color: #3b3c40; }
.ad-qr .pq { width: .95in; height: .95in; }
.ad .p-disc { margin: .06in .45in 0; }

/* Buyers Guide panel */
.bg-wrap { max-width: 900px; margin: 0 auto; padding: 8px 16px 64px; display: grid; gap: 16px; }
.bg-dealer { display: grid; gap: 14px; }
.bg-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; }
.bg-row > .field { flex: 1 1 240px; }
.bg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bg-card { display: grid; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.bg-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.bg-title { font-weight: 700; font-size: 16px; }
.bg-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.bg-pct { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; }
.bg-pct .input { width: 64px; text-align: center; }
.bg-systems { display: grid; gap: 6px; }
.bg-sys-head, .bg-sys { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; }
.bg-sys-head { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bg-more .select-wrap { flex: 1 1 280px; }
.bg-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bg-go .banner, .bg-go .help { flex-basis: 100%; margin: 0; }
@media (max-width: 600px) { .bg-sys-head, .bg-sys { grid-template-columns: 1fr; } .bg-sys-head span:last-child { display: none; } .bg-go .btn { flex: 1 1 100%; } }

/* Inventory > Print */
.bp-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 16px; }
.bp-doc { display: grid; gap: 4px; padding: 12px; text-align: left; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-sm); color: var(--ink); cursor: pointer; font: inherit; }
.bp-doc.is-on { border-color: var(--accent); background: var(--accent-soft); }
.bp-doc-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.bp-doc-help { font-size: 12.5px; color: var(--muted); }
.bp-pick-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.bp-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.bp-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.bp-row input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.bp-title { flex: 1; min-width: 0; font-weight: 600; }
.bp-sub { color: var(--muted); font-size: 13px; white-space: nowrap; }

@media print {
  @page { size: letter portrait; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .print-bar, .print-note, .print-msg, .bg-wrap, .toasts, .skip, .offline-bar { display: none !important; }
  .print-root { background: none !important; min-height: 0 !important; }
  .print-pages { zoom: 1 !important; display: block !important; padding: 0 !important; }
  .pp { box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  .pp:last-child { break-after: auto; page-break-after: auto; }
}
.ws-lead { margin-top: .12in; font-size: 11pt; line-height: 1.38; white-space: pre-line; max-height: 1.1in; overflow: hidden; }
.ws-body.is-wide { grid-template-columns: 1fr; }
.ws-equip .p-list.is-3 { column-count: 3; column-gap: .2in; }
.ws-equip .p-list.is-4 { column-count: 4; column-gap: .16in; }
.ws-fit, .ad-equip-fit { position: relative; }
.ws-fit[data-more]:not([data-more=""])::after, .ad-equip-fit[data-more]:not([data-more=""])::after { content: attr(data-more); position: absolute; left: 0; bottom: 0; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 9pt; color: var(--pb-accent); }

.ad-specs > div { padding: 4px 8px 5px; }
.ad-specs dd { font-size: 11.5pt; }
.ad-fit { max-height: .85in; overflow: hidden; }
.ad-equip { min-height: .9in; }
.ad-more { margin-top: 3px; font-family: 'PBC', Arial, sans-serif; font-weight: 700; font-size: 9pt; color: var(--pb-accent); }
.bg-wrap .segmented { max-width: 100%; flex-wrap: wrap; }
.bg-wrap .segmented button { white-space: normal; text-align: center; }
@media (max-width: 600px) { .bg-dealer .segmented { display: grid; grid-template-columns: 1fr; width: 100%; } .bg-card-head .segmented { width: 100%; } .bg-card-head .segmented button { flex: 1; } }
.vinscan-guide.is-waiting i { animation-play-state: paused; opacity: .35; }
.vinscan-help.is-bad { color: #ff9c9c; }

/* ---------- Settings: website chat ---------- */
.chat-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.chat-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.chat-stat-n { font-size: 24px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.chat-stat-l { font-size: 12.5px; color: var(--muted); }

/* ---------- AI draft (vehicle description) ---------- */
.ai-draft { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); }
.ai-draft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-draft-head .icon { color: var(--accent); }
.ai-draft-text { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 14.5px; }

/* ---------- Social post ---------- */
.social-modal .modal-body { display: flex; flex-direction: column; gap: 14px; }
.social-top { display: flex; justify-content: flex-start; }
.social-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.social-img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.social-img-ph { display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.social-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.social-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.social-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.social-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.social-title-row { display: flex; gap: 8px; }
.social-title-row .input { flex: 1; min-width: 0; }
.social-cap { min-height: 250px; font-size: 14.5px; line-height: 1.5; }
.social-copy .row-actions { align-items: center; margin-top: 0; }
.social-copy .grow { flex: 1; }
.social-steps { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.social-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.social-foot .row-actions { margin-top: 0; }
@media (max-width: 760px) {
  .social-grid { grid-template-columns: 1fr; }
  .social-img { max-width: 360px; margin: 0 auto; }
  .social-cap { min-height: 200px; }
  .social-foot { flex-direction: column; align-items: stretch; }
  .social-foot .row-actions { justify-content: stretch; }
  .social-foot .row-actions .btn { flex: 1; }
}

/* ---------- Leads: reply with AI, chat transcript ---------- */
.lead-reply { display: flex; flex-direction: column; gap: 10px; }
.lead-reply-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lead-reply-head .drawer-h { margin: 0; }
.lead-reply .row-actions { margin-top: 0; }
.lead-reply-start { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-reply-start .input { flex: 1; min-width: 140px; }
.lead-reply-subject { font-weight: 600; }
.lead-chat { margin-top: 12px; }
.lead-chat summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.chat-log { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chat-log li { max-width: 92%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-log li.is-them { align-self: flex-end; background: var(--ink); color: var(--surface); border-bottom-right-radius: 4px; }
.chat-log li.is-bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-who { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }

/* ---------- Lot dashboard ---------- */
.lot-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.inv-stat.is-hot .inv-stat-n { color: var(--warn); }
.lot-note { display: flex; align-items: center; gap: 6px; margin: -6px 0 18px; }
.lot-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; }
.lot-h .icon { color: var(--warn); }
.lot-attn { margin-bottom: 24px; }
.lot-attn-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lot-attn-link { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: inherit; height: 100%; transition: border-color .15s; }
.lot-attn-link:hover { border-color: var(--accent); }
.lot-thumb { flex: none; width: 84px; height: 63px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.lot-thumb.sm { width: 56px; height: 42px; border-radius: 6px; }
.lot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lot-attn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lot-attn-title { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.lot-attn-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.lot-attn-next { font-size: 13px; color: var(--muted); line-height: 1.4; }
.lot-attn-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; white-space: nowrap; }
.lot-attn-price { font-weight: 700; }
.lot-allgood { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; margin: 0 0 20px; }
.page-lot .toolbar .lot-h { margin-right: auto; }
.lot-table td { vertical-align: middle; }
.lot-veh { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.lot-days { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; white-space: nowrap; }
.lot-days strong { font-size: 18px; }
.lot-days.tone-neutral { color: var(--ink); }
.lot-bar { display: inline-flex; align-items: center; gap: 8px; width: 140px; }
.lot-bar-fill { display: block; height: 8px; border-radius: 4px; background: var(--accent); flex: none; max-width: 100px; }
.lot-bar-n { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .lot-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .lot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lot-attn-list { grid-template-columns: 1fr; }
  .lot-attn-side { display: none; }
  .lot-bar { width: 90px; }
  .lot-bar-fill { max-width: 50px; }
}

/* ---------- Chats ---------- */
.chat-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.chat-list li + li { border-top: 1px solid var(--line); }
.chat-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.chat-row:hover { background: var(--surface-2); }
.chat-row-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.chat-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-row-q { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-lead-link { margin-bottom: 14px; }
.chat-log-full .chat-page { align-self: center; max-width: none; padding: 2px 0; background: none; border: 0; }
.chat-lead-tag { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--ok); }

/* ---------- vehicle editor: AI photo sort, odometer ---------- */
.photo-aside { display: inline-flex; align-items: center; gap: 10px; }
.sort-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px 8px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 13.5px; }
.sort-note > span { flex: 1; min-width: 200px; }
.sort-note .icon { color: var(--accent); }
.img-ai-tag { position: absolute; left: 6px; bottom: 34px; max-width: calc(100% - 12px); padding: 2px 6px; border-radius: 4px; background: rgba(16, 15, 14, .78); color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.img-ai-tag.is-bad { background: var(--bad); }
.img-grid-item.is-flagged .thumb { box-shadow: 0 0 0 2px var(--bad); }
.vf-tools { display: flex; gap: 6px; align-items: stretch; }
.vf-tools .input { flex: 1; min-width: 0; }
.vf-tools .btn { flex: none; }
.social-top-multi { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.social-max { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.social-max .input { width: 110px; }
.multi-pick { list-style: none; margin: 0 0 6px; padding: 0; max-height: 236px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.multi-pick li + li { border-top: 1px solid var(--line); }
.multi-pick label { display: grid; grid-template-columns: auto 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 10px; cursor: pointer; font-size: 13.5px; }
.multi-pick label.is-on { background: var(--accent-soft); }
.multi-pick img { width: 52px; height: 39px; object-fit: cover; border-radius: 4px; display: block; }
.multi-pick-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.multi-pick-p { white-space: nowrap; font-variant-numeric: tabular-nums; }
.multi-pick-p s { color: var(--muted); font-size: 12px; }

/* ---------- phone alerts ---------- */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.alerts-row .row-actions { margin-top: 0; }
.alerts-on { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ok); }
.alerts-steps p { margin: 0 0 6px; font-size: 14px; }
.alerts-steps ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.alerts-others { margin: 0; }
.alerts--compact { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); }
.alerts-prompt { position: relative; }
.alerts-prompt .alerts--compact { padding-right: 90px; }
.alerts-hide { position: absolute; right: 14px; top: 14px; font-size: 13px; }
@media (max-width: 600px) { .alerts-prompt .alerts--compact { padding-right: 14px; padding-top: 34px; } .alerts-hide { top: 10px; } }
/* MMG team (MMG clients page) and sign-up links */
.mmg-team { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.team-who { min-width: 0; }
.team-who .cell-sub { overflow-wrap: anywhere; }
.team-act { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mmg-team .team-help { padding: 0 18px 14px; }
.signup-link { margin: 12px 0; }
.signup-link .input { width: 100%; font-size: 13px; }
.signup-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- store catalog: tabs, filters, bulk edit ---------- */
.cat-tabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; text-decoration: none !important; }
.cat-tab:hover { color: var(--ink); }
.cat-tab.is-on { color: var(--ink); }
.cat-tab.is-on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 2px 2px 0 0; background: var(--accent); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 14px; }
.filter-row .select-wrap { flex: 0 1 200px; min-width: 0; }
.filter-row .input-sm.is-set { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.check { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; flex: none; }
.col-check { width: 44px; padding-right: 0 !important; cursor: pointer; }
.table tr.is-selected td { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.sel-count { color: var(--ink); }
.table th .link-btn { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; margin-left: 8px; }
.tag-mini { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.page.has-bulk { padding-bottom: 120px; }
.bulk-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: min(760px, calc(100% - 40px)); padding: 10px 10px 10px 18px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(10px); box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
@media (min-width: 861px) { .shell:not(.is-editor) .bulk-bar { margin-left: calc(var(--side-w, 236px) / 2); } }
.bulk-count { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.bulk-count strong { color: var(--ink); font-size: 16px; }
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; align-items: center; }
.bulk-bar .menu { top: auto; bottom: calc(100% + 6px); }
.radio-list { display: grid; gap: 6px; margin-bottom: 10px; max-height: 300px; overflow: auto; }
.radio-row, .check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); }
.radio-row > span:nth-child(2), .check-row > span { flex: 1; min-width: 0; }
.radio-row.is-on { border-color: var(--accent); background: var(--accent-soft); }
.radio-row input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.check-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.check-row { min-height: 40px; padding: 4px 10px; font-size: 14.5px; }
.restock-check { margin-top: 12px; }
.inline-add { display: flex; gap: 6px; align-items: center; }
.inline-add .input { flex: 1; min-width: 0; }
.link-plain { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; }

/* tags */
.tag-box { position: relative; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: text; }
.tag-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.tag-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.tag-chip button:hover { background: var(--paper-2); color: var(--ink); }
.tag-text { flex: 1 1 100px; min-width: 80px; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; padding: 4px 2px; }
.tag-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.tag-sugg-item { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper-2); color: var(--ink); font-size: 13.5px; cursor: pointer; }
.tag-sugg-item:hover { border-color: var(--accent); }

/* product picker */
.picker .modal-body { display: flex; flex-direction: column; gap: 10px; }
.picker-search { position: sticky; top: 0; z-index: 2; }
.picker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.picker-row { border: 1px solid transparent; border-radius: var(--r-sm); }
.picker-row.is-on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.picker-main { display: flex; align-items: center; gap: 12px; padding: 8px 10px; cursor: pointer; min-height: 56px; }
.picker-text { min-width: 0; display: flex; flex-direction: column; }
.picker-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.picker-var { margin: 0 10px 10px 40px; }
.picker-count { margin-right: auto; }

/* stock history */
.stock-log { list-style: none; margin: 0; padding: 0; }
.stock-log-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.stock-delta { flex: none; min-width: 48px; text-align: center; padding: 4px 6px; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-delta.is-up { background: var(--ok-soft); color: var(--ok); }
.stock-delta.is-down { background: var(--bad-soft); color: var(--bad); }
.stock-log-main { flex: 1; min-width: 0; }
.stock-log-what { font-weight: 600; }
.stock-after { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* packages */
.pkg-parts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pkg-part { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pkg-part.is-missing { border-color: var(--bad-line); background: var(--bad-soft); }
.pkg-part-main { flex: 1; min-width: 0; }
.pkg-part-title { font-weight: 600; line-height: 1.3; }
.pkg-part-title a { color: var(--ink); }
.pkg-part-qty { display: flex; align-items: center; gap: 4px; flex: none; }
.qty-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.qty-btn:hover:not(:disabled) { border-color: var(--accent); }
.qty-btn:disabled { opacity: .4; cursor: default; }
.qty-n { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pkg-part-tools { display: flex; flex: none; }
.pkg-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.pkg-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper-2); font-size: 14px; }
.pkg-sum strong { font-size: 16px; }
.pkg-empty { display: flex; gap: 12px; align-items: center; padding: 16px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); color: var(--muted); }
.pkg-empty p { margin: 0; }
.pkg-save { display: flex; gap: 8px; align-items: center; margin: 4px 0 0; color: var(--ok); font-weight: 600; font-size: 14px; }

/* collections */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.col-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; color: var(--ink); text-decoration: none !important; transition: border-color .15s; }
.col-card:hover { border-color: var(--accent); }
.col-thumbs { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 64px 64px; gap: 2px; background: var(--line-2); }
.col-thumbs > img, .col-thumbs > span { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.col-thumbs > span { background: var(--paper-2); }
.col-thumbs > .col-hero { grid-column: 1 / -1; grid-row: 1 / -1; object-fit: cover; }
.col-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.col-name { font-weight: 700; font-size: 16px; }
.col-rules { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-row { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-2); }
.cat-row:last-child { border-bottom: 0; }
.cat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-tools { display: flex; flex: none; }
.rule-match { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; font-size: 14px; color: var(--ink-2); }
.rules { display: grid; gap: 8px; margin-bottom: 10px; }
.rule-row { display: grid; grid-template-columns: minmax(120px, 160px) minmax(130px, 170px) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.rule-row:has(.rule-label) { grid-template-columns: minmax(110px, 140px) minmax(90px, 130px) minmax(120px, 150px) minmax(0, 1fr) auto; }
.rule-row .select-wrap { min-width: 0; }
.rule-preview { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.rule-count { margin: 0 0 10px; }
.rule-count.is-loading { opacity: .55; }
.rule-thumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rule-more { font-weight: 700; color: var(--muted); padding: 0 6px; }
.col-img img { width: 100%; border-radius: var(--r-sm); display: block; aspect-ratio: 16 / 10; object-fit: cover; }

/* inventory */
.inv-tabs { margin: -4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.inv-tabs::-webkit-scrollbar { display: none; }
.table-inv .inv-col { width: 200px; }
.inv-ctl { display: flex; align-items: center; gap: 4px; }
.inv-input { width: 84px; min-height: 36px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 6px; }
.inv-input::placeholder { font-weight: 400; font-size: 12px; }
.inv-state { min-height: 18px; font-size: 12.5px; margin-top: 3px; padding-left: 40px; font-weight: 600; }
.inv-var { color: var(--ink-2); }
.table-inv tr.is-dirty td { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.inv-note { flex: 1 1 160px; min-width: 0; }
.inv-bar .bulk-actions .select-wrap { flex: 0 0 160px; }
.line-parts { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); font-size: 13.5px; color: var(--ink-2); display: grid; gap: 2px; }

@media (max-width: 860px) {
  .cat-tabs { margin: -6px -16px 14px; padding: 0 6px; gap: 0; }
  .cat-tab { flex: 1 0 auto; justify-content: center; padding: 0 8px; font-size: 11px; letter-spacing: .05em; }
  .cat-tab .icon { display: none; }
  .cat-tab.is-on::after { left: 6px; right: 6px; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; margin: -6px -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row .select-wrap { flex: 0 0 auto; }
  .filter-row .input-sm { min-width: 130px; }
  .bulk-bar { left: 8px; right: 8px; width: auto; transform: none; margin-left: 0 !important; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px); padding: 10px 10px 10px 14px; }
  .bulk-actions { order: 3; flex: 1 1 100%; }
  .bulk-actions .btn { flex: 1 1 auto; }
  .bulk-count { flex: 1; }
  .page.has-bulk { padding-bottom: 170px; }
  .col-check { width: 40px; }
  .pkg-part { flex-wrap: wrap; }
  .pkg-part-main { flex: 1 1 calc(100% - 72px); }
  .pkg-part-qty { margin-left: 60px; }
  .pkg-part-tools { margin-left: auto; }
  .pkg-sum { grid-template-columns: 1fr; }
  .rule-row, .rule-row:has(.rule-label) { grid-template-columns: 1fr 1fr auto; }
  .rule-row .rule-value, .rule-row .rule-label, .rule-row .rule-fill { grid-column: 1 / 3; grid-row: 2; }
  .rule-row:has(.rule-label) .rule-label { grid-row: 2; grid-column: 1 / 3; }
  .rule-row:has(.rule-label) .rule-value { grid-row: 3; }
  .rule-row > .icon-btn, .rule-row > button:last-child { grid-column: 3; grid-row: 1; }
  .col-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .col-thumbs { grid-template-rows: 48px 48px; }
  .table-inv thead { display: none; }
  .table-inv tbody tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) 44px; align-items: start; border-bottom: 1px solid var(--line-2); padding: 10px 0; }
  .table-inv tbody tr:last-child { border-bottom: 0; }
  .table-inv td { border: 0 !important; padding: 0 !important; }
  .table-inv td.col-thumb { grid-row: 1 / 3; padding-left: 12px !important; }
  .table-inv td.cell-actions { grid-column: 3; grid-row: 1; text-align: center; }
  .table-inv td.inv-col { grid-column: 2 / 4; grid-row: 2; width: auto; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-right: 12px !important; }
  .table-inv .inv-state { margin: 0; padding: 0; text-align: left; }
  .table-inv .qty-btn { width: 40px; height: 40px; }
  .inv-input { width: 76px; min-height: 40px; }
  .inv-bar .bulk-actions .select-wrap { flex: 1 1 130px; }
}
@media (max-width: 420px) { .col-grid { grid-template-columns: 1fr; } }
.home-alert { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; padding: 12px 16px; border: 1px solid var(--warn-line); border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink); text-decoration: none !important; font-size: 14.5px; }
.home-alert > .icon:first-child { color: var(--warn); flex: none; }
.home-alert > span { flex: 1; min-width: 0; }
.home-alert:hover { border-color: var(--warn); }

/* card payments (Stripe Connect) */
.pay-head { display: flex; gap: 12px; align-items: flex-start; }
.pay-head-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pay-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2); flex: none; }
.pay-dot.tone-ok { background: var(--ok-soft); }
.pay-dot.tone-bad { background: var(--bad-soft); }
.pay-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0 8px; }
.pay-facts > div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper-2); }
.pay-facts dt { font-size: 12px; color: var(--muted); }
.pay-facts dd { margin: 2px 0 0; font-weight: 700; }
.pay-card .row-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pay-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pay-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pay-steps li > span { flex: 1; }
.pay-steps li.is-done { border-color: var(--ok-line, var(--line)); }
.pay-steps li.is-done > .icon { color: var(--ok); }
.mmg-stripe { margin-top: 20px; }

/* MMG billing (portal/src/billing.js) */
.bill-lines { display: grid; gap: 8px; margin: 16px 0 8px; }
.bill-line { display: grid; grid-template-columns: minmax(0, 1fr) 132px 36px; gap: 8px; align-items: center; }
.bill-line .affix { min-width: 0; }
.bill-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.bill-chip { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; min-height: 32px; }
.bill-chip:hover { border-color: var(--accent); color: var(--accent-text); }
.bill-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.bill-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line-2); margin-bottom: 12px; font-size: 15px; }
.bill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.bill-fixed { margin: 6px 0 0; font-weight: 600; }
.bill-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.bill-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.bill-list li > span:last-child { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-list .bill-list-total { border-bottom: 0; font-weight: 700; }
.bill-card-on-file { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ink-2); font-size: 14px; }
.bill-sub { margin-top: 20px; }
.bill-h { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0; }
.bill-invoices { list-style: none; margin: 6px 0 0; padding: 0; }
.bill-invoices li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 64px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.bill-inv-amt { font-variant-numeric: tabular-nums; }
.bill-inv-link { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; font-weight: 600; }
.mmg-billing { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.mmg-billing .table-wrap { margin: 0 18px; }
.bill-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 18px; }
.bill-stats > div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper-2); min-width: 0; }
.bill-stats dt { font-size: 12px; color: var(--muted); }
.bill-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.mmg-billing > .help { margin: 10px 18px 16px; }
.mmg-billing .panel-head .grow { flex: 1; }
.client-cell .cell-sub { font-weight: 400; }
.bill-card-plain { border: 0; background: transparent; box-shadow: none; }
.bill-card-plain > .form-card-body { padding: 0; }
.bill-source { margin: 12px 0 14px; }
.mmg-orders .orders-empty { margin: 14px 18px; }
.order-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.hub-conn { margin: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); display: grid; gap: 14px; }
.hub-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.hub-row-hook { display: grid; align-items: end; grid-template-columns: minmax(0, 1fr) auto; }
.hub-row-hook .field { margin: 0; }
@media (max-width: 640px) { .hub-row-hook { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .bill-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bill-line { grid-template-columns: minmax(0, 1fr) 108px 36px; }
  .bill-invoices li { grid-template-columns: minmax(0, 1fr) auto 56px; }
  .bill-invoices li .badge { display: none; }
}

/* ---------- Calls (phone add-on) ---------- */
.banner-info { background: var(--info-soft); border: 1px solid var(--info-line); color: var(--ink); }
.banner-info > .icon { color: var(--info); }
.page-calls .tabs { margin-bottom: 18px; }
.call-icon.tone-bad { background: var(--bad-soft); color: var(--bad); }
.call-icon.tone-warn { background: var(--warn-soft); color: var(--warn); }
.call-icon.tone-ok { background: var(--ok-soft); color: var(--ok); }
.call-icon.tone-info { background: var(--info-soft); color: var(--info); }
.call-icon.tone-neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.call-row-sum { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.call-has-audio { color: var(--muted); flex: none; }
.chat-row.is-unread .chat-row-q { color: var(--accent-text); }
.chat-row.is-unread .chat-row-meta { color: var(--ink-2); }
.call-audio { display: block; width: 100%; height: 40px; margin: 2px 0 12px; }
.call-working { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.spin-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.call-summary { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14.5px; line-height: 1.5; }
.call-summary p { margin: 0; }
.call-summary p + p { margin-top: 8px; }
.call-next { display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.call-next .icon { margin-top: 3px; color: var(--accent-text); flex: none; }
.call-transcript { margin-top: 12px; }
.call-transcript summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.call-transcript ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.call-transcript li { display: grid; gap: 2px; font-size: 14px; line-height: 1.5; }
.ct-who { display: flex; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.call-transcript li.is-team .ct-who { color: var(--accent-text); }
.ct-at { font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }

/* text bubbles: the Texts screen and the lead drawer */
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 84%; display: flex; flex-direction: column; gap: 3px; }
.bubble.is-them { align-self: flex-start; }
.bubble.is-us { align-self: flex-end; align-items: flex-end; }
.bubble-text { padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.is-them .bubble-text { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.is-us .bubble-text { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bubble.is-failed .bubble-text { background: var(--bad-soft); color: var(--ink); border: 1px solid var(--bad-line); }
.bubble-meta { font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.bubble-media { display: flex; gap: 8px; font-size: 13px; padding: 0 4px; }
.thread-lead { margin-bottom: 14px; }
.thread-foot { width: 100%; }
.thread-foot .text-compose { margin-top: 0; }
.text-compose { margin-top: 12px; }
.text-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.text-compose-foot .is-long { color: var(--warn); }
.text-consent { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 8px; }
.text-consent .icon { flex: none; margin-top: 2px; }
.comm-call { align-self: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.comm-call-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.comm-call-head:hover { background: var(--surface-2); }
.comm-call-head .icon { color: var(--accent-text); flex: none; }
.comm-call-what { flex: 1; min-width: 0; font-weight: 600; }
.comm-call-at { font-size: 12px; color: var(--muted); white-space: nowrap; }
.comm-call-sum { margin: 0; padding: 0 12px 10px 35px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.comm-call-body { padding: 0 12px 12px; }

/* phone settings */
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 180px; min-width: 0; max-width: 260px; }
.num-list, .num-found, .ring-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.num-list li, .num-found li, .ring-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.num-list li + li, .num-found li + li, .ring-list li + li { border-top: 1px solid var(--line-2); }
.num-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 160px; }
.num-found li > span { flex: 1; }
.num-add { display: grid; gap: 4px; }
.ring-name { flex: 1 1 140px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ring-list .input { flex: 0 1 170px; min-width: 140px; }
.ring-list .toggle { flex: none; min-height: 36px; padding: 0; align-items: center; }
.ring-none { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 12px; font-size: 13.5px; color: var(--warn); }
.ring-none .icon { flex: none; margin-top: 2px; }
.hours-grid { display: grid; gap: 4px; margin: 10px 0 16px; }
.hours-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.hours-day { display: inline-flex; align-items: center; gap: 8px; width: 72px; font-weight: 600; cursor: pointer; }
.hours-row .input { width: 128px; flex: none; }
.page-calls .form-card .toggle + .field { margin-top: 12px; }
.page-calls select.input-sm { max-width: 200px; }
@media (max-width: 860px) {
  .ring-list .input { flex: 1 1 100%; order: 3; }
  .hours-row .input { width: 112px; }
}

/* ---------- CRM: tabs across the top ---------- */
.crm-nav { position: sticky; top: var(--topbar); z-index: 15; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crm-nav-in { max-width: 1180px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 20px; min-height: 52px; }
.crm-nav-title { flex: none; font-family: var(--display); font-size: 21px; line-height: 1; text-transform: uppercase; color: var(--heading); padding-right: 18px; border-right: 1px solid var(--line); }
.crm-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.crm-tabs::-webkit-scrollbar { display: none; }
.crm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 16px 12px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.crm-tab:hover { color: var(--ink); }
.crm-tab.is-on { color: var(--ink); border-bottom-color: var(--accent); }
.crm-tab-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; letter-spacing: 0; }
.has-crm .page { padding-top: 24px; }
@media (max-width: 860px) {
  .crm-nav-in { padding: 0 4px 0 8px; gap: 0; min-height: 46px; }
  .crm-nav-title { display: none; }
  .crm-tab { padding: 14px 10px 12px; font-size: 12px; }
  .has-crm .page { padding-top: 16px; }
}

/* ---------- CRM: Conversations ---------- */
.page-convo { padding-bottom: 20px; }
.convo { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--topbar) - 52px - 48px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.page-convo .banner + .convo { height: calc(100dvh - var(--topbar) - 52px - 48px - 62px); }
.convo-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.convo-tools { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.convo-tools .segmented { width: 100%; }
.convo-tools .segmented button { flex: 1; justify-content: center; }
.convo-rows { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.convo-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent; }
.convo-row:hover { background: var(--surface-2); }
.convo-row.is-on { background: var(--accent-soft); border-left-color: var(--accent); }
.convo-av { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 700; }
.convo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.convo-top { display: flex; align-items: baseline; gap: 8px; }
.convo-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-row.is-unread .convo-name { font-weight: 800; }
.convo-at { flex: none; font-size: 12px; color: var(--muted); }
.convo-last { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.convo-last span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-last .icon { flex: none; }
.convo-last.is-bad { color: var(--bad); }
.convo-row.is-unread .convo-last { color: var(--ink-2); }
.convo-empty { padding: 20px 14px; }
.convo-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.convo-none { margin: auto; padding: 24px; }
.thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.thread-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.thread-name { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; text-transform: uppercase; color: var(--heading); }
.thread-sub { font-size: 13px; color: var(--muted); }
.thread-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-owner { font-size: 12.5px; color: var(--ink-2); }
.thread-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.thread-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.thread .thread-foot { border-top: 1px solid var(--line); padding: 12px 18px 14px; }
.thread-loading { padding: 8px 0; }
.thread-drawer .thread-head { padding: 0 0 14px; margin-bottom: 14px; }
.thread-drawer .thread-log { padding: 0; overflow: visible; }
@media (max-width: 1023px) {
  .convo-list { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
  .convo-rows { overflow: visible; }
}

/* ---------- CRM: pipeline board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(172px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.board-col { display: flex; flex-direction: column; gap: 8px; min-height: 180px; padding: 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.board-col.is-over { border-color: var(--accent); background: var(--accent-soft); }
.board-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.board-title { flex: 1; }
.board-n { font-size: 12px; color: var(--muted); letter-spacing: 0; }
.board-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.board-dot.tone-accent { background: var(--accent); } .board-dot.tone-warn { background: var(--warn-dot); } .board-dot.tone-info { background: var(--info); } .board-dot.tone-ok { background: var(--ok-solid); }
.board-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-card { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); cursor: grab; outline: none; }
.board-card:hover { border-color: var(--line-strong); }
.board-card:focus-visible { box-shadow: var(--focus); }
.board-card.is-dragging { opacity: .45; }
.board-card-top { display: flex; align-items: center; gap: 8px; }
.board-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-card .lead-owner-dot { width: 24px; height: 24px; margin: 0; font-size: 10px; }
.board-kind { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.board-veh { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-foot { font-size: 12.5px; }
.board-empty, .board-more { margin: 0; padding: 14px 6px; text-align: center; font-size: 12.5px; color: var(--faint); }
.board-empty { border: 1px dashed var(--line); border-radius: var(--r-sm); }
.board-more { padding: 4px 6px; }
@media (max-width: 860px) {
  .board { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 0 16px 8px; }
  .board-col { scroll-snap-align: start; }
}

/* ---------- CRM: contacts ---------- */
.contacts { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.contact-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) 130px minmax(140px, 1.2fr) 130px 120px 90px 110px; gap: 12px; align-items: center; padding: 10px 16px; color: inherit; text-decoration: none; border-top: 1px solid var(--line-2); font-size: 14px; }
.contact-row:hover:not(.contact-head) { background: var(--surface-2); }
.contact-head { border-top: 0; padding-top: 12px; padding-bottom: 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.contact-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-name { display: flex !important; align-items: center; gap: 10px; }
.c-name .convo-av { width: 34px; height: 34px; font-size: 12px; }
.c-name-text { display: flex; flex-direction: column; min-width: 0; }
.c-name-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-count { font-size: 12px; color: var(--accent-text); font-weight: 600; }
.c-sub { display: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-type { display: inline-flex !important; align-items: center; gap: 6px; color: var(--ink-2); }
.c-type .icon { flex: none; }
.c-owner .lead-owner-dot { width: 26px; height: 26px; margin: 0; font-size: 10.5px; }
.c-last { color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) {
  .contact-row { grid-template-columns: minmax(180px, 1.6fr) 130px 120px 110px 90px; }
  .contact-row .c-email, .contact-row .c-owner { display: none; }
}
@media (max-width: 760px) {
  .contact-head { display: none; }
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 12px 14px; }
  .contact-row .c-phone, .contact-row .c-type, .contact-row .c-last { display: none; }
  .contact-row:nth-child(2) { border-top: 0; }
  .c-sub { display: block; }
}

/* ---------- CRM: calendar ---------- */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; }
.cal-day:disabled { cursor: default; opacity: .7; }
.cal-day.has { color: var(--ink); border-color: var(--line-strong); }
.cal-day:first-child { border-color: var(--accent); }
.cal-dow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cal-dom { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.cal-n { min-height: 18px; font-size: 12px; font-weight: 700; color: var(--accent-text); }
.cal { display: grid; gap: 18px; }
.cal-group { scroll-margin-top: calc(var(--topbar) + 64px); }
.cal-h { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.cal-group.is-late .cal-h { color: var(--bad); }
.cal-group ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.cal-group li + li { border-top: 1px solid var(--line-2); }
.cal-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: inherit; text-decoration: none; }
.cal-item:hover { background: var(--surface-2); }
.cal-time { flex: none; width: 74px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.cal-ic { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.cal-item.is-appt .cal-ic { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.cal-item.is-late .cal-ic { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-what { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item .lead-owner-dot { width: 26px; height: 26px; margin: 0; font-size: 10.5px; flex: none; }
@media (max-width: 860px) {
  .cal-week { gap: 4px; }
  .cal-day { padding: 8px 2px; }
  .cal-dom { font-size: 20px; }
  .cal-time { width: 64px; font-size: 13px; }
}

.contact-row, .contact-row:hover, .cal-item, .cal-item:hover, .convo-row, .convo-row:hover, .board-card { text-decoration: none; }
.contact-head > span { font-size: 11px; color: var(--muted); }

/* ---------- CRM: viewing switcher, tags, bulk, add lead, reports ---------- */
.crm-whose { flex: none; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.crm-whose .select-wrap { display: inline-block; }
.crm-whose select { min-width: 150px; padding-right: 30px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.crm-whose .select-wrap > .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
@media (max-width: 860px) {
  .crm-nav-in { flex-wrap: wrap; }
  .crm-tabs { flex-basis: 100%; }
  .crm-whose { width: 100%; margin: 0; padding: 0 8px 8px; }
  .crm-whose select { width: 100%; }
  .crm-whose .select-wrap { flex: 1; }
}
.head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-edit .tag { font-size: 12.5px; padding: 3px 4px 3px 10px; }
.tag-x button { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.tag-x button:hover { background: var(--surface-2); color: var(--ink); }
.tag-new { cursor: pointer; padding: 3px 10px !important; border-style: dashed; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tag-new:hover { color: var(--ink); border-color: var(--line-strong); }
.tag-add .input { width: 160px; min-height: 30px; padding: 3px 10px; }
.lead-check, .c-check { flex: none; display: inline-grid; place-items: center; }
.lead-check { align-self: center; padding: 6px 4px 6px 0; cursor: pointer; }
.lead-check input, .c-check, .select-all input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.c-check { margin-right: 2px; }
.lead-row.is-picked, .contact-row.is-picked { background: var(--accent-soft); }
.select-all { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 8px 2px; font-size: 13px; color: var(--muted); cursor: pointer; }
.crm-bulk { border-color: var(--accent); }
.bulk-n { font-size: 14px; margin-right: 4px; }
.crm-bulk .select-wrap { flex: 0 0 auto; }
.crm-bulk select { min-width: 140px; padding-right: 30px; }
.crm-bulk .select-wrap > .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.bulk-tag { display: flex; gap: 6px; align-items: center; }
.bulk-tag .input { width: 150px; }
@media (max-width: 860px) {
  .crm-bulk .select-wrap, .bulk-tag { flex: 1 1 140px; }
  .crm-bulk select, .bulk-tag .input { width: 100%; min-width: 0; }
}
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .field-pair { grid-template-columns: 1fr; gap: 0; } }
.add-lead .segmented { flex-wrap: wrap; }
.add-dupe { display: flex; gap: 8px; align-items: flex-start; margin: -6px 0 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 13.5px; }
.add-dupe .icon { flex: none; margin-top: 2px; color: var(--warn); }
.thread-assign { display: inline-block; }
.thread-assign select { min-height: 30px; padding: 3px 28px 3px 10px; font-size: 13px; }
.thread-assign > .icon { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.rr-list { margin-top: 12px; }
.rep-stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rep-stats .inv-stat-n small { font-size: .55em; color: var(--muted); font-family: var(--font); font-weight: 600; }
.rep-card { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rep-h { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rep-table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.rep-table th, .rep-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--line-2); vertical-align: top; white-space: nowrap; }
.rep-table thead th { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rep-table th:first-child, .rep-table td:first-child { text-align: left; }
.rep-table tbody tr:last-child th, .rep-table tbody tr:last-child td { border-bottom: 0; }
.rep-table tr.is-none th { color: var(--muted); font-weight: 600; }
.rep-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.rep-who .lead-owner-dot { width: 26px; height: 26px; margin: 0; font-size: 10.5px; }
.rep-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.rep-note { margin: 10px 0 0; }
.rep-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rep-src li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.rep-src-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-bar { height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; }
.rep-bar span { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.rep-src-n { text-align: right; font-weight: 700; }
@media (max-width: 600px) { .rep-src li { grid-template-columns: 1fr 60px; } .rep-bar { grid-column: 1 / -1; grid-row: 2; } }
/* Lead rows with a checkbox first */
.lead-row { grid-template-columns: 20px 44px minmax(0, 1fr) auto; padding-left: 12px; gap: 12px; }
.lead-check { padding: 6px 0; }
@media (max-width: 860px) {
  .lead-row { grid-template-columns: 20px 40px minmax(0, 1fr); gap: 10px; }
  .lead-check { padding-top: 10px; align-self: start; }
  .lead-side { grid-column: 3; }
}
/* CRM bar: room for every tab and the Viewing switcher on a laptop */
.crm-tab { padding-left: 10px; padding-right: 10px; }
.crm-whose-l { display: none; }
.crm-whose select { min-width: 140px; }
@media (min-width: 1500px) { .crm-whose-l { display: inline; } }
@media (max-width: 1360px) and (min-width: 861px) { .crm-nav-title { display: none; } }
