/* Capital Shots Agent Portal — components + layout
 * Order matches the cascade: reset → typography → primitives → patterns → app.
 */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap');
@import url('./tokens.css');

/* ───── Reset (tight, not normalize-all) ─────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
::selection { background: var(--brand-soft); color: var(--brand-ink); }

/* ───── Typography utilities ─────────────────────────────── */
.h1 { font-size: clamp(28px, 3.5vw, 40px); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); font-weight: 500; margin: 0; }
.h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: var(--leading-snug); letter-spacing: var(--tracking-tight); font-weight: 500; margin: 0; }
.h3 { font-size: 18px; line-height: var(--leading-snug); letter-spacing: var(--tracking-tight); font-weight: 500; margin: 0; }
.kicker { font-size: 11px; letter-spacing: var(--tracking-overline); text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.muted { color: var(--ink-3); }
.eyebrow { font-size: 12px; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }

/* ───── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 11px 18px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--r-2);
  letter-spacing: var(--tracking-normal);
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}
.btn:hover { background: var(--bg-hover); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-primary {
  background: var(--brand); color: var(--brand-ink);
  border-color: transparent;
}
.btn-primary:hover { background: var(--brand-deep); color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--ink); }

/* Brand-green back button — solid + unmistakable on white surface */
.btn-back {
  display: inline-flex; align-items: center;
  padding: 9px 16px;
  font-size: 13px; font-weight: 500;
  letter-spacing: var(--tracking-normal);
  background: var(--brand);
  color: var(--brand-ink);
  border: 1px solid var(--brand);
  border-radius: var(--r-pill);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease), color var(--t-base) var(--ease);
}
.btn-back:hover {
  background: var(--brand-deep);
  color: #fff;
  border-color: var(--brand-deep);
  transform: translateX(-1px);
}
.btn-back:active { transform: translateX(-3px); }

.btn-danger { background: transparent; border-color: var(--line); color: var(--err); }
.btn-danger:hover { background: rgba(198,75,58,.08); border-color: rgba(198,75,58,.32); }

.btn-icon { padding: 9px; width: 36px; height: 36px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: var(--r-3); }

/* ───── Inputs ───────────────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus);
}
.input-lg { padding: 14px 18px; font-size: 15px; border-radius: var(--r-3); }
.textarea { resize: vertical; min-height: 88px; line-height: var(--leading-body); }

.field { display: block; margin-bottom: var(--sp-4); }
.field-label {
  display: flex; align-items: baseline; gap: var(--sp-2);
  font-size: 12px; font-weight: 500;
  color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.field-help { margin-top: 6px; font-size: 12px; color: var(--ink-3); line-height: var(--leading-snug); }
.field-error { margin-top: 6px; font-size: 12px; color: var(--err); }

/* Switch */
.switch {
  --w: 36px; --h: 20px;
  position: relative; width: var(--w); height: var(--h);
  background: var(--line-strong); border-radius: var(--r-pill);
  transition: background var(--t-base) var(--ease);
  cursor: pointer; flex: 0 0 auto;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: calc(var(--h) - 4px); height: calc(var(--h) - 4px);
  background: #fff; border-radius: 50%;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease);
}
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(calc(var(--w) - var(--h))); }

/* ───── Card / Panel ─────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.card-pad   { padding: var(--sp-5); }
.card-pad-lg{ padding: var(--sp-8); }

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-6);
}

/* ───── Badge ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .04em;
  background: var(--bg-sunken);
  color: var(--ink-2);
  border-radius: var(--r-pill);
}
.badge-ok    { background: rgba(47,158,110,.1);  color: var(--ok); }
.badge-warn  { background: rgba(201,138,20,.1);  color: var(--warn); }
.badge-err   { background: rgba(198,75,58,.1);   color: var(--err); }
.badge-brand { background: var(--brand-soft);    color: var(--brand-deep); }
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .6;
}

/* ───── App nav (top tabs + user) ─────────────────────────── */
.app-nav {
  position: sticky; top: 0; z-index: 50;
  /* CS signature blur — matches the Webflow site nav (lighter / cleaner
   * version since the portal canvas is white, not the Webflow dark hero) */
  background: rgba(247,245,240,.65);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
html[data-theme="dark"] .app-nav {
  background: rgba(14,15,16,.55);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-bottom-color: rgba(255,255,255,.06);
}

/* Real logo replaces the dot+wordmark on /cs/* */
.cs-brand-logo {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  padding: 4px 0;
}
.cs-brand-logo img {
  height: 26px; width: auto; display: block;
}
.cs-brand-logo .cs-nav-marker {
  font-size: 9px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-deep);
  padding: 2px 6px; border-radius: var(--r-pill);
  background: rgba(62,224,146,.14);
}
html[data-theme="dark"] .cs-brand-logo .cs-nav-marker {
  color: #92e8ba;
  background: rgba(92,240,168,.14);
}
.app-nav-inner {
  display: flex; align-items: center; gap: var(--sp-6);
  max-width: 1440px; margin: 0 auto;
  padding: 0 var(--sp-6);
  height: var(--topbar-h);
}
.app-nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink);
}
.app-nav-brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(62,224,146,.14);
}
.app-nav-tabs {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; gap: 2px;
  flex: 1;
}
.nav-tab {
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  letter-spacing: var(--tracking-normal);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.nav-tab:hover { background: var(--bg-hover); color: var(--ink); }
.nav-tab.is-active { background: var(--bg-elevated); color: var(--ink); box-shadow: var(--shadow-1); }
.nav-tab.is-active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); margin-right: 8px;
}

