/* ReachLab: one column, one action per row. Anything secondary is folded or in a tooltip. */
:root {
  color-scheme: dark;
  --bg: #0d0f13;
  --panel: #15181e;
  --panel-2: #1b1f27;
  --panel-3: #232833;
  --line: #262b34;
  --line-2: #323845;
  --text: #e8eaed;
  --muted: #9aa0ab;
  --accent: #f97316;
  --accent-ink: #14100c;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --ok: #3fb950;
  --warn: #f0b429;
  --bad: #f85149;
  --radius: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 70px; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: 60px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.15s;
}
.skip:focus { top: 10px; text-decoration: none; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: rgba(16, 19, 24, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
}
.brand:hover strong { color: var(--accent); }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.brand strong { font-size: 15px; letter-spacing: -0.01em; }
.mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
}

.app-select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  max-width: 240px;
  min-height: 34px;
}
.app-select:hover { border-color: var(--line-2); }

.tabs { display: flex; gap: 2px; margin-left: 6px; }
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 13px;
  min-height: 36px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.tab.on { background: var(--panel-2); color: var(--text); }
.tab.on::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0.55;
}
/* orange is reserved for the one main action (.cta); tab badges stay neutral */
.badge {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.status-pill {
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.status-pill:hover { border-color: var(--line-2); color: var(--text); }
.status-pill.ok { border-color: transparent; padding: 4px 6px; }
.status-pill.ok .status-text { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.18); }

.gear {
  position: relative;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  transition: color 0.15s, border-color 0.15s;
}
.gear:hover { color: var(--text); border-color: var(--accent); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 16px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--accent-soft);
  transition: filter 0.15s, transform 0.1s, box-shadow 0.2s;
}
.cta:hover { filter: brightness(1.08); box-shadow: 0 0 0 4px var(--accent-soft); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.cta[hidden] { display: none; }
.cta-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(20, 16, 12, 0.18); font-size: 12px; line-height: 20px; text-align: center; }
.cta.busy { cursor: progress; }
.cta.busy .cta-label::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: cta-spin 0.7s linear infinite; }
@keyframes cta-spin { to { transform: rotate(360deg); } }

/* ---------- page ---------- */

