/* PPC Studio design system — Apple-HIG-inspired. One accent, semantic colors,
   8pt grid, hairline borders, generous whitespace. Light + dark. */

:root {
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --bg-sidebar: #ececee;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.08);
  --accent: #0a84ff;
  --ok: #30d158;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  /* aliases (2026-09-09): rules written against these names fell back to currentColor */
  --line: var(--hairline);
  --muted: var(--text-dim);
  --card-2: rgba(0, 0, 0, 0.03);
}
/* Light theme only (owner decision 2026-08-29) — dark mode removed. */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", Inter,
               "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.shell { display: flex; min-height: 100vh; }

/* ---------- sidebar (macOS System Settings style) ---------- */
.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--hairline);
  padding: 24px 12px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(160deg, var(--accent), #0060df);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.02em;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

.tenant-switch { display: flex; flex-direction: column; gap: 2px; }
.tenant {
  padding: 7px 12px; border-radius: 8px; text-decoration: none;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tenant.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500;
  transition: background 150ms ease;
}
.nav-item:hover { background: rgba(125, 125, 125, 0.1); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; }
.nav-dot.today { background: var(--warn); }
.nav-dot.products { background: var(--ok); }
.nav-dot.calendar { background: #0a84ff; }
.nav-dot.wbrs { background: #5e5ce6; }
.nav-dot.lst-studio { background: #ff9500; }
.nav-dot.lst-create { background: var(--ok); }
.nav-dot.lst-library { background: #0a84ff; }
.nav-dot.lst-publish { background: #af52de; }
.nav-item.active .nav-dot { background: #fff; }

.sidebar-foot { margin-top: auto; padding: 0 12px; font-size: 12px; }
.foot-line { color: var(--text); }
.foot-line.dim { color: var(--text-dim); }

/* ---------- content ---------- */
.content { flex: 1; max-width: 880px; padding: 48px 40px 96px;
           transition: opacity 0.15s; }
/* tab navigation swaps only this element — dim it while the next page loads
   (the shell around it never moves) */
.content.htmx-request { opacity: 0.55; }

.page-head { margin-bottom: 24px; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-dim); margin-top: 4px; font-size: 15px; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 32px 0 12px;
}

/* ---------- day-type banner ---------- */
.daytype-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
}
.daytype-chip {
  padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: 13px;
  color: #fff; background: var(--text-dim); white-space: nowrap;
}
.daytype-banner.look .daytype-chip { background: var(--ok); }
.daytype-banner.read .daytype-chip { background: var(--warn); }
.daytype-banner.act .daytype-chip { background: var(--accent); }
.daytype-banner.wbr .daytype-chip { background: #5e5ce6; }
.daytype-reason { color: var(--text); }
.daytype-calendar { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* ---------- cards ---------- */
.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.warn-card { border-color: var(--warn); }
.warn-line { color: var(--warn); font-weight: 500; }

.duty-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.duty-title { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.duty-detail { color: var(--text-dim); }
.duty-run { margin-top: 12px; display: flex; align-items: center; gap: 12px; }

.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: 999px; color: #fff;
}
.badge.do { background: var(--accent); }
.badge.watch { background: var(--warn); }
.badge.escalate { background: var(--bad); }
.badge.strategy { background: var(--accent); text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  border: none; border-radius: 999px; padding: 8px 18px;
  cursor: pointer; transition: filter 150ms ease, transform 150ms ease;
  background: rgba(125, 125, 125, 0.12); color: var(--text);
  white-space: nowrap; display: inline-block;  /* a pill never breaks mid-label
    (mobile stacked buttons re-allow wrapping where they go full-width) */
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary .hint { color: rgba(255, 255, 255, 0.8); } /* a cost on a blue pill reads */
.btn.small { font-size: 13px; padding: 6px 14px; }
.hint { color: var(--text-dim); font-size: 12.5px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- jobs ---------- */
.job {
  margin-top: 12px; border: 1px solid var(--hairline); border-radius: 10px;
  padding: 12px 14px; background: var(--bg);
}
.job-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job-title { font-weight: 600; }
.job-state { font-size: 13px; color: var(--text-dim); }
.job-state.ok { color: var(--ok); font-weight: 600; }
.job-state.fail { color: var(--bad); font-weight: 600; }
.job-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.job.running .job-status-dot { background: var(--accent); animation: pulse 1.2s infinite; }
.job.ok .job-status-dot { background: var(--ok); }
.job.fail .job-status-dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: 0.4; } }

.job-output {
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 12px; line-height: 1.55; white-space: pre-wrap;
  max-height: 420px; overflow-y: auto; padding: 10px 0 0;
}

/* progress */
.progress {
  height: 4px; background: rgba(125, 125, 125, 0.15);
  border-radius: 999px; overflow: hidden; margin-top: 6px; width: 160px;
}
.progress.thin { width: 120px; margin: 0; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.progress-indeterminate {
  height: 100%; width: 40%; background: var(--accent); border-radius: 999px;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---------- parsed results (tiles / status / table) ---------- */
.result { margin-top: 14px; }

.result-status {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; padding: 10px 2px;
}
.result-status .status-icon {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.result-status.ok .status-icon { background: var(--ok); }
.result-status.bad .status-icon { background: var(--bad); }
.result-status.bad { color: var(--bad); }
.result-status.warn .status-icon { background: var(--text-dim); }
.result-status.warn { color: var(--text-dim); }
/* a status pill sitting inside a row rather than owning a line */
.result-status.inline { display: inline-flex; padding: 0; font-size: 13px;
  gap: 6px; }
.result-status.inline .status-icon { width: 18px; height: 18px;
  font-size: 11px; }

/* library: one block per product, its finished set on a shelf */
/* ---------- library, iOS style (owner 2026-09-06) ---------- */
.lib-head-ios h1 { font-size: 34px; letter-spacing: -0.02em; font-weight: 700; }
.lib-stats { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.lib-stat { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px;
  background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: 999px;
  box-shadow: var(--shadow); }
.lib-stat strong { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.lib-stat span { font-size: 13px; color: var(--text-dim); }

/* the segmented control */
.lib-seg { display: flex; padding: 3px; background: rgba(118, 118, 128, 0.12);
  border-radius: 10px; margin: 0 0 18px; max-width: 420px; }
.lib-seg-btn { flex: 1; font: inherit; font-size: 14px; font-weight: 600; border: 0;
  background: transparent; color: var(--text); padding: 7px 10px; border-radius: 8px;
  cursor: pointer; transition: background 150ms ease, box-shadow 150ms ease; }
.lib-seg-btn.active { background: var(--bg-elev); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
  0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.lib-seg-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: rgba(118, 118, 128, 0.18); font-size: 11px;
  font-weight: 700; color: var(--text-dim); line-height: 18px; text-align: center; }
.lib-seg-btn.active .lib-seg-n { background: var(--accent); color: #fff; }

/* grouped sections with small-caps headers */
.lib-section { margin-bottom: 22px; }
.lib-section-title { font-size: 13px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em; padding: 0 4px 8px;
  display: flex; align-items: baseline; gap: 8px; }
.lib-section-title span { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* one card per product */
.lib-card { background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 16px; box-shadow: var(--shadow); padding: 16px 16px 12px; margin-bottom: 12px; }
.lib-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lib-card-titles { flex: 1; min-width: 0; }
.lib-card-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.lib-card-sub { font-size: 13px; color: var(--text-dim); margin-top: 1px; }

/* the progress ring */
.lib-ring { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.lib-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.lib-ring circle { fill: none; stroke-width: 3; }
.lib-ring-track { stroke: rgba(118, 118, 128, 0.18); }
.lib-ring-bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 300ms ease; }
.lib-ring.done .lib-ring-bar { stroke: var(--ok); }
.lib-ring.some .lib-ring-bar { stroke: var(--warn); }
.lib-ring span { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: -0.02em; }
.lib-ring span em { font-style: normal; font-weight: 500; color: var(--text-dim); }

/* the shelf and its tiles */
.lib-shelf { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; }
.lib-shelf::-webkit-scrollbar { display: none; }
.lib-tile { flex: 0 0 124px; margin: 0; scroll-snap-align: start; }
.lib-tile-img { position: relative; width: 124px; height: 124px; }
.lib-tile-img img { width: 124px; height: 124px; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--hairline); cursor: zoom-in; display: block; background: #f2f2f4; }
.lib-tile-pos { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; background: rgba(29, 29, 31, 0.72); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lib-tile figcaption { font-size: 11.5px; color: var(--text-dim); font-weight: 500;
  text-align: center; padding-top: 5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
/* corner actions: templatify (⧉), done (✓), hints (◎), delete (–) */
.lib-tpl-form { position: absolute; right: 6px; top: 6px; margin: 0; }
.lib-tile-act { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; line-height: 26px; text-align: center;
  cursor: pointer; text-decoration: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lib-tpl-form .lib-tile-act { position: static; }
.lib-tile-act:active { transform: scale(0.94); }
.lib-tile-act.done { background: var(--ok); color: #fff; }
.lib-tile-act.hint-act { right: 38px; }
.lib-tile-act.del { color: var(--bad); font-size: 18px; line-height: 24px; }
.lib-tile-img form { margin: 0; }
.lib-tpl-chip { text-decoration: none; }
.lib-check { color: var(--warn); }

/* the card toolbar: tinted iOS actions */
.lib-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.lib-toolbar form { margin: 0; }
.lib-act { font: inherit; font-size: 14px; font-weight: 600; border: 0; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  background: rgba(10, 132, 255, 0.10); color: var(--accent); display: inline-flex;
  align-items: center; gap: 6px; transition: filter 150ms ease, transform 150ms ease; }
.lib-act:hover { filter: brightness(1.05); }
.lib-act:active { transform: scale(0.98); }
.lib-act.primary { background: var(--accent); color: #fff; }
.lib-act-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.5); color: var(--accent); font-size: 11px;
  font-weight: 700; line-height: 18px; text-align: center; }
.lib-out:empty { display: none; }
.lib-out { margin-top: 10px; }

/* notes, the disclosure, the empties */
.lib-note { font-size: 13px; color: var(--warn); margin-top: 8px; }
.lib-note.dim { color: var(--text-dim); }
.lib-empty-row { font-size: 13.5px; color: var(--text-dim); padding: 6px 0; }
.lib-disclose { margin-top: 8px; }
.lib-disclose > summary { list-style: none; cursor: pointer; display: flex;
  align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500;
  color: var(--text); padding: 8px 0; }
.lib-disclose > summary::-webkit-details-marker { display: none; }
.lib-chevron { color: var(--text-dim); font-size: 20px; line-height: 1;
  transition: transform 150ms ease; display: inline-block; }
.lib-disclose[open] .lib-chevron { transform: rotate(90deg); }
.lib-empty { text-align: center; padding: 48px 20px; color: var(--text-dim); }
.lib-empty-glyph { font-size: 40px; line-height: 1; margin-bottom: 12px; opacity: 0.5; }
.lib-empty-title { font-size: 17px; font-weight: 600; color: var(--text); }
.lib-empty-text { font-size: 14px; margin-top: 4px; max-width: 420px; margin-left: auto;
  margin-right: auto; }
@media (max-width: 640px) {
  .lib-head-ios h1 { font-size: 30px; }
  .lib-seg { max-width: none; }
  .lib-card { padding: 14px 12px 10px; border-radius: 14px; }
  .lib-toolbar { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .lib-toolbar::-webkit-scrollbar { display: none; }
}

/* settings: one block per API key */
.key-row { padding: 14px 0; border-top: 1px solid var(--hairline); }
.key-row:first-of-type { border-top: 0; }
.key-head { display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; }

.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.tile {
  flex: 1; min-width: 130px;
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 12px 16px;
}
.tile-label { font-size: 12px; color: var(--text-dim); }
.tile-value {
  font-size: 26px; font-weight: 650; letter-spacing: -0.02em;
  margin-top: 2px;                      /* proportional figures at display size */
}
.tile-sub { font-size: 12px; color: var(--text-dim); }
.tile.ok .tile-value { color: var(--ok); }
.tile.warn .tile-value { color: var(--warn); }
.tile.bad .tile-value { color: var(--bad); }

.result-table {
  width: 100%; border-collapse: collapse; margin-top: 12px;
  font-size: 13.5px;
}
.result-table th {
  font-size: 11.5px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 10px; border-bottom: 1px solid var(--hairline);
}
.result-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;   /* columns of numbers align */
}
.result-table tr:last-child td { border-bottom: none; }
.result-table .r { text-align: right; }
.result-table .l { text-align: left; }
.result-table tr.total-row td { font-weight: 650; border-top: 1.5px solid var(--hairline); }
.result-table tr.warn td:first-child { color: var(--warn); font-weight: 600; }
.result-table tr.bad td:first-child { color: var(--bad); font-weight: 600; }

.result-note {
  margin-top: 10px; font-size: 12.5px; color: var(--text-dim);
  padding-left: 2px;
}

/* ---------- disclosure ---------- */
details.raw { margin-top: 10px; }
details.raw summary {
  cursor: pointer; color: var(--text-dim); font-size: 13px; font-weight: 500;
  list-style: none;
}
details.raw summary::before { content: "▸ "; }
details.raw[open] summary::before { content: "▾ "; }
details.raw pre {
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 12px; white-space: pre-wrap; color: var(--text-dim);
  background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 6px;
}
details.cadence { margin-top: 40px; }

/* ---------- skeleton ---------- */
.skeleton {
  height: 48px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(125,125,125,0.08) 25%,
              rgba(125,125,125,0.16) 50%, rgba(125,125,125,0.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- health ---------- */
.health-grid { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 24px; }
@media (max-width: 768px) { .health-grid { grid-template-columns: 1fr; gap: 14px; } }
.health-title {
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.health-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 13.5px; flex-wrap: wrap;
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.ok { background: var(--ok); }
.dot.fail { background: var(--bad); }
.dot.warn { background: var(--warn); }
.fail-text { color: var(--bad); }

/* ---------- standard-plan phase stepper ---------- */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.phase-stepper { display: flex; align-items: center; gap: 0; margin: 18px 0 8px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: rgba(125,125,125,0.12); color: var(--text-dim);
  border: 2px solid transparent;
}
.step.active .step-dot { background: var(--accent); color: #fff; }
.step.done .step-dot { background: var(--ok); color: #fff; }
.step-name { font-size: 12px; font-weight: 600; color: var(--text-dim); text-align: center; }
.step.active .step-name { color: var(--text); }
.step-line { flex: 1; height: 2px; background: var(--hairline); margin: 0 4px 22px; min-width: 24px; }
.step-line.done { background: var(--ok); }
.phase-does { color: var(--text-dim); font-size: 13.5px; max-width: 60ch; margin-bottom: 4px; }

/* ---------- daily KPI row on product cards ---------- */
.kpi-row {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px;
  background: var(--bg); border-radius: 10px; border: 1px solid var(--hairline);
}
.kpi { display: flex; flex-direction: column; }
.kpi-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.kpi-note { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; padding-left: 2px; }
.spark { width: 120px; height: 28px; }
.spark polyline { stroke: var(--accent); stroke-width: 1.5; opacity: 0.65; }

.stability { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.stability.ok { color: var(--ok); background: rgba(48, 209, 88, 0.12); }
.stability.amber { color: var(--warn); background: rgba(255, 159, 10, 0.12); }
.stability.red { color: var(--bad); background: rgba(255, 69, 58, 0.12); }
.stability.na { color: var(--text-dim); background: rgba(125,125,125,0.1); }

.floor-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.floor-chip {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 1.5px solid var(--accent); color: var(--accent);
}
.hint.suggest { color: var(--warn); }

.account-strip { margin-bottom: 16px; }
.strip-title {
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.kpi-card .result-table { margin-top: 14px; }

/* ---------- Phase-1 execution stepper ---------- */
.p1 { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.p1-step {
  border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px;
  background: var(--bg);
}
.p1-step.now { border-color: var(--accent); background: rgba(10, 132, 255, 0.05); }
.p1-step.done { opacity: 0.85; }
.p1-step.wait { opacity: 0.45; }
.p1-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p1-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: rgba(125,125,125,0.15); color: var(--text-dim);
}
.p1-step.now .p1-num { background: var(--accent); color: #fff; }
.p1-step.done .p1-num { background: var(--ok); color: #fff; }
.p1-title { font-weight: 650; font-size: 15px; }
.p1-result { font-size: 13px; color: var(--text-dim); }
.p1-detail { color: var(--text-dim); font-size: 13.5px; margin: 6px 0 0 36px; max-width: 62ch; }
.p1-step .duty-run { margin: 10px 0 0 36px; }
.p1-indent { margin: 6px 0 0 36px; }

.econ-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 12px 0 0 36px; }
.econ-form .field input { min-width: 130px; }

/* proposal render */
.prop { margin: 12px 0 0 36px; display: flex; flex-direction: column; gap: 12px; }
.prop-group { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.prop-group-head {
  padding: 8px 14px; font-weight: 650; font-size: 13px;
  background: rgba(125,125,125,0.07);
  display: flex; justify-content: space-between; align-items: center;
}
.prop-row {
  display: grid; grid-template-columns: 1.4fr 0.9fr 1fr; gap: 10px;
  padding: 7px 14px; border-top: 1px solid var(--hairline);
  font-size: 13px; align-items: baseline;
}
.prop-name { font-weight: 550; }
.prop-meta { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.prop-total {
  padding: 10px 4px 0; font-size: 14px;
}

/* ---------- metric info icons (ⓘ hover explanations) ---------- */
.info-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  font-size: 9px; font-weight: 700; font-family: Georgia, serif;
  background: rgba(125, 125, 125, 0.22); color: var(--text-dim);
  cursor: help; position: relative; vertical-align: 1px;
  margin-left: 2px; outline: none; text-transform: none;
}
.info-i::after {
  content: attr(data-info);
  font-family: -apple-system, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  position: absolute; left: 50%; top: 19px; transform: translateX(-50%);
  width: 250px; white-space: normal; text-transform: none; letter-spacing: 0;
  background: var(--text); color: var(--bg-elev);
  border-radius: 9px; padding: 9px 12px;
  font-size: 11.5px; font-weight: 450; line-height: 1.5; text-align: left;
  opacity: 0; visibility: hidden; transition: opacity 130ms ease;
  pointer-events: none; z-index: 60;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.info-i:hover::after, .info-i:focus::after { opacity: 1; visibility: visible; }
/* side-aware anchoring — set by the small positioner in base.html so the bubble
   never clips against its container (dialog, card, table) edges */
.info-i[data-side="left"]::after { left: -8px; right: auto; transform: none; }
.info-i[data-side="right"]::after { left: auto; right: -8px; transform: none; }

/* ---------- ROAS coloring + timed-out job state ---------- */
.roas-good { color: var(--ok) !important; }
.roas-bad { color: var(--bad) !important; }
.job.warn .job-status-dot { background: var(--warn); }
.job-state.warn-state { color: var(--warn); font-weight: 600; }

/* ---------- detail dialog + charts ---------- */
dialog#detail-dialog {
  margin: auto;             /* the global reset kills the UA auto-centering — restore it */
  border: 1px solid var(--hairline); border-radius: 16px;
  background: var(--bg-elev); color: var(--text);
  padding: 0; width: min(680px, 92vw);
  max-height: 88vh; overflow: hidden;   /* header pins; only .detail-scroll moves */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
dialog#detail-dialog[open] { display: flex; flex-direction: column; }
/* NOTE: never set position:relative here — it breaks the dialog out of the UA's
   fixed top-layer positioning and into page flow (scroll jumps on open). The
   fixed dialog is already the positioning anchor for the absolute ✕ button. */
.dialog-close { z-index: 6; }
#detail-body { display: flex; flex-direction: column; min-height: 0; }
#detail-body .skeleton { margin: 24px 28px; }
.detail { display: flex; flex-direction: column; min-height: 0; }
.detail-top {
  flex-shrink: 0; padding: 22px 28px 14px;
  border-bottom: 1px solid var(--hairline);
}
.detail-scroll { overflow-y: auto; min-height: 0; padding: 14px 28px 24px; }
dialog#detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px);
}
.dialog-close {
  position: absolute; top: 14px; right: 16px;
  font: inherit; font-size: 14px; border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(125, 125, 125, 0.15); color: var(--text-dim);
}
.dialog-close:hover { background: rgba(125, 125, 125, 0.3); }
.detail-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.chart-block { margin-top: 20px; }
.chart-title {
  font-size: 12.5px; font-weight: 650; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
html.modal-open { overflow: hidden; }   /* background holds still under the dialog */
.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; pointer-events: none; display: none;
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 6px 10px; font-size: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); white-space: nowrap; z-index: 5;
  font-variant-numeric: tabular-nums;
}
.chart-tip .tip-date { color: var(--text-dim); margin-bottom: 2px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.tip-swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-cross {
  position: absolute; pointer-events: none; display: none;
  width: 1px; background: var(--text-dim); opacity: 0.4; top: 0;
}
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--hairline); stroke-width: 1; }
svg.chart .tick { font-size: 10px; fill: var(--text-dim); font-variant-numeric: tabular-nums; }
svg.chart .refline {
  stroke: var(--text-dim); stroke-width: 1.5; stroke-dasharray: 5 4;
}
svg.chart .ref-label, svg.chart .series-label { font-size: 11px; font-weight: 600; }
svg.chart .ref-label { fill: var(--text-dim); }
.detail .tiles { margin-top: 4px; }
.tile.bad .tile-value { color: var(--bad); }

/* ---------- WBR library ---------- */
.wbr-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.wbr-pill {
  padding: 7px 16px; border-radius: 999px; text-decoration: none;
  font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--bg-elev); border: 1px solid var(--hairline); color: var(--text);
  transition: background 150ms ease;
}
.wbr-pill:hover { background: rgba(125, 125, 125, 0.1); }
.wbr-pill.active { background: #5e5ce6; border-color: #5e5ce6; color: #fff; }
.wbr-frame-card { padding: 0; overflow: hidden; }
.wbr-frame { width: 100%; height: calc(100vh - 240px); border: none; display: block; background: #fff; }

/* ---------- home dashboard: provisional line + chart grid ---------- */
.provisional-line {
  margin-top: 10px; font-size: 13px; color: var(--text);
  padding: 8px 12px; border: 1px dashed var(--hairline); border-radius: 9px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.prov-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 159, 10, 0.15); color: var(--warn);
}
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .chart-grid { grid-template-columns: 1fr; } }

/* ---------- campaigns panel ---------- */
.campaigns-block { margin-top: 14px; }
.camp-table td { font-size: 12.5px; padding: 5px 8px; }
.camp-name { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 9px; border-radius: 999px;
}
.state-chip.on { background: rgba(48, 209, 88, 0.15); color: var(--ok); }
.state-chip.off { background: rgba(125, 125, 125, 0.15); color: var(--text-dim); }
.budget-input {
  font: inherit; font-size: 12.5px; width: 74px; text-align: right;
  padding: 4px 8px; border-radius: 7px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
}
.budget-input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.camp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.table-scroll { overflow-x: auto; }
.camp-table { font-size: 12px; min-width: 900px; }
.camp-table th { white-space: nowrap; }
.camp-table .camp-name { max-width: 250px; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--text); }
th.sort[data-dir="asc"]::after { content: " ↑"; }
th.sort[data-dir="desc"]::after { content: " ↓"; }
.tgt-btn { font-size: 11px; padding: 3px 10px; }
.tgt-btn.htmx-request { pointer-events: none; opacity: 0.45; }  /* no double-fetch */
.target-row > td { padding: 0 !important; border-bottom: none; }
.target-box {
  margin: 4px 8px 12px 28px; padding: 10px 14px;
  border: 1px dashed var(--hairline); border-radius: 10px; background: var(--bg);
}
.target-head {
  font-size: 11.5px; font-weight: 650; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.target-table td { font-size: 12px; padding: 4px 8px; }

/* ---------- listings management ---------- */
.listings-block { margin-top: 14px; }
.listings-block .result-table td { font-size: 12.5px; padding: 5px 8px; }
.manage-forms { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.manage-forms form { display: flex; gap: 8px; align-items: center; }

/* ---------- watch items (account-specific, NOT the standard plan) ---------- */
.watch-items {
  margin-top: 18px; border: 1px dashed var(--hairline);
  border-radius: 10px; padding: 12px 16px;
}
.watch-title {
  font-size: 11.5px; font-weight: 650; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.watch-row {
  display: flex; gap: 12px; padding: 3px 0; font-size: 13px;
  align-items: baseline;
}
.watch-row.done { opacity: 0.5; }
.watch-row.done .watch-what { text-decoration: line-through; }
.watch-when {
  color: var(--text-dim); font-variant-numeric: tabular-nums;
  min-width: 92px; flex-shrink: 0; font-size: 12px;
}
.watch-what { color: var(--text); }

.notice-card { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pin-inline {
  font: inherit; padding: 8px 12px; border-radius: 8px; width: 110px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
}
.pin-inline:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---------- add-product ---------- */
.pick-table { margin-top: 8px; }
.pick-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.add-form { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12.5px; font-weight: 600; }
.field input {
  font: inherit; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
  min-width: 260px;
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---------- products: search + collapsed cards ---------- */
.head-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.head-tools .btn { white-space: nowrap; }
.search-field {
  display: flex; align-items: center; gap: 8px; width: 130px;
  background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 8px 14px;
  transition: width 200ms ease;
}
.search-field:focus-within { width: 240px; }   /* grows while you type */
.search-field:focus-within { outline: 2px solid var(--accent); }
.search-glyph { color: var(--text-dim); font-size: 16px; }
.search-field input {
  font: inherit; border: none; background: none; color: var(--text);
  width: 100%; outline: none;
}
.filter-count { color: var(--text-dim); font-size: 13px; }
.empty-state { color: var(--text-dim); }

details.product { padding: 0; overflow: hidden; }
.product-summary {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; cursor: pointer; list-style: none;
  transition: background 150ms ease;
}
.product-summary::-webkit-details-marker { display: none; }
.product-summary::marker { content: ""; }
.product-summary:hover { background: rgba(125, 125, 125, 0.06); }
.product-summary .chev {
  color: var(--text-dim); font-size: 15px; line-height: 1; flex-shrink: 0;
  width: 18px; text-align: center;
  transition: transform 150ms ease;
}
details.product[open] .chev { transform: rotate(90deg); }
.sum-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.sum-main .product-name { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.sum-kpi { display: flex; gap: 16px; flex-shrink: 0; align-items: baseline; }
.sum-stat { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sum-stat em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--text-dim); }
.sum-stat.dim { color: var(--text-dim); font-weight: 500; font-size: 12.5px; }
.badge.run-badge { background: var(--accent); animation: pulse 1.2s infinite; }
/* expanded: the summary slims down to just the identity — the numbers hide
   (the body carries them) but the See-details button STAYS available */
details.product[open] .sum-kpi .sum-stat { display: none; }
details.product[open] .sum-main > .hint { display: none; }
.product-body { padding: 4px 22px 22px 52px; border-top: 1px solid var(--hairline); }
.product-body .phase-stepper { margin-top: 16px; }
@media (max-width: 900px) { .product-body { padding-left: 22px; } }

/* ---------- products ---------- */
.card.product { padding: 22px 24px; }
.product-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
}
.product-name { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.product-strategy { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.product-numbers { display: flex; gap: 20px; }
.stat { text-align: right; }
.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.phases { display: flex; gap: 8px; margin: 18px 0 6px; flex-wrap: wrap; }
.phase {
  flex: 1; min-width: 150px; border: 1px solid var(--hairline);
  border-radius: 10px; padding: 10px 14px; opacity: 0.55;
}
.phase.active { opacity: 1; border-color: var(--accent); background: rgba(10, 132, 255, 0.06); }
.phase.done { opacity: 0.8; border-color: var(--ok); }
.phase-name { font-weight: 600; font-size: 13.5px; }
.phase-target { color: var(--text-dim); font-size: 12.5px; }
.phase-gate { font-size: 12.5px; margin-top: 4px; }

/* timeline: vertical, dots + connecting line */
.timeline { margin-top: 16px; position: relative; padding-left: 6px; }
.milestone { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.milestone:last-child { padding-bottom: 0; }
.milestone::before {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px;
  width: 2px; background: var(--hairline);
}
.milestone:last-child::before { display: none; }
.mile-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 5px;
  background: var(--bg-elev); border: 2.5px solid var(--text-dim);
  flex-shrink: 0; z-index: 1;
}
.milestone.done .mile-dot { background: var(--ok); border-color: var(--ok); }
.milestone.next .mile-dot { background: var(--warn); border-color: var(--warn); }
.milestone.done .mile-what { color: var(--text-dim); text-decoration: line-through; }
.milestone.next .mile-when { color: var(--warn); font-weight: 600; }
.mile-when { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mile-what { font-size: 14.5px; }

/* ---------- clamp: long blocks collapse to a standard height ----------
   [data-clamp] elements taller than the limit get .clamped + a Show-all
   toggle (wired in base.html). The fade is a mask on the content itself,
   so it works on any background and in both themes. */
.clamped {
  max-height: 320px;
  overflow-y: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
}
.clamp-toggle { display: block; margin: 6px auto 0; }

/* htmx request indicator (skeleton hidden until its request is in flight) */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: block; }

/* ---------- calendar (Google-Calendar-style month grid) ---------- */
.cal-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-month { font-weight: 650; font-size: 17px; min-width: 150px;
  text-align: center; font-variant-numeric: tabular-nums; }
.cal-card { padding: 10px 12px 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { font-size: 11px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 8px 4px; }
.cal-day { min-height: 96px; min-width: 0; border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline); padding: 4px 6px 6px;
  display: flex; flex-direction: column; gap: 3px; }
.cal-grid .cal-day:last-child { border-right: 1px solid var(--hairline); }
.cal-grid:last-of-type .cal-day { border-bottom: 1px solid var(--hairline); }
.cal-day.out { opacity: 0.38; }
.day-num { font-size: 12px; color: var(--text-dim); align-self: flex-end;
  font-variant-numeric: tabular-nums; padding: 1px 4px; border-radius: 999px; }
.cal-day.today .day-num { background: var(--accent); color: #fff;
  font-weight: 650; }
.cal-chip { display: block; width: 100%; max-width: 100%; text-align: left; border: 0;
  cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 550;
  padding: 2px 7px; border-radius: 6px; border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); background: var(--bg); }
.cal-chip.weekly    { background: rgba(10,132,255,.12);  border-left-color: #0A84FF; }
.cal-chip.monthly   { background: rgba(191,90,242,.12);  border-left-color: #BF5AF2; }
.cal-chip.quarterly { background: rgba(94,92,230,.12);   border-left-color: #5E5CE6; }
.cal-chip.report    { background: rgba(48,209,88,.14);   border-left-color: #30D158; }
.cal-chip.reviews   { background: rgba(255,214,10,.18);   border-left-color: #FFD60A; }
.cal-chip.compact   { font-size: 10px; padding: 1px 6px; opacity: 0.8; }
.cal-chip.product   { background: rgba(255,159,10,.14);  border-left-color: #FF9F0A; }
.cal-chip.done { opacity: 0.45; }
.cal-chip.st-ready, .cal-chip.st-failed, .cal-chip.st-due { opacity: 1; }
.cal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-left: 5px; vertical-align: middle; background: #c7c7cc; }
.cal-dot.ready { background: var(--warn); }
.cal-dot.applied, .cal-dot.done { background: var(--ok); }
.cal-dot.failed { background: var(--bad); }
.cal-dot.due { background: var(--accent); }
.cal-dot.scheduled { background: transparent; border: 1px solid #c7c7cc; }
.cal-dot.pending { background: transparent; border: 1px dashed #c7c7cc; }
.cal-state-line { font-size: 14px; }
.cal-state-line.failed { color: var(--bad); }
.cal-state-line.ready, .cal-state-line.due { color: var(--warn); font-weight: 500; }
.cal-state-line.applied, .cal-state-line.done { color: var(--ok); }
.cal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cal-chip:hover { filter: brightness(0.96); }
.cal-dialog { border: 1px solid var(--hairline); border-radius: 14px;
  padding: 18px 22px; max-width: 560px; width: min(560px, 92vw);
  margin: auto;    /* the global reset kills the UA centering — restore it */
  background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }
.cal-dialog::backdrop { background: rgba(0,0,0,0.35); }
.cal-dialog-head { display: flex; align-items: center; gap: 10px; }
.cal-d-list { margin: 4px 0 12px 18px; padding: 0; font-size: 14px; }
.cal-d-list li { margin: 3px 0; }

/* seller switcher sheet (opened from the mobile topbar title) */
.seller-sheet { border: 1px solid var(--hairline); border-radius: 14px;
  padding: 12px 14px; width: min(360px, 92vw);
  margin: auto;    /* the global reset kills the UA centering — restore it */
  background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }
.seller-sheet::backdrop { background: rgba(0,0,0,0.35); }
.seller-row { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 44px; padding: 0 8px; border-radius: 10px;
  text-decoration: none; color: var(--text); font-size: 16px; }
.seller-row:active { background: rgba(125, 125, 125, 0.1); }
.seller-row.active { font-weight: 650; }
.seller-check { color: var(--accent); font-weight: 700; }
.seller-row.add { color: var(--accent); font-weight: 600; }

/* ---------- onboarding wizard ---------- */
.onboard-shell { max-width: 640px; margin: 0 auto; padding: 32px 20px 60px; }
.onboard-top { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; }
.onboard-dots { display: flex; gap: 8px; }
.odot { width: 24px; height: 24px; border-radius: 50%; display: grid;
  place-items: center; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--hairline); color: var(--text-dim); }
.odot.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.odot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.onboard-card { margin-top: 14px; }
.onboard-shell h1 { font-size: 26px; letter-spacing: -0.02em; }
.radio-card { display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px;
  margin: 6px 0; cursor: pointer; font-size: 14px; }
.radio-card:hover { border-color: var(--accent); }
.radio-card input { margin-top: 3px; }
.tenant.add-seller { color: var(--accent); font-weight: 550; }

/* ---------- chart period/granularity controls ---------- */
.chart-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 14px 0 4px; }
.chip-toggle { font: inherit; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--hairline); border-radius: 999px; padding: 3px 11px;
  background: var(--bg); color: var(--text-dim); cursor: pointer; }
.chip-toggle.on { background: var(--accent); border-color: var(--accent);
  color: #fff; }
.chip-toggle:hover:not(.on) { border-color: var(--accent); color: var(--text); }

/* chart-control dropdowns (Products / Chart lines) + native selects */
.ctl { display: inline-flex; align-items: center; gap: 6px; }
.ctl-select { font: inherit; font-size: 12.5px; font-weight: 550;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 4px 8px; }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; font-size: 12.5px;
  font-weight: 550; color: var(--text); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 4px 10px;
  white-space: nowrap; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after { content: " ▾"; color: var(--text-dim); }
.dd[open] > summary { border-color: var(--accent); }
.dd-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 240px; max-width: 300px; background: var(--card, #fff);
  border: 1px solid var(--hairline); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.dd-note { font-size: 11.5px; color: var(--text-dim); padding: 4px 8px 8px;
  border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.dd-head { font-size: 11px; font-weight: 650; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-dim); padding: 8px 8px 2px;
  border-top: 1px solid var(--hairline); margin-top: 4px; }
.dd-row { display: flex; align-items: center; gap: 8px; width: 100%;
  font: inherit; font-size: 13px; color: var(--text); text-align: left;
  background: none; border: 0; border-radius: 8px; padding: 6px 8px;
  cursor: pointer; }
.dd-row:hover { background: var(--bg); }
.dd-row.on { font-weight: 600; }
.dd-row.blocked { opacity: 0.4; cursor: default;
  text-decoration: line-through; }
.dd-check { width: 14px; flex: 0 0 14px; color: var(--accent);
  font-weight: 700; }
@media (max-width: 520px) {
  .dd-panel { max-width: calc(100vw - 48px); }
}

/* ---------- Listing Studio ---------- */
.lst-fam-row { padding: 12px 0; border-top: 1px solid var(--hairline); }
.lst-fam-row:first-of-type { border-top: 0; }
.lst-fam-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lst-fam-name { font-weight: 650; color: var(--text); text-decoration: none; }
.lst-fam-name:hover { color: var(--accent); }
.lst-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px;
  -webkit-overflow-scrolling: touch; }
.lst-thumb { width: 64px; height: 64px; object-fit: contain; flex: 0 0 auto;
  background: #fff; border: 1px solid var(--hairline); border-radius: 8px; }
.lst-thumb.main { border-color: var(--accent); border-width: 2px; }
.lst-step { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
  font-weight: 700; background: var(--bg); border: 1.5px solid var(--hairline);
  color: var(--text-dim); margin-right: 4px; }
.lst-step.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.lst-locked { opacity: 0.55; }
.lst-slot-row { display: flex; align-items: center; gap: 8px; margin: 6px 0;
  flex-wrap: wrap; }
.lst-slot-row select { min-width: 0; }  /* selects must be able to shrink */
.lst-slot-n { width: 20px; text-align: right; font-size: 12.5px;
  font-weight: 650; color: var(--text-dim); flex: 0 0 20px; }
.lst-check-row { display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--hairline); }
.lst-check { width: 20px; font-weight: 700; color: var(--text-dim); }
.lst-check.ok { color: var(--ok); }
.lst-ref { position: relative; flex: 0 0 auto; }
.lst-ref .lst-thumb { width: 84px; height: 84px; }
.lst-ref-x { position: absolute; top: -6px; right: -6px; width: 20px;
  height: 20px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--card, #fff); font-size: 10px; cursor: pointer;
  line-height: 1; }
.lst-grid { display: grid; grid-template-columns:
  repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.lst-pick { position: relative; display: block; cursor: pointer; }
.lst-pick img { width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 2px solid var(--hairline); border-radius: 10px; display: block;
  background: #fff; }
.lst-pick input { position: absolute; top: 6px; left: 6px; z-index: 2;
  width: 18px; height: 18px; accent-color: var(--accent); }
.lst-pick input:checked + img { border-color: var(--accent); }
.lst-rank { position: absolute; bottom: 6px; right: 6px; z-index: 2;
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 999px; padding: 1px 7px; }
.lst-verdicts { display: flex; flex-wrap: wrap; gap: 6px; }
.lst-verdict { font-size: 11.5px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; border: 1px solid var(--hairline);
  color: var(--text-dim); cursor: help; }
.lst-verdict.adopt { background: rgba(52, 199, 89, 0.12);
  border-color: rgba(52, 199, 89, 0.5); color: #1e7d38; }
.lst-verdict.reject { text-decoration: line-through; opacity: 0.65; }
.lst-proposal { display: flex; gap: 10px; align-items: flex-start;
  border: 1.5px solid var(--hairline); border-radius: 12px;
  padding: 10px 12px; margin: 8px 0; cursor: pointer; }
.lst-proposal:has(input:checked) { border-color: var(--accent);
  background: rgba(10, 132, 255, 0.05); }
.lst-proposal input { margin-top: 3px; accent-color: var(--accent); }
.lst-ev { display: inline-block; font-size: 11px; font-weight: 600;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 2px 8px; color: var(--text-dim); white-space: nowrap;
  flex: 0 0 auto; }
.lst-ev.extra { border-color: #ff9500; color: #b36800; }
.lst-ev-strip { display: flex; align-items: center; gap: 6px;
  overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px;
  -webkit-overflow-scrolling: touch; }
.lst-disclose > summary { list-style: none; cursor: pointer; }
.lst-disclose > summary::-webkit-details-marker { display: none; }
.lst-disclose-body { margin-top: 10px; border-top: 1px solid
  var(--hairline); padding-top: 10px; }
.lst-standout { position: relative; flex: 0 0 auto; }
.lst-standout .lst-thumb { width: 84px; height: 84px; }
.lst-badge { position: absolute; bottom: 6px; left: 4px; font-size: 9.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #fff; border-radius: 6px; padding: 1px 6px; }
.lst-badge.style { background: #0a84ff; }
.lst-badge.donor { background: #af52de; }
.lst-badge.crop { background: #ff9f0a; }
.lst-badge.design { background: #6e6e73; text-transform: none;
  letter-spacing: 0; max-width: calc(100% - 8px); overflow: hidden;
  white-space: nowrap; }
.lst-pick.lst-aside { opacity: 0.7; }
.lst-standout .lst-ref-x { top: -6px; right: -6px; }

/* tap-to-preview lightbox + hold-to-drag re-categorization */
.img-preview { border: 0; border-radius: 14px; padding: 8px;
  background: var(--card, #fff); max-width: min(94vw, 900px);
  /* centered in the VISIBLE viewport (owner 2026-09-01: UA-default modal
     centering + static vh opened it above the screen on mobile). inset:0
     + auto margins, NOT top/left 50% + transform: with `left: 50%` and
     `right: auto`, a shrink-to-fit dialog may only use the space from the
     midpoint to the right edge, so on a 412px phone the preview capped at
     206px — half the screen (owner 2026-09-01 "it is quite small now").
     fit-content is required, or inset:0 stretches it full-bleed. */
  position: fixed; inset: 0; margin: auto;
  width: fit-content; height: fit-content;
  max-height: 92dvh; }
.img-preview::backdrop { background: rgba(0, 0, 0, 0.55); }
/* the stage clips the zoomed picture (owner 2026-09-03); the img keeps
   its fit sizes — the zoom is a transform, so the layout never moves */
.lb-stage { position: relative; overflow: hidden; border-radius: 8px;
  line-height: 0; width: fit-content; max-width: 100%; touch-action: none;
  cursor: zoom-in; }
.img-preview img { max-width: 100%; max-height: 76dvh; display: block;
  border-radius: 8px; transform-origin: 0 0; will-change: transform;
  object-fit: contain; height: auto; transition: filter 200ms ease; }
.img-preview img.lb-loading { filter: blur(3px); }   /* the thumbnail, until the full file lands */
/* the group walk (owner 2026-09-03): swipe or edge-tap the picture; the
   chevrons live in the caption bar, nothing is drawn over the picture */
.img-preview-cap { padding: 6px 0 0; max-width: 100%; display: flex;
  align-items: center; justify-content: center; gap: 4px; }
.img-preview img { user-select: none;
  -webkit-user-select: none; -webkit-user-drag: none; }
.lb-zoom { background: none; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; font: inherit; font-size: 12px; font-weight: 700;
  padding: 0 10px; min-height: 30px; cursor: pointer; }
.lb-zoom[hidden] { display: none; }
.lb-text { flex: 1; min-width: 0; text-align: center; padding: 0 4px; }
.lb-prev, .lb-next { position: static; background: none; border: 0;
  color: var(--accent); font-size: 26px; line-height: 1; padding: 0 12px;
  min-width: 44px; min-height: 44px; cursor: pointer; border-radius: 22px; }
.lb-prev:hover, .lb-next:hover { background: rgba(10, 132, 255, 0.08); }
.lb-prev:disabled, .lb-next:disabled { opacity: 0.25; cursor: default;
  background: none; }
.lb-prev[hidden], .lb-next[hidden] { display: none; }
.lst-pick { touch-action: manipulation; cursor: pointer; }
.lst-pick img { -webkit-user-drag: none; user-select: none;
  -webkit-user-select: none; }
.lst-dragging { opacity: 0.35; }
.lst-ghost { position: fixed; z-index: 200; pointer-events: none;
  transform: scale(1.08); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  border-radius: 10px; }
.lst-ghost input { display: none; }
.lst-ghost img { width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; display: block; }
.lst-dropzone { min-height: 64px; border-radius: 10px;
  transition: outline-color 0.1s; outline: 2px dashed transparent;
  outline-offset: 3px; }
.lst-dropzone.lst-dropover { outline-color: var(--accent);
  background: rgba(10, 132, 255, 0.05); }
.lst-drop-hint { display: flex; align-items: center; justify-content:
  center; font-size: 11.5px; color: var(--text-dim); border: 1.5px
  dashed var(--hairline); border-radius: 10px; aspect-ratio: 1;
  min-height: 64px; }
.lst-wfield { margin: 8px 0; }
.lst-wfield label { display: block; font-size: 12px; font-weight: 600;
  color: var(--text-dim); margin-bottom: 3px; }
.lst-wfield input { width: 100%; }
/* htmx replaces this section wholesale on every filter change; Chrome's
   scroll anchoring then loses its anchor node and "compensates" ~1200px
   down. Excluding the subtree keeps the viewport where the user left it. */
#kpis { overflow-anchor: none; }

/* ---------- movements drill-down ---------- */
.mv-table td { vertical-align: top; }
.mv-table .mv-d { display: block; font-size: 11px; font-weight: 600; }
.mv-d.good { color: var(--ok); }
.mv-d.bad { color: var(--bad); }
.mv-d.neutral { color: var(--text-dim); }
.mv-trio { font-size: 12px; color: var(--text-dim); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.mv-account { font-weight: 650; background: var(--bg); }
.mv-name-campaign { padding-left: 26px !important; }
.mv-name-keyword { padding-left: 46px !important; }
.mv-btn { padding: 1px 8px; margin-right: 4px; }
.mv-btn.htmx-request { pointer-events: none; opacity: 0.45; }
.mv-actions { white-space: nowrap; }
.bid-chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 6px; background: var(--bg); white-space: nowrap; }
.bid-chip.over { background: rgba(255,69,58,.14); color: var(--bad); }
.bid-chip.room { background: rgba(48,209,88,.14); color: var(--ok); }
.bid-chip.inline { background: rgba(125,125,125,.12); color: var(--text-dim); }

/* ---------- attention findings ---------- */
.findings { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.finding { display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--hairline); border-left-width: 3px;
  border-radius: 10px; padding: 9px 12px; background: var(--bg); }
.finding.red { border-left-color: var(--bad); }
.finding.amber { border-left-color: var(--warn); }
.finding.green { border-left-color: var(--ok); }
.finding-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px;
  flex-shrink: 0; }
.finding.red .finding-dot { background: var(--bad); }
.finding.amber .finding-dot { background: var(--warn); }
.finding.green .finding-dot { background: var(--ok); }
.finding-body { flex: 1; min-width: 0; }
.finding-title { font-weight: 600; font-size: 14px; }
.finding-evidence { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; }
.finding-action { font-size: 12.5px; font-weight: 550; margin-top: 2px; }
.finding-btns { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
tr.mv-flash td { background: rgba(255, 214, 10, 0.22) !important;
  transition: background 400ms ease; }

/* ---------- Seller Studio suite (home + coming-soon landings) ---------- */
.suite-topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  position: sticky; top: 0; z-index: 40; min-height: 48px;
  background: rgba(247, 247, 247, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  padding: calc(4px + env(safe-area-inset-top, 0px)) 16px 4px;
}
.suite-mark {
  width: 30px; height: 30px; border-radius: 8px; justify-self: start;
  background: linear-gradient(160deg, #5e5ce6, #3634a3); color: #fff;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.suite-tenant { justify-self: center; font: inherit; font-weight: 600;
  font-size: 17px; letter-spacing: -0.02em; display: inline-flex;
  align-items: center; gap: 5px; background: none; border: none;
  padding: 8px 4px; color: var(--text); cursor: pointer;
  white-space: nowrap; }
.suite-topbar form { justify-self: end; }
.suite-topbar .nav-action { font: inherit; font-size: 15px;
  color: var(--accent); background: none; border: none; padding: 8px 0;
  cursor: pointer; }
.suite-shell { max-width: 680px; margin: 0 auto; padding: 28px 20px 60px; }
.suite-head h1 { font-size: 30px; letter-spacing: -0.02em; }
.suite-head { margin-bottom: 22px; }
.app-grid { display: flex; flex-direction: column; gap: 12px; }
.app-card {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--hairline); border-radius: 16px; padding: 16px 18px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.app-card.live:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.app-card:active { transform: scale(0.985); }
.app-card.soon { opacity: 0.78; }
.app-ico {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff; font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.app-ico.xl { width: 84px; height: 84px; border-radius: 20px;
  font-size: 32px; }
.app-meta { flex: 1; min-width: 0; }
.app-name { font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-desc { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.soon-pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-dim);
  background: rgba(125, 125, 125, 0.13); border-radius: 999px;
  padding: 2px 9px;
}
.soon-pill.big { font-size: 12.5px; padding: 5px 14px; margin-top: 10px;
  display: inline-block; }
.app-open { color: var(--accent); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.suite-foot { text-align: center; margin-top: 26px; display: block; }
/* desktop: the home is a LAUNCHER (Launchpad grammar) — centered grid of
   vertical tiles filling one viewport, not the phone's stacked list */
@media (min-width: 769px) {
  .suite-shell:not(.landing) {
    max-width: 960px; min-height: calc(100vh - 140px);
    display: flex; flex-direction: column; justify-content: center;
  }
  .suite-head { text-align: center; margin-bottom: 30px; }
  .suite-head h1 { font-size: 34px; }
  .app-grid { flex-direction: row; flex-wrap: wrap; justify-content: center;
    gap: 16px; }
  .app-card { flex: 0 1 292px; flex-direction: column; text-align: center;
    align-items: center; gap: 12px; padding: 28px 20px 22px; }
  .app-ico { width: 64px; height: 64px; border-radius: 16px; font-size: 24px; }
  .app-name { justify-content: center; }
  .app-open { margin-top: 2px; }
  .suite-foot { margin-top: 34px; }
}

.suite-shell.landing { display: flex; flex-direction: column; gap: 18px; }
.landing-hero { text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 6px; margin-top: 8px; }
.landing-hero h1 { font-size: 28px; margin-top: 8px; }
.landing-card .health-row { font-size: 14px; }

/* ================= MOBILE (iOS grammar), <= 768px ================= */
* { -webkit-tap-highlight-color: transparent; }

.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .shell { display: block; }

  .topbar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    position: sticky; top: 0; z-index: 40; min-height: 44px;
    background: rgba(247, 247, 247, 0.92);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.18);
    padding: calc(4px + env(safe-area-inset-top, 0px)) 16px 4px;
  }
  .topbar .brand-mark { width: 26px; height: 26px; border-radius: 6.5px;
    font-size: 11px; justify-self: start; }
  .topbar-tenant { font: inherit; font-weight: 600; font-size: 17px;
    letter-spacing: -0.02em; justify-self: center;
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; padding: 8px 4px; color: var(--text);
    cursor: pointer; }
  .topbar-tenant:active { opacity: 0.55; }
  .tenant-chev { width: 12px; height: 12px; color: var(--text-dim); }
  /* the switcher is summoned from the TOP bar title — it drops down from
     under it (Slack-workspace pattern), never rises from the bottom */
  .seller-sheet { margin: calc(54px + env(safe-area-inset-top, 0px)) auto auto; }
  .topbar form { justify-self: end; }
  .nav-action { font: inherit; font-size: 15px; color: var(--accent);
    background: none; border: none; padding: 8px 0; cursor: pointer; }

  .tabbar {
    display: flex; flex-direction: row; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(49px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(247, 247, 247, 0.92);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 0.5px solid rgba(0, 0, 0, 0.18);
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 1px; text-decoration: none;
    color: #8e8e93; font-size: 10px; font-weight: 500;
    letter-spacing: 0.01em;
  }
  .tab .tab-ico { width: 24px; height: 24px; display: block; }
  .tab.active { color: var(--accent); }
  .tab:active { opacity: 0.55; }

  .content { max-width: none; padding: 16px 14px 92px; }
  h1 { font-size: 26px; }
  .page-head { margin-bottom: 14px; }
  .section-title { margin: 22px 0 10px; }
  .card { padding: 14px; border-radius: 12px; }

  /* wide tables become finger-scrollable, layout intact */
  .result-table { display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .table-scroll { margin: 0 -14px; padding: 0 14px; }

  .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { padding: 10px 12px; }
  .tile-value { font-size: 17px; }

  .finding { flex-wrap: wrap; }
  .finding-btns { width: 100%; justify-content: flex-end; margin-top: 6px; }

  .chart-wrap, .chart-wrap svg, svg.chart { max-width: 100%; height: auto; }
  .chart-controls { gap: 4px; }
  .chip-toggle { padding: 5px 10px; }

  .btn { min-height: 44px; }                       /* the iOS touch minimum (owner 2026-09-09) */
  .btn.small { min-height: 44px; }
  .field input { min-width: 0; width: 100%; }      /* never 260px on a 362px card */
  input, select, textarea { font-size: 16px; }   /* stops iOS zoom-on-focus */

  /* no content may ever widen the layout viewport (drags fixed bars).
     clip, not hidden: hidden turns body into a scroll container, which
     silently kills position:sticky on the topbar (hidden stays as the
     fallback for pre-clip browsers) */
  html, body { overflow-x: hidden; overflow-x: clip; }

  /* products: page head stacks — title block full-width, then a tools row
     with the search pill growing and the button fitting beside it */
  .head-row { flex-wrap: wrap; }
  .head-row > div:first-child { flex: 1 1 100%; }
  .head-tools { width: 100%; gap: 8px; }
  .search-field, .search-field:focus-within { flex: 1; width: auto; min-width: 0; }

  /* products: summary wraps — identity line, then stats + See details */
  .product-summary { flex-wrap: wrap; padding: 14px 16px; row-gap: 10px; }
  .sum-main { min-width: 0; }
  .sum-kpi { width: 100%; padding-left: 28px; gap: 14px; align-items: center; }
  .sum-kpi .detail-btn { margin-left: auto; }
  .badge { font-size: 10px; }

  .product-body { padding: 4px 16px 18px; }
  .step { min-width: 64px; }
  .kpi-row { gap: 14px; padding: 10px 12px; }
  .detail-top { padding: 16px 16px 12px; }
  .detail-scroll { padding: 12px 16px 18px; }

  /* phase-1 stepper: action rows stack — full-width tappable buttons,
     hints on their own line, PIN field full-width; the pill radius becomes
     a continuous 12px so wrapped labels don't render as circle blobs */
  .duty-run { flex-wrap: wrap; gap: 8px; }
  .duty-run .btn { flex: 1 1 100%; text-align: center; border-radius: 12px;
                   white-space: normal; }
  .duty-run .hint, .camp-actions .hint { flex-basis: 100%; }
  .duty-run .pin-inline, .camp-actions .pin-inline { flex: 1 1 100%; width: auto; }
  .camp-actions .btn.primary { flex: 1 1 100%; text-align: center;
                               border-radius: 12px; }
  .p1-detail, .p1-step .duty-run, .p1-indent, .econ-form { margin-left: 0; }
  .p1-step { padding: 12px 12px; }
  .prop-row { grid-template-columns: 1fr; gap: 2px; }
  .econ-form .field { flex: 1 1 100%; }
  .econ-form .field input { width: 100%; min-width: 0; }

  /* calendar: Google-Calendar-style month view */
  .cal-card { padding: 8px 6px 10px; }
  .cal-day { min-height: 52px; padding: 1px 2px 3px; gap: 2px; }
  .cal-chip { font-size: 8px; line-height: 1.5; padding: 0 3px;
    border-left-width: 2px; border-radius: 3px; }
  .day-num { font-size: 10px; padding: 0 3px; }
  .cal-dow { font-size: 0; padding: 4px 0 2px; text-align: center; }
  .cal-dow::first-letter { font-size: 11px; }
  .cal-month { min-width: 104px; font-size: 15px; }
  .cal-head { gap: 8px; }
  .cal-dialog { width: 94vw; max-height: 80vh; overflow-y: auto;
    margin-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* suite home: tighter springboard so the 5 apps fit one screen */
  .suite-shell { padding: 14px 14px 24px; }
  .suite-head { margin-bottom: 12px; }
  .suite-head h1 { font-size: 23px; }
  .suite-head .subtitle { font-size: 13px; }
  .app-grid { gap: 9px; }
  .app-card { padding: 12px 14px; border-radius: 14px; gap: 12px; }
  .app-ico { width: 46px; height: 46px; border-radius: 12px; font-size: 17px; }
  .app-name { font-size: 15.5px; }
  .app-desc { font-size: 12.5px; }
  .suite-foot { margin-top: 14px; font-size: 11px; }

  .daytype-banner { flex-wrap: wrap; padding: 12px 14px; }
  .onboard-shell { padding: 24px 16px 60px; }
  .cal-dialog { padding: 14px 16px; }
}

/* ---------- Listing Studio: generation studio (step 5) ---------- */
/* the image board as a list (owner 2026-09-03): preview · body · order */
.gen-rows { display: flex; flex-direction: column; gap: 8px; }
.gen-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--hairline); background: var(--bg-elev);
  box-shadow: var(--shadow); min-width: 0; }
.gen-row-thumb { width: 56px; height: 56px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--hairline); cursor: zoom-in;
  background: #fff; }
.gen-row-thumb.empty { display: flex; align-items: center; justify-content: center;
  border-style: dashed; color: var(--text-dim); font-weight: 700; cursor: default; }
.gen-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0;
  text-decoration: none; color: var(--text); }
.gen-row-n { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.gen-row-order { display: flex; gap: 6px; align-items: center; font-size: 11px;
  white-space: nowrap; }
.gen-row-order .btn.small { padding: 2px 10px; min-height: 30px; }
.gen-row-order .ctl-select { font-size: 12px; padding: 4px 6px; }
.gen-row.done { border-color: rgba(48, 209, 88, 0.5); }
.gen-row.done .gen-chip-state { color: var(--ok); font-weight: 600; }
.gen-row.review { border-color: rgba(10, 132, 255, 0.4); }
.gen-row.review .gen-chip-state { color: var(--accent); }
.gen-row.backup { border-color: rgba(255, 159, 10, 0.5); }
.gen-row.backup .gen-chip-state { color: var(--warn); font-weight: 600; }
/* the drag handle (owner 2026-10-08): the one affordance that says "this list reorders"; touch-action none so the
   finger moves the row, not the page */
.gen-row-handle { grid-column: 3; grid-row: 1; width: 44px; min-height: 44px; border: 0; background: none; color: var(--text-dim);
  font-size: 24px; line-height: 1; cursor: grab; touch-action: none; border-radius: 10px; }
.gen-row-handle:active { cursor: grabbing; }
.gen-row-handle:focus-visible { outline: 2px solid var(--accent); }
.gen-row.dragging { border-color: var(--accent); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); transform: scale(1.015); position: relative; z-index: 2; }
.gen-rows.reorder-live .gen-row { transition: transform .08s ease; }
.gen-rows.reorder-live { user-select: none; -webkit-user-select: none; }
@media (max-width: 640px) {
  .gen-row { grid-template-columns: 56px minmax(0, 1fr) 44px; }
  .gen-row-order { grid-column: 2; }
  .gen-row-order .btn.small { min-height: 34px; }
  .gen-row-order.hint { grid-column: 2 / 4; }
}
.gen-chip-label { font-size: 13px; font-weight: 600; }
.gen-chip-state { font-size: 11px; color: var(--text-dim); }

.gen-ctx { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gen-ctx-chip { font-size: 11.5px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 9px; }
/* the brief's reference strip WRAPS (owner 2026-09-24: on the phone a captioned tile grew to its caption's
   width, the rest ran off the screen and the strip's sideways scroll was invisible); the picker's rows
   (.gen-pool) keep scrolling sideways */
.gen-refstrip { display: flex; flex-wrap: wrap; gap: 8px 10px; overflow: visible;
  padding-bottom: 4px; margin-bottom: 8px; }
.gen-refstrip.gen-pool { flex-wrap: nowrap; gap: 6px; overflow-x: auto; }
.gen-refstrip img { height: 64px; width: 64px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--hairline); cursor: zoom-in;
  flex: 0 0 auto; }
/* a tile with Claude's reason under it: a fixed column, the picture across it, the words in three lines */
.gen-refstrip > .gen-ref-tile:has(.gen-ref-why) { width: 108px; }
.gen-refstrip > .gen-ref-tile:has(.gen-ref-why) img { width: 108px; height: 72px; }
.gen-prompt { white-space: pre-wrap; font-size: 12px; line-height: 1.55;
  background: var(--bg); border-radius: 10px; padding: 10px 12px;
  max-height: 300px; overflow-y: auto; }

/* minmax(0, 1fr) + min-width: 0 on the card: a grid item's default
   min-width is its content, and the take strip (four 132px tiles) made
   the phone column 580px wide in a 372px viewport (owner 2026-09-02:
   "not rendering properly on mobile" - clipped page, zoomed image) */
.gen-duel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px; }
@media (min-width: 900px) {
  /* 220px, not 260: four duel cards fit one row from 900px (a fourth
     model joined the arena 2026-09-01) */
  .gen-duel { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
.gen-duel-card { border: 1px solid var(--hairline); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-elev); box-shadow: var(--shadow);
  min-width: 0; overflow: clip; }
.gen-duel-card .gen-quadrow { margin: 0 -10px; padding: 6px 10px; }
.gen-duel-card > img { width: 100%; border-radius: 8px; cursor: zoom-in; }
.gen-duel-meta { display: flex; align-items: baseline; gap: 8px;
  justify-content: space-between; flex-wrap: wrap; }   /* a phone stacks the extras */
.gen-duel-meta > strong { flex: 0 0 auto; }
.gen-duel-meta > .gen-textfix-line, .gen-duel-meta > .gen-before { flex-basis: 100%; }
.gen-failure { font-size: 12px; color: var(--warn); line-height: 1.4; }

.gen-current { display: flex; gap: 14px; align-items: flex-start; }
.gen-current > img { width: 46%; max-width: 380px; border-radius: 10px;
  cursor: zoom-in; border: 1px solid var(--hairline); }
.gen-current-side { flex: 1; display: flex; flex-direction: column;
  gap: 10px; min-width: 0; max-width: 100%; }
.gen-fix { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-fix input { flex: 1 1 220px; min-width: 0; }

.gen-filmstrip { display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 6px; }
.gen-frame { flex: 0 0 108px; display: flex; flex-direction: column;
  gap: 4px; }
.gen-frame img { width: 108px; height: 108px; object-fit: cover;
  border-radius: 8px; border: 2px solid transparent; cursor: zoom-in; }
.gen-frame.current img { border-color: var(--accent); }
.gen-frame-meta { display: flex; align-items: center;
  justify-content: space-between; font-size: 11px;
  color: var(--text-dim); font-weight: 600; }
.gen-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  background: var(--text-dim); }
.gen-dot.keep { background: var(--ok); }
.gen-dot.discard { background: var(--bad); }

@media (max-width: 640px) {
  .gen-duel { grid-template-columns: minmax(0, 1fr); }
  .gen-current { flex-direction: column; }
  .gen-current > img { width: 100%; max-width: none; }
}

/* variant adaptation rows */
.gen-adapt-row { display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--hairline);
  /* always wrap: the row carries a .gen-job-out with flex-basis 100%
     for the job output; on a nowrap row it claimed the whole width
     and squeezed the caption to one word per line (2026-09-01) */
  flex-wrap: wrap; }
.gen-adapt-row:first-of-type { border-top: 0; }
.gen-adapt-truth, .gen-adapt-render { width: 56px; height: 56px;
  object-fit: cover; border-radius: 8px; border: 1px solid var(--hairline);
  cursor: zoom-in; flex: 0 0 auto; }
.gen-adapt-render { width: 72px; height: 72px; }
.gen-adapt-main { flex: 1; min-width: 0; display: flex;
  flex-direction: column; gap: 4px; }
.gen-adapt-actions { display: flex; flex-direction: column; gap: 6px;
  flex: 0 0 auto; }
.gen-job-out { flex-basis: 100%; }
.gen-job-out .job { margin-top: 4px; }
/* "one model" beside the duel (owner 2026-09-03): a select and a pill */
.gen-one-model { display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap; max-width: 100%; }
.gen-one-model .ctl-select { max-width: 100%; min-width: 0; }
.gen-textfix { display: inline-block; max-width: 100%; }
/* the iOS action sheet and the toast (owner 2026-09-03) */
.nav-more { font: inherit; font-size: 18px; letter-spacing: 1px; background: none; border: 0;
  color: var(--accent); cursor: pointer; padding: 4px 8px; vertical-align: middle; }
.ios-sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; border: 0;
  background: transparent; width: min(560px, calc(100vw - 16px));
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); color: var(--text); }
.ios-sheet::backdrop { background: rgba(0, 0, 0, 0.4); }
.ios-sheet-group { background: var(--bg-elev); border-radius: 14px; overflow: auto;
  max-height: 86dvh; margin-top: 8px; box-shadow: var(--shadow); }   /* a tall sheet scrolls inside itself (2026-09-09) */
.ios-sheet-head { padding: 14px 16px 12px; text-align: center; border-bottom: 1px solid var(--hairline); }
.ios-sheet-title { font-weight: 600; font-size: 17px; color: var(--text); }
.ios-sheet .field { padding: 6px 16px; }
.ios-sheet .field label { color: var(--text); }
.ios-sheet .sheet-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--text); }
.ios-sheet textarea { font: inherit; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--bg); width: 100%; }
dialog.ios-sheet form.htmx-request button { pointer-events: none; }   /* the same freeze as main.content */
.ios-sheet-msg { font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }
.ios-sheet-action { margin: 0; }
.ios-sheet-btn { display: block; width: 100%; min-height: 56px; font: inherit; font-size: 20px;
  background: none; border: 0; color: var(--accent); cursor: pointer; }
.ios-sheet-btn:active { background: rgba(125, 125, 125, 0.12); }
.ios-sheet-btn.destructive { color: #ff453a; }
.ios-sheet-btn.cancel { font-weight: 600; }
@media (min-width: 700px) {
  .ios-sheet { inset: 0; margin: auto; width: 320px; height: fit-content; }
}
.toast { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: rgba(28, 28, 30, 0.96); color: #fff; padding: 12px 18px; border-radius: 999px;
  display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 24px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); animation: toast-in 250ms ease; font-size: 14px; }
.toast.gone { opacity: 0; transition: opacity 300ms ease; }
.toast-undo { margin: 0; }
.toast-btn { background: none; border: 0; color: #6cb6ff; font: inherit; font-weight: 700;
  cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.lst-archives { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lst-archive-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; }
.gen-keep { display: flex; flex-direction: column; gap: 6px; }
.gen-keep input[name=override_reason] { font: inherit; padding: 8px 10px;
  border: 1px solid var(--hairline); border-radius: 10px; min-width: 0; }
/* the text tools (phase 4): look, fix what is ticked, place the logo */
.gen-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gen-detect { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.gen-detect-img { width: 100%; max-width: 420px; border-radius: 10px;
  border: 1px solid var(--hairline); cursor: zoom-in; }
.gen-detect-list { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 4px; }
.gen-detect-list label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.gen-detect-n { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 6px;
  color: #fff; font-size: 12px; text-align: center; }
.gen-detect-n.bad { background: #ff453a; }
.gen-detect-n.ok { background: var(--accent); }
.gen-detect-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gen-frame-quad { position: absolute; inset: 0; }   /* the logo-frame overlay — was `.gen-quad`, colliding with the contact-sheet tile (2026-09-09) */
.gen-frame-quad[hidden] { display: none; }
.gen-quad-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gen-quad-svg polygon { fill: rgba(10, 132, 255, 0.12); stroke: var(--accent);
  stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: auto; cursor: move;
  touch-action: none; }
.gen-handle { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 13px; background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); cursor: grab; touch-action: none; }
.gen-logo-panel { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.gen-logo-panel[hidden] { display: none; }
.gen-logo-form, .gen-logo-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gen-textfix-line { color: var(--accent); }
.gen-before { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.gen-before img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--hairline); cursor: zoom-in; }
.gen-textfix .btn { white-space: normal; }
@media (max-width: 640px) {
  .gen-adapt-row { flex-wrap: wrap; }
  .gen-adapt-actions { flex-direction: row; width: 100%; flex-wrap: wrap; }
  /* the round buttons carry a model + cost label (2026-09-03): on a
     phone a pill wraps its words rather than pushing past the edge */
  .gen-adapt-actions form, .gen-adapt-actions .btn,
  .gen-ctx .btn { min-width: 0; max-width: 100%; white-space: normal;
    text-align: center; }
  .gen-ctx > div[style*="margin-left:auto"] { flex-basis: 100%;
    margin-left: 0 !important; }
}

/* reference amendment tiles (brief editor) */
.gen-ref-tile { position: relative; flex: 0 0 auto; }
.gen-ref-tile img { display: block; }
.gen-ref-tile.added img { border-color: var(--accent); border-width: 2px; }
.gen-ref-tile.inlist img { opacity: 0.45; }
.gen-ref-x { position: absolute; top: -6px; right: -6px; width: 20px;
  height: 20px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--bg-elev); color: var(--text-dim); font-size: 11px;
  line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.gen-ref-x:hover { color: var(--bad); }
.gen-ref-x.add:hover { color: var(--ok); }
.gen-pool-group { margin-bottom: 4px; }

/* before/after compare on fix turns */
.gen-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: 58%; max-width: 520px; flex: 0 0 auto; }
.gen-compare figure { margin: 0; }
.gen-compare img { width: 100%; border-radius: 10px;
  border: 1px solid var(--hairline); cursor: zoom-in; }
.gen-compare figure:last-child img { border-color: var(--accent);
  border-width: 2px; }
.gen-compare figcaption { font-size: 11.5px; font-weight: 600;
  color: var(--text-dim); margin-top: 4px; line-height: 1.35; }
@media (max-width: 640px) {
  .gen-compare { width: 100%; max-width: none; }
}

/* fix-with-reference picker */
.gen-fixref { position: relative; flex: 0 0 auto; cursor: pointer; }
.gen-fixref input { position: absolute; opacity: 0; pointer-events: none; }
.gen-fixref img { height: 56px; width: 56px; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--hairline); display: block; }
.gen-fixref input:checked + img { border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.25); }

/* contact-sheet review: per-model rows of four concepts */
.gen-sheetrow { padding: 8px 0; border-top: 1px solid var(--hairline); }
.gen-sheetrow:first-of-type { border-top: 0; }
.gen-quadrow { display: flex; gap: 10px; overflow-x: auto;
  padding: 6px 0; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.gen-quad { position: relative; flex: 0 0 132px; display: flex;
  flex-direction: column; gap: 5px; scroll-snap-align: start; }
.gen-quad img { width: 132px; height: 132px; object-fit: cover;
  border-radius: 10px; border: 2px solid var(--hairline);
  cursor: zoom-in; }
.gen-quad.best img { border-color: var(--accent); }
.gen-quad.bad img { opacity: 0.5; }
.gen-quad-star { position: absolute; top: -6px; right: -4px;
  font-size: 14px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.gen-quad .btn { width: 100%; }
@media (max-width: 640px) {
  .gen-quad { flex-basis: 104px; }
  .gen-quad img { width: 104px; height: 104px; }
  /* the full sentence is in the button's title and the judge chips */
  .gen-quad .gen-failure { display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; }
}

/* submitting form: freeze buttons + busy cue (live miss 2026-09-01:
   "Fix it" gave no feedback and got double-clicked) */
main.content form.htmx-request button,
main.content form.htmx-request .btn {
  pointer-events: none; }
main.content form.htmx-request button:not([type="submit"]),
main.content form.htmx-request .btn:not([type="submit"]) { opacity: 0.45; }
/* the submit button is the activity indicator (owner 2026-09-03): full
   opacity, its busy phrase, a spinning ring at its right */
main.content form.htmx-request button[type="submit"] { opacity: 1; }
main.content form.htmx-request button[type="submit"]::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: spin 700ms linear infinite; }
main.content form.htmx-request button[type="submit"] .hint { display: none; }
main.content button.is-busy { pointer-events: none; opacity: 1; }
main.content button.is-busy::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-wait { padding: 10px 0; color: var(--text-dim); font-size: 13px; display: none; }
.gen-wait.htmx-request { display: flex; align-items: center; gap: 8px; }
.gen-wait::before { content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent); border-right-color: transparent;
  animation: spin 700ms linear infinite; flex: 0 0 auto; }
main.content button:disabled {
  opacity: 0.45; pointer-events: none; }

/* text inputs across the listing wizard/studio — same soft language as
   the pill buttons (owner 2026-09-01: raw browser inputs read as
   unfinished) */
.gen-fix input,
.gen-adapt-actions input,
.lst-wfield input,
.lst-slot-row input:not([type]),
.lst-items input {
  font: inherit; font-size: 14px;
  padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--bg); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.gen-fix input:focus,
.gen-adapt-actions input:focus,
.lst-wfield input:focus,
.lst-slot-row input:focus,
.lst-items input:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}
.gen-fix input::placeholder { color: var(--text-dim); }

/* ---------- settings: spend meter (2026-09-01) ---------- */
.spend-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.spend-tile { min-width: 0; }
.spend-tile .tile-value { font-variant-numeric: tabular-nums; }
.spend-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.spend-body { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.spend-ring { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.spend-ring circle { fill: none; stroke-width: 5; }
.spend-ring .track { stroke: var(--hairline); }
.spend-ring .arc {
  stroke: var(--ok); stroke-linecap: round;
  transition: stroke-dashoffset 400ms ease;
}
.spend-ring .arc.warn { stroke: var(--warn); }
.spend-prov {
  font-size: 12.5px; color: var(--text-dim); margin-top: 8px;
  line-height: 1.45;
}
.spend-fail { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; }
.spend-fail.current { color: var(--warn); font-weight: 500; }
.spend-foot { margin-top: 10px; }
.spend-skeleton {
  height: 96px; border-radius: 12px; background: var(--hairline);
  opacity: .5;
}
.state-chip.bad { background: rgba(255, 69, 58, 0.15); color: var(--bad); }
.state-chip.warnc { background: rgba(255, 159, 10, 0.15); color: var(--warn); }

/* ---------- settings: arena leaderboard (2026-09-01) ---------- */
.arena-wrap { overflow-x: auto; }
.arena-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.arena-table th {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .04em; text-align: right;
  padding: 6px 8px; border-bottom: 1px solid var(--hairline);
}
.arena-table th:first-child, .arena-table th.arena-status-h,
.arena-table td.arena-name, .arena-table td.arena-status { text-align: left; }
.arena-table td {
  padding: 7px 8px; border-bottom: 1px solid var(--hairline);
  text-align: right; white-space: nowrap;
}
.arena-table td.lead { color: var(--ok); font-weight: 650; }
.arena-of { color: var(--text-dim); font-weight: 400; }
.arena-off { color: var(--text-dim); margin-left: 2px; }
.arena-table tr.arena-facet td { color: var(--text-dim); }
.arena-table tr.arena-facet td.arena-name::before { content: '\21B3  '; }
.arena-table tr.arena-overall td {
  border-top: 2px solid var(--hairline); font-weight: 600;
}
.arena-why { display: block; white-space: normal; max-width: 340px; margin-top: 2px; }
/* the arena as rows (2026-09-09): the why is text on every width */


/* ---------- studio: main-safe sheet quadrant chips (2026-09-02) ---------- */
.gen-quad-chips { font-size: 11.5px; margin-top: 4px; line-height: 1.35; }
.gen-quad-chips span { color: var(--warn); font-weight: 600; }


/* ---------- studio: mark the spot (2026-09-02) ---------- */
.gen-imgwrap { position: relative; display: block; overflow: hidden;
  border-radius: 10px; line-height: 0; }
.gen-imgwrap > img { display: block; width: 100%; }
.gen-current > .gen-imgwrap { width: 46%; max-width: 380px; flex: 0 0 auto; }
.gen-current > .gen-imgwrap > img { border-radius: 10px; cursor: zoom-in;
  border: 1px solid var(--hairline); box-sizing: border-box; }
.gen-mark { position: absolute; inset: 0; pointer-events: none; }
.gen-imgwrap.marking .gen-mark { pointer-events: auto; touch-action: none;
  cursor: crosshair; }
.gen-imgwrap.marking::after { content: 'drag a box'; position: absolute;
  top: 8px; left: 8px; font: 600 11px/1.4 -apple-system, system-ui, sans-serif;
  background: rgba(0,0,0,.62); color: #fff; padding: 2px 8px;
  border-radius: 999px; pointer-events: none; }
.gen-box { position: absolute; border: 2px solid #ff453a; border-radius: 3px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.28); pointer-events: none; }
.gen-mark-chip { font-size: 12px; color: var(--text); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 4px 6px 4px 10px; display: inline-flex; align-items: center;
  gap: 6px; line-height: 1.2; }
.gen-mark-chip button { border: 0; background: transparent; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 3px; color: var(--text-dim); }
@media (max-width: 640px) {
  .gen-current > .gen-imgwrap { width: 100%; max-width: none; }
}
.gen-mark-chip[hidden] { display: none; }
.gen-box.snapped { border-radius: 10px; }

/* the model choice of a tool round (owner 2026-09-04) */
.model-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: 6px; font-size: 13px; }
.model-pick .pick-opt { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.model-pick .ctl-select { max-width: 200px; }
.gen-erase-pick { display: inline-flex; align-items: center; }

/* the render kept so far, while a new round is under review (owner 2026-09-04) */
.gen-adapt-render.kept { opacity: .8; outline: 2px dashed var(--line); outline-offset: 2px; }

/* a mirrored variant (owner 2026-09-04): the source's images as a strip */
.gen-mirror-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.gen-mirror-strip img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hairline); }
.gen-same-as { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }

/* the plan B main row of a variant (owner 2026-09-04) */
.gen-adapt-planb { border-left: 3px solid var(--ok); padding-left: 8px; }

/* steps 6 + 7 (owner 2026-09-04) */
.pub-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pub-row { border-left: 3px solid var(--ok); padding: 4px 0 4px 10px; }
.pub-row.bad { border-left-color: var(--bad); }
.pub-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pub-slot { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip-bg, #eef); }
.pub-slot.bad { background: #fde8e8; }
.pub-go { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.pub-after { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }

/* links out of a result (owner 2026-09-04: open the listing) */
.result-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* monthly funnel verdicts (2026-09-07) */
.verdict { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 7px;
  border-radius: 999px; background: rgba(118, 118, 128, 0.14); }
.verdict.growing, .verdict.in, .verdict.recommended { background: rgba(48, 209, 88, 0.16); color: #1a7f37; }
.verdict.breakeven, .verdict.borderline, .verdict.needs-human, .verdict.unvetted { background: rgba(255, 159, 10, 0.16); color: #9a5b00; }
.verdict.eroding, .verdict.out { background: rgba(255, 69, 58, 0.14); color: #b3261e; }
.verdict.no-economics { background: rgba(118, 118, 128, 0.14); color: var(--text-dim); }


/* ---------- the routine flow, one status language (owner 2026-09-07) ---------- */
.rt-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: rgba(118, 118, 128, 0.14); color: var(--text-dim); }
.rt-pill.sm { font-size: 11px; padding: 2px 7px; margin-right: 6px; }
.rt-pill.scheduled { background: transparent; border: 1px solid rgba(118, 118, 128, 0.35); }
.rt-pill.building, .rt-pill.applying { background: rgba(10, 132, 255, 0.14); color: #0a5ec2; }
.rt-pill.approve, .rt-pill.partial { background: rgba(255, 159, 10, 0.18); color: #9a5b00; }
.rt-pill.done { background: rgba(48, 209, 88, 0.18); color: #1a7f37; }
.rt-pill.failed { background: rgba(255, 69, 58, 0.14); color: #b3261e; }
.rt-pill.pending { background: transparent; border: 1px dashed rgba(118, 118, 128, 0.4); }

.rt-head .rt-head-line { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.rt-head .subtitle { margin: 0; }
.rt-steps { display: flex; align-items: flex-start; gap: 0; margin: 16px 0 4px; max-width: 560px; }
.rt-steps.compact { margin: 8px 0 4px; }
.rt-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.rt-step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 13px; background: rgba(118, 118, 128, 0.14);
  color: var(--text-dim); transition: background 200ms ease; }
.rt-step.done .rt-step-dot { background: var(--ok); color: #fff; }
.rt-step.active .rt-step-dot { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18); }
.rt-step.active.done .rt-step-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.2); }
.rt-step.warn .rt-step-dot { background: var(--warn); color: #fff; box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.2); }
.rt-step-name { font-size: 12px; font-weight: 600; color: var(--text-dim); text-align: center; }
.rt-step.active .rt-step-name { color: var(--text); }
.rt-step-at { font-size: 11px; color: var(--text-dim); min-height: 14px; font-variant-numeric: tabular-nums; }
.rt-step-line { flex: 1; height: 2px; background: var(--hairline); margin: 13px 2px 0; min-width: 14px; }
.rt-step-line.done { background: var(--ok); }

.rt-ring { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.rt-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.rt-ring circle { fill: none; stroke-width: 3.5; }
.rt-ring-track { stroke: rgba(118, 118, 128, 0.18); }
.rt-ring-bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 400ms ease; }
.rt-ring.done .rt-ring-bar, .rt-ring.done span { stroke: var(--ok); color: #1a7f37; }
.rt-ring.partial .rt-ring-bar, .rt-ring.approve .rt-ring-bar { stroke: var(--warn); }
.rt-ring.failed .rt-ring-bar, .rt-ring.failed span { stroke: var(--bad); color: #b3261e; }
.rt-ring.scheduled .rt-ring-bar, .rt-ring.pending .rt-ring-bar { stroke: transparent; }
.rt-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: -0.02em; }
.rt-ring span em { font-style: normal; font-weight: 500; color: var(--text-dim); }
.rt-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(10, 132, 255, 0.25);
  border-top-color: var(--accent); animation: rt-spin 0.9s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }

.rt-card { background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px 16px 14px; margin-bottom: 12px; }
.rt-card.warn-card { border-color: var(--warn); }
.rt-card-head { display: flex; align-items: center; gap: 12px; }
.rt-card-titles { flex: 1; min-width: 0; }
.rt-card-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rt-card-sub { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; }
.rt-status.done { border-color: rgba(48, 209, 88, 0.45); }
.rt-status.partial, .rt-status.approve { border-color: rgba(255, 159, 10, 0.55); }
.rt-status.failed { border-color: rgba(255, 69, 58, 0.5); }
.rt-live { margin-top: 12px; }
.rt-fail-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: #b3261e; margin-top: 14px; }
.rt-fail-list { margin: 6px 0 0 18px; font-size: 14px; }
.rt-fail-list li { margin: 4px 0; }
.rt-pending-hint { margin-top: 10px; }
.rt-empty .rt-card-sub { margin-top: 6px; }

.rt-list { margin: 4px 0 18px; }
.rt-group { background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; }
.rt-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none;
  color: var(--text); border-top: 1px solid var(--hairline); transition: background 120ms ease; }
.rt-row:first-child { border-top: 0; }
.rt-row:active { background: rgba(118, 118, 128, 0.08); }
.rt-row-titles { flex: 1; min-width: 0; }
.rt-row-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.rt-row-detail { font-size: 13px; color: var(--text-dim); margin-top: 1px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.rt-chevron { color: #c7c7cc; font-size: 22px; line-height: 1; }

.rt-mark { width: 44px; white-space: nowrap; }
.rt-mark input { margin-right: 4px; }
.rt-ok { color: #1a7f37; font-weight: 700; }
.rt-warn { color: #9a5b00; font-weight: 700; }
.rt-todo { color: #9a5b00; }
tr.rt-row-done td { color: var(--text-dim); }
tr.rt-row-done td strong { font-weight: 500; }
.rt-section:not(.show-done) tr.rt-row-done { display: none; }
.rt-sec-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rt-sec-counts { display: inline-flex; gap: 8px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.rt-toggle-done { font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); background: none;
  border: 0; cursor: pointer; padding: 0; text-transform: none; letter-spacing: 0; margin-left: auto; }
.rt-section.show-done .rt-toggle-done::after { content: " ▴"; }
.rt-section:not(.show-done) .rt-toggle-done::after { content: " ▾"; }

.rt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg-elev);
  border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px;
  margin-bottom: 12px; position: sticky; bottom: 12px; z-index: 5; }
.rt-bar .btn.primary { min-height: 44px; font-size: 15px; }
.rt-bar .btn:disabled { opacity: 0.45; cursor: default; }
.rt-bar-hint { flex-basis: 100%; }
.rt-rebuild { padding-top: 12px; }

.rt-progress { margin: 0 0 12px; background: var(--bg-elev); border: 1px solid rgba(10, 132, 255, 0.35);
  border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; }
.rt-progress.done { border-color: rgba(48, 209, 88, 0.45); }
.rt-progress.partial { border-color: rgba(255, 159, 10, 0.55); }
.rt-progress.failed { border-color: rgba(255, 69, 58, 0.5); }
.rt-progress-head { display: flex; align-items: center; gap: 12px; }
.rt-progress-title { font-size: 16px; font-weight: 600; }
.rt-checks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); }
.rt-checks li.done { color: var(--text); }
.rt-checks li.active { color: var(--text); font-weight: 600; }
.rt-check-ic { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; background: rgba(118, 118, 128, 0.12); }
.rt-checks li.done .rt-check-ic { background: var(--ok); color: #fff; }
.rt-checks li.active .rt-check-ic { background: var(--accent); color: #fff; animation: pulse 1.2s infinite; }
.rt-events { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--hairline);
  font-size: 12.5px; color: var(--text-dim); display: flex; flex-direction: column; gap: 3px; max-height: 180px; overflow: auto; }
.rt-events li.bad { color: #b3261e; }

@media (max-width: 768px) {
  .rt-steps { max-width: none; }
  .rt-step { min-width: 0; flex: 1; }
  .rt-step-name { font-size: 11px; }
  .rt-bar { position: fixed; left: 8px; right: 8px; bottom: calc(57px + env(safe-area-inset-bottom, 0px));
    margin: 0; border-radius: 18px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.92); }
  .rt-bar .pin-inline { flex: 1; width: auto; }
  .rt-bar .btn.primary { flex: 1; }
  .rt-bar-hint { display: none; }
  .rt-form { padding-bottom: 96px; }
  .rt-card { padding: 14px 12px 12px; border-radius: 14px; }
}

/* ---- start from the live gallery (owner 2026-09-07): one status language, indigo = live on Amazon ---- */
.rt-pill.live { background: rgba(94, 92, 230, 0.14); color: #3f3dbd; }
.gen-row.live { border-color: rgba(94, 92, 230, 0.45); }
.gen-row.live .gen-chip-state { color: #3f3dbd; font-weight: 600; }
.gen-row.flagged .gen-chip-state { color: #b45309; }
.gen-ctx-chip.live { border-color: #5e5ce6; color: #3f3dbd; }
.lst-live-strip { align-items: flex-start; }
.lst-live-tile { position: relative; flex: 0 0 auto; }
.lst-thumb-pos { position: absolute; top: 4px; left: 4px; font-size: 10px; font-weight: 700;
  color: #fff; background: rgba(0, 0, 0, 0.55); border-radius: 6px; padding: 1px 5px; pointer-events: none; }
.lst-thumb.live { border-color: #5e5ce6; border-width: 2px; }
.lst-thumb.reworked { border-color: var(--ok, #34c759); border-width: 2px; }
.lst-live-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; }
.lib-tile-live { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700;
  color: #fff; background: #5e5ce6; border-radius: 6px; padding: 1px 6px; }
.ios-sheet-btn.primary { font-weight: 600; }
a.ios-sheet-btn { display: block; text-align: center; text-decoration: none; }
.regen-note { border-left-color: #5e5ce6; }

/* ---- per-variation live galleries (owner 2026-09-08): every variation's images, as the main's ---- */
.lst-var-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 12px; align-items: start;
  padding: 6px 0; border-top: 1px solid var(--hairline, rgba(60, 60, 67, 0.18)); }
.lst-var-row:first-of-type { border-top: 0; }
.lst-var-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; padding-top: 10px; }
.lst-var-name { font-weight: 650; }
.lst-var-row .lst-strip { min-width: 0; }
.lst-thumb.filled { border-color: #ff9f0a; border-width: 2px; }
.lst-thumb.advisory { border-color: #ff9f0a; border-width: 2px; border-style: dashed; }
.lst-thumb.shared { opacity: 0.55; }
.lst-thumb.missing { border-style: dashed; background: var(--bg, #f5f5f7); }
.rt-pill.advisory { background: transparent; border: 1px solid rgba(255, 159, 10, 0.7); color: #9a5b00; }
.lib-var-label { font-size: 13px; font-weight: 600; margin: 8px 0 2px; }
.lib-tile-live.filled { background: #ff9f0a; }
.gen-adapt-truth.empty { display: flex; align-items: center; justify-content: center;
  background: var(--bg, #f5f5f7); color: var(--text-dim, #8e8e93); font-size: 12px; font-weight: 700; cursor: default; }
@media (max-width: 640px) { .lst-var-row { grid-template-columns: 1fr; } }

.lst-thumb.unapproved { border-color: #ff9f0a; border-width: 2px; border-style: dotted; }

/* ---- sets, the Drive library, experiments (owner 2026-09-08) ---- */
.lst-sets { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lst-set-row { border: 1px solid var(--hairline, rgba(60, 60, 67, 0.18)); border-radius: 12px; padding: 10px 12px; }
.lst-set-row.is-working { border-left: 4px solid #5e5ce6; }
.lst-set-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lst-set-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.rt-pill.studio { background: rgba(48, 176, 199, 0.16); color: #0f6b7d; }
.lst-mirror { font-size: 12px; color: var(--text-dim, #8e8e93); }
.lst-mirror.ok { color: #1a7f37; }
.lst-mirror.warn { color: #9a5b00; }
.exp-pack { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.exp-file { font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--bg, #f5f5f7); }
.exp-row { border-top: 1px solid var(--hairline, rgba(60, 60, 67, 0.18)); padding-top: 10px; margin-top: 10px; }
.sets-compare { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; margin: 6px 0; }
.sets-cell { font-size: 11px; text-align: center; border-radius: 6px; padding: 3px 0; background: var(--bg, #f5f5f7); }
.sets-cell.same { color: #1a7f37; }
.sets-cell.changed { background: rgba(255, 159, 10, 0.18); color: #9a5b00; }
.sets-cell.only_a, .sets-cell.only_b { background: rgba(255, 69, 58, 0.14); color: #b3261e; }
.ios-sheet .field { padding: 8px 14px; }
.ios-sheet .field label { display: block; font-size: 12px; color: var(--text-dim, #8e8e93); margin-bottom: 3px; }
.ios-sheet .field input, .ios-sheet .field select { width: 100%; box-sizing: border-box; }

/* the Library's history row (owner 2026-09-09): a product's saved sets under its card */
.lib-history .lst-sets { margin-top: 8px; }
.lib-history .lst-set-row { max-width: 100%; }
.lib-history .lst-live-strip { overflow-x: auto; }
.lib-history-sub { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* the brand kit (owner 2026-09-09): rows, swatches, the logo tile, the sheet sections */
.brand-row { align-items: center; }
.brand-swatches { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.brand-swatch { display: inline-block; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); }
.brand-logo-tile { display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 10px; border: 1px solid var(--hairline); overflow: hidden; background: #fff; }
.brand-logo-tile img { max-width: 88%; max-height: 88%; object-fit: contain; }
.brand-logo-tile.empty { border-style: dashed; color: var(--text-dim); font-size: 18px; background: transparent; }
.brand-checker { background-color: #fff;
  background-image: linear-gradient(45deg, #e8e8ed 25%, transparent 25%), linear-gradient(-45deg, #e8e8ed 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8ed 75%), linear-gradient(-45deg, transparent 75%, #e8e8ed 75%);
  background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.ios-sheet-section { padding: 10px 12px 12px; border-top: 1px solid var(--hairline); }
.ios-sheet-section-title { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.brand-role-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.brand-role { width: 64px; font-size: 14px; }
.brand-role-row input[type=color] { width: 34px; height: 28px; border: 1px solid var(--hairline); border-radius: 8px; padding: 0; background: none; }
.brand-hex { width: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.brand-types { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.brand-type { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 0; }
.brand-type .hint { margin-left: auto; }
.brand-type.main { opacity: 0.6; }
@media (max-width: 480px) { .brand-types { grid-template-columns: 1fr; } }
.gen-row-mark { color: var(--accent); font-size: 12px; margin-left: 4px; }

/* the copy work (owner 2026-09-09): the Images | Copy segment, the fields, the pills, the keyword rows */
.prod-seg { display: flex; padding: 3px; background: rgba(118, 118, 128, 0.12); border-radius: 10px; margin: 0 0 14px; }
.prod-seg a { flex: 1; text-align: center; font-size: 14px; font-weight: 600; padding: 7px 10px; border-radius: 8px;
  color: var(--text-dim); text-decoration: none; }
.prod-seg a.active { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.copy-truth-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--text-dim); }
.copy-sku { border-top: 1px solid var(--hairline); padding: 10px 0; }
.copy-sku:first-of-type { border-top: 0; }
.copy-sku-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.copy-field { margin: 8px 0; }
.copy-field-label { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.copy-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.copy-text.dim { color: var(--text-dim); }
.copy-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: rgba(118, 118, 128, 0.14); color: var(--text-dim); }
.copy-pill.ok { background: rgba(48, 209, 88, 0.16); color: #1f8f3e; }
.copy-pill.warn { background: rgba(255, 159, 10, 0.18); color: #a35f00; }
.copy-pill.bad { background: rgba(255, 69, 58, 0.16); color: #c0392b; }
.copy-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.copy-before, .copy-after { border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 10px; background: var(--bg-elev); }
.copy-after { border-color: rgba(10, 132, 255, 0.35); }
.copy-after textarea { width: 100%; min-height: 64px; font: inherit; font-size: 14px; line-height: 1.45; border: 0; resize: vertical; outline: none; background: transparent; }
.copy-counter { font-variant-numeric: tabular-nums; }
.copy-why { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
.copy-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.copy-claims { font-size: 13px; }
.copy-claims li { margin: 2px 0; }
.kw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kw-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text-dim); padding: 4px 6px; border-bottom: 1px solid var(--hairline); }
.kw-table td { padding: 5px 6px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.kw-q { font-weight: 600; }
.kw-src { display: inline-block; font-size: 10.5px; padding: 0 5px; border-radius: 6px; background: rgba(118, 118, 128, 0.14); margin-right: 3px; color: var(--text-dim); }
.kw-tier { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.kw-tier.title { background: rgba(10, 132, 255, 0.16); color: #0a5fbf; }
.kw-tier.highlight { background: rgba(88, 86, 214, 0.16); color: #4b48b8; }
.kw-tier.bullets { background: rgba(48, 209, 88, 0.16); color: #1f8f3e; }
.kw-tier.backend { background: rgba(118, 118, 128, 0.16); color: var(--text-dim); }
.kw-tier.never { background: rgba(255, 69, 58, 0.14); color: #c0392b; }
.kw-axis { font-variant-numeric: tabular-nums; white-space: nowrap; }
.copy-truth .lst-wfield textarea { width: 100%; min-height: 48px; font: inherit; font-size: 14px; }
@media (max-width: 640px) { .copy-pair { grid-template-columns: 1fr; } .kw-table th:nth-child(4), .kw-table td:nth-child(4) { display: none; } }

/* the copy publish step (slice 2, 2026-09-09) */
.copy-log { font-size: 13px; line-height: 1.5; }
.copy-log .copy-pill { margin-left: 2px; }
.copy-rollup a { font-weight: 600; }
#copy-publish .pub-go .field input { max-width: 160px; }

/* slice 1c (2026-09-09): the rivals, the vetting, the teardown, the run */
.copy-run { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.rv-seed { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 260px; flex: 1; }
.rv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.rv-table td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.rv-table tr.off td { opacity: .45; }
.rv-title { font-weight: 550; }
.rv-bullets summary { cursor: pointer; }
.rv-note { font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; width: 160px; }
.kw-lines { line-height: 1.7; margin: 4px 0 8px; }
.kw-inv { font-weight: 550; }
.kw-vet { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 6px 0 10px; }
.kw-vet-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 4px 0; }
.kw-vet-reason { font: inherit; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; flex: 1; min-width: 200px; }
.td-wedge { padding: 8px 10px; border-radius: 10px; background: var(--card-2, rgba(0,0,0,.03)); margin: 4px 0 8px; }
.td-row { margin-top: 6px; }
.td-pb { margin: 4px 0 6px; }

/* slice 1d (2026-09-09): the battlefield, ours, the gate */
.rv-battlefield { padding: 8px 10px; border-radius: 10px; background: var(--card-2, rgba(0,0,0,.03)); margin: 4px 0 8px; font-size: 13px; }
.rv-table tr.ours td { background: var(--card-2, rgba(0,0,0,.03)); font-weight: 550; }
.copy-gate { max-width: 100%; white-space: normal; }

/* the Copy page as one flow (owner 2026-09-09 17:36): the step strip, the step cards, the sheet, the chips */
.copy-run-card { padding: 14px 16px; }
.copy-run-card .step-primary { width: 100%; }
.step-strip { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 10px; margin: 0 0 10px;
  background: var(--bg); scrollbar-width: none; }
.step-strip::-webkit-scrollbar { display: none; }
.step-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--bg-elev); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow); }
.step-pill-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.06); font-size: 11.5px; font-weight: 700; }
.step-pill.done .step-pill-n { background: var(--ok); color: #fff; }
.step-pill.current { border-color: var(--accent); color: var(--accent); }
.step-pill.current .step-pill-n { background: var(--accent); color: #fff; }
.step-pill.stale { border-color: var(--warn); color: #b36b00; }
.step-pill.stale .step-pill-n { background: var(--warn); color: #fff; }
.step-pill.locked, .step-pill.todo { color: var(--text-dim); }
.step-card { padding: 0; overflow: hidden; }
.step-card.locked { opacity: .78; }
.step-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.step-head:active { background: rgba(0,0,0,.02); }
.step-num { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; background: rgba(0,0,0,.06); color: var(--text-dim); }
.step-num.done { background: var(--ok); color: #fff; }
.step-num.current { background: var(--accent); color: #fff; }
.step-num.stale { background: var(--warn); color: #fff; }
.step-title { flex: 1; min-width: 0; font-weight: 650; font-size: 15px; }
.step-summary { font-weight: 450; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-state { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); }
.step-state.done { color: var(--ok); }
.step-state.current { color: var(--accent); }
.step-state.stale { color: #b36b00; }
.step-chevron { color: var(--text-dim); font-size: 22px; line-height: 1; transition: transform .15s ease; }
.step-card.is-open .step-chevron { transform: rotate(90deg); }
.step-body { padding: 4px 16px 14px; border-top: 1px solid var(--hairline); }
.step-foot { margin-top: 12px; }
.step-primary { width: 100%; padding: 12px 16px; font-size: 15px; border-radius: 12px; }
.step-reason { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.45; }
.sheet-menu { position: relative; }
.sheet-menu > summary { list-style: none; cursor: pointer; font-weight: 800; font-size: 18px; letter-spacing: .05em; color: var(--text-dim);
  padding: 2px 8px; border-radius: 8px; }
.sheet-menu > summary::-webkit-details-marker { display: none; }
.sheet-menu[open] > summary { background: rgba(0,0,0,.06); }
.sheet-list { position: absolute; right: 0; top: 100%; z-index: 20; min-width: 220px; background: var(--bg-elev); border: 1px solid var(--hairline);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; }
.sheet-item { display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; padding: 10px 12px; border: 0; background: none;
  border-radius: 8px; color: var(--text); cursor: pointer; text-decoration: none; }
.sheet-item:hover { background: rgba(0,0,0,.05); }
.sheet-item:disabled { color: var(--text-dim); cursor: default; }
/* step 1: the compact rival rows */
.rv-seed-form { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.rv-seed-form[hidden] { display: none; }
.rv-list { display: flex; flex-direction: column; }
.rv-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--hairline); }
.rv-row.off { opacity: .45; }
.rv-row.ours { background: rgba(10,132,255,.06); margin: 4px -16px 0; padding: 9px 16px; }
.rv-tick { flex: 0 0 24px; padding-top: 2px; }
.rv-tick input { width: 18px; height: 18px; }
.rv-main { flex: 1; min-width: 0; cursor: pointer; }
.rv-line1 { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; align-items: center; }
.rv-title { font-size: 13px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.rv-detail { margin-top: 6px; font-size: 13px; }
.rv-detail .rv-note { width: 100%; margin-top: 6px; }
.sku-list .sku-row { padding: 9px 0; border-top: 1px solid var(--hairline); }
.truth-form { margin-top: 12px; }
.truth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
@media (max-width: 640px) { .truth-grid { grid-template-columns: 1fr; } }
/* step 2: the AI's proposal as chips, the tiers as chip rows */
.vet-form { margin-top: 10px; }
.vet-head { font-weight: 650; font-size: 15px; }
.vet-group { margin-top: 10px; }
.vet-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--hairline);
  background: var(--bg-elev); cursor: pointer; user-select: none; max-width: 100%; }
.kw-chip-q { font-weight: 600; }
.kw-chip-v { color: var(--text-dim); font-size: 12px; }
.kw-chip.keep { border-color: var(--ok); background: rgba(48,209,88,.10); }
.kw-chip.drop { border-color: var(--bad); background: rgba(255,69,58,.10); text-decoration: line-through; }
.kw-chip.drop .kw-chip-v { text-decoration: none; }
.kw-chip-reason { display: none; font: inherit; font-size: 12px; padding: 3px 8px; border: 1px solid var(--hairline); border-radius: 8px; min-width: 140px; }
.kw-chip.drop .kw-chip-reason { display: inline-block; text-decoration: none; }
.kw-chip.tier { cursor: pointer; }
.kw-chip.tier.live { border-color: var(--ok); }
.kw-move { position: relative; display: inline-block; }
.kw-move > summary { list-style: none; }
.kw-move > summary::-webkit-details-marker { display: none; }
.kw-move[open] > .sheet-list { left: 0; right: auto; }
.tier-row { margin-top: 10px; }
.tier-name { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); margin-bottom: 6px; }
/* step 5: the fields collapse */
.copy-field-d { border-top: 1px solid var(--hairline); padding: 8px 0; }
.copy-field-d > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-field-d > summary::-webkit-details-marker { display: none; }
.copy-field-d > summary .step-chevron { margin-left: auto; }
.copy-field-d[open] > summary .step-chevron { transform: rotate(90deg); }

/* ---------- the image flow, clean iOS (owner 2026-09-09 19:20): shared utilities ---------- */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
form.inline { display: inline; }
.btn.block { display: block; width: 100%; white-space: normal; border-radius: 12px; text-align: center; padding: 10px 16px; }
.btn.tint { background: rgba(10, 132, 255, 0.10); color: var(--accent); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.step-pill-t { font-weight: 600; }
.step-pill { min-height: 44px; }
.sheet-item { min-height: 44px; }
.sheet-list { max-width: calc(100vw - 32px); }
a.step-primary { display: block; text-align: center; text-decoration: none; }
a.step-primary.disabled { opacity: .45; pointer-events: none; }
.step-input { width: 100%; box-sizing: border-box; margin-bottom: 8px; min-height: 44px; font: inherit; font-size: 16px;
  padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg); }
.step-foot .field { width: 100%; }
.step-foot .field input { min-width: 0; width: 100%; box-sizing: border-box; }
.step-body .field input { min-width: 0; width: 100%; box-sizing: border-box; }
.toast.warn { border: 1px solid var(--warn); }
@media (max-width: 768px) {
  .step-body .btn.small, .step-body .ctl-select, .step-body select,
  .step-body input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]) { min-height: 44px; }
}

/* ---------- the Images page on the step frame (owner 2026-09-09 19:20): rows, tiles, 44 px targets ---------- */
.sect-title { font-weight: 650; font-size: 13.5px; margin: 12px 0 4px; }
.sect-title .hint { font-weight: 450; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-height: 44px; }
.check-line input { width: 20px; height: 20px; }
.check-text { flex: 1; min-width: 0; }
.lst-check-row form { flex: 0 0 auto; }
.row-x, .ref-x { width: 44px; height: 44px; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; font-size: 16px; color: var(--text-dim); cursor: pointer; border-radius: 10px; padding: 0; }
.row-x:active { background: rgba(0, 0, 0, 0.06); }
/* the plan rows: the type on the first line, the options in two columns under it */
.lst-slot-row { display: block; margin: 0; padding: 10px 0; border-top: 1px solid var(--hairline); }
.lst-slot-row:first-child { border-top: 0; }
.slot-main { display: flex; align-items: center; gap: 8px; }
.slot-main select { flex: 1; min-width: 0; }
.slot-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 6px; padding-left: 28px; }
.slot-opts select { min-width: 0; width: 100%; }
.type-guide { margin: 8px 0; }
.type-guide-row { padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.type-guide-row .hint { display: block; }
.lst-ev-strip .ev-lead { flex: 0 0 auto; }
/* the words: the item rows and the measurements */
.item-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.item-row input { flex: 1; min-width: 0; }
.dim-row { display: grid; grid-template-columns: 1fr 72px 72px 44px; gap: 6px; align-items: center; margin: 4px 0; }
.dim-row input { min-width: 0; width: 100%; box-sizing: border-box; }
.dim-row .dim-src { grid-column: 1 / -1; }
.item-row input, .dim-row input, .var-row input {
  font: inherit; font-size: 16px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--bg); color: var(--text); -webkit-appearance: none; appearance: none; }
.item-row input:focus, .dim-row input:focus, .var-row input:focus { outline: 2px solid var(--accent); border-color: transparent; }
/* the variants rows */
.var-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; padding: 10px 0; border-top: 1px solid var(--hairline); align-items: center; }
.var-row:first-child { border-top: 0; }
.var-row .var-lead { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); white-space: nowrap; min-height: 44px; }
.var-row .var-lead input { width: 20px; height: 20px; accent-color: var(--accent); }
.var-row input[name^="differs_"], .var-row select, .var-row > .hint { grid-column: 1 / -1; }
.var-row input, .var-row select { min-width: 0; width: 100%; box-sizing: border-box; }
/* the reference photos: a wrapping grid of tiles; the x a 44 px target with a small visible dot */
.ref-grid { display: flex; flex-wrap: wrap; gap: 12px 10px; margin-top: 10px; }
.ref-tile { position: relative; width: 84px; display: flex; flex-direction: column; gap: 2px; }
.ref-tile .lst-thumb { width: 84px; height: 84px; }
.ref-tile .ref-x-form { position: absolute; top: -12px; right: -12px; }
.ref-tile .ref-x span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--hairline); font-size: 11px; box-shadow: var(--shadow); }
.ref-cap { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* removing photos (owner 2026-10-09): the x inside the tile's corner, the tile fades at once, Select photos = pick boxes + a bar */
.ref-tile > .ref-x { position: absolute; top: 2px; right: 2px; width: 36px; height: 36px; flex: none; z-index: 2; }
.ref-tile > .ref-x span { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); border: 0; color: #111;
  font-size: 13px; font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.ref-tile.removing { opacity: 0.25; transition: opacity 150ms ease; pointer-events: none; }
.ref-pick { display: none; }
.ref-grid.picking .ref-x { display: none; }
.ref-grid.picking .ref-pick { display: block; position: absolute; left: 0; top: 0; width: 84px; height: 84px; z-index: 3; cursor: pointer; border-radius: 8px; }
.ref-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ref-pick-ring { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.28); color: transparent; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.ref-pick input:checked ~ .ref-pick-ring { background: var(--accent); border-color: #fff; color: #fff; }
.ref-grid.picking .ref-tile:has(.ref-pick input:checked) .lst-thumb { outline: 3px solid var(--accent); outline-offset: -3px; }
.ref-pick-bar { position: sticky; bottom: calc(49px + env(safe-area-inset-bottom, 0px) + 8px); z-index: 30; display: flex; gap: 8px;
  margin-top: 10px; padding: 8px; background: var(--bg-elev); border: 1px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow); }
.ref-pick-bar .btn { flex: 1; min-height: 48px; }
.ref-pick-bar[hidden] { display: none; }
.ref-use { font-size: 16px; max-width: 84px; min-height: 32px; }
.lst-thumb.mini { width: 40px; height: 40px; }
.lst-standout .lst-ref-x, .lst-ref .lst-ref-x { width: 32px; height: 32px; top: -10px; right: -10px; font-size: 13px; }
/* the board rows: the order controls only in reorder mode (the ... menu) */
.gen-rows .gen-row-order { display: none; }
#gen-reorder:not([hidden]) ~ .gen-rows .gen-row-order, .gen-rows.reordering .gen-row-order { display: flex; align-items: center; gap: 4px; }
.gen-row-order .btn.small { min-width: 44px; min-height: 44px; }
/* the publish rows as disclosures */
details.pub-row > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; }
details.pub-row > summary::-webkit-details-marker { display: none; }
details.pub-row > summary .step-chevron { margin-left: auto; }
details.pub-row[open] > summary .step-chevron { transform: rotate(90deg); }
.pub-row-body { padding: 4px 0 8px; }
.pub-slots .pub-slot { white-space: normal; }
/* the set rows: the per-row menu, the live-card refresh */
.lst-set-head .sheet-menu { margin-left: auto; }
.lst-more { align-self: center; }
.live-refresh { margin-top: 8px; }
/* the experiment: the result form as a labelled grid */
.exp-result { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.exp-result .full { grid-column: 1 / -1; }
.exp-result label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 3px; }
.exp-result input, .exp-result select { width: 100%; min-width: 0; box-sizing: border-box; }
.exp-steps { padding-left: 18px; }
.exp-row .btn.small.tint { margin: 6px 0; }
/* the brand row */
.brand-row .brand-row-main { flex: 1; min-width: 0; }
.brand-row .brand-tile-40 { width: 40px; height: 40px; }
.brand-row-pick { display: flex; gap: 6px; align-items: center; }
.study-sheet { max-width: 100%; border: 1px solid var(--hairline); border-radius: 10px; margin-top: 8px; }
.verdict-why { margin-top: 6px; }
@media (max-width: 480px) {
  .slot-opts { padding-left: 0; }
  .exp-result { grid-template-columns: 1fr; }
}
/* ---------- the list tabs (owner 2026-09-09 19:20): one row per product, a pill, a chevron ---------- */
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .sheet-menu { margin-left: auto; }
.prod-list { display: flex; flex-direction: column; }
.prod-row { position: relative; border-top: 1px solid var(--hairline); }
.prod-row:first-child { border-top: 0; }
.prod-row-main { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 44px 10px 0;
  box-sizing: border-box; text-decoration: none; color: var(--text); background: none; border: 0; font: inherit; text-align: left;
  cursor: pointer; }
.prod-row-main:active { background: rgba(0, 0, 0, 0.03); }
.prod-thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--hairline);
  background: #fff; }
.prod-thumb.empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-dim);
  background: rgba(0, 0, 0, 0.04); }
.prod-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prod-row-text strong { font-size: 15px; font-weight: 650; }
.prod-row-text .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-row-text .copy-rollup { display: flex; align-items: center; gap: 6px; }
.prod-row .rt-pill { flex: 0 0 auto; }
.prod-row > .sheet-menu { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.prod-row > .sheet-menu > summary { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.prod-row-note { padding: 0 0 8px; }
.key-form { margin-top: 8px; }
.key-form .field input { min-width: 0; width: 100%; box-sizing: border-box; }
.key-form .row .btn { min-height: 44px; flex: 1; }
/* ---------- the Library and Settings (owner 2026-09-09 19:20): phone tiles, 44 px corners, stacked forms ---------- */
@media (max-width: 640px) {
  .lib-tile { flex-basis: 104px; }
  .lib-tile-img, .lib-tile-img img { width: 104px; height: 104px; }
}
.lib-tile-act { width: 32px; height: 32px; }
.lib-tile-act::after { content: ""; position: absolute; inset: -6px; }   /* a 44 px hit area around the 32 px dot */
.lib-tile-act.hint-act { right: 44px; }
.key-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-row .key-form { margin-top: 8px; }
.key-row .field input { min-width: 0; width: 100%; box-sizing: border-box; }
.key-row .row .btn { min-height: 44px; flex: 1; }
.judge-form .check-line { align-items: flex-start; }
.judge-form .check-line input { margin-top: 3px; flex: 0 0 20px; }
.judge-form .field select { width: 100%; min-width: 0; }
.model-row { padding: 10px 0; border-top: 1px solid var(--hairline); }
.model-row:first-of-type { border-top: 0; }
.lib-path { word-break: break-all; margin-top: 6px; }
.brand-tile-88 { width: 88px; height: 88px; }
.brand-tile-72 { width: 72px; height: 72px; }
.brand-sheet-row { margin-top: 8px; }
.brand-sheet-text { flex: 1; min-width: 0; }
.brand-sheet-notice { margin: 6px 12px; }
/* the arena as rows (2026-09-09): one row per image type, the models as chips */
.arena-rows { display: flex; flex-direction: column; }
.arena-row { padding: 10px 0; border-top: 1px solid var(--hairline); }
.arena-row:first-of-type { border-top: 0; }
.arena-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.arena-row .arena-name { font-weight: 650; flex: 1; min-width: 0; }
.arena-row.arena-facet .arena-name { color: var(--text-dim); font-weight: 500; }
.arena-row.arena-facet .arena-name::before { content: '\21B3  '; }
.arena-row.arena-overall { background: rgba(10, 132, 255, 0.05); margin: 0 -16px; padding: 10px 16px; }
.arena-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.arena-chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--hairline); font-size: 13px; min-height: 32px; box-sizing: border-box; }
.arena-chip.lead { border-color: var(--ok); color: var(--ok); }
.arena-chip.off { opacity: 0.5; }
.arena-key, .arena-judge { margin-bottom: 6px; }
.arena-details > summary { list-style: none; cursor: pointer; margin-top: 4px; min-height: 32px; display: flex; align-items: center; }
.arena-details > summary::-webkit-details-marker { display: none; }
.arena-why { display: block; white-space: normal; max-width: none; margin-top: 2px; }
/* ---------- studio: pick an area of a reference (owner 2026-09-09) ---------- */
.gen-pool-tile { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; width: 88px; }
.gen-pool-tile .gen-ref-tile, .gen-pool-tile .gen-fixref { position: relative; display: block; }
.gen-pool-tile img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; border: 2px solid var(--hairline); display: block; }
.gen-pool-tile.inlist img { opacity: 0.45; }
.gen-pool-tile.area { margin-left: -2px; }
.gen-pool-tile .gen-fixref input:checked + img { border-color: var(--accent); }
.gen-area-badge { position: absolute; bottom: 6px; left: 4px; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #fff; background: #ff9f0a; border-radius: 6px; padding: 1px 6px; pointer-events: none; }
.gen-tile-name { font-size: 11px; color: var(--text-dim); max-width: 88px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; margin-top: 3px; line-height: 1.3; }
.gen-tile-acts { display: flex; gap: 0; }
.gen-tile-act { min-width: 44px; min-height: 44px; font: inherit; font-size: 17px; background: none; border: 0;
  color: var(--accent); cursor: pointer; border-radius: 10px; padding: 0; }
.gen-tile-act.gen-area-x { color: var(--text-dim); }
.gen-tile-act:active { background: rgba(125, 125, 125, 0.12); }
.gen-tile-act:disabled { opacity: 0.4; }
.gen-refstrip .gen-ref-tile .gen-area-badge { bottom: 4px; left: 3px; }
/* the brief strip's x: a 32 px dot with a 44 px hit area */
.gen-ref-x { width: 32px; height: 32px; top: -10px; right: -10px; font-size: 12px; }
.gen-ref-x::after { content: ""; position: absolute; inset: -6px; }
/* the sheet: the wrapper shrink-wraps the image so the drag's fractions are exact */
.gen-area-stage { text-align: center; line-height: 0; padding: 8px 8px 0; }
.gen-area-wrap { display: inline-block; width: auto; max-width: 100%; vertical-align: top;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.gen-area-wrap > img { display: block; width: auto; height: auto; max-width: 100%; max-height: 56dvh; }
.gen-area-wrap.has-box::after { display: none; }
.gen-area-meta { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 104px; line-height: 1.3; }
.gen-area-preview { position: relative; width: 96px; height: 96px; flex: none; border-radius: 10px; border: 1px solid var(--hairline);
  background: var(--bg) no-repeat; overflow: hidden; }
.gen-area-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gen-area-preview > img[hidden] { display: none; }
.gen-area-preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-dim); text-align: center; padding: 6px; }
.gen-area-preview-empty[hidden] { display: none; }
.gen-area-sheet .gen-mark-chip { min-height: 44px; }
.gen-area-sheet .gen-mark-chip button { min-width: 44px; min-height: 44px; }
.gen-area-sheet .ios-sheet-btn:disabled { opacity: 0.45; pointer-events: none; }
.gen-area-sheet #gen-area-out { padding: 0 12px; }
.gen-area-foot { text-align: center; padding: 0 12px 10px; }
@media (min-width: 700px) { .ios-sheet.gen-area-sheet { width: min(760px, calc(100vw - 32px)); } }
/* move / resize the brand mark (owner 2026-09-18): the wrapper shrink-wraps the image so the
   box's percentages are exact; the logo rides inside the box; one 44 px handle */
.gen-move-stage { text-align: center; line-height: 0; padding: 8px 8px 0; }
.gen-move-wrap { position: relative; display: inline-block; width: auto; max-width: 100%; vertical-align: top;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none; }
.gen-move-wrap > img { display: block; width: auto; height: auto; max-width: 100%; max-height: 56dvh; }
.gen-move-box { position: absolute; left: 0; top: 0; width: 11%; height: 11%; box-sizing: border-box;
  outline: 2px dashed var(--accent); outline-offset: 2px; cursor: move; touch-action: none; }
.gen-move-plate { position: absolute; inset: -12%; background: rgba(255, 255, 255, 0.92); border-radius: 10%; }
.gen-move-plate[hidden] { display: none; }
.gen-move-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none;
  -webkit-user-drag: none; }
.gen-move-handle { position: absolute; right: -13px; bottom: -13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); cursor: nwse-resize; touch-action: none; }
.gen-move-handle::after { content: ""; position: absolute; inset: -9px; }
.gen-move-snaps { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.gen-move-snaps .btn { min-height: 44px; flex: 1 1 auto; }
.gen-move-size { display: block; padding: 10px 12px 0; font-size: 13px; color: var(--text-dim); }
.gen-move-size input { display: block; width: 100%; height: 44px; margin-top: 4px; }
.gen-move-plate-pick { padding: 8px 12px 0; }
.gen-move-plate-pick .hint { padding-bottom: 4px; }
.gen-move-meta { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 104px; line-height: 1.3; }
.gen-move-preview { position: relative; width: 160px; height: 160px; flex: none; border-radius: 10px; border: 1px solid var(--hairline);
  background: var(--bg) no-repeat; overflow: hidden; }
.gen-move-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gen-move-preview > img[hidden] { display: none; }
.gen-move-sheet .gen-mark-chip { min-height: 44px; }
.gen-move-sheet .ios-sheet-btn:disabled { opacity: 0.45; pointer-events: none; }
.gen-move-sheet #gen-move-out { padding: 0 12px; }
.gen-move-foot { text-align: center; padding: 0 12px 10px; }
@media (min-width: 700px) { .ios-sheet.gen-move-sheet { width: min(760px, calc(100vw - 32px)); } }
/* the Library's Market tab (owner 2026-09-18): product chips (44 px), the keyword row, the
   tiles' rank and conversion pills, the brand chip on a market template, the templatify sheet */
.mk-chip-group { margin-top: 8px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mk-chip.chip-toggle { min-height: 44px; padding: 8px 14px; font-size: 13.5px; border-radius: 999px; }
.mk-chip.on { background: var(--accent); color: #fff; }
.mk-chip.on .hint { color: rgba(255, 255, 255, 0.85); }
.mk-kw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk-kw .field { flex: 1 1 200px; margin: 0; }
.mk-kw input { width: 100%; min-height: 44px; }
.mk-rate { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(48, 209, 88, 0.9); color: #0b3d1f; }
.mk-layout { left: auto; right: 6px; }
.mk-brand-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  background: rgba(125, 125, 125, 0.12); font-size: 11.5px; }
.mk-brand-chip .brand-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mk-tpl-note { display: block; margin-top: 2px; }
.mk-sheet-img img { display: block; width: 100%; max-height: 48dvh; object-fit: contain; border-radius: 12px; background: var(--bg); }
.mk-sheet-line { padding: 6px 12px 0; }
.mk-brand-pick .sheet-check { min-height: 44px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk-brand-pick .brand-swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.mk-brand-name { font-weight: 600; }
.mk-brand-note { flex-basis: 100%; padding-left: 42px; }
.mk-sheet-cost { padding: 4px 12px 8px; }
@media (min-width: 700px) { .ios-sheet.mk-sheet { width: min(720px, calc(100vw - 32px)); } }
/* the pool's summary reads as a disclosure; Done folds it (2026-09-09) */
.lst-disclose > summary .disclose-chevron { display: inline-block; margin-left: 4px; transition: transform 0.15s ease; }
.lst-disclose[open] > summary .disclose-chevron { transform: rotate(90deg); }
.gen-pool-done { margin-top: 12px; }

/* templates (owner 2026-09-18): the drawings of a refused run waiting for a pick, and the print sheet */
.tpl-pending-row { position: relative; padding: 10px 0 12px; border-top: 1px solid var(--hairline); }
.tpl-pending-row:first-of-type { border-top: 0; padding-top: 4px; }
.tpl-pending-src { font-weight: 600; padding: 2px 44px 6px 0; }
/* the drawings stack — one full-width card each on a phone, a grid on a wide screen — never the 124 px shelf */
.tpl-attempts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.tpl-attempt { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--hairline);
  border-radius: 14px; background: var(--bg-elev); min-width: 0; }
.tpl-attempt .lib-tile-img { width: auto; height: auto; }
.tpl-attempt .lib-tile-img img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.tpl-attempt figcaption { font-size: 12.5px; color: var(--text-dim); font-weight: 500; text-align: left; white-space: normal;
  overflow: visible; text-overflow: clip; line-height: 1.35; }
.tpl-attempt figcaption .tpl-why { display: block; margin-top: 2px; }
.tpl-keep { width: 100%; min-height: 44px; margin-top: 2px; }
.tpl-pending-row .sheet-menu { position: absolute; right: 0; top: 4px; }
.tpl-guide-img img { display: block; width: 100%; max-height: 48dvh; object-fit: contain; border-radius: 12px; background: var(--bg); }
.tpl-guide-text { padding: 4px 12px 8px; }
.tpl-guide-list { margin: 0; padding: 0 12px 8px 28px; }
.tpl-guide-list li { padding: 2px 0; }
.tpl-guide-out { padding: 0 12px 8px; }
@media (min-width: 700px) { .ios-sheet.tpl-guide { width: min(720px, calc(100vw - 32px)); } }

/* the reference plan (owner 2026-09-18): Claude's role and reason under a brief tile, the plan's state line */
.gen-ref-why { font-size: 11px; color: var(--text-dim); line-height: 1.3; margin-top: 3px; width: 108px; max-width: 100%;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gen-pick-state { margin-top: 4px; }

/* the starter library (owner 2026-09-20): a built-in tile is marked at its edge */
.lib-tile.lib-starter .lib-tile-img img { border-color: var(--accent); }
.lib-tile.lib-starter figcaption { color: var(--text-dim); }

/* the plan step's template picker (owner 2026-09-22 "I need to be able to see them"): the row
   shows the template it will use as a small tile; the sheet shows every template as tiles */
.lst-tpl-pick { display: flex; align-items: center; gap: 8px; min-height: 44px; width: 100%; min-width: 0;
  text-align: left; cursor: pointer; padding: 4px 8px; }
.lst-tpl-pick img { width: 36px; height: 36px; flex: 0 0 36px; object-fit: cover; border-radius: 8px; background: #fff;
  border: 1px solid var(--hairline); }
.lst-tpl-pick .lst-tpl-word { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lst-tpl-pick::after { content: "\25BE"; color: var(--text-dim); flex: 0 0 auto; }
.tpl-picker .ios-sheet-group { max-height: 88dvh; }
.tpl-pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px;
  font: inherit; color: var(--text); background: none; border: 0; border-top: 1px solid var(--hairline); text-align: left; cursor: pointer; }
.tpl-pick-row:first-of-type { border-top: 0; }
.tpl-pick-row .tpl-pick-mini { width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover; border-radius: 10px; background: #fff;
  border: 1px solid var(--hairline); }
.tpl-pick-row .tpl-pick-mini.none { display: block; border: 2px dashed var(--hairline); background: transparent; }
.tpl-pick-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.tpl-pick-words strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-pick-words .hint { display: block; white-space: normal; }
.tpl-pick-mark { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--text-dim); }
.tpl-pick-row.picked .tpl-pick-mark { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.tpl-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px 8px; padding: 8px 0 4px; }   /* two columns on a phone, and beside a desktop scrollbar */
.tpl-pick-tile { position: relative; margin: 0; min-width: 0; }
.tpl-pick-img { display: block; position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.tpl-pick-img img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #fff;
  border: 2px solid var(--hairline); }
.tpl-pick-tile.picked .tpl-pick-img img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tpl-pick-tile .lib-tile-act.hint-act { right: 6px; }
.tpl-pick-sug { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 6px; }
.tpl-pick-tile figcaption { font-size: 12px; color: var(--text); font-weight: 600; margin-top: 6px; white-space: normal; line-height: 1.3; }
.tpl-pick-chip { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 6px; padding: 0 5px; margin-right: 2px; vertical-align: 1px; }
.tpl-pick-intent { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 400; color: var(--text-dim); margin-top: 2px; }
.tpl-picker-other > summary { list-style: none; cursor: pointer; padding: 12px; border-top: 1px solid var(--hairline); }
.tpl-picker-other > summary::-webkit-details-marker { display: none; }
.tpl-picker-other > summary::after { content: " \25BE"; }
.tpl-picker-other[open] > summary::after { content: " \25B4"; }
/* on a desktop the picker is wider than the app's phone-sized sheet: four or five tiles a row */
@media (min-width: 700px) { .ios-sheet.tpl-picker { width: min(760px, calc(100vw - 32px)); } }

/* the A+ page (owner 2026-09-22): the third half of a product on the same step frame */
.aplus-strip .aplus-asin { display: inline-flex; align-items: center; gap: 6px; }
.aplus-doc { padding: 8px 0 4px; border-top: 1px solid var(--hairline); }
.aplus-doc:first-of-type { border-top: 0; }
.aplus-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aplus-asins { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; font-size: 12.5px; }
.aplus-asin { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.aplus-asin.extra { color: var(--text-dim); }
.aplus-modules { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.aplus-module { padding: 6px 0 2px; border-top: 1px dashed var(--hairline); }
.aplus-module-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aplus-module .copy-text { margin-top: 4px; }
.aplus-alt { margin-top: 4px; white-space: normal; }
.step-num.aplus-n { width: 22px; height: 22px; font-size: 12px; }
/* the A+ module plan (step 2): one row per module, a schematic tile, the change and remove actions */
.aplus-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.aplus-row:first-of-type { border-top: 0; }
.aplus-row .step-num { flex: 0 0 auto; margin-top: 2px; }
.aplus-schem { flex: 0 0 72px; width: 72px; height: 48px; border-radius: 8px; border: 1px solid var(--hairline); background: #fff; object-fit: cover; }
.aplus-row-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aplus-row-words strong { font-size: 14px; }
.aplus-row-acts { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.aplus-row-acts button { min-width: 44px; min-height: 32px; font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--accent); cursor: pointer; }
.aplus-row-acts button.remove { color: var(--bad); }
.aplus-chip { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--hairline); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.aplus-chip.live { color: var(--accent); border-color: var(--accent); }
.aplus-add { width: 100%; min-height: 44px; margin-top: 6px; }
.aplus-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 10px; padding: 8px 12px 12px; }
.aplus-pick { position: relative; margin: 0; }
.aplus-pick button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.aplus-pick img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 2px solid var(--hairline); background: #fff; }
.aplus-pick.current img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.aplus-pick figcaption { font-size: 12px; font-weight: 600; margin-top: 5px; white-space: normal; line-height: 1.3; }
.aplus-pick figcaption .hint { display: block; font-weight: 400; }
/* the A+ pictures (step 4): one row per picture, the tile at the module's shape */
.aplus-pics { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; }
.aplus-pic { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--hairline);
  color: inherit; text-decoration: none; }
.aplus-pic:first-of-type { border-top: 0; }
.aplus-pic-tile { position: relative; flex: 0 0 96px; width: 96px; height: 64px; border-radius: 10px; overflow: hidden; background: #fff;
  border: 1px solid var(--hairline); }
.aplus-pic-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.aplus-pic-tile img.schem { opacity: .7; }
.aplus-pic-size { position: absolute; right: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55);
  border-radius: 5px; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.aplus-pic-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.aplus-pic-words .hint { white-space: normal; }
.aplus-pic.done .aplus-pic-tile { border-color: var(--ok); }

/* ---- the A+ preview (owner 2026-09-26): the page as a shopper sees it, desktop or phone ---- */
.aplus-preview-link { margin: 6px 0 2px; }
.ap-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 6px 0 14px; }
.ap-toolbar .hint { flex: 1 1 260px; }
.ap-widths { display: inline-flex; gap: 6px; }
.ap-widths .btn.on { background: var(--accent); color: #fff; }
.ap-page { container-type: inline-size; margin: 0 auto; max-width: 1000px; background: #fff; color: #0F1111;
           border: 1px solid #e3e6e6; border-radius: 8px; padding: 18px 20px; font-family: "Amazon Ember", Arial, Helvetica, sans-serif; }
.ap-page[data-width="phone"] { max-width: 375px; padding: 10px 12px; }
.ap-mod { margin: 0 0 30px; }
.ap-mod h2 { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 0 0 10px; color: #0F1111; }
.ap-mod h3 { font-size: 18px; font-weight: 700; margin: 10px 0 6px; color: #0F1111; }
.ap-mod h4 { font-size: 15px; font-weight: 700; margin: 8px 0 4px; color: #0F1111; }
.ap-mod p { font-size: 14px; line-height: 1.5; margin: 0 0 8px; color: #0F1111; white-space: pre-line; }
.ap-mod ul { margin: 0 0 8px 18px; padding: 0; font-size: 14px; line-height: 1.5; color: #0F1111; }
.ap-img { display: block; width: 100%; height: auto; }
.ap-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; aspect-ratio: var(--ar, 1);
         background: #eef0f2; color: #5f6b7a; font-size: 12px; text-align: center; padding: 8px; border: 1px dashed #c8ccd0; box-sizing: border-box; }
.ap-ph.live { background: #e9f2ff; color: #3a5a80; border-color: #a9c4e6; }
.ap-logo { display: flex; justify-content: center; }
.ap-logo .ap-fig { width: 100%; max-width: 600px; }
.ap-overlay { position: relative; }
.ap-overlay .ap-box { position: absolute; top: 50%; right: 4%; transform: translateY(-50%); width: 42%; padding: 14px 16px; border-radius: 4px; }   /* Amazon's desktop box sits right; a phone stacks it below (2026-09-26) */
.ap-overlay.dark .ap-box { background: rgba(0, 0, 0, 0.62); color: #fff; }
.ap-overlay.light .ap-box { background: rgba(255, 255, 255, 0.88); color: #0F1111; }
.ap-overlay .ap-box h3, .ap-overlay .ap-box p { color: inherit; margin: 0 0 4px; }
.ap-hl { display: grid; grid-template-columns: 31% 1fr 1fr; gap: 20px; align-items: start; }   /* highlights: picture | blocks | list (Amazon desktop, 2026-09-26) */
.ap-side { display: flex; gap: 20px; align-items: flex-start; }
.ap-side.right { flex-direction: row-reverse; }
.ap-side .ap-fig { flex: 0 0 31%; max-width: 300px; }
.ap-side .ap-fig.quad { flex-basis: 30%; max-width: 135px; }
.ap-side .ap-txt { flex: 1 1 auto; min-width: 0; }
.ap-cols { display: grid; gap: 20px; }
.ap-cols.c2 { grid-template-columns: repeat(2, 1fr); }
.ap-cols.c3 { grid-template-columns: repeat(3, 1fr); }
.ap-cols.c4 { grid-template-columns: repeat(4, 1fr); }
.ap-sidebar { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.ap-caption { font-size: 12px; color: #565959; }
.ap-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ap-tab { border: 1px solid #c8ccd0; background: #f7f8f8; color: #0F1111; padding: 6px 12px; border-radius: 4px; font-size: 13px; cursor: pointer; }
.ap-tab.on { background: #fff; border-color: #e77600; box-shadow: 0 0 0 1px #e77600 inset; }
.ap-pane { display: none; }
.ap-pane.on { display: block; }
.ap-grid { display: grid; grid-template-columns: 1.2fr repeat(var(--n, 2), 1fr); border: 1px solid #ddd; font-size: 13px; color: #0F1111; }
.ap-grid > div { padding: 8px 10px; border-bottom: 1px solid #eee; border-right: 1px solid #eee; min-width: 0; }
.ap-grid .hd { font-weight: 700; background: #f7f8f8; }
.ap-grid .hl { background: #fff8e6; }
.ap-specs { display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); gap: 20px; }
.ap-spec { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #ddd; font-size: 13px; color: #0F1111; }
.ap-spec > div { padding: 8px 10px; border-bottom: 1px solid #eee; min-width: 0; }
.ap-spec > div:nth-child(odd) { font-weight: 700; background: #f7f8f8; }
@container (max-width: 600px) {
  .ap-cols.c2, .ap-cols.c3, .ap-cols.c4, .ap-sidebar, .ap-specs, .ap-hl { grid-template-columns: 1fr; }
  .ap-side, .ap-side.right { flex-direction: column; }
  .ap-side .ap-fig, .ap-side .ap-fig.quad { flex-basis: auto; max-width: 100%; }
  .ap-mod h2 { font-size: 20px; }
  .ap-overlay .ap-box { position: static; transform: none; width: auto; border-radius: 0; }
  .ap-grid { grid-template-columns: 1fr repeat(var(--n, 2), 1fr); font-size: 11px; }
  .ap-grid > div { padding: 5px 6px; }
}

/* ---- the brand's type & style (2026-09-26): the presets, the specimen ---- */
.brand-specimen { margin: 8px 0; border: 1px solid var(--line, #e3e6e6); border-radius: 8px; overflow: hidden; background: #fff; }
.brand-specimen img { display: block; width: 100%; height: auto; }
.brand-presets { display: grid; gap: 6px; margin: 4px 0 8px; }
.brand-preset { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line, #e3e6e6); border-radius: 10px; cursor: pointer; }
.brand-preset.on { border-color: var(--accent); background: rgba(10, 132, 255, 0.06); }
.brand-preset input { margin-top: 3px; }
.brand-design-form select { max-width: 100%; }

/* the move sheet while the A+ mark is off (2026-10-04): the design's spot shown faint, to put it back or move it */
.gen-move-box.is-off { opacity: .55; }
.gen-move-box.is-off .gen-move-logo { filter: grayscale(1); }

/* the Settings page regrouped (owner 2026-10-05 "categories expandable iOS style"): four disclosures, a status
   line in each head, the inner cards flat inside them */
.settings-group { padding: 0; overflow: hidden; }
.settings-group > summary.settings-summary { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 16px;
  cursor: pointer; list-style: none; }
.settings-group > summary.settings-summary::-webkit-details-marker { display: none; }
.settings-summary .settings-name { font-weight: 600; font-size: 17px; flex: 0 0 auto; }
.settings-summary .settings-status { flex: 1 1 auto; min-width: 0; color: var(--text-dim); font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.settings-summary .disclose-chevron { flex: 0 0 auto; color: var(--text-dim); font-size: 20px; }
.settings-group > .lst-disclose-body { margin: 0; padding: 0 12px 12px; border-top: 1px solid var(--hairline); }
.settings-group .settings-inner { box-shadow: none; border: 0; border-radius: 0; padding: 14px 4px 10px; margin: 0;
  border-bottom: 1px solid var(--hairline); }
.settings-group .settings-inner:last-child { border-bottom: 0; }
.settings-group .lst-disclose-body > #brand.card { box-shadow: none; border: 0; border-radius: 0; margin: 0; padding: 14px 4px 10px; }
@media (max-width: 480px) { .settings-summary { flex-wrap: wrap; } .settings-summary .settings-status { flex-basis: 100%; white-space: normal; } }

/* design first, then the photographs (owner 2026-10-06): the two-step card's places */
.gen-two-step { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.two-step-places { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.two-step-place { padding-top: 8px; border-top: 1px solid rgba(125, 125, 125, 0.25); }
.two-step-stepper { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.two-step-row { border: 1px solid var(--hairline); border-radius: 12px; background: var(--bg-elev); }
.two-step-row > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; }
.two-step-row > summary::-webkit-details-marker { display: none; }
.two-step-row .two-step-words { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.two-step-row .two-step-detail { font-size: 13px; color: var(--text-dim); white-space: normal; }
.two-step-row .two-step-state { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.two-step-row.active .two-step-state { color: var(--accent); }
.two-step-row .two-step-body { padding: 4px 12px 12px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 8px; }

/* the look (owner 2026-10-08): the plan row's control and its panel; the studio's one-axis change */
.lst-look-pick { grid-column: 1 / -1; min-height: 44px; width: 100%; min-width: 0; text-align: left; }   /* the whole row: the chips read on a phone (2026-10-08) */
.lst-look-pick .lst-look-word { display: block; white-space: normal; overflow-wrap: anywhere; }
.lst-look-line { margin-bottom: 4px; }
.lst-look-panel { grid-column: 1 / -1; display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 10px; }
.lst-look-panel[hidden] { display: none; }   /* display:grid would beat the hidden attribute (2026-10-08: every panel stood open, empty) */
.lst-look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.lst-look-grid label { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-dim); min-width: 0; }
.lst-look-grid select { min-width: 0; width: 100%; }
.gen-look { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.gen-look select { flex: 1; min-width: 0; }
.aplus-chip.look { opacity: .85; }
@media (max-width: 480px) { .lst-look-grid { grid-template-columns: 1fr; } }

/* the view road (owner 2026-10-08): the card shares the two-step's stepper */
.gen-callouts { margin-top: 10px; }

/* the template rank (2026-10-08): the reason under a tile and under the row's pick */
.tpl-pick-why { display: block; font-size: 11px; color: var(--accent); margin-top: 2px; }
.lst-tpl-why { grid-column: 1 / -1; min-height: 0; }
.lst-tpl-why:empty { display: none; }

/* ================= THE BETA LAYOUT (owner 2026-10-09 "develop in beta the full solution to test") =================
   Everything under body.ui-beta; the classic pages are untouched while the switch is off. */
/* the jobs pill: fixed, in the top bar's band on the phone, top right of the content on the desktop */
.jobs-pill { position: fixed; z-index: 45; right: 78px; top: calc(5px + env(safe-area-inset-top, 0px)); }
.jobs-pill:not(.has) { display: none; }
@media (min-width: 769px) { .jobs-pill { right: 20px; top: 12px; } }
.jobs-pill .sheet-menu > summary { padding: 2px; min-height: 34px; display: inline-flex; align-items: center; background: none; }
.jobs-pill .rt-pill { cursor: pointer; }
.jobs-pill .sheet-list { min-width: 270px; max-width: calc(100vw - 24px); padding: 4px 0 6px; }
.jobs-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 8px 12px 2px; }
.jobs-item { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.jobs-item.dim strong { color: var(--text-dim); font-weight: 600; }
/* the rail: under the top bar on the phone; the state as a pill everywhere */
@media (max-width: 768px) { body.ui-beta .step-strip { top: calc(44px + env(safe-area-inset-top, 0px)); } }
body.ui-beta .step-state { padding: 3px 9px; border-radius: 999px; font-size: 10.5px; background: rgba(118, 118, 128, 0.12); color: var(--text-dim); border: 1px solid transparent; white-space: nowrap; }
body.ui-beta .step-state.done { background: rgba(48, 209, 88, 0.18); color: #1a7f37; }
body.ui-beta .step-state.current { background: rgba(10, 132, 255, 0.14); color: #0a5ec2; }
body.ui-beta .step-state.stale { background: rgba(255, 159, 10, 0.18); color: #9a5b00; }
body.ui-beta .step-state.locked { background: transparent; border-color: rgba(118, 118, 128, 0.35); }
/* the hub */
.hub-back { display: inline-block; color: var(--accent); text-decoration: none; font-size: 15px; margin-bottom: 2px; }
.hub-head { margin-bottom: 10px; }
.hub-strip { display: flex; gap: 6px; overflow-x: auto; align-items: flex-end; padding: 2px 0 12px; scrollbar-width: none; }
.hub-strip::-webkit-scrollbar { display: none; }
.hub-thumb { width: 72px; height: 72px; flex: 0 0 72px; object-fit: cover; border-radius: 10px; background: #fff; border: 1px solid var(--hairline); }
.hub-thumb.main { width: 128px; height: 128px; flex-basis: 128px; }
.hub-card + .hub-card { margin-top: 12px; }
.hub-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hub-card-title { font-size: 17px; font-weight: 700; }
.hub-step-line { margin-top: 2px; }
.hub-line { margin: 6px 0 2px; font-size: 14px; line-height: 1.4; }
.hub-open { margin-top: 10px; }
/* the Listings row on the hub and its sheet (2026-10-09) */
.hub-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 2px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hub-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-row-text .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listings-sheet .lst-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hairline); }
.listings-sheet .lst-row:first-child { border-top: 0; }
.listings-sheet .lst-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.listings-sheet .lst-row-text .prod-name { font-weight: 600; font-size: 14px; }
.listings-sheet .btn.armed { background: var(--bad); color: #fff; border-color: var(--bad); }
.listings-sheet .lst-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.listings-sheet .lst-add select, .listings-sheet .lst-add input[type=text] { flex: 1 1 180px; min-width: 0; }
@media (min-width: 700px) { .ios-sheet.listings-sheet { width: min(640px, calc(100vw - 32px)); } }
.prod-flows { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.prod-flows .rt-pill.sm { margin-right: 0; }
.prod-list-beta .prod-row-text .hint { white-space: normal; }
.beta-note { margin-top: 10px; text-align: center; }
#products-card .btn.block.primary { margin-top: 12px; }
.hub-catalogue { margin-bottom: 6px; }
.hub-catalogue > summary { display: inline-flex; align-items: center; gap: 6px; }
/* plan rows as rows + a sheet (the classic controls live inside .slot-sheet; off the beta it is transparent) */
.slot-sheet { display: contents; }
body.ui-beta .slot-sum { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
body.ui-beta .slot-sum:active { background: rgba(0, 0, 0, 0.03); }
body.ui-beta .slot-sum-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #fff; border: 1px solid var(--hairline); flex: 0 0 44px; }
body.ui-beta .slot-sum-img[hidden] { display: none; }
body.ui-beta .slot-sum-n { width: 20px; text-align: right; font-size: 12.5px; color: var(--text-dim); font-weight: 700; flex: 0 0 20px; }
body.ui-beta .slot-sum-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
body.ui-beta .slot-sum-title { font-size: 15px; font-weight: 650; }
body.ui-beta .slot-sum-chips { display: flex; flex-wrap: wrap; gap: 4px; }
body.ui-beta .slot-sum-chips span { padding: 2px 8px; border-radius: 999px; background: rgba(118, 118, 128, 0.12); font-size: 11px; color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ui-beta .slot-sheet { display: none; }
body.ui-beta .slot-sheet.open { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 86vh; overflow: auto; background: var(--bg-elev);
  border-radius: 16px 16px 0 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22); }
@media (min-width: 700px) { body.ui-beta .slot-sheet.open { left: 50%; right: auto; bottom: 24px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); border-radius: 16px; } }
body.ui-beta .slot-sheet .slot-opts { grid-template-columns: 1fr; padding-left: 0; }
body.ui-beta .slot-sheet .slot-main .lst-slot-n { display: none; }
body.ui-beta .slot-sheet-head { text-align: center; padding: 2px 0 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; font-size: 17px; }
body.ui-beta .slot-sheet-foot { margin-top: 12px; }
.slot-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.4); }
.slot-backdrop[hidden] { display: none; }
body.slot-sheet-open { overflow: hidden; }
/* the photo chips */
.ref-cover-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.ref-cover-chip { font: inherit; cursor: pointer; min-height: 30px; }
.ref-cover-chip.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.ref-grid.filtered .ref-tile:not(.match) { display: none; }
/* the studio: the picture first, then the decision; the brief folded below */
/* two rules on purpose: a browser without :has() drops a whole selector list, so the page's own class carries it too */
body.ui-beta main.content:has(.gen-card-work) { display: flex; flex-direction: column; gap: 12px; }
body.ui-beta main.content.gen-page { display: flex; flex-direction: column; gap: 12px; }
body.ui-beta main.content:has(.gen-card-work) > .card { margin: 0; }
body.ui-beta main.content.gen-page > .card { margin: 0; }
body.ui-beta main.content > .gen-card-work { order: 1; }
body.ui-beta main.content > .gen-card-refs { order: 2; }     /* the references right under the picture (2026-10-09) */
body.ui-beta main.content > .gen-card-note { order: 3; }
body.ui-beta main.content > .gen-card-history { order: 4; }
body.ui-beta main.content > .gen-card-brief { order: 5; }
body.ui-beta main.content > .gen-card-backup { order: 6; }
body.ui-beta main.content > script { order: 99; }
body.ui-beta .gen-card-brief > .strip-title { display: none; }
/* inside the work card the picture leads too: the other roads (two steps, the re-lay) drop under the loop */
body.ui-beta .gen-card-work { display: flex; flex-direction: column; }
body.ui-beta .gen-card-work > .gen-zone-roads, body.ui-beta .gen-card-work > .gen-zone-roads2 { order: 10; }
body.ui-beta .gen-card-work > #gen-job { order: 9; }
body.ui-beta .gen-current { flex-direction: column; align-items: stretch; }
body.ui-beta .gen-current > .gen-imgwrap, body.ui-beta .gen-current > img { width: 100%; max-width: 640px; margin: 0 auto; }
body.ui-beta .gen-current-side { display: flex; flex-direction: column; }
.gen-zone { display: contents; }
body.ui-beta .gen-zone { display: none; }
body.ui-beta .gen-zone.open { display: block; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; margin-top: 8px; }
body.ui-beta .gen-zone-h { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
body.ui-beta .gen-zone-b { order: 3; }
body.ui-beta .gen-zone-a { order: 4; }
body.ui-beta .gen-zone-approve { order: 5; }
body.ui-beta .gen-zone-more, body.ui-beta .gen-zone-more2 { order: 6; }
.gen-actbar { display: none; }
body.ui-beta .gen-actbar { display: flex; gap: 8px; margin: 10px 0 4px; }
body.ui-beta .gen-actbar .btn { flex: 1; min-height: 48px; font-size: 15px; border-radius: 12px; }
body.ui-beta .gen-actbar .gen-act-more { flex: 0 0 56px; font-weight: 800; letter-spacing: .05em; }
body.ui-beta .gen-actbar .btn.on { background: rgba(10, 132, 255, 0.14); color: var(--accent); }
/* the approval flow (2026-10-09): the status strip, the bar's own form, the answer under the bar, the approve sheet */
body.ui-beta .gen-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
body.ui-beta .gen-actbar > form { flex: 1; display: flex; min-width: 0; }
body.ui-beta .gen-actbar > form .btn { flex: 1; }
body.ui-beta .gen-actbar > a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
body.ui-beta .gen-approve-out:not(:empty) { margin: 4px 0 8px; }
body.ui-beta .gen-act-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
body.ui-beta .gen-approve-sheet .gen-failure { margin: 6px 0; }
body.ui-beta .gen-approve-sheet .gen-fix .btn { flex: 1 1 100%; min-height: 48px; }

/* ---- the rest of the review (2026-10-09 "full solution in beta, full") ---- */
/* the words rows share the plan rows' sheet; the sheet title stands in for the section title */
body.ui-beta .wrow { border-top: 1px solid var(--hairline); }
body.ui-beta .wrow:first-child { border-top: 0; }
body.ui-beta .wrow .wrow-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui-beta .wrow .slot-sheet > .sect-title:first-of-type { margin-top: 0; }
/* the board's states as pills */
body.ui-beta .gen-row .gen-chip-state { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: rgba(118, 118, 128, 0.12); color: var(--text-dim); max-width: 100%; }
body.ui-beta .gen-row .gen-chip-state .rt-pill { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; }
body.ui-beta .gen-row.done .gen-chip-state { background: rgba(48, 209, 88, 0.18); color: #1a7f37; }
body.ui-beta .gen-row.review .gen-chip-state { background: rgba(10, 132, 255, 0.14); color: #0a5ec2; }
body.ui-beta .gen-row.backup .gen-chip-state, body.ui-beta .gen-row.needs_input .gen-chip-state { background: rgba(255, 159, 10, 0.18); color: #9a5b00; }
body.ui-beta .gen-row.live .gen-chip-state { background: rgba(94, 92, 230, 0.14); color: #3f3dbd; }
body.ui-beta .gen-row.flagged .gen-chip-state { background: rgba(255, 159, 10, 0.18); color: #b45309; }
/* the headed step menus */
.sheet-h { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 8px 12px 2px; }
.sheet-h + .sheet-h { display: none; }
/* the Copy draft and A+ words fields: the row, then the body as a sheet */
body.ui-beta .copy-field-d > summary { min-height: 48px; }
body.ui-beta .copy-field-d > summary .step-chevron { margin-left: auto; }
body.ui-beta .copy-counter-sum { margin-left: 2px; }
body.ui-beta details.copy-field-d[open] > .copy-pair, body.ui-beta details.copy-field-d[open] > form {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 86vh; overflow: auto; background: var(--bg-elev);
  border-radius: 16px 16px 0 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22); margin: 0; }
body.ui-beta details.copy-field-d[open] > .copy-pair { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { body.ui-beta details.copy-field-d[open] > .copy-pair, body.ui-beta details.copy-field-d[open] > form {
  left: 50%; right: auto; bottom: 24px; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); border-radius: 16px; } }
body.field-sheet-open { overflow: hidden; }
/* the Drive pick page's chips */
.drive-chips a { text-decoration: none; }
/* the Publish tab's diff strip */
.pub-diff { display: flex; gap: 5px; overflow-x: auto; padding: 6px 0 2px; scrollbar-width: none; }
.pub-diff::-webkit-scrollbar { display: none; }
.pub-diff-thumb { width: 56px; height: 56px; flex: 0 0 56px; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid var(--hairline); }
.pub-open { margin: 6px 0 8px; }

/* one picture's words on the A+ studio page (owner 2026-10-10): the line, and the fold that rewrites them alone */
.gen-aplus-words { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.gen-aplus-words .gen-words-fold textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-elev); color: var(--text); margin: 4px 0 8px; }

/* make the images match (2026-10-10): two strips of pictures - tap the look to follow, tick the images to change */
.hm-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.hm-tile { position: relative; flex: 0 0 104px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; scroll-snap-align: start; }
.hm-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hm-tile img { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; border: 3px solid transparent; background: var(--bg-elev); }
.hm-tile.is-on img { border-color: var(--accent); }
.hm-cap { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ring { display: none; position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.hm-look.is-on .hm-ring { display: inline-block; }
.hm-tick { display: none; position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 800; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.hm-change.is-on .hm-tick { display: inline-flex; }
.hm-change:not(.is-on) img { opacity: 0.75; }
.hm-verdict { font-size: 11px; font-weight: 600; }
.hm-verdict.ok { color: #1a7f37; }
.hm-verdict.off { color: #9a5b00; }
.hm-verdict.scene { color: var(--text-dim); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }

/* the review after a harmonise (2026-10-10): one row per image, the current version beside the new ones */
.hm-row { padding: 10px 0; border-top: 1px solid var(--hairline); }
.hm-row:first-of-type { border-top: 0; }
.hm-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.hm-compare { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.hm-take { flex: 0 0 132px; display: flex; flex-direction: column; gap: 4px; }
.hm-take img { width: 132px; height: 132px; object-fit: cover; border-radius: 12px; border: 3px solid transparent; background: var(--bg-elev); display: block; }
.hm-take.hm-now img { border-color: rgba(118, 118, 128, 0.35); }
.hm-take.is-pick img { border-color: var(--accent); }
.hm-take-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 12px; }
.hm-take-btn:active img { opacity: 0.7; }
.hm-row.is-decided .hm-row-head { margin-bottom: 0; }

/* the benefit ledger and the swap row on the A+ words step (2026-10-10) */
.aplus-ledger { margin: 8px 0 12px; }
.aplus-ledger textarea, .aplus-steer textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-elev); color: var(--text); }
.aplus-swap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aplus-swap select { flex: 1; min-width: 160px; }

/* the words step as one flow (2026-10-10): the change sheet's line; the steer's trace */
.aplus-change-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-elev); color: var(--text); }
.aplus-steer-diff s { color: var(--text-dim); }
.aplus-balance { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* the A+ module sheet (2026-10-10 "unusable, I click and nothing happens"): reads top to bottom, one primary, the improve in place */
.copy-pair.aplus-mod-sheet { display: grid; grid-template-columns: 1fr; gap: 12px; }
.aplus-mod-sheet .sheet-title { font-weight: 800; font-size: 17px; }
.aplus-read { display: grid; gap: 8px; }
.aplus-read-row { display: grid; gap: 3px; }
.aplus-read-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); display: flex; gap: 6px; align-items: center; }
.aplus-read-text { white-space: pre-line; line-height: 1.45; }
.aplus-read-text.head { font-weight: 700; font-size: 16px; }
.aplus-improve-box { border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: rgba(0, 0, 0, 0.025); }
.aplus-improve-box textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-elev); color: var(--text); }
.aplus-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aplus-pick-chip { font: inherit; font-size: 13px; min-height: 34px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--bg-elev); color: var(--text); cursor: pointer; text-align: left; }
.aplus-pick-chip.on { background: rgba(10, 132, 255, 0.14); border-color: transparent; color: #0a5ec2; font-weight: 600; }
.aplus-edit > summary { display: flex; align-items: center; gap: 6px; min-height: 40px; flex-wrap: wrap; }
.aplus-edit > summary .disclose-chevron { margin-left: auto; }
.aplus-edit .lst-disclose-body { display: grid; gap: 8px; }
.aplus-mod-links { display: flex; gap: 16px; flex-wrap: wrap; }
.aplus-mod-links .link-btn { min-height: 40px; }
/* Use this is the sheet's primary; the Done the beta adds stays secondary while there is one */
.aplus-mod-sheet.has-primary > .slot-sheet-foot > .btn.primary { background: var(--bg-elev); color: var(--text); border: 1px solid var(--hairline); }

/* the banner's look (owner 2026-10-10 "always 1 and 2"): three tiles in the module sheet, a schematic each */
.hero-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hero-tile { font: inherit; text-align: left; border: 1px solid var(--hairline); border-radius: 12px; padding: 8px; background: var(--bg-elev);
  color: var(--text); display: grid; gap: 4px; cursor: pointer; min-width: 0; align-content: start; }
.hero-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.18); }
.hero-tile:disabled { opacity: .6; cursor: default; }
.hero-tile-name { font-weight: 700; font-size: 13px; line-height: 1.2; }
.hero-tile .hint { font-size: 11px; line-height: 1.3; }
.hero-mini { position: relative; display: block; height: 46px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(90deg, #f1efe9 0 60%, #cfd6d2 60%); }
.hero-mini i { position: absolute; left: 8%; height: 4px; border-radius: 2px; background: #6b6b6b; display: none; }
.hero-mini .hm-h { top: 22%; width: 42%; height: 8px; background: #2b2b2b; display: block; }
.hero-mini b { position: absolute; right: 9%; top: 20%; width: 24%; height: 60%; border-radius: 4px; background: #6f7d76; }
.hero-mini-tagline .hm-h { top: 34%; width: 46%; height: 10px; }
.hero-mini-proof .hm-l:nth-of-type(2) { display: block; top: 58%; width: 30%; }
.hero-mini-callouts .hm-l { display: block; width: 20%; left: 14%; }
.hero-mini-callouts .hm-l:nth-of-type(2) { top: 56%; }
.hero-mini-callouts .hm-l:nth-of-type(3) { top: 74%; }
.hero-mini-callouts .hm-l::before { content: ""; position: absolute; left: -9px; top: -1px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* the blockers line on the A+ words step (2026-10-10): each a tap that opens its module */
.aplus-blockers .link-btn { text-align: left; min-height: 36px; line-height: 1.3; }

/* fix on an adaptation (owner 2026-10-12): the sheet's line, the photo ticks, the one-model row */
.gen-adapt-fix-line { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; margin: 10px 0 6px;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg-elev); color: var(--text); }
.gen-adapt-fix-refs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.gen-adapt-fix-ref { position: relative; display: inline-block; }
.gen-adapt-fix-ref img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; background: #fff; }
.gen-adapt-fix-ref input { position: absolute; left: 4px; top: 4px; margin: 0; width: 18px; height: 18px; }
.gen-adapt-fix-ref input:checked + img { border-color: var(--accent); }
.gen-adapt-fix-one { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.gen-adapt-fix-one select { flex: 1; min-width: 0; }
.gen-adapt-fix-one .ios-sheet-btn { width: auto; min-height: 44px; font-size: 16px; padding: 0 14px; }

/* the variant row's pair (2026-10-12): approved now -> the new pick, a full-width strip under the words; pills may wrap on a phone */
.gen-adapt-pair { flex: 0 0 100%; display: flex; align-items: center; gap: 12px; padding: 2px 0 4px; }
.gen-adapt-pair-item { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.gen-adapt-pair-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hairline); background: #fff; cursor: zoom-in; }
.gen-adapt-pair-item:last-child img { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.18); }
.gen-adapt-pair-arrow { font-size: 22px; color: var(--text-dim); }
.gen-adapt-main .rt-pill, .gen-adapt-main .lst-verdict { white-space: normal; max-width: 100%; }

/* ---- a product born by a split (2026-10-12): one line under the header, the merge back beside it ---- */
.split-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px;
  border-radius: 10px; background: var(--card-bg, #fff); border: 1px solid var(--line, #e5e5ea); font-size: 13px; }
.split-banner-text { color: var(--muted, #6e6e73); }
.gen-split-hint { margin-bottom: 6px; }
.gen-split-hint .btn { margin-left: 6px; }

/* ---- something changed about the product (2026-10-12 evening): the findings as rows, before and after, the tiles ---- */
.change-direction { font-size: 16px; font-weight: 600; margin: 2px 0 4px; }
.change-row { align-items: flex-start; gap: 10px; cursor: pointer; }
.change-row input[type="checkbox"] { margin-top: 5px; flex-shrink: 0; }
.change-row .lst-row-text { gap: 3px; }
.change-before { opacity: .75; }
.change-after .copy-pill, .change-before .copy-pill { margin-right: 4px; }
.change-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--line, #e5e5ea); }
.hub-change-link { display: inline-block; margin-top: 6px; }