.app-nav-user { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--r-pill);
  font-size: 14px; color: var(--ink);
  background: transparent;
  transition: background var(--t-base) var(--ease);
}
.user-btn:hover { background: var(--bg-hover); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0;
}
.user-name { font-weight: 500; }
.user-caret { font-size: 10px; color: var(--ink-3); }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  padding: 6px;
  z-index: 60;
  animation: menuIn var(--t-base) var(--ease);
}
.user-menu hr { margin: 6px 4px; border-top: 1px solid var(--line); border-bottom: 0; }
.theme-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.theme-toggle-switch {
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background var(--t-base) var(--ease);
  flex: 0 0 auto;
}
.theme-toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform var(--t-base) var(--ease);
}
.theme-toggle[aria-pressed="true"] .theme-toggle-switch { background: var(--brand); }
.theme-toggle[aria-pressed="true"] .theme-toggle-switch::after { transform: translateX(14px); }
.user-menu-head { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.user-menu-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.user-menu-email { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.user-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: var(--r-1);
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  background: transparent;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.user-menu-item:hover { background: var(--bg-hover); color: var(--ink); }
.user-menu-item.is-danger { color: var(--ink-3); }
.user-menu-item.is-danger:hover { color: var(--err); background: rgba(198,75,58,.06); }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile drawer toggle */
.nav-mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  background: transparent; border: 0;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0;
  margin-left: auto;
}
.nav-mobile-toggle .bar {
  width: 18px; height: 1.5px; background: var(--ink); border-radius: 1px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.app-nav[data-mobile-open="true"] .nav-mobile-toggle .bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.app-nav[data-mobile-open="true"] .nav-mobile-toggle .bar:nth-child(2) { opacity: 0; }
.app-nav[data-mobile-open="true"] .nav-mobile-toggle .bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .app-nav-inner { gap: var(--sp-3); padding: 0 var(--sp-4); }
  .nav-mobile-toggle { display: flex; }
  .user-name { display: none; }
  .user-caret { display: none; }
  .app-nav-tabs {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
  }
  .app-nav[data-mobile-open="true"] .app-nav-tabs {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .nav-tab {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--r-2);
    background: var(--bg);
    font-size: 15px;
  }
  .nav-tab.is-active { background: var(--brand-soft); color: var(--brand-deep); box-shadow: none; }
  .nav-tab.is-active::before { background: var(--brand-deep); }
  .user-menu { right: var(--sp-4); }
}

/* ───── Top bar (legacy, used in editor only) ─────────────── */
html[data-theme="dark"] .app-nav { background: rgba(14,15,16,.85); }
html[data-theme="dark"] .topbar { background: rgba(14,15,16,.85); }
html[data-theme="dark"] .user-avatar { color: #0a1f14; }
html[data-theme="dark"] .auth-wrap {
  background:
    radial-gradient(1400px 800px at 120% -10%, rgba(62,224,146,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,255,255,.025), transparent 60%),
    var(--bg);
}
html[data-theme="dark"] .auth-brand {
  background:
    radial-gradient(800px 400px at 20% 90%, rgba(62,224,146,.07), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}
html[data-theme="dark"] .preview-frame { background: #fff; } /* SPW always light */
html[data-theme="dark"] .ip { background: #fff; color: #1a1a1a; } /* buyers always see white */
html[data-theme="dark"] .listing-thumb,
html[data-theme="dark"] .live-thumb { background: #1d2022; }
html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .select { background: var(--bg-sunken); color: var(--ink); }
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder { color: var(--ink-4); }
html[data-theme="dark"] .btn-back { background: var(--brand); color: #0a1f14; border-color: var(--brand); }
html[data-theme="dark"] .btn-back:hover { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
html[data-theme="dark"] .btn-primary { color: #0a1f14; }
html[data-theme="dark"] .badge { background: var(--bg-sunken); color: var(--ink-2); }
html[data-theme="dark"] .swatch-color { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
html[data-theme="dark"] .toast { background: var(--bg-elevated); color: var(--ink-2); }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: rgba(247,245,240,.88);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 var(--sp-6);
  gap: var(--sp-4);
}
.topbar-brand {
  font-size: 13px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink);
}
.topbar-brand .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); margin-right: 10px; transform: translateY(-1px);
}
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); }

/* ───── Layout ───────────────────────────────────────────── */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-main {
  max-width: var(--max-w-app);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6) var(--sp-16);
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-tight { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ───── Dashboard ────────────────────────────────────────── */
.dashboard-head { max-width: 640px; }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
}
.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-5) var(--sp-5);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.kpi-card:hover { border-color: var(--line-strong); }
.kpi-card[data-tone="brand"] {
  background: var(--brand-soft);
  border-color: rgba(30,107,70,.16);
}
.kpi-card[data-tone="brand"] .kpi-value { color: var(--brand-deep); }
.kpi-card[data-tone="warn"] { background: rgba(201,138,20,.06); border-color: rgba(201,138,20,.18); }
.kpi-card[data-tone="warn"] .kpi-value { color: var(--warn); }
/* Money tone — refined terracotta, replaces warn for $ outstanding on CS-admin only */
.kpi-card[data-tone="money"] {
  background: var(--accent-money-soft);
  border-color: var(--accent-money-line);
}
.kpi-card[data-tone="money"] .kpi-value { color: var(--accent-money); }
.kpi-label { font-size: 12px; color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase; margin-bottom: 6px; font-weight: 500; }
.kpi-value { font-size: clamp(28px, 3vw, 36px); font-weight: 500; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--ink); }

.dash-section { margin-top: var(--sp-10); }
.live-grid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.live-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.live-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.live-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
  overflow: hidden;
  display: block;
}
.live-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.live-card:hover .live-thumb img { transform: scale(1.03); }
.live-flag {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px;
  font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(201,138,20,.92); color: #fff;
  border-radius: var(--r-pill);
}
.live-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.live-title { font-size: 16px; font-weight: 500; margin: 0; letter-spacing: var(--tracking-tight); }
.live-meta { font-size: 13px; color: var(--ink-2); }
.live-stats { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.live-actions {
  display: flex; gap: 8px;
  margin-top: auto; padding-top: var(--sp-4);
}
.live-actions .btn-primary { flex: 1; }
.live-actions .btn-ghost { padding: 7px 11px; }

@media (max-width: 640px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-thumb { aspect-ratio: 5 / 3; }
}

.attn-row, .recent-row {
  display: grid; align-items: center; gap: var(--sp-3);
  padding: 12px 8px; border-radius: var(--r-2);
  transition: background var(--t-base) var(--ease);
  cursor: pointer;
}
.attn-row { grid-template-columns: 60px 1fr auto; }
.recent-row { grid-template-columns: 56px 1fr auto; }
.attn-row + .attn-row, .recent-row + .recent-row {
  border-top: 1px solid var(--line);
}
.attn-row:hover, .recent-row:hover { background: var(--bg-hover); }
.attn-body, .recent-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attn-body strong, .recent-body strong { font-size: 14px; font-weight: 500; color: var(--ink); }
.attn-body .muted, .recent-body .muted {
  font-size: 12px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.attn-tag {
  font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: var(--r-pill);
  background: var(--bg-sunken); color: var(--ink-3);
  width: max-content;
}
.attn-tag-draft { background: rgba(201,138,20,.12); color: var(--warn); }
.attn-tag-lead  { background: var(--brand-soft); color: var(--brand-deep); }
.attn-cta { font-size: 13px; color: var(--ink-3); }
.recent-thumb {
  width: 56px; height: 40px; border-radius: var(--r-1);
  background: var(--bg-sunken);
  background-size: cover; background-position: center;
}
.recent-go { font-size: 18px; color: var(--ink-3); }

/* ───── Listing card — Signature design language ─────────── */
.lc {
  display: flex; flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.lc:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.lc:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Hero — cover photo with address overlay */
.lc-hero {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--bg-sunken);
  overflow: hidden;
  color: #fff;
  container-type: inline-size;
}
.lc-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.lc:hover .lc-cover { transform: scale(1.04); }
.lc-cover-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 11px; letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.lc-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%);
}
.lc-status {
  position: absolute; top: 12px; left: 12px;
  font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  padding: 4px 10px 4px 4px;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lc-status-ok { color: #b8f3d2; }
.lc-status-warn { color: #f3d8a5; }
.lc-action {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(20,20,20,.18);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.lc:hover .lc-action, .lc:focus-within .lc-action { opacity: 1; transform: translateY(0); }
.lc-action:hover { background: #fff; }
@media (pointer: coarse) { .lc-action { opacity: 1; transform: none; } }
.lc-hero-body {
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  z-index: 2;
}
.lc-city {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; opacity: .9;
  margin-bottom: 4px;
}
.lc-title {
  font-family: 'Onest', system-ui, sans-serif;
  font-size: clamp(18px, 6cqi, 28px);
  font-weight: 500; letter-spacing: -.018em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.lc-title-period { color: var(--brand); }

/* Black stats bar (SPW signature) */
.lc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0a0a0a; color: #fff;
  padding: 14px 8px;
  text-align: center;
  container-type: inline-size;
}
.lc-stat { padding: 0 4px; border-right: 1px solid rgba(255,255,255,.06); }
.lc-stat:last-child { border-right: 0; }
.lc-stat-value {
  font-family: 'Onest', system-ui, sans-serif;
  font-size: clamp(13px, 3.5cqi, 16px);
  font-weight: 500; letter-spacing: -.012em;
  line-height: 1.1;
}
.lc-stat-label {
  font-size: 8px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-top: 3px;
}
.lc-dollar { color: var(--brand); margin-right: 1px; }

/* Foot — copy link + photo count */
.lc-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-3);
}
.lc-copy {
  background: var(--bg);
  border-color: var(--line);
}
.lc-copy:hover { background: var(--brand-soft); border-color: rgba(30,107,70,.3); color: var(--brand-deep); }
.lc-photos { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

html[data-theme="dark"] .lc-stats { background: #000; }
html[data-theme="dark"] .lc-foot  { background: var(--bg-elevated); }

/* ───── Listing card (legacy class, kept for any stragglers) ─ */
.listing-card { display: flex; flex-direction: column; cursor: pointer; }
.listing-thumb {
  aspect-ratio: 16 / 10; background: var(--bg-sunken);
  overflow: hidden; position: relative;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.listing-actions {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; gap: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.listing-card:hover .listing-actions,
.listing-card:focus-within .listing-actions { opacity: 1; transform: translateY(0); }
.card-action {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(20,20,20,.18);
  border: 0; cursor: pointer;
  transition: background var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}
.card-action:hover { background: #fff; transform: scale(1.06); }
@media (pointer: coarse) {
  .listing-actions { opacity: 1; transform: none; }
}
.listing-card:hover .listing-thumb img { transform: scale(1.02); }
.listing-body { padding: var(--sp-5); }
.listing-title {
  font-size: 16px; font-weight: 500; letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--sp-1);
}
.listing-meta { font-size: 13px; color: var(--ink-3); }
.listing-stats {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  margin-top: var(--sp-3);
  font-size: 12px; color: var(--ink-2);
}
.listing-stats span {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  letter-spacing: .02em;
}
.listing-stats .listing-stats-photos {
  background: transparent; color: var(--ink-3); padding-left: 0;
}
.listing-foot {
  margin-top: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.listing-copy {
  background: var(--bg);
  border-color: var(--line);
}
.listing-copy:hover { background: var(--brand-soft); border-color: rgba(30,107,70,.3); color: var(--brand-deep); }
.listing-thumb-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 12px; letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.listing-thumb-status {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex;
}
.listing-thumb-status .badge {
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ───── Auth screen ──────────────────────────────────────── */
.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background:
    radial-gradient(1400px 800px at 120% -10%, rgba(62,224,146,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(20,20,20,.025), transparent 60%),
    var(--bg);
}

/* Left: brand panel (desktop only). A quiet, taste-forward statement. */
.auth-brand {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--sp-12) var(--sp-12) var(--sp-10);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(800px 400px at 20% 90%, rgba(62,224,146,.05), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  overflow: hidden;
}
.auth-brand-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase; color: var(--ink-2);
}
.auth-brand-mark .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(62,224,146,.16);
}
.auth-brand-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 540px; }
.auth-brand-eyebrow {
  font-size: 11px; letter-spacing: var(--tracking-overline);
  color: var(--ink-3); text-transform: uppercase; font-weight: 500;
  margin-bottom: var(--sp-4);
}
.auth-brand-title {
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1.04; letter-spacing: -.024em; font-weight: 500;
  margin: 0 0 var(--sp-6); color: var(--ink);
}
.auth-brand-title em {
  font-style: normal;
  background: linear-gradient(105deg, var(--brand-deep) 0%, var(--brand) 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-brand-sub {
  font-size: 17px; line-height: 1.55;
  color: var(--ink-2); margin: 0 0 var(--sp-10); max-width: 38ch;
}
.auth-brand-bullets { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.auth-brand-bullets li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: 14px; color: var(--ink-2); line-height: 1.5;
}
.auth-brand-bullets li::before {
  content: ''; flex: 0 0 auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  background-image:
    linear-gradient(135deg, transparent 38%, var(--brand) 38%, var(--brand) 62%, transparent 62%);
  margin-top: 2px;
}
.auth-brand-foot {
  margin-top: auto; padding-top: var(--sp-10);
  font-size: 12px; color: var(--ink-3); letter-spacing: var(--tracking-normal);
  display: flex; justify-content: space-between; gap: var(--sp-4);
}

/* Right: sign-in column */
.auth-form-col {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-10) var(--sp-8);
}
.auth-card { width: 100%; max-width: 440px; padding: var(--sp-10); border-radius: var(--r-4); }
.auth-eyebrow { margin-bottom: var(--sp-8); }
.auth-card .h1 { margin-bottom: var(--sp-3); }
.auth-card p { color: var(--ink-2); margin: 0 0 var(--sp-6); }

/* ── Passwordless: OTP boxes, divider, QR ── */
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp-box {
  width: 100%; max-width: 52px; aspect-ratio: 3 / 4;
  text-align: center; font-size: 22px; font-weight: 500;
  letter-spacing: 0; padding: 0; border-radius: var(--r-3);
  font-variant-numeric: tabular-nums;
}
.otp-box:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(62,224,146,.18); }

.auth-divider {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--ink-3); font-size: 12px; text-transform: uppercase;
  letter-spacing: var(--tracking-overline); margin: var(--sp-2) 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.qr-frame {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4); border-radius: var(--r-4);
  background: #fff; border: 1px solid var(--line);
  width: fit-content; margin: 0 auto;
}
.qr-frame svg { display: block; border-radius: 8px; }

/* Tablet: tighter split (iPad portrait & landscape) */
@media (max-width: 1100px) and (min-width: 641px) {
  .auth-wrap { grid-template-columns: 1fr 1fr; }
  .auth-brand { padding: var(--sp-10) var(--sp-6); }
  .auth-brand-title { font-size: clamp(30px, 4.2vw, 44px); }
  .auth-brand-sub { font-size: 14px; margin-bottom: var(--sp-6); }
  .auth-brand-bullets { gap: var(--sp-2); }
  .auth-brand-bullets li { font-size: 13px; }
  .auth-brand-foot { padding-top: var(--sp-6); font-size: 11px; }
  .auth-form-col { padding: var(--sp-8) var(--sp-5); }
  .auth-card { padding: var(--sp-8); }
}

/* Phone (≤640): brand panel hides, single card centered */
@media (max-width: 640px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-col { padding: var(--sp-6) var(--sp-4); min-height: 100dvh; }
}

/* ───── Editor split layout ──────────────────────────────── */
.editor {
  display: grid;
  min-height: calc(100dvh - var(--topbar-h));
  background: var(--bg);
  transition: grid-template-columns var(--t-slow) var(--ease);
}
.editor[data-preview-on="false"] { grid-template-columns: 1fr; }
.editor[data-preview-on="true"]  { grid-template-columns: minmax(380px, 620px) 1fr; }
.editor-panel {
  border-right: 1px solid var(--line);
  padding: var(--sp-8) var(--sp-6) var(--sp-12);
  background: var(--bg);
}
/* When the preview is parked, the form gets a centered max width so reading
   stays comfortable on big screens. */
.editor[data-preview-on="false"] .editor-panel {
  border-right: 0;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}
.editor-preview {
  position: sticky; top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  background: var(--bg-sunken);
  padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.editor[data-preview-on="false"] .editor-preview { display: none; }
/* ───── Editor inline buyer-page preview ─────────────────────
 * Scaled-down replica of the SPW. Lives inside the editor's preview
 * pane and updates live as the agent edits the form.
 * Class prefix `ip-` (inline-preview) so it never collides with portal CSS.
 */
.preview-frame {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  border: 1px solid var(--line); border-radius: var(--r-3);
  background: #fff;
  box-shadow: var(--shadow-2);
}
.ip {
  /* Palette role variables — driven by the agent's brand palette.
     button = primary CTA / dot accent / agent avatar
     accent-text = price, eyebrows, section underline ink
     divider = hairline sections + footer
     highlight = small chips / hovers */
  --ip-button:        #3ee092;
  --ip-button-ink:    #0a1f14;
  --ip-accent-text:   #1a1a1a;
  --ip-divider:       rgba(0,0,0,.06);
  --ip-highlight:     #e3f6ec;
  /* Font variables — swapped by Brand kit picker */
  --ip-font-heading:  var(--font-sans);
  --ip-font-body:     var(--font-sans);
  /* Layout constants — overridden per template */
  --ip-radius: 4px;
  --ip-hero-radius: 0;
  --ip-shadow: none;
  --ip-eyebrow-letter: .18em;
  --ip-h1-letter: -.02em;
  --ip-h1-weight: 500;
  --ip-h2-letter: .14em;
  --ip-cta-radius: 999px;
  --ip-cta-weight: 500;
  --ip-section-pad: 18px 20px;
  font-family: var(--ip-font-body);
  color: #1a1a1a;
  background: #fff;
  font-size: 13px; line-height: 1.5;
}

/* ── Signature (current — modern minimal, Onest sans) ── */
.ip[data-template="signature"] {
  --ip-font-heading: 'Onest', system-ui, sans-serif;
  --ip-font-body:    'Onest', system-ui, sans-serif;
  --ip-radius: 6px;
  --ip-hero-radius: 0;
  --ip-cta-radius: 999px;
}

/* ── Elegant (serif, classic luxury) ── */
.ip[data-template="elegant"] {
  --ip-font-heading: 'Playfair Display', 'Lora', serif;
  --ip-font-body:    'Lora', 'Georgia', serif;
  --ip-radius: 0;
  --ip-hero-radius: 0;
  --ip-cta-radius: 0;
  --ip-h1-letter: -.005em;
  --ip-h1-weight: 400;
  --ip-h2-letter: .26em;
  --ip-eyebrow-letter: .32em;
  --ip-cta-weight: 400;
  --ip-section-pad: 24px 24px;
}
.ip[data-template="elegant"] .ip-h1 { font-style: normal; }
.ip[data-template="elegant"] .ip-h2 { font-family: var(--ip-font-body); font-style: italic; font-weight: 400; }

/* ── Simple (Inter, ultra-minimal) ── */
.ip[data-template="simple"] {
  --ip-font-heading: 'Inter', system-ui, sans-serif;
  --ip-font-body:    'Inter', system-ui, sans-serif;
  --ip-radius: 0;
  --ip-hero-radius: 0;
  --ip-cta-radius: 4px;
  --ip-h1-weight: 600;
  --ip-h1-letter: -.025em;
  --ip-h2-letter: .04em;
  --ip-eyebrow-letter: .12em;
}
.ip[data-template="simple"] .ip-h2 { text-transform: none; font-weight: 500; font-size: 14px; }
.ip-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-sunken);
  overflow: hidden;
  display: flex; align-items: flex-end;
  color: #fff;
  border-radius: var(--ip-hero-radius);
  font-family: var(--ip-font-heading);
}

/* ── Cinematic Signature hero (matches the real SPW) ──────── */
.ip-hero-spw {
  aspect-ratio: 4 / 5;          /* taller hero like the real page */
  display: block;
  container-type: inline-size;
}
.ip-hero-spw .ip-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ip-hero-spw .ip-hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,.45) 100%);
}
/* Top nav */
.ip-nav {
  position: absolute; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  color: #fff;
}
.ip-nav-agent { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ip-nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ip-button), var(--ip-button) 60%, rgba(255,255,255,.4));
  color: var(--ip-button-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 10px; font-family: var(--ip-font-heading);
  border: 1.5px solid rgba(255,255,255,.4);
}
.ip-nav-agent-text { display: inline-flex; flex-direction: column; gap: 1px; line-height: 1.1; min-width: 0; }
.ip-nav-agent-text strong { font-family: var(--ip-font-heading); font-size: 11px; font-weight: 500; }
.ip-nav-agent-text span { font-size: 9px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-nav-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--ip-font-heading);
}
.ip-nav-links a {
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,.9); cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  letter-spacing: .02em;
}
.ip-nav-links a.is-active { border-bottom-color: var(--ip-button); }
.ip-nav-cta {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: #fff; color: #1a1a1a;
  border: 0; border-radius: 999px;
  font-family: var(--ip-font-heading);
  font-size: 11px; font-weight: 500;
  cursor: pointer;
}
/* Centered title */
.ip-hero-title-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 18px;
  color: #fff;
}
.ip-hero-title {
  font-family: var(--ip-font-heading);
  font-weight: var(--ip-h1-weight);
  letter-spacing: var(--ip-h1-letter);
  margin: 0;
  line-height: .98;
  /* Scales with the preview pane width */
  font-size: clamp(20px, 7.5cqi, 56px);
  max-width: 14ch;
  text-wrap: balance;
}
.ip-hero-scroll {
  font-size: 8px; letter-spacing: .32em; opacity: .85;
  margin-top: 12px; padding-top: 12px;
  position: relative;
  font-family: var(--ip-font-heading);
}
.ip-hero-scroll::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 8px; background: rgba(255,255,255,.5);
}
.ip-hero-location {
  position: absolute; right: 18px; bottom: 16px;
  font-family: var(--ip-font-heading);
  font-size: 11px; letter-spacing: .02em;
  opacity: .9;
}