.page { max-width: 880px; margin: 0 auto; padding: 24px 20px 40px; animation: fade 0.25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.head { display: flex; align-items: center; gap: 10px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.head .count { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.head .sub { color: var(--muted); font-size: 12.5px; }
.head .spacer { flex: 1; }

.tiny { color: var(--muted); font-size: 12px; }
.break { overflow-wrap: anywhere; word-break: break-word; }

/* empty + loading */

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--muted);
}
.empty-state .icon { font-size: 28px; line-height: 1; }
.empty-state strong { color: var(--text); font-size: 16px; }
.empty-state p { max-width: 38ch; font-size: 13.5px; }
.empty-state .btn { margin-top: 8px; }

.skeleton { display: grid; gap: 10px; }
.skeleton i {
  height: 54px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- today list ---------- */

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.row:hover { border-color: var(--line-2); background: #181c23; }
.row.overdue { border-left: 3px solid var(--warn); }

.row .av { width: 38px; height: 38px; font-size: 14px; }

.row .main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.row .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.row .who:hover { color: var(--accent); }
.row .what { font-size: 12.5px; color: var(--muted); }
.row .meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

.chip {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-2);
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
}

.acts { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 13px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, transform 0.08s, opacity 0.15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { opacity: 0.88; color: var(--accent-ink); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.busy { pointer-events: none; }
.btn.busy::before {
  content: "";
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }

.dots {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  line-height: 1;
  font-size: 16px;
  transition: color 0.15s, border-color 0.15s;
}
.dots:hover, .dots[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 40;
  display: grid;
  min-width: 170px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: pop 0.12s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu button {
  background: transparent;
  border: 0;
  text-align: left;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text);
}
.menu button:hover, .menu button:focus-visible { background: var(--accent-soft); color: var(--accent); outline: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.menu .warn-item:hover { background: rgba(248, 81, 73, 0.14); color: var(--bad); }

.flag {
  font-size: 10.5px;
  color: var(--warn);
  border: 1px solid rgba(240, 180, 41, 0.4);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* ---------- creators table ---------- */

.search {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 34px;
  font-size: 13px;
  width: 190px;
}
.search:focus { border-color: var(--accent); outline: none; }
.link {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 4px;
  min-height: 32px;
}
.link:hover { color: var(--accent); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fchip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 550;
  transition: color 0.15s, border-color 0.15s;
}
.fchip:hover { color: var(--text); border-color: var(--line-2); }
.fchip[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(249, 115, 22, 0.5); color: var(--accent); }
.fchip .n { opacity: 0.7; margin-left: 4px; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th, .grid td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: #181c23; }
.grid th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; white-space: nowrap; }
.grid th button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: inherit;
  letter-spacing: inherit;
}
.grid th button:hover { color: var(--text); }
.grid th button:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.grid th[aria-sort] button { color: var(--text); }
.num { font-variant-numeric: tabular-nums; }

.score { display: inline-flex; align-items: center; gap: 8px; min-width: 76px; font-variant-numeric: tabular-nums; }
.score i { flex: 1; height: 4px; min-width: 34px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.score i b { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.score.hi i b { background: var(--ok); }
.score.lo i b { background: var(--muted); }

.status {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 7px;
  min-height: 30px;
  font-size: 12px;
  max-width: 130px;
}
.status.st-contacted { border-color: rgba(249, 115, 22, 0.5); color: var(--accent); }
.status.st-replied { border-color: rgba(63, 185, 80, 0.5); color: var(--ok); }
.status.st-booked { border-color: var(--ok); color: var(--ok); }
.status.st-declined { border-color: rgba(248, 81, 73, 0.5); color: var(--bad); }

/* ---------- forms ---------- */

.form { display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 16px; }
.form .wide { grid-column: 1 / -1; }
.form label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.form input[type="text"], .form input[type="number"], .form input[type="url"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  min-height: 38px;
  font-size: 14px;
}
.form input:focus { border-color: var(--accent); outline: none; }
.form .inline { display: flex; gap: 6px; }
.form .inline input { flex: 1; }
.form button { height: 38px; }
.hint { font-size: 11.5px; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

.opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.opts .check { display: flex; align-items: center; gap: 8px; height: 38px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--text); cursor: pointer; }
.opts .check input { width: 16px; height: 16px; accent-color: var(--accent); }

.progress { margin-top: 8px; }
.meter { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); width: 0; transition: width 0.4s ease; }

.fold { border-top: 1px solid var(--line); padding-top: 8px; }
.fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 6px 0;
}
.fold > summary:hover { color: var(--text); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; color: var(--accent); font-weight: 700; width: 10px; }
.fold[open] > summary::before { content: "–"; }
.fold[open] > summary { margin-bottom: 10px; }

/* ---------- drawer ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(5, 7, 10, 0.55);
  animation: fadein 0.18s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 94vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 16px 18px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 50;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 12px;
  align-content: start;
  animation: slide 0.22s var(--ease);
}
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.d-head { display: flex; align-items: center; gap: 10px; position: sticky; top: -16px; margin: -16px -18px 0; padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 1; }
.d-head strong { font-size: 15px; }
.d-head .tiny { margin-left: auto; }
.x {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  width: 32px; height: 32px;
  border-radius: 8px;
}
.d-head .tiny + .x { margin-left: 0; }
.d-head > strong + .x { margin-left: auto; }
.x:hover { color: var(--text); background: var(--panel-2); }

.msg {
  white-space: pre-wrap;
  background: #101318;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 13.5px;
  line-height: 1.6;
}

.d-acts { display: flex; flex-wrap: wrap; gap: 6px; }

.piece { margin-bottom: 10px; }
.piece p { white-space: pre-wrap; font-size: 13px; background: #101318; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 3px; }

.tl { display: flex; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.tl .tiny { margin-left: auto; }

.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.principles li { font-size: 12px; color: var(--muted); }
.principles strong { display: block; color: var(--text); font-size: 12.5px; }

.flag-line { color: var(--warn); font-size: 12px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 13px;
  max-width: min(560px, 92vw);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 60;
  animation: toast-in 0.2s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.ok { border-color: rgba(63, 185, 80, 0.45); }
.toast.bad { border-color: rgba(248, 81, 73, 0.45); color: #ffb4ae; }

/* ---------- narrow ---------- */

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .app-select { flex: 1; max-width: none; }
  .status-pill { display: none; }
  .gear[data-level="warn"]::after, .gear[data-level="bad"]::after { content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); box-sizing: content-box; }
  .gear[data-level="bad"]::after { background: var(--bad); }
  .brand strong { display: none; }
  .cta { padding: 0 12px; }
  .tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .tab { flex: 1; justify-content: center; }
  .page { padding: 16px 14px 40px; }
  .row { flex-wrap: wrap; }
  .row .main { flex-basis: calc(100% - 60px); }
  .acts { margin-left: 0; width: 100%; justify-content: flex-end; }
  .search { width: 100%; order: 5; }
  .form { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr 1fr; }
  .grid th:nth-child(4), .grid td:nth-child(4) { display: none; }
  .drawer { width: 100vw; }
  .toast { bottom: 16px; }
}

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

/* creator identity: avatar and what they post */
.av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
  border: 1px solid var(--line);
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  vertical-align: middle;
}
.av.lg { width: 42px; height: 42px; font-size: 16px; }
.av.ph { border-style: dashed; }
.d-id { display: grid; gap: 2px; margin-right: auto; }
.summary { font-size: 13px; color: var(--text); line-height: 1.5; }

/* ---------- app switcher ---------- */
.switcher { position: relative; min-width: 0; }
.sw-btn {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 10px 4px 5px; min-height: 38px; max-width: 260px; width: 100%;
  font-size: 13.5px; font-weight: 600; text-align: left;
  transition: border-color 0.15s;
}
.sw-btn:hover, .sw-btn[aria-expanded="true"] { border-color: var(--accent); }
.sw-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sw-caret { color: var(--muted); font-size: 11px; }
.app-ico { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; background: var(--panel-3); display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.app-ico.lg { width: 44px; height: 44px; border-radius: 10px; font-size: 18px; }
.sw-menu {
  position: absolute; left: 0; top: 46px; z-index: 40; width: 320px; max-width: 92vw;
  max-height: min(70vh, 460px); overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55); animation: pop 0.12s var(--ease);
}
.sw-label { padding: 6px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sw-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; border-radius: 8px; padding: 8px 10px; text-align: left; color: var(--text);
}
.sw-item:hover, .sw-item:focus-visible { background: var(--accent-soft); outline: none; }
.sw-item[aria-selected="true"] { background: var(--panel-3); }
.sw-item .t { display: grid; min-width: 0; flex: 1; }
.sw-item .t strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-item .t span { font-size: 11.5px; color: var(--muted); }
.sw-item .check { color: var(--accent); font-weight: 700; }
.sw-add { color: var(--accent); font-weight: 600; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: 11px; }
.sw-add .plus { width: 28px; height: 28px; border-radius: 7px; border: 1px dashed var(--accent); display: grid; place-items: center; font-size: 18px; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 2px; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .d { font-size: 11.5px; color: var(--muted); }
.kpi.hot { border-color: rgba(249,115,22,0.5); background: linear-gradient(180deg, var(--accent-soft), var(--panel)); }
.kpi.hot .v { color: var(--accent); }
.kpi.link { cursor: pointer; text-align: left; color: inherit; }
.kpi.link:hover { border-color: var(--accent); }

.section-h { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.section-h h2 { font-size: 14px; margin: 0; font-weight: 650; }
.section-h .tiny { margin-left: auto; }

.funnel { display: grid; gap: 8px; }
.fn { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 12px; font-size: 13px; }
.fn .track { height: 22px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.fn .track b { display: block; height: 100%; border-radius: 6px; background: var(--accent); min-width: 2px; transition: width 0.5s var(--ease); }
.fn:nth-child(2) .track b { opacity: 0.85; }
.fn:nth-child(3) .track b { background: var(--ok); opacity: 0.8; }
.fn:nth-child(4) .track b { background: var(--ok); }
.fn .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fn .n small { color: var(--muted); font-weight: 400; }

.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.app-card {
  display: grid; gap: 12px; text-align: left; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  transition: border-color 0.15s, transform 0.1s;
}
.app-card:hover { border-color: var(--accent); }
.app-card.cur { border-color: rgba(249,115,22,0.55); }
.app-card .top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.app-card .top .t { display: grid; min-width: 0; }
.app-card .top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.app-card .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.app-card .stats span { display: grid; font-size: 11px; color: var(--muted); }
.app-card .stats b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.app-card.add { place-items: center; align-content: center; min-height: 128px; border-style: dashed; border-color: var(--line-2); color: var(--accent); font-weight: 600; background: transparent; }
.app-card.add .plus { font-size: 26px; line-height: 1; }

.upnext { display: grid; gap: 6px; }
.upnext .row { cursor: pointer; }

.store-badge { font-size: 10.5px; border: 1px solid var(--line-2); color: var(--muted); border-radius: 5px; padding: 0 5px; }

.add-hint { display: grid; gap: 6px; }
.err-line { color: #ffb4ae; font-size: 12.5px; }

@media (max-width: 720px) {
  .switcher { flex: 1; }
  .sw-btn { max-width: none; }
  .sw-menu { width: calc(100vw - 28px); }
  .fn { grid-template-columns: 74px 1fr 54px; }
}

/* ---------- add app panel ---------- */
.add-intro { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.add-form { display: grid; gap: 8px; }
.add-form label { font-size: 12px; font-weight: 600; color: var(--muted); }
.url-field { display: flex; gap: 6px; }
.url-field input {
  flex: 1; min-width: 0; min-height: 42px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px;
}
.url-field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.url-field input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(248,81,73,0.15); }
.url-field .btn { min-height: 42px; }
.detect { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.store-badge.ok { color: var(--ok); border-color: rgba(63,185,80,0.5); }
.btn.block { width: 100%; min-height: 42px; margin-top: 4px; }
.steps { list-style: none; margin: 6px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.steps b { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; }

/* background research jobs: visible on every tab, survives reload */
.jobs {
  max-width: 880px;
  margin: 14px auto 0;
  padding: 0 20px;
  display: grid;
  gap: 8px;
}
.jobs[hidden] { display: none; }
.job {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(140px, 2fr) 120px 40px auto;
  gap: 10px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
}
.job-app { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-stage { color: var(--muted); }
.job-bar { height: 5px; background: #101318; border-radius: 999px; overflow: hidden; }
.job-bar b { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.job-pct { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 720px) {
  .job { grid-template-columns: 1fr auto; row-gap: 6px; }
  .job-bar { grid-column: 1 / -1; }
  .job-pct { display: none; }
}

/* platform switch and platform chip */
.plat { display: flex; align-items: center; gap: 6px; }
.plat-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
}
.plat-btn.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.plat-btn[hidden] { display: none; }
.plat { margin-left: auto; }
.chip.plat { color: var(--muted); }

/* ---------- reply analysis ---------- */
.reply-box, .convo { display: grid; gap: 10px; padding: 14px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; }
.reply-box label { font-size: 13px; }
.reply-box textarea, .fu-text {
  width: 100%; resize: vertical; min-height: 110px;
  background: #101318; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 14px; line-height: 1.55;
}
.reply-box textarea:focus, .fu-text:focus, .fu-note input:focus, .fu-step select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.reply-box select, .fu-step select, .fu-note input {
  background: #101318; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; min-height: 34px; font-size: 13px; width: 100%;
}
.reply-box .d-acts select { width: auto; }
.convo-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.convo-h .link { margin-left: auto; }
.quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: #101318; border-radius: 0 8px 8px 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.analysis { display: grid; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.an-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.an-summary { font-size: 13.5px; line-height: 1.55; }
.pill { font-size: 12px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--panel-3); color: var(--text); }
.pill.ok { background: rgba(63,185,80,0.16); color: var(--ok); }
.pill.warn { background: rgba(240,180,41,0.16); color: var(--warn); }
.pill.bad { background: rgba(248,81,73,0.16); color: var(--bad); }
.warmth { display: inline-flex; gap: 3px; }
.warmth i { width: 14px; height: 6px; border-radius: 3px; background: var(--panel-3); }
.warmth i.on { background: var(--accent); }
.an-list ul { margin: 3px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 2px; }
.an-list.warn ul { color: var(--warn); }
.an-next { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.an-next strong { font-size: 14px; color: var(--accent); }
.fu { display: grid; gap: 8px; }
.fu-step, .fu-note { display: grid; gap: 4px; }
.fu .d-acts { margin-top: 2px; }
.fu.sent .msg { border-color: rgba(63,185,80,0.4); }

.fu-box { display: grid; gap: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.fu-label { font-size: 13px; font-weight: 650; }
.tt-warn { font-size: 12px; min-height: 16px; color: var(--muted); }
.tt-warn.bad { color: var(--warn); }
.tt-warn.bad::before { content: "⚠ "; }

/* platform logo in lists and drawers */
.plat-ico {
  display: inline-flex;
  align-items: center;
  vertical-align: -2px;
  margin-left: 5px;
  color: var(--muted);
  opacity: 0.85;
}
.plat-ico:hover { opacity: 1; }
.pico { width: 14px; height: 14px; display: block; }
.d-head .plat-ico .pico, .d-id .plat-ico .pico { width: 15px; height: 15px; }

/* ---------- conversation mode + offer email ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #101318; border: 1px solid var(--line); border-radius: 9px; width: fit-content; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }
.seg button[aria-checked="true"] { background: var(--panel-3); color: var(--text); }
.fld { display: grid; gap: 4px; }
.fld[hidden] { display: none; }
.fld input, .fld select { background: #101318; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px; font-size: 13.5px; width: 100%; }
.fld input:focus, .fld select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.fld input:disabled, .em-body:disabled { opacity: 0.7; }
.fu-head { display: flex; align-items: center; gap: 10px; }
.fu-box.email { border-color: rgba(249,115,22,0.35); }
.em-body { font-family: inherit; }
.next-panel { padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.an-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.fact { display: grid; gap: 1px; padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.fact strong { font-size: 13px; overflow-wrap: anywhere; }

/* install links, one row per store */
.linkrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.linkrow:last-of-type { border-bottom: 0; }
.linkrow .tiny { margin: 0; }
.linkrow p { grid-column: 2; }
.linkrow .btn { grid-row: 1 / span 2; grid-column: 3; align-self: center; }

/* store icons: which storefronts the app is live in */
.store-badge.ico { display: inline-flex; align-items: center; padding: 2px 5px; margin-right: 4px; }
.sico { width: 12px; height: 12px; display: block; }
.sw-due { color: var(--muted); }
.sw-due::before { content: " · "; }
.section-h h2 .store-badge { vertical-align: middle; }

/* ---------- the deal: stages, thread, negotiation ---------- */
.deal { display: grid; gap: 8px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; counter-reset: st; }
.stages li { display: grid; gap: 5px; justify-items: start; font-size: 10.5px; color: var(--muted); min-width: 0; }
.stages li i { display: block; width: 100%; height: 4px; border-radius: 3px; background: var(--panel-3); }
.stages li.done i { background: rgba(249,115,22,0.55); }
.stages li.cur i { background: var(--accent); }
.stages li.cur { color: var(--text); font-weight: 650; }
.stages li span { line-height: 1.2; overflow-wrap: anywhere; }
.turn { font-size: 13px; }
.turn strong { color: var(--accent); }
.turn.wait strong { color: var(--muted); }
.agreed { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 8px 10px; background: rgba(63,185,80,0.12); border: 1px solid rgba(63,185,80,0.4); border-radius: 9px; font-size: 13px; }
.agreed strong { color: var(--ok); }
.waiting { font-size: 13px; color: var(--muted); padding: 8px 2px; }
.chip.stage { color: var(--accent); background: var(--accent-soft); }
.chip.ok { color: var(--ok); background: rgba(63,185,80,0.14); }

.thread { display: grid; gap: 6px; }
.b { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.b > summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; font-size: 12.5px; }
.b > summary::-webkit-details-marker { display: none; }
.b-who { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); flex: 0 0 auto; }
.b.me { margin-left: 22px; border-color: rgba(249,115,22,0.3); }
.b.me .b-who { color: var(--accent); }
.b.them { margin-right: 22px; }
.b-head { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-body { padding: 0 10px 10px; display: grid; gap: 6px; }

.neg { display: grid; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid rgba(240,180,41,0.35); border-radius: 10px; }
.neg-h { display: flex; align-items: center; gap: 10px; }
.neg-h .pill { margin-left: auto; }
.rates { width: 100%; border-collapse: collapse; font-size: 13px; }
.rates td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rates tr:last-child td { border-bottom: 0; }
.rates .chip { margin-left: 4px; }
.why { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }
.budget { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.budget .btn { min-height: 36px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.check-line input { accent-color: var(--accent); }
.agree-form { display: grid; gap: 8px; }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.principles-h { margin: 6px 0 -4px; text-transform: uppercase; letter-spacing: 0.06em; }
.principles .cite { display: block; margin-top: 3px; font-size: 11px; font-style: italic; opacity: 0.8; }

.reanalyze { margin-left: auto; font-size: 12px; }
.outdated { color: var(--warn); }
.rates-in textarea { width: 100%; background: #101318; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: vertical; }
.rates-in textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.form select, .next-panel select[data-rights] { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; font-size: 13.5px; }
.form select:focus { border-color: var(--accent); outline: none; }

.bundles { display: grid; gap: 3px; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; }
.bundles p { line-height: 1.45; }
.next-panel select[data-extras] { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; font-size: 13.5px; }

/* ---------- conversation view, redesigned: one move at a time ---------- */
.drawer { gap: 10px; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.turn-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.focus { display: grid; gap: 8px; padding: 14px; background: linear-gradient(180deg, var(--accent-soft), var(--panel-2) 60%); border: 1px solid rgba(249,115,22,0.45); border-radius: 14px; }
.focus.is-wait { background: var(--panel-2); border-color: var(--line-2); }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.focus.is-wait .kicker { color: var(--muted); }
.focus-title { margin: 0; font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
.focus-why { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.focus-to { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.focus-to input { flex: 1; min-width: 180px; background: #101318; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 34px; }
.focus-to[hidden] { display: none; }
.focus .d-acts .btn.primary { min-height: 40px; padding: 8px 16px; font-size: 14px; }

.more > summary, .terms > summary, .neg > summary, .said > summary, .history > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 6px 0;
}
.more > summary::-webkit-details-marker, .terms > summary::-webkit-details-marker, .neg > summary::-webkit-details-marker, .said > summary::-webkit-details-marker { display: none; }
.more > summary::before, .terms > summary::before, .neg > summary::before, .said > summary::before { content: "+"; color: var(--accent); font-weight: 700; width: 10px; }
.more[open] > summary::before, .terms[open] > summary::before, .neg[open] > summary::before, .said[open] > summary::before { content: "–"; }
.more > summary:hover, .terms > summary:hover, .neg > summary:hover, .said > summary:hover { color: var(--text); }
.more, .terms { border-top: 1px solid var(--line); padding-top: 4px; }
.more[open], .terms[open] { display: grid; gap: 8px; }
.terms > summary strong { color: var(--text); }
.terms-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }

.neg, .said { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; display: block; }
.neg[open], .said[open] { display: grid; gap: 10px; padding-bottom: 14px; }
.neg > summary .pill { margin-left: auto; }
.neg > summary strong, .said > summary .said-line { color: var(--text); }
.said > summary { flex-wrap: nowrap; }
.said-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 12.5px; }
.said > summary .pill { flex: 0 0 auto; }
.neg { border-color: rgba(240,180,41,0.3); }

.drafts { display: grid; gap: 10px; }
.how { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 2px; }
.history { padding: 4px 2px 0; }
.fu-box.email { border-color: rgba(249,115,22,0.45); }
.fu-head .pill { margin-left: auto; }
@media (max-width: 720px) { .terms-grid { grid-template-columns: 1fr 1fr; } .terms-grid .btn { grid-column: 1 / -1; } }

/* a grid column grows to its widest unbreakable child unless it is allowed to shrink */
.drawer { grid-template-columns: minmax(0, 1fr); }
.drawer > * { min-width: 0; }

.stages { gap: 3px; }
.stages li { font-size: 10px; letter-spacing: -0.01em; }
.stages li span { white-space: nowrap; }

/* stage labels take the room they need, with even space between them */
.stages { grid-template-columns: repeat(6, auto); justify-content: space-between; column-gap: 8px; }
.stages li span { white-space: nowrap; }

/* ---------- wider panel ---------- */
.drawer { width: min(760px, 96vw); padding: 16px 22px 28px; }
.d-head { margin: -16px -22px 0; padding: 14px 22px; }
@media (max-width: 720px) { .drawer { width: 100vw; padding: 14px 14px 24px; } .d-head { margin: -14px -14px 0; padding: 12px 14px; } }

/* ---------- deals: one click to the person ---------- */
.deals { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.deal-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  transition: border-color 0.15s, background 0.15s;
}
.deal-row:hover, .deal-row:focus-visible { border-color: var(--accent); background: #181c23; }
.deal-row.overdue, .deal-row.due { border-left: 3px solid var(--accent); }
.deal-row .main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.deal-row .who { font-weight: 600; }
.deal-row .what { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-row .meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.deal-row .av { width: 38px; height: 38px; font-size: 14px; }
.deal-state { flex: 0 0 auto; font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.deal-state.ok { background: var(--accent-soft); color: var(--accent); }
.deal-state.bad { background: rgba(248,81,73,0.16); color: var(--bad); }
.app-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); background: var(--panel-2); border-radius: 6px; padding: 1px 7px 1px 3px; }
.app-chip img { width: 14px; height: 14px; border-radius: 4px; }
.app-chip:not(:has(img)) { padding-left: 7px; }
.row[data-open-deal] { cursor: pointer; }

/* ---------- jump to anyone ---------- */
.jump { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); border-radius: 9px; padding: 0 10px; min-height: 36px; font-size: 13px; transition: border-color 0.15s, color 0.15s; }
.jump:hover { border-color: var(--accent); color: var(--text); }
.jump kbd { font: inherit; font-size: 10.5px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--muted); }
.palette { position: fixed; inset: 0; z-index: 80; display: grid; align-items: start; justify-items: center; padding: 11vh 14px 0; background: rgba(5, 7, 10, 0.62); animation: fadein 0.12s ease; }
.palette[hidden] { display: none; }
.palette-box { width: min(620px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.6); overflow: hidden; animation: pop 0.14s var(--ease); }
#palette-input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 16px; outline: none; }
#palette-list { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 420px); overflow-y: auto; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.pal-item.on { background: var(--accent-soft); }
.pal-main { display: grid; min-width: 0; flex: 1; }
.pal-main .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-empty { padding: 18px 12px; list-style: none; }
.palette-help { padding: 8px 14px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .jump-text, .jump kbd { display: none; } .jump { padding: 0; width: 36px; justify-content: center; } }

.jump, .jump kbd, .jump-text { white-space: nowrap; }
@media (max-width: 1180px) { .jump-text, .jump kbd { display: none; } .jump { padding: 0; width: 36px; justify-content: center; } }

/* ---------- optional things: hidden until asked for ---------- */
.opt { display: grid; gap: 8px; }
.opt-btn { justify-self: start; padding: 4px 0; min-height: 28px; font-size: 12.5px; color: var(--muted); }
.opt-btn:hover { color: var(--accent); }
.opt-body { display: grid; gap: 8px; }
.opt-body[hidden] { display: none; }

/* ---------- progress line: dots on a rail, dates under each stage ---------- */
.stages { display: flex; gap: 0; grid-template-columns: none; justify-content: stretch; counter-reset: none; }
.stages li { flex: 1 1 0; display: grid; justify-items: center; align-content: start; gap: 3px; position: relative; min-width: 0; text-align: center; font-size: 11px; letter-spacing: 0; color: var(--muted); }
.stages li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--panel-3); }
.stages li:first-child::before { display: none; }
.stages li.done::before, .stages li.cur::before { background: var(--accent); }
.stages li.cur::before { background: linear-gradient(90deg, var(--accent), var(--panel-3)); }
.stages .dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--panel-2); border: 2px solid var(--panel-3); color: var(--muted); }
.stages li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stages li.cur .dot { background: var(--panel-2); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stages li .s-label { white-space: normal; line-height: 1.2; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; padding: 0 2px; }
.stages li.cur .s-label { color: var(--text); font-weight: 700; }
.stages li.done .s-label { color: var(--text); }
.stages li .s-date { font-size: 10px; min-height: 12px; color: var(--muted); white-space: nowrap; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.status-line .btn { margin-left: auto; }
.status-detail { font-size: 12.5px; color: var(--muted); min-width: 0; }
.turn-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 3px 11px 3px 9px; border-radius: 999px; }
.turn-chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.turn-chip.me { background: var(--accent-soft); color: var(--accent); }
.turn-chip.me i { animation: pulse 1.8s ease-in-out infinite; }
.turn-chip.wait { background: var(--panel-3); color: var(--muted); }
.turn-chip.wait i { background: transparent; border: 2px solid currentColor; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.5); } 50% { box-shadow: 0 0 0 5px rgba(249,115,22,0); } }
@media (max-width: 720px) { .stages li .s-label { font-size: 10px; } .stages .dot { width: 20px; height: 20px; } .stages li::before { top: 10px; } }

/* ---------- long text wraps; nothing scrolls sideways ---------- */
/* A grid column grows to its widest unbreakable word (a URL, an email address) unless it may shrink. */
.drawer { overflow-wrap: anywhere; overflow-x: hidden; }
.drawer :is(.focus, .opt, .opt-body, .fu-box, .fu, .drafts, .neg, .said, .analysis, .terms, .more, .agree-form, .deal, .thread, .b-body, .reply-box, .bundles, .an-list, .an-next, .fld, .next-panel, .principles, .steps, .add-form) { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.drawer .terms-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
@media (max-width: 720px) { .drawer .terms-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.drawer :is(p, li, td, strong, span, label, blockquote, summary, h3) { overflow-wrap: anywhere; min-width: 0; }
.drawer :is(input, select, textarea, button) { max-width: 100%; }
.drawer select { text-overflow: ellipsis; }
.drawer .rates { table-layout: auto; width: 100%; }
.drawer .rates td:first-child { word-break: break-word; }
.drawer .chip, .drawer .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.drawer .fu-head { flex-wrap: wrap; min-width: 0; }
.drawer .focus-to strong { overflow-wrap: anywhere; word-break: break-all; }
.drawer .msg, .drawer .quote { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
/* a draft grows with its text instead of scrolling inside a small box */
.drawer textarea.fu-text, .drawer .rates-in textarea { overflow-y: hidden; resize: vertical; }

/* Buttons keep their label whole. "Break anywhere" is for long text, and a flex row would otherwise
   squeeze a button down to one letter (the Undo button next to a long package name). */
.drawer button { overflow-wrap: normal; word-break: normal; }
.drawer .link, .drawer .btn, .drawer .x, .drawer .agreed button { white-space: nowrap; flex: 0 0 auto; }
.drawer .link { min-width: max-content; }
.agreed { align-items: flex-start; }
.agreed > span { flex: 1 1 0; min-width: 0; }
@media (max-width: 720px) { .agreed { flex-wrap: wrap; } .agreed > span { flex-basis: 100%; } }

/* ---------- this app: store listings and refresh ---------- */
.this-app { display: grid; gap: 10px; padding: 14px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; }
.listings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.listing { display: flex; align-items: center; gap: 10px; }
.listing .t { display: grid; min-width: 0; flex: 1; }
.listing .t strong { font-size: 13.5px; }

/* ---------- sign in ---------- */

body.signed-out .topbar, body.signed-out .jobs, body.signed-out #main { display: none; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 14px; padding: 28px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.auth-brand { display: flex; align-items: center; gap: 9px; }
.auth-card h1 { margin: 6px 0 0; font-size: 22px; letter-spacing: -0.02em; }
.auth-card p { margin: 0; }
.auth-card label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.auth-card input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 42px; color: var(--text); font-size: 15px; }
.auth-card input:focus { border-color: var(--accent); outline: none; }
.auth-error { color: #ffb4ae; font-size: 13px; background: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.35); border-radius: 8px; padding: 8px 10px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); }
.auth-card .btn.block { margin-top: 0; }
.acct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.acct .who-am-i { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sw-org { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 6px; }

/* ---------- account menu ---------- */

.acct-wrap { position: relative; }
.acct-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 700; text-transform: uppercase; display: grid; place-items: center; transition: border-color 0.15s; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--accent); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; max-width: 80vw; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); z-index: 40; }
.acct-email { margin: 0; padding: 8px 10px 10px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-menu button { width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 9px 10px; min-height: 38px; border-radius: 7px; font-size: 13.5px; }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--accent-soft); outline: none; }
@media (max-width: 720px) { .acct-wrap { display: none; } } /* on a phone, Sign out is in Settings */

/* ---------- settings ---------- */

.set-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.set-nav::-webkit-scrollbar { display: none; }
.set-nav button { flex: 0 0 auto; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; min-height: 32px; }
.set-nav button:hover { color: var(--text); border-color: var(--line-2); }
.set-form { display: grid; gap: 10px; }
.set-card { display: grid; gap: 12px; padding: 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 64px; }
.set-card h3 { margin: 0; font-size: 14px; letter-spacing: -0.01em; }
.set-lead { margin: -6px 0 0; font-size: 12.5px; color: var(--muted); }
.set-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .set-pair { grid-template-columns: 1fr; } }
.set-field { display: grid; gap: 5px; min-width: 0; }
.set-field > label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.set-field input, .set-field select { width: 100%; min-height: 40px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font-size: 14px; }
.set-field input:focus, .set-field select:focus { border-color: var(--accent); outline: none; }
.set-field [aria-invalid="true"] { border-color: var(--bad); }
.set-money { position: relative; display: block; }
.set-money > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.set-money input { padding-left: 24px; }
.set-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.set-error { margin: 0; font-size: 12.5px; color: #ffb4ae; }
.set-status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.set-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.set-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.set-dl dt { color: var(--muted); }
.set-dl dd { margin: 0; min-width: 0; }
.set-pw { display: grid; gap: 12px; max-width: 360px; }
.set-bar { position: sticky; bottom: -28px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 -22px -28px; padding: 12px 22px; background: var(--panel); border-top: 1px solid var(--line-2); box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35); z-index: 2; }
.set-bar[hidden] { display: none; }
.set-dirty { margin-right: auto; font-size: 13px; color: var(--warn); }
.this-app { padding: 0; border: 0; }

/* company mailbox and inbox */
.set-field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.set-field textarea:focus { border-color: var(--accent); outline: none; }
.mb { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mb:first-child { border-top: 0; padding-top: 0; }
.mb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mb-head .set-status { color: var(--muted); }
.bad-text { color: var(--bad); }
.mail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mail-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; font: inherit; }
.mail-row:hover { border-color: var(--accent); }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 700; }
.mail-from { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-subj { grid-column: 1 / -1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .chip { grid-column: 1 / -1; justify-self: start; }
.mail-body { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; line-height: 1.5; max-height: 55vh; overflow: auto; }

/* threads */
.mail-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.mail-filters button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.mail-filters button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.unread-n { color: var(--accent); font-weight: 600; }
.mail-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.link-chip { cursor: pointer; font: inherit; font-size: 12px; }
.link-chip:hover { border-color: var(--accent); color: var(--accent); }
.mail-thread { display: grid; gap: 10px; margin: 12px 0; }
.mail-msg { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.mail-msg.out { border-color: var(--accent); background: var(--accent-soft); }
.mail-msg header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.mail-msg .mail-body { max-height: none; }
.mail-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.assign-results { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#assign-q { width: 100%; min-height: 40px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); }

/* one app's page */
.app-page { display: grid; gap: 14px; }
.ap-head { display: flex; align-items: center; gap: 14px; }
.ap-head .t { display: grid; gap: 2px; min-width: 0; }
.ap-head h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.ap-lead { margin: 0; font-size: 13px; }
.ap-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.ap-nav { position: sticky; top: 76px; display: grid; gap: 4px; }
.ap-nav button { text-align: left; background: transparent; border: 0; border-left: 2px solid var(--line); color: var(--muted); padding: 7px 12px; font-size: 13px; cursor: pointer; }
.ap-nav button:hover { color: var(--text); border-left-color: var(--accent); }
.ap-main { display: grid; gap: 16px; min-width: 0; }
.ap-main .set-bar { position: sticky; bottom: 0; margin: 0; border: 1px solid var(--line-2); border-radius: 12px; }
.ap-main .set-card { scroll-margin-top: 80px; }
@media (max-width: 720px) {
  .ap-grid { grid-template-columns: 1fr; }
  .ap-nav { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .ap-nav button { border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
}
.set-appcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; margin: 4px 0 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); cursor: pointer; font: inherit; }
.set-appcard:hover { border-color: var(--accent); }
.set-appcard .t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tabs .tab[data-tab="app"] { margin-left: 4px; }

/* selecting several creators */
.sel-col { width: 36px; padding-right: 0; }
.sel-col input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.grid tr.selected td { background: var(--accent-soft); }
.sel-bar { position: sticky; top: 64px; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 0 10px; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); font-size: 13px; }
.sel-bar[hidden] { display: none; }
.sel-bar .spacer { flex: 1; }

/* dashboard: global, action first */
.page.wide { max-width: 1180px; }
.brand.on strong { color: var(--accent); }
.brand.on .mark { box-shadow: 0 0 0 3px var(--accent-soft); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h2 { font-size: 14px; margin: 0; font-weight: 650; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pad { padding: 8px 0; }
.needs { margin-bottom: 14px; border-color: var(--line-2); }
.needs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.need-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.need-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.need-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.need-chip span { color: var(--muted); }
.need-chip.hot { border-color: rgba(249, 115, 22, 0.55); background: var(--accent-soft); }
.need-chip.hot b { color: var(--accent); }
.need-chip.bad { border-color: rgba(248, 81, 73, 0.5); }
.need-chip.bad b { color: var(--bad); }
.need-chip.warn { border-color: rgba(240, 180, 41, 0.5); }
.need-chip.warn b { color: var(--warn); }
.need-chip.info { border-color: rgba(88, 166, 255, 0.5); }
.need-chip.zero { opacity: 0.55; cursor: default; }
.need-chip:not(.zero):hover { border-color: var(--accent); }
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.att { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.att:hover { border-color: var(--accent); }
.att.overdue { border-left: 3px solid var(--bad); }
.att .main { display: grid; min-width: 0; flex: 1; }
.att .who { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .what { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-tag { font-weight: 400; font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.att-go { color: var(--muted); font-size: 18px; }
.att-more { margin: 10px 0 0; }
.caught { display: flex; align-items: center; gap: 12px; padding: 6px 2px; }
.caught span { font-size: 26px; }
.caught p { margin: 2px 0 0; }
.kpi .d.up { color: var(--ok); }
.kpi .d.down { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dash-grid.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 860px) { .dash-grid, .dash-grid.wide-left { grid-template-columns: 1fr; } }
.pipe { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pipe li { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; font-size: 12.5px; }
.pipe .track { height: 14px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.pipe .track b { display: block; height: 100%; background: var(--accent); border-radius: 5px; min-width: 2px; }
.pipe li:nth-child(n+5) .track b { background: var(--ok); }
.pipe .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.legend { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.lg.sent, .bar.sent { background: var(--accent); }
.lg.rep, .bar.rep { background: var(--ok); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; height: 110px; align-items: end; }
.bar-col { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.bar { display: block; width: 45%; min-height: 2px; border-radius: 2px 2px 0 0; }
.bar-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.app-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.app-row { width: 100%; display: grid; grid-template-columns: auto minmax(120px, 1.2fr) auto minmax(0, 2fr) 56px; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.app-row:hover, .app-row.cur { border-color: var(--accent); }
.app-row .ar-name { display: grid; min-width: 0; }
.app-row .ar-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.ar-badges { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ar-stats { display: flex; gap: 14px; justify-content: flex-end; font-size: 11px; color: var(--muted); }
.ar-stats span { display: grid; text-align: right; }
.ar-stats b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.ar-last { text-align: right; }
.ok-text { color: var(--ok); }
.chip.warn { border-color: rgba(240, 180, 41, 0.5); color: var(--warn); }
.chip.hotc { border-color: rgba(249, 115, 22, 0.55); color: var(--accent); }
@media (max-width: 720px) {
  .app-row { grid-template-columns: auto 1fr auto; }
  .ar-stats { grid-column: 1 / -1; justify-content: space-between; }
  .ar-last { display: none; }
}
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 6px; background: transparent; border: 0; border-radius: 8px; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.feed-row:hover { background: var(--panel-2); }
.fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.feed-row.in .fdot { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18); }
.feed-row.out .fdot { background: var(--accent); }
.feed-row .ft { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .fa { white-space: nowrap; }

/* dashboard: expandable "Needs you", and nothing may push its card wider than the column */
.dash-grid > *, .app-rows > li, .feed > li, .att-list > li { min-width: 0; }
.app-rows, .feed, .att-list { grid-template-columns: minmax(0, 1fr); }
.needs { margin: 0 0 14px; }
.needs-head { margin-bottom: 0; }
.needs.open .needs-head { margin-bottom: 12px; }
.needs-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 4px 6px 4px 0; color: var(--text); font: inherit; cursor: pointer; border-radius: 8px; }
.needs-toggle:hover h2 { color: var(--accent); }
.needs-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.needs-toggle .chev { display: inline-block; width: 14px; font-size: 18px; line-height: 1; color: var(--muted); transition: transform 0.18s var(--ease); }
.needs.open .needs-toggle .chev { transform: rotate(90deg); }
.needs-total { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.needs-total.ok { background: rgba(63, 185, 80, 0.15); color: var(--ok); }
.needs-body[hidden] { display: none; }
.feed { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.feed-row .ft { display: block; }
.dash-grid .card { overflow: hidden; }

/* search and commands box */
.palette-box { width: min(680px, 100%); }
.pal-sec { list-style: none; padding: 10px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pal-sec:first-child { padding-top: 4px; }
.pal-item .app-ico, .pal-item .av { flex: 0 0 auto; }
.pal-ico { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: 14px; }
.pal-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.pal-main mark { background: transparent; color: var(--accent); font-weight: 700; }
.palette-help { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11.5px; }
.palette-help kbd { font: inherit; font-size: 10.5px; padding: 0 5px; margin-right: 2px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); background: var(--panel-2); }
.pal-ops { margin-left: auto; color: var(--muted); }
@media (max-width: 720px) { .pal-ops { display: none; } }

/* after the price: production milestones */
.stages { overflow-x: auto; scrollbar-width: none; }
.stages::-webkit-scrollbar { display: none; }
.stages li { flex: 1 0 58px; }
.prod { display: grid; gap: 8px; padding-top: 6px; }
.prod-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prod-found { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.prod-found li { display: flex; align-items: baseline; gap: 10px; padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.pf-k { font-weight: 650; flex: 0 0 auto; }
.pf-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-done { margin: 0; color: var(--ok); }
.status.st-posted { border-color: var(--ok); color: var(--ok); }
.status.st-paid { border-color: var(--ok); color: var(--ok); background: rgba(63, 185, 80, 0.12); }

/* estimated return of a paid video */
.estimate .est-verdict { margin: 6px 0 8px; font-weight: 600; }
.estimate .est-verdict.ok { color: var(--ok); }
.estimate .est-verdict.warn { color: var(--warn); }
.estimate .est-verdict.bad { color: var(--bad); }
.est-wrap { overflow-x: auto; }
.est-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.est-table th, .est-table td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.est-table thead th { color: var(--muted); font-weight: 500; }
.est-table tbody th { text-align: left; font-weight: 500; color: var(--text); }
.est-table .pos { color: var(--ok); }
.est-table .neg { color: var(--bad); }
.est-why { margin-top: 6px; }
.est-why ul { margin: 6px 0 0; padding-left: 18px; }
.est-why li.sub { list-style: circle; margin-left: 14px; }