/* ── Black stats bar — Signature ──────────────────────────── */
.ip-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0a0a0a; color: #fff;
  padding: 22px 16px;
  text-align: center;
  border-radius: 0;
}
.ip-stat { padding: 4px 6px; border-right: 1px solid rgba(255,255,255,.08); }
.ip-stat:last-child { border-right: 0; }
.ip-stat-value {
  font-family: var(--ip-font-heading);
  font-size: clamp(16px, 3.8cqi, 26px);
  font-weight: 500; letter-spacing: -.012em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.ip-stat-label {
  font-family: var(--ip-font-heading);
  font-size: 8px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.ip-dollar { color: var(--ip-button); font-weight: 500; margin-right: 1px; }

/* Templates tweak the stats bar */
.ip[data-template="elegant"] .ip-stats { background: #fff; color: #1a1a1a; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.ip[data-template="elegant"] .ip-stat { border-right-color: rgba(0,0,0,.08); }
.ip[data-template="elegant"] .ip-stat-label { color: rgba(0,0,0,.5); }
.ip[data-template="elegant"] .ip-nav-cta { background: #1a1a1a; color: #fff; border-radius: 0; }
.ip[data-template="elegant"] .ip-hero-title { font-style: italic; }

.ip[data-template="simple"] .ip-stats { background: #f5f5f5; color: #1a1a1a; }
.ip[data-template="simple"] .ip-stat { border-right-color: rgba(0,0,0,.08); }
.ip[data-template="simple"] .ip-stat-label { color: rgba(0,0,0,.45); }
.ip[data-template="simple"] .ip-nav-cta { border-radius: 4px; }
.ip-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ip-hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.6) 100%); }
.ip-hero-body { position: relative; padding: 18px 20px 16px; }
.ip-eyebrow { font-size: 10px; letter-spacing: var(--ip-eyebrow-letter); text-transform: uppercase; opacity: .85; margin-bottom: 6px; }
.ip-eyebrow::before { content: '• '; color: var(--ip-button); }
.ip-h1 { font-family: var(--ip-font-heading); font-size: 22px; font-weight: var(--ip-h1-weight); letter-spacing: var(--ip-h1-letter); margin: 0 0 6px; line-height: 1.1; }
.ip-meta { font-size: 12px; opacity: .9; display: flex; gap: 10px; align-items: baseline; }
.ip-price { color: var(--ip-accent-text); font-weight: 500; }

.ip-section { padding: var(--ip-section-pad); border-bottom: 1px solid var(--ip-divider); font-family: var(--ip-font-body); }
.ip-section:last-child { border-bottom: 0; }
.ip-h2 { font-family: var(--ip-font-heading); font-size: 11px; font-weight: 500; letter-spacing: var(--ip-h2-letter); text-transform: uppercase; color: var(--ip-accent-text); margin: 0 0 10px; }

/* ── Signature body — the demo SPW's design language ───────────── */
.ip-body {
  background: #0a0a0a;
  color: #f1efe9;
  container-type: inline-size;
}
.ip-body .ip-section {
  padding: clamp(28px, 6cqi, 56px) clamp(20px, 4cqi, 40px);
  border-bottom: 0;
}
.ip-eyebrow-row {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ip-font-heading);
  font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ip-button);
  margin-bottom: clamp(12px, 2cqi, 22px);
}
.ip-eyebrow-row::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ip-button);
}
.ip-eyebrow-num { color: var(--ip-button); }
.ip-eyebrow-text { color: var(--ip-button); }
.ip-section-title {
  font-family: var(--ip-font-heading);
  font-weight: var(--ip-h1-weight);
  font-size: clamp(28px, 7cqi, 64px);
  letter-spacing: var(--ip-h1-letter);
  line-height: 1.02;
  color: #fff;
  margin: 0 0 clamp(18px, 3cqi, 32px);
}
.ip-section-media { display: flex; flex-direction: column; gap: clamp(10px, 1.6cqi, 18px); }
.ip-bleed { width: 100%; overflow: hidden; border-radius: var(--ip-radius); background: #1a1a1a; }
.ip-bleed img { width: 100%; height: auto; display: block; }
.ip-more-row {
  font-family: var(--ip-font-heading);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.ip-video-placeholder {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  aspect-ratio: 16 / 9;
  background: #16181a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--ip-radius);
  font-family: var(--ip-font-heading);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.ip-video-placeholder span:first-child {
  font-size: 28px; color: var(--ip-button);
}
.ip-fp-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ip-fp-tile {
  position: relative;
  background: #fff;
  border-radius: var(--ip-radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.ip-fp-tile img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ip-fp-label {
  position: absolute; bottom: 8px; left: 10px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.78); color: #fff;
  font-family: var(--ip-font-heading);
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
}
.ip-agent-section {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,.08);
}
.ip-agent-section .ip-agent-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px;
  align-items: center;
  background: #16181a;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--ip-radius);
  padding: 16px;
}
.ip-agent-section .ip-agent-name { color: #fff; font-size: 16px; }
.ip-agent-section .ip-agent-meta { color: rgba(255,255,255,.6); font-size: 12px; }

/* Footer */
.ip-foot {
  padding: clamp(18px, 3cqi, 28px) 20px;
  font-family: var(--ip-font-heading);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
  background: #0a0a0a;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Elegant template overrides body to light/cream ─────── */
.ip[data-template="elegant"] .ip-body { background: #f7f5f0; color: #1a1a1a; }
.ip[data-template="elegant"] .ip-section-title { color: #1a1a1a; }
.ip[data-template="elegant"] .ip-eyebrow-row,
.ip[data-template="elegant"] .ip-eyebrow-num,
.ip[data-template="elegant"] .ip-eyebrow-text { color: var(--ip-button); }
.ip[data-template="elegant"] .ip-bleed { background: #fff; }
.ip[data-template="elegant"] .ip-video-placeholder { background: #fff; border-color: rgba(0,0,0,.08); color: rgba(0,0,0,.4); }
.ip[data-template="elegant"] .ip-agent-section { background: #f7f5f0; border-top-color: rgba(0,0,0,.06); }
.ip[data-template="elegant"] .ip-agent-section .ip-agent-row { background: #fff; border-color: rgba(0,0,0,.06); }
.ip[data-template="elegant"] .ip-agent-section .ip-agent-name { color: #1a1a1a; }
.ip[data-template="elegant"] .ip-agent-section .ip-agent-meta { color: rgba(0,0,0,.5); }
.ip[data-template="elegant"] .ip-foot { background: #f7f5f0; color: rgba(0,0,0,.4); border-top-color: rgba(0,0,0,.08); }
.ip[data-template="elegant"] .ip-more-row { color: rgba(0,0,0,.4); border-top-color: rgba(0,0,0,.08); }

/* ── Simple template — minimal white ─────────────────────── */
.ip[data-template="simple"] .ip-body { background: #fff; color: #1a1a1a; }
.ip[data-template="simple"] .ip-section-title { color: #1a1a1a; }
.ip[data-template="simple"] .ip-eyebrow-row,
.ip[data-template="simple"] .ip-eyebrow-num,
.ip[data-template="simple"] .ip-eyebrow-text { color: var(--ip-button); }
.ip[data-template="simple"] .ip-bleed { background: #f5f5f5; }
.ip[data-template="simple"] .ip-video-placeholder { background: #f5f5f5; border-color: rgba(0,0,0,.08); color: rgba(0,0,0,.4); }
.ip[data-template="simple"] .ip-agent-section { background: #fff; }
.ip[data-template="simple"] .ip-agent-section .ip-agent-row { background: #f5f5f5; border-color: rgba(0,0,0,.06); }
.ip[data-template="simple"] .ip-agent-section .ip-agent-name { color: #1a1a1a; }
.ip[data-template="simple"] .ip-agent-section .ip-agent-meta { color: rgba(0,0,0,.5); }
.ip[data-template="simple"] .ip-foot { background: #fff; color: rgba(0,0,0,.4); border-top-color: rgba(0,0,0,.08); }
.ip[data-template="simple"] .ip-more-row { color: rgba(0,0,0,.4); border-top-color: rgba(0,0,0,.08); }
.ip-desc { margin: 0; font-size: 13px; color: #3a3a38; line-height: 1.55; }

.ip-grid { display: grid; gap: 6px; }
.ip-grid-photos { grid-template-columns: repeat(3, 1fr); }
.ip-grid-fp { grid-template-columns: repeat(2, 1fr); }
.ip-tile {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--ip-radius); background: #f1efe9;
}
.ip-tile img { width: 100%; height: 100%; object-fit: cover; }
.ip-tile-fp img { object-fit: contain; background: #fafafa; padding: 6px; }
.ip-tile-label {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(255,255,255,.85);
  padding: 2px 6px; border-radius: 999px;
  font-size: 9px; letter-spacing: .04em; font-weight: 500;
}
.ip-more {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,.05);
  border-radius: 4px; color: #7a7a78;
  font-size: 11px;
}

.ip-agent-row { display: flex; align-items: center; gap: 10px; }
.ip-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ip-button); color: var(--ip-button-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  font-family: var(--ip-font-heading);
}
.ip-agent-name { font-family: var(--ip-font-heading); font-size: 13px; font-weight: 500; }
.ip-agent-meta { font-size: 11px; color: #7a7a78; }
.ip-cta {
  margin-left: auto;
  padding: 7px 12px;
  background: var(--ip-button); color: var(--ip-button-ink);
  border: 0; border-radius: var(--ip-cta-radius);
  font-size: 11px; font-weight: var(--ip-cta-weight);
  font-family: var(--ip-font-heading);
  letter-spacing: .04em;
  cursor: pointer;
}
.ip-foot {
  padding: 14px 20px;
  font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase;
  color: #a8a8a4;
  text-align: center;
}
.editor-section { margin-bottom: var(--sp-10); }
.editor-section h3 { margin-bottom: var(--sp-2); }
.editor-section .section-sub { font-size: 13px; color: var(--ink-3); margin: 0 0 var(--sp-5); }

@media (max-width: 1024px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: relative; top: 0; height: 60vh; }
}

/* ───── Custom galleries ─────────────────────────────────── */
.gallery-block {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3);
}
.gallery-head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.gallery-title { flex: 1; font-weight: 500; }

/* ───── Downloads center ─────────────────────────────────── */
.dl-group {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--brand-deep);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  background: var(--brand-soft);
  border: 1px solid rgba(30,107,70,.18);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin: var(--sp-6) 0 var(--sp-3);
}
.dl-group:first-of-type { margin-top: 0; }
.dl-group::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}
html[data-theme="dark"] .dl-group {
  background: rgba(62,224,146,.14);
  color: var(--brand-deep);
  border-color: rgba(92,240,168,.3);
}
.download-grid {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.dl-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.dl-card:hover { border-color: var(--line-strong); }
.dl-card-head { display: flex; align-items: center; gap: var(--sp-2); }
.dl-size { font-size: 14px; font-weight: 500; color: var(--ink); letter-spacing: var(--tracking-tight); }
.dl-desc { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.dl-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--sp-2); }

/* ───── Brand palette ────────────────────────────────────── */
.palette {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: stretch;
  margin-top: var(--sp-1);
}
.swatch {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 8px 12px 8px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  min-width: 168px;
}
.swatch:hover { border-color: var(--line-strong); }
.swatch-color {
  position: relative;
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: var(--r-1);
  background: var(--c, #3ee092);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.swatch-color input[type="color"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; border: 0;
  width: 100%; height: 100%;
}
.swatch-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; flex: 1; min-width: 0; }
.swatch-role { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; font-weight: 500; }
.swatch-hex  { font-size: 12px; color: var(--ink-2); }
.swatch-rm {
  margin-left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: transparent; color: var(--ink-3);
  font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.swatch-rm:hover { background: rgba(198,75,58,.1); color: var(--err); }
.palette-add {
  padding: 10px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink-3);
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.palette-add:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
@media (max-width: 640px) {
  .swatch { width: 100%; min-width: 0; }
}

/* ───── Template + font pickers ──────────────────────────── */
.tpl-grid {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 640px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  text-align: left; cursor: pointer;
  transition: border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}
.tpl-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tpl-card.is-active { border-color: var(--brand); box-shadow: var(--shadow-focus); }
.tpl-thumb {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px;
  background: #fff; border-radius: var(--r-1);
  overflow: hidden;
}
.tpl-thumb-hero {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 8; border-radius: 3px;
}
.tpl-thumb-h1 { font-size: 22px; font-weight: 500; }
.tpl-thumb-row { display: flex; gap: 4px; }
.tpl-thumb-row span {
  flex: 1; height: 8px; border-radius: 2px;
  background: rgba(0,0,0,.07);
}
.tpl-thumb-cta {
  padding: 4px 10px; font-size: 10px; font-weight: 500;
  border-radius: 999px; align-self: flex-start;
  letter-spacing: .04em;
}
.tpl-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.tpl-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.tpl-sub   { font-size: 11px; color: var(--ink-3); }

.font-row {
  display: grid; gap: var(--sp-3);
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) { .font-row { grid-template-columns: 1fr; } }
.font-label { font-size: 11px; color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 500; margin-bottom: 4px; }
.font-select { margin-bottom: 8px; }
.font-preview {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 14px; color: var(--ink);
  line-height: 1.3;
}

/* ───── Logo preview + palette suggestions ───────────────── */
.logo-preview {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.logo-thumb {
  width: 56px; height: 56px; border-radius: var(--r-1);
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: 0 0 auto;
}
.logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-meta { flex: 1; min-width: 0; }

.palette-suggest {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.palette-suggest-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.palette-suggest-row { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}
.suggest-chip:hover { border-color: var(--brand); transform: translateY(-1px); }
.suggest-swatch {
  width: 14px; height: 14px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}

/* ───── Drop zone ────────────────────────────────────────── */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-3);
  padding: var(--sp-8);
  text-align: center; color: var(--ink-3);
  background: var(--bg-elevated);
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease), color var(--t-base) var(--ease);
  cursor: pointer;
}
.dropzone:hover { border-color: var(--brand); color: var(--ink-2); }
.dropzone[data-over="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.dropzone .dz-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.dropzone .dz-sub { font-size: 12px; color: var(--ink-3); }

.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-3); margin-top: var(--sp-4);
}
.photo-tile {
  position: relative; aspect-ratio: 4/3; border-radius: var(--r-2);
  overflow: hidden; background: var(--bg-sunken); border: 1px solid var(--line);
  cursor: grab;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.photo-tile:active { cursor: grabbing; }
.photo-tile[data-dragging="true"] { opacity: .35; transform: scale(.96); }
.photo-tile[data-drag-over="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft), 0 4px 14px rgba(62,224,146,.18);
  transform: translateY(-2px);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-cover-pill {
  position: absolute; top: 6px; left: 6px;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: rgba(20,20,20,.78); color: #fff;
  font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none;
}
.photo-tile[data-uploading="true"]::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.5) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
}
.photo-tile .photo-rm {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(20,20,20,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.photo-tile:hover .photo-rm { opacity: 1; }

/* ───── Skeletons ────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--bg-sunken) 0%, var(--bg-hover) 50%, var(--bg-sunken) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: var(--r-2);
}
.skel-line { height: 12px; border-radius: 4px; }
.skel-card { height: 220px; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ───── Demo banner ──────────────────────────────────────── */
.demo-banner {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-5);
  background: var(--bg-sunken);
  color: var(--ink-2);
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--tracking-normal);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .demo-banner {
  background: #1a1d20;
  color: var(--ink-3);
  border-bottom-color: rgba(255,255,255,.06);
}
.demo-banner .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-3);
}
.demo-banner .link {
  margin-left: auto;
  font: inherit; color: var(--ink-2);
  background: transparent; border: 0;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.demo-banner .link:hover { color: var(--ink); }
.demo-banner + .app-shell .topbar { top: 38px; }
@media (max-width: 640px) {
  .demo-banner { padding: 8px var(--sp-3); font-size: 11px; }
  .demo-banner span:nth-of-type(2) { flex: 1; min-width: 0; }
}

/* ───── Toast ────────────────────────────────────────────── */
.toast-host {
  position: fixed; right: var(--sp-6); bottom: var(--sp-6); z-index: 80;
  display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-end;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: 13px; color: var(--ink-2);
  box-shadow: var(--shadow-2);
  display: flex; align-items: center; gap: var(--sp-2);
  pointer-events: auto;
  transform: translateY(8px); opacity: 0;
  animation: toast-in var(--t-base) var(--ease) forwards;
}
.toast[data-leaving="true"] { animation: toast-out var(--t-base) var(--ease) forwards; }
.toast .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}
.toast.toast-err   .dot { background: var(--err); }
.toast.toast-warn  .dot { background: var(--warn); }
.toast.toast-info  .dot { background: var(--info); }
@keyframes toast-in  { to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* ───── Save indicator ───────────────────────────────────── */
.save-indicator {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 12px; color: var(--ink-3);
  letter-spacing: var(--tracking-normal);
}
.save-indicator .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-4);
  transition: background var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.save-indicator[data-state="saving"] .dot { background: var(--warn); animation: pulse 1s infinite; }
.save-indicator[data-state="saved"]  .dot { background: var(--brand); }
.save-indicator[data-state="error"]  .dot { background: var(--err); }
@keyframes pulse { 50% { transform: scale(1.4); opacity: .7; } }

/* ───── Filter chips ─────────────────────────────────────── */
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 13px; color: var(--ink-2);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.filter-chip:hover { background: var(--bg-hover); border-color: var(--line-strong); }
.filter-chip.is-active {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}

/* ───── Lead row ─────────────────────────────────────────── */
.lead-row { padding: var(--sp-4) var(--sp-2); }
.lead-row + .lead-row { border-top: 1px solid var(--line); }
.lead-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.lead-row-meta { display: inline-flex; align-items: center; gap: var(--sp-2); }
.lead-row-msg { margin: 8px 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.lead-row-foot { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; font-size: 13px; }
.lead-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.link-quiet { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.link-quiet:hover { color: var(--ink); text-decoration-color: var(--ink-3); }

/* ───── Account page ─────────────────────────────────────── */
.account-main {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 220px 1fr;
  gap: var(--sp-10);
  padding: var(--sp-10) var(--sp-6) var(--sp-16);
}
.account-side {
  position: sticky; top: calc(var(--topbar-h) + var(--sp-6));
  align-self: start;
}
.account-side-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.account-side-nav a {
  display: block; padding: 9px 12px; border-radius: var(--r-2);
  font-size: 14px; color: var(--ink-2);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.account-side-nav a:hover { background: var(--bg-hover); color: var(--ink); }

.account-body { min-width: 0; }
.account-section {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
  scroll-margin-top: 80px;
}
.account-section-head { margin-bottom: var(--sp-6); }
.account-section-head .h2 { font-size: 22px; }
.account-section-body .field:last-child { margin-bottom: 0; }
.h4-row { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase; margin: var(--sp-5) 0 var(--sp-2); }

.notif-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 14px 0; gap: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.notif-row:last-child { border-bottom: 0; }
.notif-label { font-size: 14px; color: var(--ink); }
.notif-channels { display: inline-flex; gap: 6px; }
.notif-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--bg); border: 1px solid var(--line);
  font-size: 11px; font-weight: 500; letter-spacing: .06em;
  color: var(--ink-3);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.notif-toggle:hover { background: var(--bg-hover); }
.notif-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.notif-toggle:has(input:checked) {
  background: var(--brand-soft); color: var(--brand-deep); border-color: rgba(30,107,70,.2);
}

@media (max-width: 900px) {
  .account-main { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-6) var(--sp-4) var(--sp-12); }
  .account-side { position: relative; top: 0; }
  .account-side-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .account-side-nav a { padding: 8px 12px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--r-pill); }
  .account-section { padding: var(--sp-6); }
}

/* ───── Delivery page ───────────────────────────────────── */
.delivery-head { max-width: 720px; }
.dl-section { margin-bottom: var(--sp-12); }
.dl-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-4); gap: var(--sp-3); }
.dl-doc {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--line); border-radius: var(--r-3);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.dl-doc:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.dl-doc-icon {
  width: 44px; height: 44px; border-radius: var(--r-2);
  background: rgba(198,75,58,.1); color: var(--err);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
}
.dl-doc-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dl-doc-meta strong { font-size: 14px; font-weight: 500; }
.dl-doc-meta .muted { font-size: 12px; }
.dl-doc-go { font-size: 13px; color: var(--brand-deep); }

.dl-grid {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.dl-tile {
  position: relative; display: block;
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  border: 1px solid var(--line); border-radius: var(--r-2);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.dl-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.dl-tile img { width: 100%; height: 100%; object-fit: cover; }
.dl-tile-meta {
  position: absolute; inset: auto 0 0 0;
  padding: 8px 10px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, transparent 0%, rgba(20,20,20,.7) 100%);
  color: #fff; font-size: 12px;
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.dl-tile:hover .dl-tile-meta { opacity: 1; }
.dl-tile-go { font-size: 11px; letter-spacing: .04em; }
@media (pointer: coarse) { .dl-tile-meta { opacity: 1; } }

/* ───── CS admin view ────────────────────────────────────── */
.admin-stats {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.admin-stat {
  padding: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.admin-stat[data-tone="ok"]   { background: var(--brand-soft); border-color: rgba(30,107,70,.18); }
.admin-stat[data-tone="warn"] { background: rgba(201,138,20,.06); border-color: rgba(201,138,20,.18); }
.admin-stat-value { font-size: 24px; font-weight: 500; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--ink); }
.admin-stat-label { font-size: 11px; color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase; margin-top: 6px; font-weight: 500; }

.admin-table {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
.admin-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1.3fr auto;
  align-items: center; gap: var(--sp-3);
  padding: 14px var(--sp-5);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.admin-row:last-child { border-bottom: 0; }
.admin-row-head {
  background: var(--bg-sunken);
  font-size: 10px; letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.admin-cell { display: inline-flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-cell strong { font-weight: 500; color: var(--ink); }
.admin-cell.text-right { flex-direction: row; justify-content: flex-end; gap: var(--sp-2); }
.pill {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 11px; color: var(--ink-2);
  margin: 1px 4px 1px 0;
}
.pill-brand { background: var(--brand-soft); color: var(--brand-deep); border-color: rgba(30,107,70,.2); }
.pill-empty { background: rgba(201,138,20,.08); color: var(--warn); border-color: rgba(201,138,20,.2); }
.chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 500; letter-spacing: .04em;
  margin-right: 6px;
}
.chip-ok   { background: var(--brand-soft); color: var(--brand-deep); }
.chip-warn { background: rgba(201,138,20,.12); color: var(--warn); }

@media (max-width: 900px) {
  .admin-row { grid-template-columns: 1fr; gap: 6px; }
  .admin-row-head { display: none; }
  .admin-cell.text-right { justify-content: flex-start; }
}

/* ───── Invoices view ─────────────────────────────────────── */
.invoice-totals {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.invoice-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-5);
}
.invoice-card[data-tone="warn"] { background: rgba(201,138,20,.06); border-color: rgba(201,138,20,.2); }
.invoice-card[data-tone="ok"]   { background: var(--brand-soft); border-color: rgba(30,107,70,.18); }
.invoice-card-label { font-size: 11px; color: var(--ink-3); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 500; margin-bottom: 6px; }
.invoice-card-value { font-size: clamp(24px, 3vw, 32px); font-weight: 500; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--ink); }
.invoice-card[data-tone="warn"] .invoice-card-value { color: var(--warn); }
.invoice-card[data-tone="ok"]   .invoice-card-value { color: var(--brand-deep); }
.invoice-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.invoice-table { display: block; }
.invoice-row {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.8fr 0.9fr 0.8fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: 14px var(--sp-3);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.invoice-row:last-child { border-bottom: 0; }
.invoice-row-head {
  background: var(--bg-sunken);
  font-size: 10px; letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.invoice-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.invoice-cell strong { font-weight: 500; color: var(--ink); }
.invoice-cell.text-right { text-align: right; }
.invoice-actions { flex-direction: row; justify-content: flex-end; gap: 6px; }

@media (max-width: 900px) {
  .invoice-row { grid-template-columns: 1fr; gap: 6px; }
  .invoice-row-head { display: none; }
  .invoice-cell.text-right { text-align: left; }
  .invoice-actions { justify-content: flex-start; }
}

/* ───── Empty state ─────────────────────────────────────── */
.empty {
  text-align: center; padding: var(--sp-16) var(--sp-6); color: var(--ink-3);
}
.empty .empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-sunken); margin: 0 auto var(--sp-4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ───── Tiny utils ───────────────────────────────────────── */
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-8 { margin-bottom: var(--sp-8); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────────────────────────────────────────────────────
 * Responsive sweep — mobile-first. Agents work on iPad + phone
 * in the field. Three tiers: phone (<640), tablet (640–1024),
 * desktop (>1024).
 * ─────────────────────────────────────────────────────────── */

/* Tablet (≤1024) — single-column editor */
@media (max-width: 1024px) {
  :root { --topbar-h: 56px; }
  .app-main { padding: var(--sp-8) var(--sp-5) var(--sp-12); }
  .editor { grid-template-columns: 1fr; }
  .editor-panel  { padding: var(--sp-6) var(--sp-5) var(--sp-10); border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-preview {
    position: relative; top: 0; height: 72vh;
    padding: var(--sp-4);
  }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .auth-card { padding: var(--sp-8); }
}

/* Phone (≤640) — tighter spacing, simpler topbar, stacked rows */
@media (max-width: 640px) {
  :root {
    --topbar-h: 56px;
    --sp-8: 24px;
    --sp-10: 32px;
    --sp-12: 40px;
  }
  body { font-size: 15px; }
  .h1 { font-size: 26px; }
  .h2 { font-size: 20px; }
  .h3 { font-size: 16px; }
  .app-main { padding: var(--sp-6) var(--sp-4) var(--sp-12); }

  .topbar { padding: 0 var(--sp-4); gap: var(--sp-2); }
  .topbar-brand { font-size: 11px; letter-spacing: .14em; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .muted { display: none; }     /* hide "Hi, Dom" on phone */
  .btn-sm { padding: 6px 10px; font-size: 12px; }

  .row, .row-between { flex-wrap: wrap; gap: var(--sp-2); }
  .grid-cards { grid-template-columns: 1fr; gap: var(--sp-4); }

  .editor-panel  { padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .editor-preview { height: 60vh; padding: var(--sp-3); }
  .editor-section { margin-bottom: var(--sp-8); }

  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .photo-tile .photo-rm { opacity: 1; }          /* always-visible on touch */

  .auth-wrap { padding: var(--sp-4); }
  .auth-card { padding: var(--sp-6); border-radius: var(--r-3); }
  .auth-card .h1 { font-size: 24px; }

  .card-pad    { padding: var(--sp-4); }
  .card-pad-lg { padding: var(--sp-6); }
  .panel       { padding: var(--sp-4); }

  .listing-body { padding: var(--sp-4); }
  .listing-title { font-size: 15px; }

  .dropzone { padding: var(--sp-6) var(--sp-4); }

  .toast-host { right: var(--sp-3); bottom: var(--sp-3); left: var(--sp-3); align-items: stretch; }
  .toast { width: 100%; }

  /* Switches stay big & finger-friendly */
  .switch { --w: 42px; --h: 24px; }
}

/* Touch-targets — at least 44px on coarse pointers */
@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 40px; }
  .btn-icon     { min-width: 40px; min-height: 40px; }
  .input, .select { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
  .switch { --w: 44px; --h: 26px; }
}

/* iOS notch / safe area */
@supports (padding: max(0px)) {
  .topbar { padding-left: max(var(--sp-6), env(safe-area-inset-left)); padding-right: max(var(--sp-6), env(safe-area-inset-right)); }
  .app-main, .editor-panel { padding-left: max(var(--sp-5), env(safe-area-inset-left)); padding-right: max(var(--sp-5), env(safe-area-inset-right)); }
}


/* ═══════════════════════════════════════════════════════════════
   RECOVERED VIEW STYLES — rebuilt 2026-06-07 (compaction-lost .ld-/.bk-/.sd-/.mt2-)
   ═══════════════════════════════════════════════════════════════ */
/* --- listing-dashboard (.ld-) --- */
/* Capital Shots Agent Portal — Listing Dashboard view (ld-)
 * Route: /listings/:slug/dashboard — single-property hub.
 * Warm-white, calm, professional. Tokens only (tokens.css), conventions
 * mirror main.css (.topbar / .app-main / .btn / .kicker / .muted / .card).
 * Only classes emitted by views/listing-dashboard.js are styled here.
 */

/* ── Topbar status pill (Live / Draft) ───────────────────── */
.ld-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.ld-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .7;
}
.ld-pill.is-ok   { background: rgba(47,158,110,.1); color: var(--ok);   border-color: rgba(47,158,110,.22); }
.ld-pill.is-warn { background: rgba(201,138,20,.1); color: var(--warn); border-color: rgba(201,138,20,.22); }

/* ── Page grid — single centered content column ──────────── */
.ld-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

/* ── Hero — big rounded cover + address block ────────────── */
.ld-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.ld-hero-img {
  width: 100%;
  height: clamp(240px, 38vw, 440px);
  object-fit: cover;
  display: block;
  background: var(--bg-sunken);
}
.ld-hero-empty {
  width: 100%;
  height: clamp(200px, 30vw, 340px);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  color: var(--ink-4);
  font-size: 14px;
  letter-spacing: var(--tracking-normal);
}
.ld-hero-info {
  padding: var(--sp-8);
}
.ld-hero-info .h1 { margin-top: 2px; }

/* ── Meta row — horizontal stat-grid (the fix) ───────────── */
.ld-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
}
.ld-meta-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--sp-4) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  min-width: 0;
}
.ld-meta-item .v {
  font-size: 20px; font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ld-meta-item .l {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Action tiles — Editor / Delivery / Templates / Share ── */
.ld-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-4);
}
.ld-action {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  width: 100%;
  text-align: left;
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.ld-action:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.ld-action:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ld-action:active { transform: translateY(0); }
.ld-action-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 18px; line-height: 1;
}
.ld-action-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ld-action-title {
  font-size: 15px; font-weight: 600;
  letter-spacing: var(--tracking-normal);
  color: var(--ink);
}
.ld-action-sub {
  font-size: 12px;
  color: var(--ink-3);
  line-height: var(--leading-snug);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Deliverables — tidy count grid ──────────────────────── */
.ld-stats {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-6);
}
.ld-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-3);
}
.ld-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: var(--sp-4) var(--sp-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  text-align: center;
}
.ld-stat-value {
  font-size: 24px; font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.ld-stat-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Marketing assets card ───────────────────────────────── */
.ld-mkt-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-6);
}
.ld-mkt-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.ld-mkt-actions {
  display: flex; align-items: center; gap: var(--sp-2);
  flex: 0 0 auto;
}
.ld-mkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-4);
}
.ld-mkt-tile {
  display: flex; flex-direction: column; gap: 6px;
  color: var(--ink);
  border-radius: var(--r-2);
  transition: transform var(--t-base) var(--ease);
}
.ld-mkt-tile:hover { transform: translateY(-2px); }
.ld-mkt-tile:hover .ld-mkt-thumb { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.ld-mkt-tile:focus-visible { outline: none; }
.ld-mkt-tile:focus-visible .ld-mkt-thumb { box-shadow: var(--shadow-focus); }
.ld-mkt-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background-color: var(--bg-sunken);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.ld-mkt-thumb[data-fmt="igstory"] { aspect-ratio: 9 / 16; }
.ld-mkt-thumb[data-fmt="fb"]      { aspect-ratio: 191 / 100; }
.ld-mkt-thumb[data-fmt="print"]   { aspect-ratio: 17 / 22; }
.ld-mkt-spin {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  animation: ld-spin .7s linear infinite;
}
@keyframes ld-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ld-mkt-spin { animation-duration: 2s; }
}
.ld-mkt-name {
  font-size: 13px; font-weight: 500;
  color: var(--ink);
  letter-spacing: var(--tracking-normal);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ld-mkt-fmt {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Listing agent card ──────────────────────────────────── */
.ld-agent {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-6);
}
.ld-agent-card {
  display: flex; flex-direction: column; gap: 4px;
}
.ld-agent-name {
  font-size: 18px; font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.ld-agent-brokerage {
  font-size: 14px;
  color: var(--ink-2);
}
.ld-agent-contact {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

/* ───────────────────────────────────────────────────────────
 * Responsive — tablet (≤1024) and phone (≤640).
 * Panes stack, grids collapse. Mirrors main.css sweep.
 * ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .ld-grid { gap: var(--sp-5); }
  .ld-hero-info { padding: var(--sp-6); }
  .ld-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ld-actions { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .ld-mkt-head { flex-direction: column; align-items: stretch; }
  .ld-mkt-actions { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .ld-grid { gap: var(--sp-4); }
  .ld-hero-info { padding: var(--sp-5); }

  /* Meta stays a grid — 2 across so values never wrap to vertical text */
  .ld-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .ld-meta-item { padding: var(--sp-3); }
  .ld-meta-item .v { font-size: 18px; }

  .ld-actions { grid-template-columns: 1fr; gap: var(--sp-3); }
  .ld-action { padding: var(--sp-4); }

  .ld-stats { padding: var(--sp-5); }
  .ld-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .ld-stat-value { font-size: 20px; }

  .ld-mkt-card, .ld-agent { padding: var(--sp-5); }
  .ld-mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .ld-mkt-actions .btn { flex: 1; }
}

/* Touch — keep tiles tappable, no hover-only affordances */
@media (pointer: coarse) {
  .ld-action:hover { transform: none; }
  .ld-mkt-tile:hover { transform: none; }
}
/* --- sign-designer (.sd-) --- */
/* Capital Shots Agent Portal — Sign Designer view (sd-)
 * Route: /listings/:slug/sign-designer
 * A 3-pane print-product designer: left template rail · center preview stage ·
 * right options + live price card. Warm-white, calm, professional.
 * Tokens only — no hardcoded colors/spacing. Mirrors main.css conventions
 * (cards, .field/.select, .btn, .kicker, .muted, soft borders/shadows).
 */

/* ───── Shell — 3 panes side by side, fills the viewport below topbar ───── */
.sd-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 380px;
  height: calc(100vh - var(--topbar-h));
  min-height: 0;
  background: var(--bg);
}

/* ───── Left rail — scrollable column of template tiles ───── */
.sd-rail {
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.sd-rail::-webkit-scrollbar { width: 10px; }
.sd-rail::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--bg-elevated);
  border-radius: var(--r-pill);
}

/* Template tile — thumbnail card + name; whole tile is a button */
.sd-tile {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--sp-2);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-fast) var(--ease),
              background var(--t-base) var(--ease);
}
.sd-tile:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.sd-tile:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.sd-tile:active { transform: translateY(0); }

/* Selected template */
.sd-tile.is-on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow-1);
}
.sd-tile.is-on:hover { border-color: var(--brand); }

/* Thumbnail — fixed-ratio frame; JS sets background-image */
.sd-tile-img {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-2);
  background-color: var(--bg-sunken);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading spinner inside a thumbnail (removed by JS once rendered) */
.sd-tile-spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  animation: sd-spin 720ms linear infinite;
}
@keyframes sd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sd-tile-spin { animation-duration: 2.4s; }
}

/* Tile caption */
.sd-tile-name {
  margin-top: var(--sp-2);
  padding: 0 var(--sp-1) var(--sp-1);
  font-size: 13px;
  font-weight: 500;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-normal);
  color: var(--ink-2);
}
.sd-tile.is-on .sd-tile-name { color: var(--brand-deep); }

/* ───── Center — preview stage on a sunken canvas ───── */
.sd-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  overflow: auto;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg-sunken);
}

/* The artwork frame — JS sizes width/height to the scaled format */
.sd-stage {
  position: relative;
  background: #fff;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  flex: 0 0 auto;
}

/* ───── Right side panel — options + price card ───── */
.sd-side {
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-12);
  background: var(--bg-elevated);
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
}
.sd-side::-webkit-scrollbar { width: 10px; }
.sd-side::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--bg-elevated);
  border-radius: var(--r-pill);
}
.sd-side .h3 { margin-top: 2px; }

/* Options group — dropdown stack */
.sd-opts {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sd-opts .field:last-child { margin-bottom: 0; }
.sd-opts .row { margin-bottom: var(--sp-4); }
.sd-opts .row .field { margin-bottom: 0; }

/* ───── Live price card ───── */
.sd-price-card {
  padding: var(--sp-5);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.sd-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.sd-price-row > span { color: var(--ink-2); font-size: 14px; }
.sd-price-row strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  font-feature-settings: 'tnum';
  white-space: nowrap;
}
/* Sub rows — quiet meta lines under the headline price */
.sd-price-sub {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line-soft);
}
.sd-price-sub > span {
  font-size: 12px;
  color: var(--ink-3);
  line-height: var(--leading-snug);
}
.sd-price-sub + .sd-price-sub {
  margin-top: var(--sp-1);
  padding-top: var(--sp-1);
  border-top: 0;
}

/* CTA block — primary order button + ghost link, stacked */
.sd-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.sd-cta .btn { width: 100%; }

/* Trust / rules block */
.sd-rules {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}
.sd-trust-list {
  list-style: none;
  margin: var(--sp-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.sd-trust-list li {
  position: relative;
  padding-left: var(--sp-5);
  font-size: 13px;
  line-height: var(--leading-snug);
  color: var(--ink-3);
}
.sd-trust-list li strong { color: var(--ink-2); font-weight: 500; }
.sd-trust-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .8;
}

/* ───── Local fallbacks for utility/link classes this view emits
 * (not present in main.css's util set: .mt-6, generic .link). ───── */
.sd-side .mt-6 { margin-top: var(--sp-6); }
.sd-side .link {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color var(--t-base) var(--ease), text-decoration-color var(--t-base) var(--ease);
}
.sd-side .link:hover { color: var(--brand); text-decoration-color: currentColor; }

/* ───────────────────────────────────────────────────────────
 * Responsive — panes collapse to one column on tablet/phone.
 * Matches main.css tiers: tablet ≤1024, phone ≤640.
 * ─────────────────────────────────────────────────────────── */

/* Tablet — drop the right options panel below; rail + stage stay side by side */
@media (max-width: 1024px) {
  .sd-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      'rail main'
      'side side';
    height: auto;
    min-height: calc(100vh - var(--topbar-h));
  }
  .sd-rail { grid-area: rail; }
  .sd-main { grid-area: main; min-height: 56vh; }
  .sd-side {
    grid-area: side;
    border-left: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
}

/* Phone — fully stacked: rail (horizontal scroll), stage, options */
@media (max-width: 640px) {
  .sd-shell {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .sd-rail {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-3);
  }
  .sd-tile {
    flex: 0 0 144px;
    width: 144px;
  }
  .sd-main {
    min-height: 48vh;
    padding: var(--sp-5);
  }
  .sd-side {
    padding: var(--sp-6) var(--sp-4) var(--sp-10);
    overflow: visible;
  }
  .sd-opts .row { flex-wrap: wrap; }
  .sd-opts .row .field { min-width: 0; flex: 1 1 100%; }
  .sd-price-row strong { font-size: 20px; }
}
/* --- brand-kit (.bk-) --- */
/* Capital Shots Agent Portal — Brand Kit view (/account/brand-kit)
 * Class prefix: bk-
 * Layer for the brand-kit editor only. Base primitives (.field/.input/.select/
 * .btn/.dropzone/.dz-title/.dz-sub/.editor-section/.section-sub/.row/.gap-3/
 * .flex-1/.kicker/.muted + layout) already live in main.css — this file only
 * adds the brand-kit-specific layout, the upload asset grids, the real color
 * swatches, the palette rows, and the contact-defaults form rhythm.
 * Warm-white, calm, professional. All values from tokens.css. Never screaming.
 */

/* ───── Page shell ───────────────────────────────────────── */
.bk-main {
  max-width: 920px;          /* narrower than --max-w-app — a single editing column reads calmer */
}
.bk-intro {
  max-width: 64ch;
}

/* Each editor section becomes a soft elevated card (matches .account-section rhythm) */
.bk-sect {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
  scroll-margin-top: calc(var(--topbar-h) + var(--sp-4));
}
.bk-sect:last-of-type { margin-bottom: 0; }
.bk-sect .h3 { margin-bottom: var(--sp-2); }
.bk-sect .section-sub { max-width: 64ch; }

/* ───── Upload asset grids (Logos / Badges / Headshots) ──── */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-2) 0 var(--sp-4);
}
/* When the grid is empty the JS drops in a single .muted line — keep it from
   stretching the implicit track and give it breathing room. */
.bk-grid:has(> .muted) {
  display: block;
  margin-bottom: var(--sp-4);
  padding: var(--sp-4);
  border: 1px dashed var(--line);
  border-radius: var(--r-2);
  background: var(--bg);
}

/* A single uploaded asset — rounded thumbnail card with name + remove + active */
.bk-asset-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.bk-asset-cell:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.bk-asset-cell img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  /* subtle checker-ish neutral bed so transparent logos/badges stay legible */
  background:
    linear-gradient(45deg, var(--bg-sunken) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, var(--bg-sunken) 25%, transparent 25%) 0 0 / 16px 16px,
    var(--bg-elevated);
  padding: var(--sp-3);
}

/* Active state — highlighted with brand accent, never a loud fill */
.bk-asset-cell.is-on {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-2);
}
.bk-asset-cell.is-on img {
  background-color: var(--brand-soft);
}

.bk-asset-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--line);
  min-height: 38px;
}
.bk-asset-name {
  font-size: 12px;
  color: var(--ink-2);
  line-height: var(--leading-snug);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bk-asset-active {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-radius: var(--r-pill);
}
.bk-asset-active::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand);
}
.bk-asset-makeactive {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.bk-asset-makeactive:hover {
  color: var(--brand-deep);
  border-color: rgba(30,107,70,.28);
  background: var(--brand-soft);
}
.bk-asset-makeactive:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Remove control — quiet by default, top-right, reddens on intent */
.bk-asset-x {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-3);
  background: rgba(253,252,249,.86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.bk-asset-cell:hover .bk-asset-x,
.bk-asset-x:focus-visible { opacity: 1; }
.bk-asset-x:hover {
  color: var(--err);
  border-color: rgba(198,75,58,.32);
  background: rgba(198,75,58,.1);
}
.bk-asset-x:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (pointer: coarse) {
  .bk-asset-x { opacity: 1; }      /* always reachable on touch */
}

/* Dropzone tile — base .dropzone handles look; bk-uploader just sets rhythm */
.bk-uploader {
  display: block;
  margin-top: 0;
}

/* ───── Colors — curated palette chips (real swatches) ───── */
.bk-palette-row-curated {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
/* A curated swatch is a real colored square, not colored text */
.mt2-palette-chip {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.mt2-palette-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255,255,255,.18);
}
.mt2-palette-chip:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* Selected curated palette — brand ring + check, no loud fill */
.mt2-palette-chip.is-on {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--brand);
}
.mt2-palette-chip.is-on::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 11px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

/* Native color inputs styled to feel like swatches, not OS chrome */
.input-color {
  width: 100%;
  min-width: 56px;
  height: 44px;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.input-color:hover { border-color: var(--line-strong); }
.input-color:focus-visible { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.input-color::-webkit-color-swatch-wrapper { padding: 0; }
.input-color::-webkit-color-swatch { border: 0; border-radius: var(--r-1); }
.input-color::-moz-color-swatch { border: 0; border-radius: var(--r-1); }

/* Full multi-color palette list (primary/secondary/accent/neutral rows) */
.bk-palette-full {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.bk-palette-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--t-base) var(--ease);
}
.bk-palette-row:hover { border-color: var(--line-strong); }
/* The first input in a palette row is the color picker — give it swatch chrome */
.bk-palette-row input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.bk-palette-row input[type="color"]:hover { border-color: var(--line-strong); }
.bk-palette-row input[type="color"]:focus-visible { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.bk-palette-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.bk-palette-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.bk-palette-row input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
/* The role text field — inherit .input look without the class */
.bk-palette-row input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.bk-palette-row input[type="text"]::placeholder { color: var(--ink-4); }
.bk-palette-row input[type="text"]:hover { border-color: var(--line-strong); }
.bk-palette-row input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
/* Reuse the asset remove control inside palette rows — make it inline, not absolute */
.bk-palette-row .bk-asset-x {
  position: static;
  opacity: 1;
  flex: 0 0 auto;
}

/* Visually-hidden label text inside swatch buttons */
.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ───── Brokerage picker (Brand Kit) ─────────────────────────
 * Pre-loaded logo library + upload-your-own. Dark-native: logos ride on a
 * near-black bed so the sourced white/reverse lockups read cleanly; marks
 * with no file fall back to a two-tone brand-colour chip. */
.bk-brk-current {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.bk-brk-current-logo {
  flex: 0 0 auto;
  width: 88px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  border-radius: var(--r-1);
  overflow: hidden;
}
.bk-brk-current-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bk-brk-current-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-brk-current-meta strong { font-size: 14px; color: var(--ink); }
.bk-brk-current-tag {
  font-size: 10px; font-weight: 500; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--ink-3);
}

.bk-brk-searchrow { margin-bottom: var(--sp-3); }
.bk-brk-searchrow .input { max-width: 320px; }

.bk-brk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* One brokerage cell: logo bed + name. Selectable, quiet until hover/on. */
.bk-brk-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.bk-brk-cell:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.bk-brk-cell:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.bk-brk-cell.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); }

/* Logo bed — deliberately dark so white/reverse lockups have contrast */
.bk-brk-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5 / 2;
  padding: var(--sp-4);
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--line);
}
.bk-brk-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Broken image → hide it, the chip fallback is layered behind via JS class */
.bk-brk-logo.is-broken img { display: none; }
/* Marks with no white/reverse lockup (dark/coloured on transparent) get a
   light plate so they don't disappear against the dark bed. */
.bk-brk-cell.light-bed .bk-brk-logo { background: #f4f2ec; border-bottom-color: var(--line-strong); }

/* Two-tone brand-colour chip for brokerages with no logo file on disk */
.bk-brk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c1) 50%, var(--c2) 50%, var(--c2) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.bk-brk-cell.no-logo .bk-brk-logo { background: var(--bg); }

.bk-brk-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-3);
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  line-height: var(--leading-snug);
}
.bk-brk-tag {
  font-size: 9px; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--ink-4);
  padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r-pill);
}
.bk-brk-nofile {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  font-size: 9px; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--ink-4);
  padding: 2px 7px; background: rgba(0,0,0,.28); border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.bk-brk-check {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand);
}
.bk-brk-check::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 5px;
  border-left: 2px solid var(--brand-ink); border-bottom: 2px solid var(--brand-ink);
  transform: translateY(-1px) rotate(-45deg);
}

.bk-brk-own {
  display: flex; align-items: center; gap: var(--sp-3);
  padding-top: var(--sp-2);
}

/* ───── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .bk-sect { padding: var(--sp-6); }
  .bk-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .bk-brk-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 640px) {
  .bk-sect { padding: var(--sp-5); margin-bottom: var(--sp-4); }
  /* Asset grids collapse to two-up on phone */
  .bk-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .bk-brk-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .bk-brk-searchrow .input { max-width: none; }
  .bk-brk-own { flex-wrap: wrap; }
  /* Curated swatches stay tappable */
  .mt2-palette-chip { width: 44px; height: 44px; }
  /* Palette rows: keep the color picker + remove on a line, role field below */
  .bk-palette-row {
    grid-template-columns: 48px 1fr auto;
    gap: var(--sp-2);
  }
  /* The .row groups in the contact form already wrap (main.css), so the
     2-col field pairs stack to one column on phone automatically. */
}
/* --- templates chrome (.mt2-) --- */
/* ============================================================================
 * Capital Shots Agent Portal — Marketing Templates Designer (templates-chrome)
 * Route: /listings/:slug/templates   ·   class prefix: mt2-
 *
 * App CHROME only — the canvas artwork (.mt-root and its template internals)
 * is styled in marketing-templates.js / its own sheet. Here we lay out the
 * 3-pane designer: sticky topbar · left template rail · center preview canvas ·
 * right inspector · bottom photo strip + kit bar, plus the assets drawer and
 * the order-prints modal.
 *
 * Warm-white, calm, professional. Tokens only — no hardcoded colors/spacing.
 * Conventions copied from main.css (.btn / .field-label / .kicker / cards).
 * ==========================================================================*/

/* ── Tiny scoped helpers the markup uses but main.css doesn't define ──────── */
.mt2-shell .sr,
#mt2-order-modal .sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt2-modal-head .mb-1,
#mt2-order-modal .mb-1 { margin-bottom: var(--sp-1); }

/* ── 3-pane shell ────────────────────────────────────────────────────────── */
/* Fills the viewport below the sticky topbar; each pane scrolls on its own. */
.mt2-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) var(--drawer-w);
  height: calc(100dvh - var(--topbar-h));
  background: var(--bg);
  overflow: hidden;
}

/* ── LEFT: template rail ─────────────────────────────────────────────────── */
.mt2-rail-wrap {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
}
.mt2-rail-head {
  flex: 0 0 auto;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--line);
}

/* Category tabs (#mt2-cats) */
.mt2-cats {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.mt2-cat {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--tracking-normal);
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.mt2-cat:hover { background: var(--bg-hover); color: var(--ink); }
.mt2-cat.is-on {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: rgba(30,107,70,.18);
}
.mt2-cat:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Thumbnail tile grid (#mt2-rail) */
.mt2-rail {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  align-content: start;
}

.mt2-tile {
  display: flex; flex-direction: column;
  text-align: left;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.mt2-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.mt2-tile:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.mt2-tile.is-on {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-2);
}
/* Format not supported by this template — dimmed, still selectable */
.mt2-tile.is-degraded { opacity: .55; }
.mt2-tile.is-degraded:hover { opacity: .82; }
/* Currently part of the marketing kit — green tint accent */
.mt2-tile.is-in-kit {
  border-color: rgba(30,107,70,.4);
  background: var(--brand-soft);
}
.mt2-tile.is-in-kit.is-on { box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); }

.mt2-tile-img {
  position: relative;
  aspect-ratio: 4 / 5;
  background-color: var(--bg-sunken);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.mt2-tile-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  animation: mt2-spin .7s linear infinite;
}
@keyframes mt2-spin { to { transform: rotate(360deg); } }
.mt2-tile-img-err {
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-4);
}

.mt2-tile-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
  min-height: 34px;
}
.mt2-tile-label {
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  line-height: var(--leading-snug);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt2-tile-kit-mark {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 600; line-height: 1;
  background: var(--bg-sunken); color: var(--ink-2);
}
.mt2-tile.is-in-kit .mt2-tile-kit-mark { background: var(--brand); color: var(--brand-ink); }
.mt2-tile-warn {
  flex: 0 0 auto;
  font-size: 11px; color: var(--warn);
}

/* ── CENTER: main column (format bar · preview · drawer · strip · kit bar) ── */
.mt2-main {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  background: var(--bg);
  position: relative;
}

/* Empty-state banner prepended above the format bar */
.mt2-empty-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  flex: 0 0 auto;
  padding: 10px var(--sp-5);
  background: var(--accent-money-soft);
  border-bottom: 1px solid var(--accent-money-line);
  font-size: 13px; color: var(--ink-2);
}
.mt2-empty-banner strong { color: var(--ink); font-weight: 600; }

/* Format strip (#mt2-fmts) */
.mt2-fmts {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
}
.mt2-fmt {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 6px 12px;
  border-radius: var(--r-2);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.mt2-fmt:hover { background: var(--bg-hover); border-color: var(--line-strong); }
.mt2-fmt:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.mt2-fmt.is-on {
  background: var(--brand-soft);
  border-color: rgba(30,107,70,.22);
}
.mt2-fmt.is-disabled,
.mt2-fmt:disabled { opacity: .4; cursor: not-allowed; }
.mt2-fmt-short {
  font-size: 12px; font-weight: 600; color: var(--ink);
  letter-spacing: var(--tracking-normal);
}
.mt2-fmt.is-on .mt2-fmt-short { color: var(--brand-deep); }
.mt2-fmt-dim {
  font-size: 10px; color: var(--ink-4);
  font-family: var(--font-mono); font-feature-settings: 'tnum';
}

/* Preview canvas (#mt2-preview) — sunken surface, artwork centered */
.mt2-preview {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-8);
  overflow: auto;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(0,0,0,.015), transparent 60%),
    var(--bg-sunken);
}
/* Drag-and-drop highlight when a photo cell is dragged over the canvas */
.mt2-preview.is-drop-target {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.mt2-preview.is-drag-over {
  box-shadow: inset 0 0 0 2px var(--brand);
  background:
    radial-gradient(120% 120% at 50% 0%, var(--brand-soft), transparent 70%),
    var(--bg-sunken);
}

/* The scaled stage wrapper that holds .mt-root (artwork). JS sets its size. */
.mt2-stage {
  position: relative;
  flex: 0 0 auto;
  background: #fff;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-3);
}
.mt2-stage .mt-root { will-change: transform; }

/* Hero crop target affordance (added to the artwork's hero element by JS) */
.mt2-hero-target { cursor: grab; }
.mt2-hero-target.is-cropping { cursor: grabbing; }

/* Click-to-edit text affordance inside the artwork */
.mt2-editable { cursor: text; outline: 1px dashed transparent; outline-offset: 2px; transition: outline-color var(--t-fast) var(--ease); }
.mt2-editable:hover { outline-color: var(--brand); }
.mt2-editable.is-editing { outline: 1px solid var(--brand); outline-offset: 2px; }

/* ── Assets drawer (#mt2-assets-drawer) — overlays the preview area ───────── */
.mt2-assets-drawer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.mt2-assets-head {
  flex: 0 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.mt2-assets-head .h3 { margin-top: 4px; }
.mt2-assets-head .muted { margin-top: 6px; line-height: var(--leading-snug); }
.mt2-assets-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-8);
}
.mt2-assets-sect {
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.mt2-assets-sect:last-child { border-bottom: 0; padding-bottom: 0; }

.mt2-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.mt2-asset-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.mt2-asset-cell:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.mt2-asset-cell.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.mt2-asset-cell img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mt2-asset-x {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; line-height: 1;
  background: var(--bg-elevated); color: var(--ink-3);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease), color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.mt2-asset-cell:hover .mt2-asset-x { opacity: 1; }
.mt2-asset-x:hover { background: rgba(198,75,58,.1); color: var(--err); }

.mt2-assets-uploader {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px;
  border-radius: var(--r-2);
  border: 1px dashed var(--line-strong);
  background: var(--bg);
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.mt2-assets-uploader:hover { background: var(--bg-hover); border-color: var(--brand); color: var(--ink); }

.mt2-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.mt2-contact-grid label {
  display: flex; flex-direction: column; gap: 5px;
}
.mt2-contact-grid label > span {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3);
}
.mt2-contact-grid input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.mt2-contact-grid input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }

/* ── Photo strip (#mt2-photo-strip + row) ────────────────────────────────── */
.mt2-photo-strip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
}
.mt2-photo-strip-label {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink-3);
}
.mt2-photo-strip-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; gap: var(--sp-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}
.mt2-photo-cell {
  position: relative;
  flex: 0 0 auto;
  width: 76px; aspect-ratio: 4 / 3;
  border-radius: var(--r-1);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.mt2-photo-cell:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.mt2-photo-cell:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.mt2-photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.mt2-photo-cell.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.mt2-photo-cell.is-dragging { opacity: .5; }
.mt2-photo-cell-mark {
  position: absolute; top: 3px; right: 3px;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 10px; line-height: 1;
  background: var(--brand); color: var(--brand-ink);
  opacity: 0; transform: scale(.6);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.mt2-photo-cell.is-on .mt2-photo-cell-mark { opacity: 1; transform: scale(1); }
.mt2-photo-empty {
  font-size: 13px; color: var(--ink-3);
  padding: var(--sp-2) 0;
}
.mt2-photo-empty .link { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.mt2-photo-empty .link:hover { color: var(--brand); }

/* ── Keyboard-shortcuts hint ─────────────────────────────────────────────── */
.mt2-shortcuts-hint {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  padding: 6px var(--sp-5);
  background: var(--bg-elevated);
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--ink-4);
}
.mt2-shortcuts-hint span { display: inline-flex; align-items: center; gap: 6px; }
.mt2-shortcuts-hint kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; padding: 1px 5px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-2);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
}

/* ── Kit bar (bottom) ────────────────────────────────────────────────────── */
.mt2-kit-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  /* Hidden until "Build kit" mode is on */
  display: none;
}
.mt2-shell[data-kit-mode="true"] .mt2-kit-bar { display: flex; }

.mt2-kit-summary {
  flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.mt2-kit-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-overline); text-transform: uppercase;
  color: var(--ink-3);
}
#mt2-kit-count { font-size: 16px; font-weight: 600; color: var(--ink); }
.mt2-kit-sub { font-size: 12px; }

.mt2-kit-tray {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; gap: var(--sp-2);
  overflow-x: auto;
  align-items: center;
}
.mt2-kit-empty {
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap;
}
.mt2-kit-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  border: 1px solid rgba(30,107,70,.18);
  font-size: 12px; color: var(--ink);
}
.mt2-kit-chip-fmt {
  font-size: 10px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-deep);
  padding: 1px 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-pill);
}
.mt2-kit-chip-x {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; line-height: 1;
  color: var(--ink-3);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mt2-kit-chip-x:hover { background: rgba(198,75,58,.12); color: var(--err); }

/* ── RIGHT: inspector (#mt2-opts + hero slot) ────────────────────────────── */
.mt2-inspector {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bg-elevated);
  border-left: 1px solid var(--line);
}
.mt2-inspector-head {
  flex: 0 0 auto;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.mt2-inspector-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-5);
}
.mt2-inspector-sect {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.mt2-inspector-section-label { margin-bottom: var(--sp-3); display: block; }

/* Options stack (#mt2-opts) — each control on its own row */
.mt2-opts {
  display: flex; flex-direction: column;
  gap: var(--sp-4);
}
.mt2-opt {
  display: flex; flex-direction: column;
  gap: var(--sp-2);
}
.mt2-opt > label,
.mt2-opt > .field-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3);
}
.mt2-opt input[type="text"],
.mt2-opt input[type="tel"],
.mt2-opt input[type="email"],
.mt2-opt input[type="number"],
.mt2-opt select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.mt2-opt input::placeholder { color: var(--ink-4); }
.mt2-opt input:hover,
.mt2-opt select:hover { border-color: var(--line-strong); }
.mt2-opt input:focus,
.mt2-opt select:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }

/* Accent colour picker row */
.mt2-color-row {
  display: flex; align-items: center; gap: var(--sp-2);
}
.mt2-color-row input[type="color"] {
  width: 44px; height: 36px; padding: 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
}
.mt2-color-row input[type="color"]:hover { border-color: var(--line-strong); }
#opt-accent-reset {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-2);
  font-size: 15px; color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
#opt-accent-reset:hover { background: var(--bg-hover); color: var(--ink); border-color: var(--line-strong); }

/* Print-safety warning */
.mt2-print-warn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(201,138,20,.08);
  border: 1px solid rgba(201,138,20,.22);
  border-radius: var(--r-2);
  font-size: 12px; color: var(--ink-2);
  line-height: var(--leading-snug);
}
.mt2-print-warn-icon { color: var(--warn); flex: 0 0 auto; }
.mt2-print-warn-text { flex: 1 1 140px; min-width: 0; }
.mt2-print-warn-snap {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500;
  color: var(--brand-ink);
  background: var(--brand);
  transition: background var(--t-base) var(--ease);
}
.mt2-print-warn-snap:hover { background: var(--brand-deep); color: #fff; }

/* Palette chips */
.mt2-palette-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}
.mt2-palette-chip {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), outline-color var(--t-base) var(--ease);
}
.mt2-palette-chip:hover { transform: scale(1.08); }
.mt2-palette-chip.is-on { outline-color: currentColor; }
.mt2-palette-chip:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Font pickers — select + custom free-text + browse link */
.mt2-font-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-2);
  align-items: center;
}
.mt2-font-select { grid-column: 1 / -1; }
.mt2-font-input {
  width: 100%;
  padding: 8px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 12px; color: var(--ink);
}
.mt2-font-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.mt2-font-browse {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink-3);
  border: 1px solid var(--line);
  background: var(--bg);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.mt2-font-browse:hover { background: var(--bg-hover); color: var(--ink); }

.mt2-opt-assets,
.mt2-opt-color,
.mt2-opt-palette,
.mt2-opt-font { /* layout slots — inherit .mt2-opt; here for explicit naming */ }

/* ── Hero photo tools (#mt2-hero-slot → .mt2-hero-tools) ──────────────────── */
.mt2-hero-tools {
  display: flex; flex-direction: column;
  gap: var(--sp-4);
}
.mt2-hero-row {
  display: flex; align-items: center; gap: var(--sp-2);
}
.mt2-hero-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.mt2-hero-val {
  flex: 0 0 auto;
  min-width: 42px; text-align: right;
  font-family: var(--font-mono); font-feature-settings: 'tnum';
  font-size: 12px; color: var(--ink-2);
}
.mt2-hero-tick {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px;
  border-radius: var(--r-2);
  font-size: 12px; font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.mt2-hero-tick:hover { background: var(--bg-hover); color: var(--ink); border-color: var(--line-strong); }
.mt2-hero-tick.is-on {
  background: var(--brand-soft); color: var(--brand-deep);
  border-color: rgba(30,107,70,.22);
}
.mt2-hero-filter { width: 100%; }

/* ── Topbar overrides scoped to this view ────────────────────────────────── */
/* The shared .topbar / .btn / .btn-back come from main.css; we only add the
 * undo/redo group + the ▾ dropdown menus that are unique to this view. Allow
 * the dense action row to wrap gracefully on small screens. */
.topbar-actions { flex-wrap: wrap; }

.mt2-undo-group {
  display: inline-flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
}
.mt2-undo-btn {
  border-radius: 0;
  border: 0;
  padding: 6px 10px;
  font-size: 15px; line-height: 1;
  color: var(--ink-2);
}
.mt2-undo-btn + .mt2-undo-btn { border-left: 1px solid var(--line); }
.mt2-undo-btn:hover { background: var(--bg-hover); color: var(--ink); }
.mt2-undo-btn:disabled { opacity: .4; pointer-events: none; }

/* Reset / My-style dropdown wrappers + menus */
.mt2-reset-wrap,
.mt2-preset-wrap { position: relative; }
.mt2-reset-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  z-index: 60;
  min-width: 200px;
  padding: var(--sp-2);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; gap: 2px;
}
.mt2-reset-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px;
  border-radius: var(--r-1);
  font-size: 13px; color: var(--ink-2);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.mt2-reset-menu button:hover { background: var(--bg-hover); color: var(--ink); }
.mt2-reset-menu hr { margin: var(--sp-1) 0; }

/* ── Order-prints modal (#mt2-order-modal / .mt2-modal-wrap) ──────────────── */
.mt2-modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6);
  background: rgba(20,20,20,.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: mt2-fade var(--t-base) var(--ease);
}
@keyframes mt2-fade { from { opacity: 0; } to { opacity: 1; } }
.mt2-modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 560px;
  max-height: calc(100dvh - var(--sp-12));
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.mt2-modal-head {
  flex: 0 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.mt2-modal-x {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 18px; line-height: 1; color: var(--ink-3);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.mt2-modal-x:hover { background: var(--bg-hover); color: var(--ink); }
.mt2-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-6);
}
.mt2-modal-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* Product picker */
.mt2-prod-list {
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.mt2-prod-cell {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.mt2-prod-cell:hover { border-color: var(--line-strong); }
.mt2-prod-cell.is-on { border-color: var(--brand); background: var(--brand-soft); }
.mt2-prod-cell input[type="radio"] { accent-color: var(--brand-deep); flex: 0 0 auto; }
.mt2-prod-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.mt2-prod-meta { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* Quantity chips + number entry */
.mt2-qty-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
}
.mt2-qty-chip {
  min-width: 40px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.mt2-qty-chip:hover { background: var(--bg-hover); color: var(--ink); }
.mt2-qty-chip.is-on {
  background: var(--brand-soft); color: var(--brand-deep);
  border-color: rgba(30,107,70,.22);
}
.mt2-qty-num {
  width: 72px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink);
  font-family: var(--font-mono); font-feature-settings: 'tnum';
}
.mt2-qty-num:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }

/* Ship-to form grid */
.mt2-ship-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.mt2-ship-grid label {
  display: flex; flex-direction: column; gap: 5px;
}
.mt2-ship-grid label.full { grid-column: 1 / -1; }
.mt2-ship-grid label > span {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-3);
}
.mt2-ship-grid input,
.mt2-ship-grid select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.mt2-ship-grid input:focus,
.mt2-ship-grid select:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }

/* Live shipping rates */
.mt2-ship-rates { margin-top: var(--sp-2); }
.mt2-ship-rates-body { display: flex; flex-direction: column; gap: 6px; }
.mt2-ship-note {
  font-size: 12px; color: var(--ink-3);
  padding: 10px 12px;
  background: var(--bg-sunken);
  border: 1px dashed var(--line);
  border-radius: var(--r-2);
  line-height: 1.45;
}
.mt2-ship-rate {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.mt2-ship-rate:hover { border-color: var(--line-strong); }
.mt2-ship-rate.is-on { border-color: var(--brand); background: var(--brand-soft); }
.mt2-ship-rate input[type="radio"] { accent-color: var(--brand-deep); flex: 0 0 auto; }
.mt2-ship-rate-name { flex: 1 1 auto; font-size: 13px; color: var(--ink); }
.mt2-ship-rate-cost { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ink); }

/* Order summary */
.mt2-order-summary {
  padding: var(--sp-4);
  background: var(--bg-sunken);
  border-radius: var(--r-2);
}
.mt2-sum-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
  font-size: 13px; color: var(--ink-2);
  padding: 4px 0;
}
.mt2-sum-total {
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--ink);
}

/* ============================================================================
 * RESPONSIVE — agents work on iPad + phone in the field.
 * Panes collapse to a single scrolling column; rail/inspector go full-width.
 * ==========================================================================*/

/* Tablet (≤1024) — stack panes, page scrolls instead of inner panes */
@media (max-width: 1024px) {
  .mt2-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100dvh - var(--topbar-h));
    overflow: visible;
  }
  .mt2-rail-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    order: 1;
  }
  .mt2-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 360px;
  }
  .mt2-main { order: 2; }
  .mt2-preview { min-height: 56vh; }
  .mt2-inspector {
    order: 3;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .mt2-inspector-body { overflow-y: visible; }
  .mt2-assets-drawer { position: fixed; inset: 0; z-index: 200; border-left: 0; }
}

/* Phone (≤640) — tightest spacing, two-up rail, single-column forms */
@media (max-width: 640px) {
  .mt2-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--sp-3); gap: var(--sp-2); }
  .mt2-fmts { padding: var(--sp-2) var(--sp-4); }
  .mt2-preview { padding: var(--sp-4); min-height: 48vh; }
  .mt2-photo-strip { flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
  .mt2-photo-strip-label { width: 100%; }

  .mt2-contact-grid,
  .mt2-ship-grid { grid-template-columns: 1fr; }
  .mt2-ship-grid label.full { grid-column: auto; }

  .mt2-kit-bar { flex-wrap: wrap; }
  .mt2-shortcuts-hint { display: none; }

  .mt2-modal-wrap { padding: 0; align-items: flex-end; }
  .mt2-modal {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: var(--r-4) var(--r-4) 0 0;
  }
  .mt2-modal-head,
  .mt2-modal-body { padding: var(--sp-5); }
  .mt2-modal-foot { padding: var(--sp-4) var(--sp-5); }
  .mt2-modal-foot .btn { flex: 1; }
}

/* Coarse pointers — always-visible affordances + bigger touch targets */
@media (pointer: coarse) {
  .mt2-asset-x { opacity: 1; }
  .mt2-photo-cell { width: 88px; }
}

/* ═══════════════════════════════════════════════════════════════
   SPW Style Designer v2 — /account/spw-designer
   Full-bleed live preview center stage, floating control rail,
   three numbered steps. Motion: soft fades + fluid FLIP drags only.
   ═══════════════════════════════════════════════════════════════ */

.spwd2 {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: var(--sp-4);
  height: calc(100dvh - var(--topbar-h));
  padding: var(--sp-4);
  box-sizing: border-box;
}

/* ── Floating rail ── */
.spwd2-rail {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.spwd2-rail-scroll {
  overflow-y: auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  min-height: 0;
  overscroll-behavior: contain;
}
.spwd2-sheet-btn { display: none; }

.spwd2-railintro { margin-bottom: var(--sp-6); }
.spwd2-h1 {
  font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: var(--tracking-tight); line-height: var(--leading-tight);
  margin: 0;
}
.spwd2-sub { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; line-height: var(--leading-snug); }

/* Steps */
.spwd2-step { margin-top: var(--sp-8); }
.spwd2-step:first-of-type { margin-top: 0; }
.spwd2-stephead { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-3); }
.spwd2-stepnum {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 13px; font-weight: 600;
}
.spwd2-steptitle { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0; letter-spacing: var(--tracking-normal); }
.spwd2-stepsub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 var(--sp-3); line-height: var(--leading-snug); }

.spwd2-ctl { margin-top: var(--sp-5); }
.spwd2-ctl-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.spwd2-help { font-size: 11.5px; color: var(--ink-4); margin-top: 8px; line-height: var(--leading-snug); }

/* Lock (Signature) */
.spwd2-lock-note {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-sunken);
  border-radius: var(--r-2);
  font-size: 12.5px; color: var(--ink-2); line-height: var(--leading-snug);
  margin-bottom: var(--sp-3);
}
#spwd2-controls.is-locked .spwd2-ctl,
#spwd2-controls.is-locked .spwd2-brandnote,
#spwd2-sections.is-locked .spwd2-seclist,
#spwd2-sections.is-locked .spwd2-addrow,
#spwd2-sections.is-locked .spwd2-ctl-label,
#spwd2-photos.is-locked .spwd2-photogrid {
  opacity: .35; pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

/* ── Template cards: live scaled SPWs ── */
.spwd2-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spwd2-tpl {
  appearance: none; padding: 0; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--bg-elevated);
  overflow: hidden;
  font-family: var(--font-sans);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.spwd2-tpl:hover { border-color: var(--ink-4); box-shadow: var(--shadow-2); }
.spwd2-tpl.is-on { border-color: var(--brand-deep); box-shadow: var(--shadow-2); }
.spwd2-tpl-view {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #171512;
  pointer-events: none; /* card handles the click */
  isolation: isolate;   /* forces iframe content to clip to the radius */
  border-radius: calc(var(--r-3) - 1.5px) calc(var(--r-3) - 1.5px) 0 0;
}
.spwd2-tpl-frame {
  width: 1200px; height: 760px; border: 0;
  transform: scale(var(--s, 0.14)); /* JS sets --s = cardWidth / 1200 */
  transform-origin: top left;
  position: absolute; top: 0; left: 0;
  pointer-events: none;
  transition: transform 1.4s var(--ease-out); /* slow soft zoom */
}
.spwd2-tpl:hover .spwd2-tpl-frame { transform: scale(calc(var(--s, 0.14) * 1.06)); }
.spwd2-tpl-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand);
  padding: 4px 9px; border-radius: var(--r-pill);
  opacity: 0; transition: opacity var(--t-slow) var(--ease);
}
.spwd2-tpl.is-on .spwd2-tpl-badge { opacity: 1; }
.spwd2-tpl-body {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px 11px;
}
.spwd2-tpl-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.spwd2-tpl-tag { font-size: 10.5px; color: var(--ink-3); line-height: 1.3; }

/* ── Swatches / fonts / modes (compact) ── */
.spwd2-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.spwd2-swatch {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid transparent; outline: 1px solid var(--line-strong);
  cursor: pointer; padding: 0;
  transition: transform var(--t-fast) var(--ease);
}
.spwd2-swatch:hover { transform: scale(1.07); }
.spwd2-swatch.is-on { outline: 2px solid var(--ink); outline-offset: 2px; }
.spwd2-swatch-custom {
  display: inline-flex; align-items: center; justify-content: center;
  background: conic-gradient(#ea1d2d, #e8a13a, #3ee092, #4d7ec0, #8b5cf6, #ea1d2d);
  position: relative; overflow: hidden;
}
.spwd2-swatch-custom input { position: absolute; inset: -8px; width: 56px; height: 56px; opacity: 0; cursor: pointer; }
.spwd2-swatch-custom::after {
  content: '+'; color: #fff; font-size: 17px; font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none;
}
.spwd2-fonts { display: flex; flex-wrap: wrap; gap: 7px; }
.spwd2-font {
  appearance: none; cursor: pointer;
  padding: 9px 15px; font-size: 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--bg-elevated); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spwd2-font:hover { border-color: var(--ink-4); }
.spwd2-font.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.spwd2-modes { display: flex; gap: 7px; }
.spwd2-mode {
  appearance: none; cursor: pointer; flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-2);
  background: var(--bg-elevated);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spwd2-mode:hover { border-color: var(--ink-4); }
.spwd2-mode.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.spwd2-mode-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); }
.spwd2-brandnote {
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border: 1px dashed var(--line-strong); border-radius: var(--r-2);
  font-size: 12px; color: var(--ink-2); line-height: var(--leading-snug);
}

/* ── Section composer ── */
.spwd2-seclist { display: grid; gap: 7px; }
.spwd2-secrow {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center; gap: 10px;
  padding: 11px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  user-select: none;
  position: relative;
}
.spwd2-secrow.is-off .spwd2-seclabel { color: var(--ink-4); }
.spwd2-secrow.is-pinned { background: var(--bg-sunken); border-style: dashed; }
.spwd2-secrow.is-drag {
  z-index: 30;
  box-shadow: var(--shadow-3);
  background: var(--bg-elevated);
  border-color: var(--brand-deep);
}
.spwd2-sechandle {
  color: var(--ink-4); font-size: 15px; cursor: grab;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 28px;
}
.spwd2-secrow.is-pinned .spwd2-sechandle { cursor: default; color: var(--ink-5); }
.spwd2-secrow.is-drag .spwd2-sechandle { cursor: grabbing; }
.spwd2-seclabel { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.spwd2-secpin { font-size: 10.5px; color: var(--ink-4); letter-spacing: .04em; }
.spwd2-sectoggle {
  appearance: none; cursor: pointer;
  width: 40px; height: 24px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  position: relative; padding: 0;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.spwd2-sectoggle .spwd2-secknob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fdfcf9; box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease);
}
.spwd2-sectoggle.is-on { background: var(--brand); border-color: var(--brand); }
.spwd2-sectoggle.is-on .spwd2-secknob { transform: translateX(16px); }
.spwd2-secx {
  appearance: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--bg-elevated);
  color: var(--ink-3); font-size: 14px; line-height: 1;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.spwd2-secx:hover { color: var(--err); border-color: var(--err); }
.spwd2-blkfields {
  grid-column: 1 / -1;
  display: grid; gap: 8px; margin-top: 8px;
}
.spwd2-blkfield { display: grid; gap: 4px; }
.spwd2-blkfield span { font-size: 10.5px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); }
.spwd2-blkfield .input { font-size: 13px; padding: 8px 10px; }
/* Property description — heading + a real textarea for the marketing paragraph. */
.spwd2-descfields { margin-top: 10px; user-select: text; }
.spwd2-desctext { font-size: 13px; padding: 9px 11px; line-height: 1.55; min-height: 104px; resize: vertical; width: 100%; }
.spwd2-addrow { display: flex; flex-wrap: wrap; gap: 7px; }
.spwd2-addchip {
  appearance: none; cursor: pointer;
  padding: 8px 13px; font-size: 12.5px; font-weight: 500;
  font-family: var(--font-sans); color: var(--ink-2);
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-pill);
  background: transparent;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spwd2-addchip:hover { border-color: var(--brand-deep); color: var(--brand-deep); background: var(--brand-soft); }

/* ── Photo grid ── */
.spwd2-photogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.spwd2-photo {
  aspect-ratio: 3 / 2;
  border-radius: var(--r-1);
  background: var(--bg-sunken) center / cover no-repeat;
  position: relative;
  cursor: grab;
  user-select: none;
  outline: 1px solid var(--line);
}
.spwd2-photo.is-drag {
  z-index: 30; cursor: grabbing;
  box-shadow: var(--shadow-3);
  outline: 2px solid var(--brand-deep);
  /* Soft lift while carried — compositor-only, no layout cost */
  filter: brightness(1.02);
}
.spwd2-photo.is-cover { outline: 2px solid var(--brand-deep); }
.spwd2-coverbtn {
  position: absolute; left: 4px; bottom: 4px;
  appearance: none; cursor: pointer;
  font-size: 9.5px; font-weight: 600; letter-spacing: .04em;
  font-family: var(--font-sans);
  padding: 3px 7px; border-radius: var(--r-pill);
  border: 0; color: #fff; background: rgba(20,20,20,.55);
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.spwd2-photo:hover .spwd2-coverbtn { opacity: 1; }
.spwd2-photo.is-cover .spwd2-coverbtn {
  opacity: 1; background: var(--brand); color: var(--brand-ink);
}

/* ── Save card ── */
.spwd2-savecard {
  border-top: 1px solid var(--line);
  padding-top: var(--sp-6);
}
.spwd2-save { width: 100%; min-height: 46px; }
.spwd2-save-note {
  margin-top: var(--sp-3); font-size: 12.5px; color: var(--brand-deep);
  animation: spwd2-fade var(--t-slow) var(--ease-out);
}
@keyframes spwd2-fade { from { opacity: 0; } to { opacity: 1; } }
.spwd2-apply-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.spwd2-apply-url { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
#spwd2-apply-slug { margin-top: 0; }

/* ── Stage: the star of the screen ── */
.spwd2-stage {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}
.spwd2-stage-head {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-2) var(--sp-3);
}
.spwd2-stage-kicker {
  font-size: 10.5px; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--ink-3);
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spwd2-devices { display: flex; gap: 6px; }
.spwd2-device {
  appearance: none; cursor: pointer;
  padding: 7px 14px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-2);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--bg-elevated);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.spwd2-device.is-on { border-color: var(--brand-deep); background: var(--brand-soft); color: var(--ink); }
.spwd2-open { font-size: 12px; white-space: nowrap; }
.spwd2-frame-wrap {
  flex: 1; min-height: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-4);
  overflow: hidden;
  isolation: isolate; /* forces iframe content to clip to the radius */
  background: var(--bg-sunken);
  box-shadow: var(--shadow-2);
  transition: width var(--t-slow) var(--ease);
}
.spwd2-frame-wrap.is-phone {
  width: min(390px, 100%);
  margin-inline: auto;
  border-width: 4px;
}
.spwd2-frame {
  width: 100%; height: 100%; border: 0; display: block;
  background: #faf7f2;
  border-radius: calc(var(--r-4) - 1px); /* content clips to the frame */
  transition: opacity var(--t-slow) var(--ease);
}
.spwd2-frame-wrap.is-phone .spwd2-frame { border-radius: calc(var(--r-4) - 4px); }

/* ── Mobile: preview on top, rail becomes a bottom sheet ── */
@media (max-width: 999px) {
  .spwd2 {
    display: block;
    height: auto;
    padding: var(--sp-3);
    padding-bottom: 96px; /* room for the collapsed sheet bar */
  }
  .spwd2-stage { height: calc(100dvh - var(--topbar-h) - 120px); }
  .spwd2-stage-head { flex-wrap: wrap; gap: var(--sp-2); }
  .spwd2-rail {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    border-radius: var(--r-4) var(--r-4) 0 0;
    border-bottom: 0;
    max-height: 78dvh;
    transform: translateY(calc(100% - 58px));
    transition: transform var(--t-slow) var(--ease-out);
    box-shadow: 0 -12px 48px rgba(20,20,20,.14);
  }
  .spwd2-rail.is-open { transform: translateY(0); }
  .spwd2-sheet-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    width: 100%; padding: 10px 0 12px;
    appearance: none; border: 0; background: transparent; cursor: pointer;
  }
  .spwd2-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--ink-5); }
  .spwd2-sheet-label {
    font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink);
  }
  .spwd2-rail-scroll { max-height: calc(78dvh - 58px); padding: 0 var(--sp-5) var(--sp-8); }
  .spwd2-photogrid { grid-template-columns: repeat(3, 1fr); }
  .spwd2-swatch { width: 44px; height: 44px; }
}

/* Sortable placeholder — the calm gap that holds the dragged item's spot.
   Fades in softly (slow-fade rule) so the gap opens gently, not with a snap. */
.spwd2-ph {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-2);
  background: var(--bg-sunken);
  box-sizing: border-box;
  animation: spwd2-ph-in var(--t-base) var(--ease-out);
}
@keyframes spwd2-ph-in { from { opacity: 0; } to { opacity: 1; } }
.spwd2-photogrid .spwd2-ph { border-radius: var(--r-1); }

/* ── Section row buttons + block settings popover ── */
.spwd2-secbtns { display: inline-flex; gap: 6px; align-items: center; }
.spwd2-secstyle {
  appearance: none; cursor: pointer;
  height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--bg-elevated);
  color: var(--ink-2); font-family: Georgia, serif; font-size: 12px; font-style: italic;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.spwd2-secstyle:hover { border-color: var(--brand-deep); color: var(--brand-deep); }
.spwd2-pop {
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  padding: var(--sp-4);
  display: grid; gap: var(--sp-4);
  animation: spwd2-fade var(--t-slow) var(--ease-out);
}
.spwd2-pop-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.spwd2-popfont {
  appearance: none; cursor: pointer;
  padding: 7px 12px; font-size: 13px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--bg-elevated); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spwd2-popfont:hover { border-color: var(--ink-4); }
.spwd2-popfont.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.spwd2-popswatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; outline: 1px solid var(--line-strong);
  cursor: pointer; padding: 0; position: relative;
  transition: transform var(--t-fast) var(--ease);
}
.spwd2-popswatch:hover { transform: scale(1.08); }
.spwd2-popswatch.is-on { outline: 2px solid var(--ink); outline-offset: 2px; }
.spwd2-popswatch-accent::after {
  content: 'A'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.spwd2-popswatch-custom {
  display: inline-flex; overflow: hidden;
  background: conic-gradient(#ea1d2d, #e8a13a, #3ee092, #4d7ec0, #8b5cf6, #ea1d2d);
}
.spwd2-popswatch-custom input { position: absolute; inset: -8px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.spwd2-popsize {
  appearance: none; cursor: pointer; flex: 1;
  padding: 8px 0; font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-2);
  background: var(--bg-elevated); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spwd2-popsize.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.spwd2-pop-done { justify-self: end; }

/* ═══════════════════════════════════════════════════════════════
   Everything-page (/account) + Brokerage board (/brokerage)
   Warm account home. Mobile-first, cream, soft fades only.
   ═══════════════════════════════════════════════════════════════ */

.evp { padding-top: var(--sp-8); padding-bottom: var(--sp-16); }
.evp-head { margin-bottom: var(--sp-6); }

/* Quick links */
.evp-quick {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: var(--sp-8);
}
@media (min-width: 800px) { .evp-quick { grid-template-columns: repeat(4, 1fr); } }
.evp-quicklink {
  display: flex; flex-direction: column; gap: 3px;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-3);
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.evp-quicklink:hover { border-color: var(--ink-4); box-shadow: var(--shadow-2); }
.evp-quicklink.is-primary { background: var(--brand-soft); border-color: var(--brand-deep); }
.evp-quicklink-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.evp-quicklink-sub { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }

/* Cards + grid */
.evp-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); margin-bottom: var(--sp-8); }
@media (min-width: 900px) { .evp-grid { grid-template-columns: 340px 1fr; align-items: start; } }
.evp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
}
.evp-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.evp-dl { margin: 0; display: grid; gap: 2px; }
.evp-dl-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.evp-dl-row dt { font-size: 10.5px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); margin: 0; }
.evp-dl-row dd { font-size: 13.5px; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.evp-billing { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.evp-billing-label { font-size: 10.5px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.evp-billing-line { font-size: 13px; color: var(--ink-2); }
.evp-billing-sub { font-size: 12px; color: var(--ink-4); margin-top: 6px; line-height: var(--leading-snug); }

/* Orders */
.evp-sect { margin-bottom: var(--sp-8); }
.evp-sect-head { display: flex; align-items: baseline; gap: var(--sp-3); justify-content: space-between; margin-bottom: var(--sp-4); flex-wrap: wrap; }
.evp-orders { display: grid; gap: 8px; }
.evp-order {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: var(--sp-3); align-items: center;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  text-decoration: none;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.evp-order:hover { border-color: var(--ink-4); box-shadow: var(--shadow-1); }
.evp-order-thumb {
  width: 64px; height: 44px; border-radius: var(--r-1);
  background: var(--bg-sunken) center / cover no-repeat;
}
.evp-order-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.evp-order-addr { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evp-order-meta { font-size: 11.5px; color: var(--ink-3); }
.evp-chip {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill); white-space: nowrap;
}
.evp-chip.is-ok { background: var(--brand-soft); color: var(--brand-deep); }
.evp-chip.is-warn { background: rgba(201,138,20,.12); color: var(--warn); }

/* Deliveries — full-bleed photo cards */
.evp-deliveries { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .evp-deliveries { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .evp-deliveries { grid-template-columns: repeat(3, 1fr); } }
.evp-delivery {
  position: relative; display: block;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-3);
  background: var(--bg-sunken) center / cover no-repeat;
  overflow: hidden; text-decoration: none;
  isolation: isolate;
}
.evp-delivery-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.62) 100%);
  transition: opacity var(--t-slow) var(--ease);
}
.evp-delivery:hover .evp-delivery-scrim { opacity: .85; }
.evp-delivery-body {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.evp-delivery-addr { color: #fff; font-size: 14.5px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.evp-delivery-sub { color: rgba(255,255,255,.82); font-size: 11.5px; }

/* ── Brokerage board ── */
.bb { padding-top: var(--sp-8); padding-bottom: var(--sp-16); }
.bb-banner {
  padding: var(--sp-3) var(--sp-4);
  background: rgba(201,138,20,.10);
  border: 1px solid rgba(201,138,20,.28);
  border-radius: var(--r-2);
  font-size: 13px; color: var(--ink-2);
  margin-bottom: var(--sp-6);
}
.bb-board { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .bb-board { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .bb-board { grid-template-columns: repeat(3, 1fr); } }
.bb-card {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-3);
  background: var(--bg-sunken) center / cover no-repeat;
  overflow: hidden; isolation: isolate;
}
.bb-card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.66) 100%);
}
.bb-chip {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(253,252,249,.92); color: var(--ink);
}
.bb-card-body { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.bb-card-addr { color: #fff; font-size: 14.5px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.bb-card-links { display: flex; gap: 14px; margin-top: 4px; }
.bb-card-links a { color: rgba(255,255,255,.88); font-size: 12px; text-decoration: none; }
.bb-card-links a:hover { color: #fff; text-decoration: underline; }
.bb-split { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); margin-top: var(--sp-8); }
@media (min-width: 900px) { .bb-split { grid-template-columns: 1fr 1fr; align-items: start; } }
.bb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bb-table th {
  text-align: left; font-size: 10.5px; font-weight: 600;
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3);
  padding: 6px 8px 8px; border-bottom: 1px solid var(--line-strong);
}
.bb-table td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.bb-table-sub { display: block; font-size: 11px; color: var(--ink-4); }
.bb-amt { font-weight: 600; white-space: nowrap; }

/* Stat-icons toggle row (SPW designer) */
.spwd2-iconrow { display: flex; align-items: center; gap: 10px; }
.spwd2-icon-demo { width: 20px; height: 20px; color: var(--ink-2); flex: none; }
.spwd2-iconrow-label { flex: 1; font-size: 13px; color: var(--ink-2); }

/* Named styles manager (SPW designer) */
.spwd2-namerow { display: flex; gap: 8px; }
.spwd2-namerow .input { flex: 1; min-width: 0; }
.spwd2-styles { display: grid; gap: 6px; }
.spwd2-stylerow { display: flex; align-items: center; gap: 6px; }
.spwd2-stylerow-load {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  appearance: none; cursor: pointer; text-align: left;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  transition: border-color var(--t-fast) var(--ease);
}
.spwd2-stylerow-load:hover { border-color: var(--brand-deep); }
.spwd2-stylerow-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; outline: 1px solid var(--line-strong); }
.spwd2-stylerow-name { flex: 1; min-width: 0; font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spwd2-stylerow-tpl { font-family: var(--font-sans); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.spwd2-stylerow-edit { font-size: 13px; padding: 6px 8px; flex: 1; }

/* Sign designer — upload-your-own print design */
.sd-own-drop { padding: var(--sp-4); }
.sd-own-report { margin-top: var(--sp-3); }
.sd-own-ok, .sd-own-warn {
  font-size: 12.5px; line-height: var(--leading-snug);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-2);
}
.sd-own-ok { background: var(--brand-soft); color: var(--ink); }
.sd-own-warn { background: rgba(201,138,20,.12); color: var(--ink); }
.sd-own-qrow { font-size: 12.5px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid var(--line-soft); }

/* ── Help layer — the "?" toggle ── */
#cs-help-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  width: 44px; height: 44px; border-radius: 50%;
  appearance: none; cursor: pointer;
  background: var(--bg-elevated); color: var(--ink-2);
  border: 1px solid var(--line-strong);
  font: 600 18px/1 var(--font-sans);
  box-shadow: var(--shadow-2);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
#cs-help-btn:hover { color: var(--ink); border-color: var(--ink-4); }
#cs-help-btn.is-on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
#cs-help-overlay {
  position: fixed; inset: 0; z-index: 190;
  pointer-events: none;
}
.cs-help-tip {
  position: fixed;
  max-width: 250px;
  padding: 8px 11px;
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-2);
  font: 500 12px/1.45 var(--font-sans);
  box-shadow: var(--shadow-3);
  animation: spwd2-fade var(--t-slow) var(--ease-out);
}
