/* ============ ROBUSTORS HQ — Studio Ops Console ============ */
/* Signature: backlit glass panels in a violet-lit console. One bold move
   (the ambient aura + accent glow); everything else stays disciplined. */

:root {
  /* dark (default) */
  --bg: #0a0b10;
  --bg-tint-1: rgba(124,116,255,.10);
  --bg-tint-2: rgba(45,206,196,.055);
  --panel: #14161f;
  --panel-2: #1a1d28;
  --panel-3: #232634;
  --line: #262a37;
  --line-2: #343a4b;
  --text: #edeff6;
  --mut: #99a0b5;
  --dim: #626a82;
  --accent: #7c74ff;      /* iris */
  --accent-2: #b39bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(124,116,255,.14);
  --green: #34d399;
  --red: #fb6a6a;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter Tight", var(--sans);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 10px 26px -16px rgba(0,0,0,.8);
  --shadow-2: 0 4px 10px rgba(0,0,0,.45), 0 22px 48px -20px rgba(0,0,0,.9);
  --glow: 0 10px 34px -10px rgba(124,116,255,.55);
  --hair: inset 0 1px 0 rgba(255,255,255,.05);
}
:root[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-tint-1: rgba(124,116,255,.10);
  --bg-tint-2: rgba(45,206,196,.08);
  --panel: #ffffff;
  --panel-2: #f4f5fa;
  --panel-3: #eaecf4;
  --line: #e5e7f0;
  --line-2: #d4d8e6;
  --text: #191c28;
  --mut: #5a6076;
  --dim: #6f768f;
  --accent: #665bff;
  --accent-2: #8a7bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(102,91,255,.12);
  --green: #0f9d6a;
  --red: #e5484d;
  --shadow-1: 0 1px 2px rgba(30,35,70,.06), 0 8px 22px -14px rgba(30,35,70,.2);
  --shadow-2: 0 3px 10px rgba(30,35,70,.1), 0 18px 40px -18px rgba(30,35,70,.28);
  --glow: 0 10px 30px -12px rgba(102,91,255,.4);
  --hair: inset 0 1px 0 rgba(255,255,255,.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(1200px 620px at 8% -10%, var(--bg-tint-1), transparent 58%),
    radial-gradient(1000px 520px at 100% -6%, var(--bg-tint-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
/* ---------- premium boot / loading ---------- */
.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; height: 100vh; }
.boot-logo { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.boot-logo svg { width: 76px; height: 76px; position: relative; z-index: 1;
  filter: drop-shadow(0 10px 26px rgba(232,41,31,.45)); animation: bootpop .55s cubic-bezier(.2,.9,.3,1.3) both; }
.boot-logo::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, transparent, rgba(232,41,31,.5), transparent 42%);
  filter: blur(7px); animation: spin 2.4s linear infinite; }
.boot-word { font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: 4px;
  text-transform: uppercase; color: var(--mut); animation: fadeup .7s .25s both; }
.boot-word b { color: var(--text); }
.boot-bar { width: 150px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; animation: fadeup .7s .35s both; }
.boot-bar span { display: block; height: 100%; width: 40%; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: bootbar 1.2s ease-in-out infinite; }
@keyframes bootpop { from { opacity: 0; transform: scale(.55) translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } }
@keyframes bootbar { 0% { transform: translateX(-130%); } 100% { transform: translateX(330%); } }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); background-clip: content-box; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 390px; background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 38px 34px;
  box-shadow: var(--shadow-2), var(--hair); }
.login-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; }
.mark svg { width: 100%; height: 100%; display: block; }
.login-mark h1 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: 0.2px; }
.login-mark span { display: block; color: var(--dim); font-size: 11px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 2px; font-weight: 400; }
.login-err { background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
  color: var(--red); border-radius: 9px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; display: none; }
.login-err.show { display: block; }

/* ---------- shared form bits ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f span { display: block; font-size: 11px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--mut); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: var(--panel-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 70px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--panel-3); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 14px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: transform .12s ease, border-color .15s, background .15s, box-shadow .15s, color .15s; }
.btn:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  border-color: transparent; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: var(--glow); }
.btn.danger:hover { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent); }
.btn.wide { width: 100%; justify-content: center; padding: 11px; font-size: 14.5px; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 224px; flex: 0 0 224px; background: linear-gradient(180deg, var(--panel), var(--bg));
  border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.side .login-mark { margin-bottom: 16px; padding: 0 6px; flex: 0 0 auto; }
.nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--mut); font-weight: 600; font-size: 14px; cursor: pointer; position: relative; transition: color .15s, background .15s; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav-item:hover { color: var(--text); background: var(--panel-2); }
.nav-item.on { color: var(--text); background: var(--accent-soft); }
.nav-item.on svg { color: var(--accent); opacity: 1; }
.nav-item.on::before { content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: var(--glow); }
.side .foot { flex: 0 0 auto; margin-top: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.side .who { display: flex; align-items: center; gap: 9px; padding: 4px 4px 6px; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(145deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: var(--accent); flex: 0 0 32px; font-family: var(--display); }
.who .nm { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.who .rl { font-size: 11px; color: var(--dim); font-family: var(--mono); }

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -0.4px; }
.page-head .sub { color: var(--dim); font-size: 13px; font-family: var(--mono); }
.page-head .grow { flex: 1; }

/* ---------- stat strip ---------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow-1), var(--hair); }
.stat .k { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1.4px; color: var(--mut); }
.stat .v { font-size: 25px; font-weight: 700; font-family: var(--display); margin-top: 5px; letter-spacing: -0.5px; }
.stat .v small { font-size: 13px; color: var(--dim); font-weight: 400; }

/* ---------- generic card grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.chan { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--shadow-1), var(--hair);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s; }
.chan:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.chan::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--nc, var(--dim)); box-shadow: 0 0 20px 0 var(--nc, transparent); }
.chan .top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; padding-right: 46px; flex-wrap: wrap; }
.chan .top .grow { min-width: 0; flex: 1 1 150px; }
.chan .top .pill { flex: 0 0 auto; white-space: nowrap; }
.chan .cava { width: 42px; height: 42px; border-radius: 50%; background: var(--panel-3); flex: 0 0 42px;
  border: 1px solid var(--line-2); object-fit: cover; display: grid; place-items: center;
  font-weight: 800; font-family: var(--display); color: var(--nc, var(--mut)); }
.chan h3 { font-size: 15.5px; font-weight: 700; line-height: 1.2; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.chan .hnd { font-size: 12px; color: var(--dim); font-family: var(--mono); overflow-wrap: anywhere; }
.chan .nums { display: flex; gap: 18px; margin: 10px 0 8px; }
.chan .nums div { font-family: var(--mono); }
.chan .nums .n { font-size: 17px; font-weight: 700; }
.chan .nums .l { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 1.2px; }
.chan .latest { font-size: 12.5px; color: var(--mut); border-top: 1px solid var(--line); padding-top: 9px;
  margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan .latest b { color: var(--text); font-weight: 600; }
.chan .latest .lmeta { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.chan .latest .lmeta b { color: var(--accent); }
.prio { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--dim); border: 1px solid var(--line-2); border-radius: 7px; padding: 2px 7px; background: var(--panel-2); }
.prio.p1 { color: var(--accent-ink); background: linear-gradient(145deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: var(--glow); }
.chan .meta-row { display: flex; gap: 6px; align-items: center; margin-top: 9px; flex-wrap: wrap; }

/* pills + chips */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.pill.live .dot { animation: pulse 1.8s infinite; box-shadow: 0 0 8px currentColor; }
.pill.not_launched { color: var(--mut); background: color-mix(in srgb, var(--mut) 14%, transparent); }
.pill.paused { color: var(--accent); background: var(--accent-soft); }
.pill.ready { color: #35c4e8; background: rgba(53,196,232,.12); }
.pill.created { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 15%, transparent); }
@keyframes pulse { 50% { opacity: .35; } }
.chip { display: inline-block; font-size: 11px; font-weight: 700; font-family: var(--mono);
  padding: 3px 9px; border-radius: 7px; color: var(--c, var(--mut)); background: color-mix(in srgb, var(--c, #888) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #888) 22%, transparent); }
.tag-ava { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-3); border: 1px solid var(--line-2); font-size: 10px; font-weight: 800; color: var(--accent); }
/* Person pill — mini avatar + full name (replaces bare initial badges). */
.person { display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 9px 2px 2px; border-radius: 999px; background: var(--panel-3);
  border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 650; color: var(--text); }
.person .pava { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent);
  font-size: 9px; font-weight: 800; flex: 0 0 auto; }
.person .pnm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- pipeline board ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 2px; height: calc(100vh - 145px); }
.col { flex: 0 0 252px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-1); }
.col.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.col-body { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-bottom: 8px; }
.board-wrap { position: relative; }
.board-arrow { position: absolute; top: 46%; transform: translateY(-50%); z-index: 8;
  width: 40px; height: 40px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--line-2);
  color: var(--text); font-size: 24px; line-height: 1; display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-2); transition: transform .14s, border-color .14s, color .14s, box-shadow .14s; }
.board-arrow:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow); transform: translateY(-50%) scale(1.08); }
.board-arrow.left { left: -6px; }
.board-arrow.right { right: -6px; }
@media (max-width: 600px) { .board-arrow { display: none; } }
.col-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px 9px;
  border-bottom: 2px solid var(--sc, var(--line)); margin-bottom: 9px; }
.col-head .t { font-size: 12px; font-weight: 800; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1.4px; }
.col-head .c { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--dim); }
.vcard { background: color-mix(in srgb, var(--sc, #888) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--sc, #888) 26%, var(--line));
  border-left: 3px solid var(--sc, var(--line-2));
  border-radius: 10px; padding: 11px 12px; margin: 0 9px 8px; cursor: grab; transition: transform .12s, border-color .12s, box-shadow .12s; }
.vcard:hover { border-color: var(--sc, var(--line-2)); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.vcard.dragging { opacity: .45; }
.vcard .vt { font-size: 13.5px; font-weight: 650; line-height: 1.32; margin-bottom: 8px; cursor: pointer; }
.vcard .vt:hover { color: var(--accent); }
.up-count { font-size: 10.5px; color: var(--mut); font-weight: 400; white-space: nowrap; }
.up-thread { margin-top: 18px; border-top: 1px solid var(--line); }
.up-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px; color: var(--mut); padding: 12px 0 4px; }
.up { padding: 9px 0; border-bottom: 1px solid var(--line); }
.up:last-child { border: none; }
.up-meta { font-size: 11.5px; color: var(--dim); font-family: var(--mono); margin-bottom: 3px; }
.up-meta b { color: var(--accent); font-weight: 700; }
.up-text { font-size: 13.5px; white-space: pre-wrap; }
.vcard .vm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vcard .age { margin-left: auto; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.vcard .move { display: flex; gap: 4px; margin-top: 9px; }
.vcard .move .btn { flex: 1; }

/* ---------- panels / tables / lists ---------- */
.panel { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1), var(--hair); }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-family: var(--display); font-size: 14.5px; font-weight: 700; }
.panel-head .grow { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--panel-2); }
.row.stagerow { box-shadow: inset 3px 0 0 var(--sc, transparent);
  background: color-mix(in srgb, var(--sc, transparent) 7%, transparent); }
.row.stagerow:hover { background: color-mix(in srgb, var(--sc, transparent) 13%, transparent); }
.badge { display: inline-block; font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 1.2px; padding: 3px 8px; border-radius: 6px; color: var(--c, var(--mut));
  background: color-mix(in srgb, var(--c, #888) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #888) 40%, transparent); white-space: nowrap; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .sub { font-size: 12px; color: var(--dim); margin-top: 1px; }
.row .mono { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.row.done .title { text-decoration: line-through; color: var(--dim); }
.empty { padding: 26px 16px; text-align: center; color: var(--dim); font-size: 13.5px; }
.panel.inactive { opacity: .62; }

.status-sel { width: auto; padding: 4px 26px 4px 9px; font-size: 12px; font-family: var(--mono);
  border-radius: 7px; background: var(--panel-3); }
.check { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line-2); background: none;
  cursor: pointer; flex: 0 0 19px; display: grid; place-items: center; color: transparent; font-size: 12px; transition: .12s; }
.check.on { background: var(--green); border-color: var(--green); color: #06231a; }

/* ---------- modal (glass) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(6,7,12,.6); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  display: grid; place-items: center; z-index: 100; padding: 18px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 480px; background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-2), var(--hair); animation: pop .2s cubic-bezier(.2,.9,.3,1.1); }
.modal h3 { font-family: var(--display); font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.modal .actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 7px; margin: -6px 0 14px; }
.ck { display: inline-flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 7px 12px; font-size: 13.5px; cursor: pointer; user-select: none; transition: .12s; }
.ck input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.ck:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 11px 16px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-2); animation: rise .2s ease-out; }
.toast.err { border-left-color: var(--red); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ---------- channel detail ---------- */
.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-head .cava { width: 58px; height: 58px; font-size: 22px; border-radius: 50%; background: var(--panel-3);
  border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 800; font-family: var(--display); object-fit: cover; }
.detail-head h2 { font-family: var(--display); font-size: 23px; font-weight: 700; }
.detail-head .mono { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.back { color: var(--dim); font-size: 13px; cursor: pointer; margin-bottom: 12px; display: inline-flex; gap: 6px; }
.back:hover { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* activity */
.act { display: flex; gap: 11px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.act:last-child { border: none; }
.act .when { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; padding-top: 2px; }

/* schedule */
.day-h { font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--mut); padding: 14px 16px 6px; border-bottom: 1px solid var(--line); background: var(--panel-2); }

/* ---------- niche radar ---------- */
.grid.niches { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); align-items: start; }
.niche { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; position: relative; overflow: hidden; box-shadow: var(--shadow-1), var(--hair);
  transition: transform .16s, box-shadow .16s, border-color .16s; align-self: start; }
.niche:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.niche::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--sc, var(--dim)); }
.niche .ntop { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.niche .age { font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.niche h3 { font-family: var(--display); font-size: 16px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.niche h3:hover { color: var(--accent); }
.niche .nov { font-size: 13px; color: var(--mut); margin-top: 6px; line-height: 1.5; }
.nsec { margin-top: 11px; }
.nk { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--dim); margin-bottom: 4px; }
.nval { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.nrefs { display: flex; flex-direction: column; gap: 6px; }
.nref { font-size: 12.5px; line-height: 1.4; }
.nref a { color: var(--accent); font-weight: 600; word-break: break-word; }
.nref a:hover { text-decoration: underline; }
.rpat { display: block; color: var(--mut); font-family: var(--mono); font-size: 11px; margin-top: 1px; }
.nnote { margin-top: 11px; font-size: 12.5px; color: var(--mut); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; white-space: pre-wrap; }
.nact { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.nact .status-sel { margin-right: auto; }
.refrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; margin-bottom: 8px; }
.refrow .ri { font-size: 13px; padding: 7px 10px; }
.refrow .ri[data-k="name"] { grid-column: 1; grid-row: 1; }
.refrow .ri[data-k="url"] { grid-column: 2; grid-row: 1; }
.refrow .ri[data-k="pattern"] { grid-column: 1 / 3; grid-row: 2; }
.refrow .refdel { grid-column: 3; grid-row: 1 / 3; align-self: stretch; }

/* ---------- topic bank + thumbnails + produce ---------- */
.apct { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.apct.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.apct.low { color: var(--accent); background: var(--accent-soft); }
.last-tag { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
.modal-sub { font-size: 13px; color: var(--mut); margin: -8px 0 16px; line-height: 1.5; }
.optrow { display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 7px; margin-bottom: 7px; }
.optrow .opt-i { font-size: 13px; padding: 7px 10px; }
.thumbrow { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-bottom: 7px; align-items: start; }
.thumbrow .thumb-i { min-height: 46px; font-size: 13px; }
.optrow .rowdel, .thumbrow .rowdel { align-self: start; }
.slotrow { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 7px; margin-bottom: 7px; }
.linkrow { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 7px; margin-bottom: 7px; }
.linkrow .lk-i { font-size: 13px; padding: 7px 10px; }
@media (max-width: 560px) { .linkrow { grid-template-columns: 1fr auto; } .linkrow .lk-i[data-k="url"] { grid-column: 1 / 2; } }
.dsec { margin-top: 16px; }
/* Free-text research brief inside a details view. */
.research-body { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
/* Update box lifted to the top of the video details modal. */
.update-box { margin: 16px 0 4px; padding: 14px 14px 4px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); }
.update-box .up-thread { margin-top: 10px; }
.titopt { border-left: 2px solid var(--accent); padding: 3px 0 3px 10px; margin-bottom: 8px; }
.titopt .tt { font-size: 14px; font-weight: 650; line-height: 1.35; }
.titopt .tp2 { font-size: 11.5px; font-family: var(--mono); color: var(--mut); margin-top: 2px; }
.thumbp { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; white-space: pre-wrap; align-items: flex-start; }
.thumbp:last-child { border-bottom: none; }
.thumbp .tp-text { flex: 1; min-width: 0; }
.tp-copy { flex: 0 0 auto; align-self: flex-start; }
.thumbn { flex: 0 0 20px; height: 20px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line-2);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 700; }
.picktitles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.pick { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: .12s; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick input { margin-top: 3px; accent-color: var(--accent); flex: 0 0 auto; width: 15px; }
.pick b { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.pick em { display: block; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--mut); margin-top: 2px; }

/* ---------- rulebook / guide ---------- */
.guide-tabs { display: flex; gap: 6px; }
.guide-tab.on { background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; }
.guide-body { padding: 26px 30px; max-width: 880px; }
.guide-body h1 { font-family: var(--display); font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.4px; }
.guide-body h2 { font-family: var(--display); font-size: 18px; font-weight: 700; margin: 26px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-body h3 { font-size: 15px; font-weight: 750; margin: 18px 0 8px; color: var(--accent); }
.guide-body p { margin: 0 0 12px; color: var(--mut); font-size: 14px; line-height: 1.65; }
.guide-body strong { color: var(--text); font-weight: 700; }
.guide-body ul, .guide-body ol { margin: 0 0 14px; padding-left: 22px; color: var(--mut); font-size: 14px; line-height: 1.65; }
.guide-body li { margin-bottom: 5px; }
.guide-body li strong, .guide-body td strong { color: var(--text); }
.guide-body code { font-family: var(--mono); font-size: 12.5px; background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 1px 6px; color: var(--accent); }
.guide-body a { color: var(--accent); text-decoration: underline; word-break: break-word; }
.guide-body hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.guide-body table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 13.5px; }
.guide-body th, .guide-body td { border: 1px solid var(--line-2); padding: 8px 11px; text-align: left; vertical-align: top; }
.guide-body th { background: var(--panel-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--mut); }
.guide-body td { color: var(--mut); }

/* ---------- schedule templates ---------- */
.segbar { display: flex; gap: 6px; margin-bottom: 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; }
.seg { flex: 1; background: none; border: none; color: var(--mut); font-weight: 650; font-size: 13px; padding: 7px; border-radius: 7px; cursor: pointer; transition: .12s; }
.seg.on { background: var(--accent-soft); color: var(--accent); }
.tmpls { display: flex; flex-wrap: wrap; gap: 6px; }
.tmpl, .tpick { background: var(--bg); }
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wday { background: var(--bg); border: 1px solid var(--line-2); color: var(--mut); border-radius: 8px; padding: 9px 0; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--mono); transition: .12s; }
.wday:hover { border-color: var(--accent); }
.wday.on { background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; }

/* ---------- team roster (simple list) ---------- */
.team-list { display: flex; flex-direction: column; gap: 8px; }
.teamrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1), var(--hair); transition: transform .14s, box-shadow .14s; }
.teamrow:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.teamrow.inactive { opacity: .6; }
.teamrow .tm-name { font-size: 15px; font-weight: 700; }

/* ---------- workload boxes ---------- */
/* grid with auto-fill: every card gets the same track width even when the last
   row is only partly filled (flex-grow made a 2-card row stretch edge to edge) */
.grid.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.emp {
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-1), var(--hair); transition: transform .16s, box-shadow .16s; }
.emp:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.emp.inactive { opacity: .6; }
.emp-top { display: flex; align-items: center; gap: 11px; }
.emp-top .ava { width: 40px; height: 40px; flex: 0 0 40px; font-size: 14px; }
.emp-top h3 { font-family: var(--display); font-size: 16px; font-weight: 700; line-height: 1.2; }
.emp-sub { font-size: 12px; color: var(--dim); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.es { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; text-align: center; }
.es .n { font-size: 18px; font-weight: 700; font-family: var(--display); line-height: 1.1; }
.es .l { font-size: 9px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); margin-top: 2px; }
.es.load .n { font-size: 13px; padding-top: 3px; }
.es.load.none .n { color: var(--dim); }
.es.load.light .n { color: var(--green); }
.es.load.mid .n { color: var(--accent); }
.es.load.heavy .n { color: var(--red); }
.emp-sec .ek { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--mut); margin-bottom: 5px; }
.ev { display: flex; flex-wrap: wrap; gap: 5px; }
.ev.col { flex-direction: column; gap: 7px; }
.emp-vid { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; min-width: 0;
  padding: 7px 8px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.emp-vid .chip { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-vid .stagechip { margin-left: auto; }
.emp-vid .evt { flex: 1 1 100%; min-width: 0; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.emp-actions { display: flex; gap: 7px; padding-top: 4px; }

/* tablets & down: sidebar becomes a scrolling top bar */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; overflow: hidden;
    padding: 8px 10px; align-items: center; background: var(--panel); }
  .side .login-mark { margin: 0 8px 0 2px; flex: 0 0 auto; }
  .nav-scroll { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: 1 1 auto; gap: 3px; }
  .side .who { display: none; }
  .side .foot { margin: 0 0 0 8px; border: none; padding: 0; flex-direction: row; gap: 6px; flex: 0 0 auto; }
  .nav-item { padding: 9px 11px; flex: 0 0 auto; }
  .nav-item.on::before { display: none; }
  .nav-item span:not(.nbadge) { display: none; }
  .nav-item .nbadge { margin-left: 2px; }
  .main { padding: 16px 14px 48px; }
  .page-head h2 { font-size: 20px; }
  .board { height: calc(100vh - 205px); }
}
/* phones */
@media (max-width: 480px) {
  .main { padding: 14px 10px 42px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .emp-stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .f2 { grid-template-columns: 1fr; }
  .modal { padding: 18px 16px; }
  .page-head { gap: 8px; }
  .col { flex-basis: 80vw; }
}

/* ---------- niche freshness + deliverable links ---------- */
.fresh { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .4px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.fresh::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.nref .fresh { margin-left: 4px; vertical-align: middle; }
.refrow { grid-template-columns: 1fr 1fr auto auto; }
.refrow .ri[data-k="pattern"] { grid-column: 1 / 3; grid-row: 2; }
.refrow .ri[data-k="lastUpload"] { grid-column: 3; grid-row: 1 / 3; align-self: stretch; min-width: 150px; }
.refrow .refdel { grid-column: 4; grid-row: 1 / 3; }
.lk-add { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; margin: 6px 0 10px; }
.lk-add input { font-size: 13px; padding: 7px 10px; }
.lk-list { display: flex; flex-direction: column; gap: 6px; }
.lk-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.lk-url { color: var(--accent); font-weight: 600; font-size: 13px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-url:hover { text-decoration: underline; }
.lk-meta { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
@media (max-width: 560px) {
  .lk-add { grid-template-columns: 1fr 1fr; } .lk-add input { grid-column: 1 / 3; }
  .lk-row { flex-wrap: wrap; } .lk-url { flex-basis: 100%; }
  .refrow { grid-template-columns: 1fr auto; }
  .refrow .ri[data-k="name"], .refrow .ri[data-k="url"], .refrow .ri[data-k="pattern"], .refrow .ri[data-k="lastUpload"] { grid-column: 1; grid-row: auto; }
  .refrow .refdel { grid-column: 2; grid-row: 1 / 5; }
}

/* ---------- team updates feed ---------- */
.nbadge { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 99px; flex: 0 0 auto; }
.upd-feed { padding: 4px 0; }
.upd-row { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.upd-row:last-child { border-bottom: none; }
.upd-row .ava { width: 34px; height: 34px; flex: 0 0 34px; font-size: 12px; }
.upd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.upd-head b { font-weight: 700; }
.upd-vid { color: var(--mut); font-weight: 600; cursor: pointer; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.upd-vid:hover { color: var(--accent); text-decoration: underline; }
.upd-time { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); flex: 0 0 auto; }
.upd-text { margin-top: 5px; font-size: 13.5px; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
/* workload card: the employee's latest posted update */
.emp-upd { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font-size: 12.5px; line-height: 1.4; color: var(--mut); cursor: pointer; overflow-wrap: anywhere; transition: border-color .15s; }
.emp-upd:hover { border-color: var(--accent); }
.emp-upd-on { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* ---------- deadlines, levels, employee dashboard ---------- */
.due { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .3px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 99px; padding: 2px 8px; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.due::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.due.late { animation: duepulse 1.6s ease-in-out infinite; }
.due.none { --c: #626a82; }
@keyframes duepulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 45%, transparent); } 50% { box-shadow: 0 0 0 4px transparent; } }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 12px; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 99px; padding: 4px 11px; white-space: nowrap; flex: 0 0 auto; }
.lvl::before { content: none; } /* icon comes from the per-level <i> now */
.bar { height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .4s ease; }
.bar.sm { height: 5px; margin: 6px 0 0; }
.emp-perf { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.emp-perf b { color: var(--text); font-family: var(--mono); }
.emp-perf .bad b { color: var(--red); }
.emp-perf .grow { flex: 1; }
.dash { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-1), var(--hair); display: grid; grid-template-columns: 1.2fr 1.6fr 1.2fr; gap: 18px; align-items: center; }
.dash-me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-me .ava.lg { width: 48px; height: 48px; flex: 0 0 48px; font-size: 16px; }
.dash-name { font-family: var(--display); font-size: 18px; font-weight: 700; line-height: 1.15; text-wrap: balance; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dash-stats .es .n, .emp-stats .es .n { font-variant-numeric: tabular-nums; }
.dash-stats .es.bad .n { color: var(--red); }
.dash-target { font-size: 12.5px; color: var(--mut); min-width: 0; }
.dt-head { display: flex; justify-content: space-between; gap: 10px; }
.dt-head b { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dt-next { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.queue { margin-bottom: 14px; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: none; }
.qn { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--dim); width: 22px; text-align: right; flex: 0 0 22px; font-variant-numeric: tabular-nums; }
.qrow .title { font-weight: 600; font-size: 13.5px; }
.qmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 11px; color: var(--dim); }
.tgt { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.tgt input { width: 58px; padding: 5px 7px; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr 1fr; } .dash-target { grid-column: 1 / 3; } }
@media (max-width: 560px) { .dash { grid-template-columns: 1fr; } .dash-target { grid-column: auto; } .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .qrow { flex-wrap: wrap; } .qrow .due { order: 5; } }

/* ---------- levels, points, dashboard, extensions ---------- */
.lvl i { font-style: normal; font-size: 11px; letter-spacing: -1px; }
.lvl.top { background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent), 0 6px 18px -8px var(--c); }
.lvl.top i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--c); color: #fff; font-size: 9px; letter-spacing: 0; }
.lvl.l3 { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), color-mix(in srgb, var(--c) 8%, transparent)); }
.lvl.big { font-size: 14px; padding: 7px 14px; }
.lvl.big i { font-size: 13px; }
.lvl.big.top i { width: 18px; height: 18px; font-size: 11px; }
.dash.hero { grid-template-columns: 1.3fr 1fr 1.4fr; border-color: color-mix(in srgb, var(--c) 35%, var(--line)); box-shadow: var(--shadow-1), var(--hair), 0 20px 50px -30px var(--c); }
.points { text-align: center; padding: 6px 10px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.p-n { font-family: var(--display); font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.p-n.neg { color: var(--red); }
.p-l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.p-sub { font-size: 12px; color: var(--mut); margin-top: 6px; }
.p-sub .bad { color: var(--red); }
.challenge { min-width: 0; }
.ch-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.ch-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: var(--accent); }
.ch-num { font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; }
.ch-left { font-size: 13px; color: var(--text); margin-top: 4px; }
.ladder { display: grid; gap: 8px; }
.lstep { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel-2); opacity: .75; }
.lstep.done { opacity: 1; border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.lstep.next { opacity: 1; border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--panel-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.ls-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ls-ok { font-family: var(--mono); font-size: 11px; color: var(--green); font-weight: 700; }
.ls-now { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c); font-weight: 700; }
.ls-req { font-size: 12.5px; color: var(--mut); margin-top: 5px; }
.ls-req b { color: var(--text); }
.ls-num { font-size: 12px; color: var(--dim); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ls-num b { color: var(--text); font-family: var(--mono); }
.dash-stats.four { grid-template-columns: repeat(4, 1fr); }
.rules ul { padding: 4px 16px 14px 32px; font-size: 13px; color: var(--mut); line-height: 1.55; }
.rules li { margin: 4px 0; }
.rules b { color: var(--text); }
.vtable { display: flex; flex-direction: column; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.vrow:last-child { border-bottom: none; }
.vrow.counts { background: color-mix(in srgb, var(--green) 5%, transparent); }
.vmark { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--panel-3); color: var(--dim); }
.vrow.counts .vmark { background: var(--green); color: #052; }
.vrow .title { font-weight: 600; font-size: 13.5px; }
.views { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.views b { font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }
.views span { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }
.views em { font-style: normal; font-size: 11px; color: var(--mut); margin-top: 2px; }
.lvlcard { border-color: color-mix(in srgb, var(--c) 30%, var(--line)); }
.chip.dim { opacity: .5; }
.ext-form { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; flex: 1; }
.nbadge.warn { background: #ffb020; color: #1a1200; }
.orphan-note { margin-bottom: 14px; border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.extreqs { margin-bottom: 14px; border-color: color-mix(in srgb, #ffb020 45%, var(--line)); }
.extreq { align-items: flex-start; gap: 12px; }
.extreq .ava { width: 34px; height: 34px; flex: 0 0 34px; font-size: 12px; }
.extreq .sub { margin-top: 3px; }
.ext-decide { flex: 0 1 380px; justify-content: flex-end; }
.ext-decide input { flex: 1 1 140px; }
@media (max-width: 760px) { .extreq { flex-wrap: wrap; } .ext-decide { flex-basis: 100%; justify-content: flex-start; } }
.ext-form input { flex: 1 1 220px; font-size: 13px; padding: 7px 10px; }
.emp-perf .bad, .emp-perf b.bad { color: var(--red); }
@media (max-width: 1100px) { .dash.hero { grid-template-columns: 1fr 1fr; } .points { border: none; border-top: 1px solid var(--line); padding-top: 12px; } .challenge { grid-column: 1 / 3; } }
@media (max-width: 560px) { .dash.hero { grid-template-columns: 1fr; } .challenge { grid-column: auto; } .vrow { flex-wrap: wrap; } .views { flex-direction: row; gap: 6px; align-items: baseline; } }

/* ---------- updates hub + grok insights ---------- */
.upd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upd-card .upd-row { padding: 11px 16px; }
.upd-card.bot { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.upd-card.bot .panel-head h3::before { content: "◆ "; color: var(--accent); }
a.upd-vid { text-decoration: none; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 4px 16px 16px; }
.chcard { display: block; text-decoration: none; color: inherit; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c);
  border-radius: 12px; padding: 12px; transition: border-color .15s, transform .12s; }
.chcard:hover { border-color: var(--c); transform: translateY(-1px); }
.chcard-top { display: flex; align-items: center; gap: 10px; }
.chcard-top .cava { width: 34px; height: 34px; flex: 0 0 34px; font-size: 12px; }
.chcard-top b { display: block; font-size: 14px; }
.chcard-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.chcard-nums b { color: var(--text); font-family: var(--mono); }
.vins { display: block; text-decoration: none; color: inherit; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line);
  border-top: 3px solid var(--c); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1), var(--hair); transition: transform .12s, box-shadow .15s; }
.vins:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.vins .title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.vins-status { margin-top: 10px; font-size: 12.5px; line-height: 1.45; }
.vins-status .sub { display: block; margin-top: 6px; color: var(--mut); }
.ins-persp { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ins-text { padding: 4px 16px 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ins-hl { padding: 0 16px 14px 34px; font-size: 13px; color: var(--mut); line-height: 1.5; }
.cmt { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cmt:last-child { border-bottom: none; }
.cmt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.cmt-head .mono { font-size: 11px; color: var(--dim); }
.cmt-text { margin-top: 6px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.cmt-replies { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--mut); }
.cmt-r b { color: var(--text); }
.cmt-grok { margin-top: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; }
.cmt-grok-text { flex: 1 1 320px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-none { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fb { display: flex; flex-direction: column; gap: 8px; }
.fb-sum { font-size: 13.5px; line-height: 1.55; color: var(--mut); white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-list { display: flex; flex-direction: column; gap: 6px; }
.fb-item { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.fb-item i { font-style: normal; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; margin-top: 1px; }
.fb-list.good .fb-item i { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.fb-list.bad .fb-item i { background: color-mix(in srgb, #ffb020 22%, transparent); color: #ffb020; }
.fb-meta { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fbpanel { border-color: color-mix(in srgb, #ffb020 40%, var(--line)); }
.goodpanel { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.sugpanel { border-color: color-mix(in srgb, #5bb8f0 40%, var(--line)); }
.fb-list.sug .fb-item i { background: color-mix(in srgb, #5bb8f0 20%, transparent); color: #5bb8f0; }
.fb-rep { padding: 4px 16px 14px; font-size: 12.5px; color: var(--mut); line-height: 1.9; }
.fb-rep b { color: var(--red); }
.gtext summary { cursor: pointer; font-size: 13px; color: var(--mut); padding: 6px 0 10px; }
.gtext textarea { min-height: 120px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 900px) { .upd-two { grid-template-columns: 1fr; } }

/* ---------- accessibility ---------- */
/* Keyboard navigation: a visible ring on the focused control, mouse clicks unaffected. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* Long or unbroken titles wrap instead of clipping / forcing horizontal scroll. */
.vt, .row .title, .chan h3, .niche h3, .emp .title, .up-text, .research-body { overflow-wrap: anywhere; }

/* Honor the OS "reduce motion" setting: kill decorative animation and hover lift. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .chan:hover, .emp:hover, .vcard:hover, .btn:hover { transform: none; }
}

/* ---------- points adjustment (admin) ---------- */
.good { color: var(--green); }
.pts-tot { display: flex; align-items: baseline; gap: 9px; padding: 12px 14px; margin-bottom: 16px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; }
.pts-tot .p-n { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.pts-tot .p-n.neg { color: var(--red); }
.pts-tot .p-l { font-size: 12.5px; color: var(--dim); }
.pts-grp { margin-bottom: 16px; }
.pts-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.pts-hd .ek { font-family: var(--mono); font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--mut); }
.pts-hd .btn { margin-left: auto; }
.pts-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-3); margin-bottom: 6px; }
.pts-row .title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pts-row .sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.pts-row b { font-size: 14px; flex: 0 0 auto; }
.pts-none { padding: 12px; text-align: center; color: var(--dim); font-size: 12.5px;
  border: 1px dashed var(--line-2); border-radius: 10px; }
.pts-add { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pts-add input { margin: 0; }
.pts-add input[name="delta"] { width: 110px; flex: 0 0 110px; font-family: var(--mono); }
.emp-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- "Fixed" — employee tidies a feedback line away ---------- */
.fb-item .grow { min-width: 0; }
.fixb { flex: 0 0 auto; align-self: flex-start; background: none; border: 1px solid var(--line-2);
  color: var(--dim); border-radius: 7px; padding: 3px 9px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; transition: .12s; white-space: nowrap; }
.fixb:hover { border-color: var(--green); color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.fb-hid { padding: 0 16px 12px; font-size: 12px; color: var(--dim); }
.lnk { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.sug-by { font-size: 11.5px; font-weight: 600; color: var(--mut); margin-left: 4px; }
.sug-by::before { content: "· "; }

/* ---------- comment done state (Copy & done) ---------- */
.cmt-done-bar { padding: 10px 16px; font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); }
.cmt.done { opacity: .55; }
.cmt.done .cmt-text { color: var(--dim); }

/* ---------- community inbox ---------- */
.comm-filters { flex-wrap: wrap; gap: 8px; }
.comm-q { width: 190px; padding: 5px 10px; font-size: 12.5px; border-radius: 7px;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); margin: 0; }
.comm-vid { text-decoration: none; --c: var(--accent); max-width: 240px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.comm-vid:hover { filter: brightness(1.2); }
.cmt-see { background: none; border: 0; padding: 4px 0; margin: 4px 0 2px; color: var(--accent); font: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cmt-see:hover { text-decoration: underline; }
.cmt-replies[hidden] { display: none !important; }

/* pipeline card: the views chip is the YouTube link, red = attached */
.chip.yt { --c: #ff2d2d; text-decoration: none; cursor: pointer; }
.chip.yt:hover { filter: brightness(1.15); text-decoration: underline; }

.fb-why { margin-top: 10px; font-size: 12.5px; color: var(--mut); text-align: left; }
.fb-why b { color: var(--dim); font-weight: 600; }

/* Team: a member's trades and the channels they are cleared for. */
.tm-tags { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.tm-skill { font-size:11px; font-weight:600; letter-spacing:.02em; padding:2px 8px; border-radius:999px;
  background:var(--chip-bg,#20263a); color:var(--fg,#dfe5f2); border:1px solid #2e3650; }
.tm-none { font-size:11px; color:var(--dim); }
.tm-none.warn { color:#ffb020; }
.tm-dot { color:var(--dim); font-size:11px; }
.chip.sm { font-size:11px; padding:2px 8px; }
.btn.xs { font-size:11px; padding:2px 8px; line-height:1.6; }
.tickset { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:6px; }
.tick { display:flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; }
.tick input { margin:0; }
.fld { margin-bottom:16px; }
.fld > label { display:block; font-size:12px; font-weight:600; color:var(--dim); margin-bottom:2px; }
.hint { font-size:11px; color:var(--dim); margin-top:6px; }

/* Video card: the four legs of the pipeline. */
.legs { display:flex; flex-direction:column; gap:6px; margin:0 0 16px; }
.leg { display:grid; grid-template-columns: 84px minmax(0,1fr) 140px minmax(0,1.2fr) auto;
  gap:8px; align-items:center; padding:7px 10px; border-radius:9px;
  background:var(--panel-2,#161b28); border:1px solid var(--line,#232a3d); }
.leg.on { border-color:#3d6bff; background:#151d33; }
.leg.late { border-color:#fb6a6a; }
.leg-n { font-size:12px; font-weight:700; color:var(--dim); }
.leg-u, .leg-d { font-size:12px; padding:4px 6px; border-radius:7px;
  background:var(--input-bg,#10141f); color:var(--fg,#dfe5f2); border:1px solid var(--line,#232a3d); }
.leg-u:disabled { opacity:.5; }
.leg-s { font-size:11px; display:flex; gap:8px; flex-wrap:wrap; }
.leg-ok { color:#34d399; }
.leg-now { color:#7aa2ff; font-weight:600; }
.leg-wait { color:var(--dim); }
.leg-miss { color:#ffb020; }
@media (max-width: 640px) { .leg { grid-template-columns: 1fr 1fr; } .leg-n { grid-column:1/-1; } }
/* The thumbnail leg runs alongside the edit, so it reads differently from the line. */
.leg.par { border-style:dashed; }

/* The route a card takes through the team, on every pipeline card. */
.chain { display:flex; flex-wrap:wrap; align-items:center; gap:3px 5px; margin:4px 0 6px; font-size:11px; line-height:1.4; }
.chain b { color:var(--dim); font-weight:400; }
.lg { color:var(--dim); white-space:nowrap; }
.lg i { font-style:normal; opacity:.55; margin-left:3px; font-size:10px; }
.lg.now { color:var(--fg,#dfe5f2); font-weight:700; }
.lg.done { color:#34d399; }
.lg.me { text-decoration:underline; text-underline-offset:2px; }
.lg.soon { margin-left:6px; padding:1px 7px; border-radius:999px; background:#2b3a6b; color:#9db4ff; font-weight:600; }

/* ClaudeOps window: the owner's chat with the local brain, plus its pass logs. */
.ops-panel { display:flex; flex-direction:column; max-height: calc(100vh - 170px); }
.ops-feed { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:10px; padding:6px 4px 14px; }
.op-me { align-self:flex-end; max-width:70%; }
.op-me .op-b { background:var(--accent,#e8291f); color:#fff; padding:9px 13px; border-radius:14px 14px 4px 14px; font-size:13.5px; white-space:pre-wrap; }
.op-bot { align-self:flex-start; max-width:78%; }
.op-bot .op-b { background:var(--panel-2,#161b28); border:1px solid var(--line,#232a3d); padding:9px 13px; border-radius:14px 14px 14px 4px; font-size:13.5px; white-space:pre-wrap; }
.op-t { font-size:10.5px; color:var(--dim); margin-top:3px; }
.op-log { align-self:stretch; }
.op-log details { background:transparent; border:1px dashed var(--line,#232a3d); border-radius:10px; padding:6px 10px; }
.op-log summary { font-size:12px; color:var(--mut); cursor:pointer; }
.op-log pre { font-size:11.5px; white-space:pre-wrap; color:var(--mut); margin:8px 0 2px; max-height:340px; overflow-y:auto; }
.ops-input { display:flex; gap:8px; padding-top:10px; border-top:1px solid var(--line,#232a3d); }
.ops-input input { flex:1; font-size:13.5px; padding:10px 12px; border-radius:10px; background:var(--input-bg,#10141f); color:var(--fg,#dfe5f2); border:1px solid var(--line,#232a3d); }

/* Capped lists: 2 video rows / 4 chips until "+N more" opens them. Keeps every
   Workload and Team card the same shape regardless of load. */
.ev.capped:not(.open) > .emp-vid:nth-of-type(n+3) { display:none; }
.ev.capped:not(.open) > .chip:nth-of-type(n+5) { display:none; }
.tm-ch { display:contents; }
.tm-ch:not(.open) .chip.sm:nth-of-type(n+5) { display:none; }
.btn.more { color:var(--dim); border-style:dashed; }
.emp { display:flex; flex-direction:column; }
.emp-vid[data-open-video] { cursor:pointer; }

/* Workload: every card the same height (the tallest capped card sets the row), and
   the latest-update block pinned to the bottom so the shape reads identically. */
.grid.team { align-items: stretch; grid-auto-rows: 1fr; }
.emp { height: 100%; }
.emp > .emp-sec:last-of-type { margin-top: auto; }

/* The card-as-image view, photographed for Discord announcements. */
.shot-wrap { display:flex; justify-content:center; padding:30px; }
.shot-col { width:300px; background:#0b0f18; border-radius:14px; padding:10px 10px 6px; }
.shot-colh { display:flex; justify-content:space-between; align-items:center; padding:2px 6px 10px; font-size:11px; font-weight:800; letter-spacing:.14em; color:var(--sc,#3d6bff); }
.shot-n { color:#8b94a7; font-weight:600; }
.shot-card { background:#10151f; border:1.5px solid var(--sc,#3d6bff); border-radius:13px; padding:12px 13px 10px; }
.shot-title { font-size:14.5px; font-weight:700; color:#eef2fb; margin-bottom:7px; }
.shot-lk { font-size:11px; color:#8b94a7; font-weight:500; }
.shot-card .chain { font-size:11.5px; line-height:1.8; }
.shot-btns { display:flex; gap:8px; margin-top:11px; }
.shot-btns .btn { flex:1; pointer-events:none; }
.shot-code { text-align:right; font-size:10px; color:#5b6478; padding:6px 4px 2px; font-family:ui-monospace,monospace; }

/* Revision checklist - the red section on a card */
.rev-item { display: flex; gap: 10px; align-items: flex-start; border-left: 3px solid #e74c3c; background: rgba(231,76,60,.08); padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; }
.rev-item .rev-text { flex: 1; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.rev-item.fixed { border-left-color: #2ecc71; background: rgba(46,204,113,.06); opacity: .75; }
.rev-item.fixed .rev-text { text-decoration: line-through; }
#revf textarea { width: 100%; }
.btn.danger { border-color: #e74c3c; color: #e74c3c; }

/* Revision checklist v2: numbered timeline + red board-card label */
.rev-num { min-width: 20px; height: 20px; border-radius: 10px; background: #e74c3c; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.rev-item.fixed .rev-num { background: #2ecc71; }
.rev-ts { font-family: ui-monospace, monospace; font-size: 12px; color: #e74c3c; font-weight: 700; white-space: nowrap; margin-top: 2px; flex: none; }
.rev-item.fixed .rev-ts { color: #2ecc71; }
.vcard.has-rev { border: 1px solid #e74c3c; box-shadow: 0 0 0 1px rgba(231,76,60,.25); }
.chip.revchip { --c: #e74c3c; background: rgba(231,76,60,.16); color: #ff6b5b; font-weight: 700; }

/* red revision banner inside the Discord card screenshot */
.shot-rev { margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(231,76,60,.16); border: 1px solid #e74c3c; color: #ff6b5b; font-weight: 700; font-size: 13px; letter-spacing: .4px; }

/* Today's Uploads (uploader role) */
.upl { margin-bottom: 14px; }
.upl-h { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.upl-f { margin-bottom: 10px; }
.upl-k { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.upl-v { background: var(--panel2, rgba(255,255,255,.03)); border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 6px; padding: 8px 10px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.upl-v.big { max-height: 220px; overflow: auto; font-size: 13px; }
.upl-v .empty-v, .upl-v.empty-v { color: var(--dim); font-style: italic; }
.upl-done { display: flex; gap: 8px; margin-top: 12px; }
.upl-done input { flex: 1; }

/* per-channel automation switches */
.auto-set { margin-bottom: 6px; }
.auto-set .tick { display: block; margin-bottom: 4px; }

/* has this person been told? */
.leg-told { color: var(--green, #2ecc71); font-size: 11px; }
.leg-soon { color: var(--accent, #f1c40f); font-size: 11px; }

/* ClaudeOps live status + read-only legs */
.ops-live { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: 8px; font-size: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); color: var(--mut); }
.ops-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; flex: none; }
.ops-live.on { border-color: #2ecc71; color: #d7ffe6; background: rgba(46,204,113,.10); }
.ops-live.on .dot { background: #2ecc71; animation: opspulse 1.4s ease-in-out infinite; }
.ops-live.warn { border-color: #e74c3c; color: #ffd9d4; background: rgba(231,76,60,.10); }
.ops-live.warn .dot { background: #e74c3c; }
@keyframes opspulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.leg-u.ro, .leg-d.ro { font-size: 12px; color: var(--mut); align-self: center; }
.leg-u.ro i, .leg-d.ro i { color: var(--dim); font-style: italic; }
.legs-hint { margin-top: 8px; font-size: 11px; }

/* voice picker: search box + result list - theme colours, readable in light and dark */
.voice-list { max-height: 210px; overflow-y: auto; margin: -4px 0 10px; padding: 4px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-3); box-shadow: var(--shadow-2); font-size: 13px; line-height: 1.4; }
.voice-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); font-weight: 500; }
.voice-row:hover { background: var(--accent-soft); }
.voice-row.on { background: var(--accent-soft); color: var(--accent-2); }
.voice-row.on::after { content: "✓"; margin-left: auto; font-size: 12px; }
.voice-row small { color: var(--mut); font-weight: 400; font-size: 11px; }
.voice-row.muted { color: var(--mut); cursor: default; font-weight: 400; }
#voice-search { width: 100%; }

/* legs panel, read-only: holder and date are plain text, not dead inputs */
.legs .leg { grid-template-columns: 78px minmax(0,1.1fr) 88px minmax(0,1.5fr) auto; align-items: center; column-gap: 10px; }
.legs .leg .leg-u.ro, .legs .leg .leg-d.ro { background: none; border: 0; padding: 0; box-shadow: none; font-size: 12.5px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legs .leg .leg-d.ro { font-family: var(--mono); font-size: 11.5px; color: var(--mut); font-weight: 400; }
.legs .leg .leg-u.ro i, .legs .leg .leg-d.ro i { color: var(--dim); font-style: italic; font-weight: 400; font-family: var(--sans); }
.legs .leg .leg-s { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.35; }
.legs .leg .btn.xs { white-space: nowrap; }
.legs-hint { margin-top: 8px; font-size: 11px; color: var(--dim); }
@media (max-width: 640px) { .legs .leg { grid-template-columns: 1fr 1fr; row-gap: 4px; } .legs .leg .leg-s { grid-column: 1/-1; flex-direction: row; flex-wrap: wrap; gap: 8px; } }

/* card detail: collapsed sections with bold headers */
.csec { border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; background: var(--panel-2); overflow: hidden; }
.csec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text); user-select: none; }
.csec > summary::-webkit-details-marker { display: none; }
.csec > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--mut); font-size: 18px; line-height: 1; transition: transform .15s; }
.csec[open] > summary::before { transform: rotate(90deg); }
.csec > summary:hover { background: var(--accent-soft); }
.csec > summary .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--mut); letter-spacing: 0; text-align: right; }
.csec > .cbody { padding: 2px 14px 14px; border-top: 1px solid var(--line); }
.csec > .cbody > .dsec:first-child, .csec > .cbody > .rows:first-child { margin-top: 6px; }
.csec .update-box { margin: 6px 0 0; padding: 0; background: none; border: 0; }
.csec .hint { margin: 8px 0 6px; }

/* legs panel, fully read-only: four text columns, theme-safe highlight row */
.legs .leg { grid-template-columns: 78px minmax(0,1.1fr) 88px minmax(0,1.6fr); }
.legs .leg.on { background: var(--accent-soft); border-color: var(--accent); }
.legs .leg.late { border-color: var(--red); }

/* people on a video - read-only chips */
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.people .chip small { opacity: .75; margin-left: 4px; font-size: 11px; font-weight: 400; }
.csec form .f, .csec .f { margin-top: 6px; }

/* ClaudeOps status pill: readable in both themes (text in the theme colour, tint + border carry the state) */
.ops-live { background: var(--panel-2); border-color: var(--line); color: var(--mut); }
.ops-live.on { color: var(--text); border-color: var(--green); background: rgba(52,211,153,.12); }
.ops-live.on b { color: var(--text); }
.ops-live.warn { color: var(--text); border-color: var(--red); background: rgba(251,106,106,.12); }

/* Script approval box at the top of a card in Script Approval */
.approve-box { border: 1px solid #e0a800; border-left-width: 6px; background: color-mix(in srgb, #e0a800 10%, transparent); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.approve-box .approve-h { font-weight: 700; width: 100%; }
.approve-box .approve-t { font-size: 12.5px; opacity: .85; width: 100%; line-height: 1.45; }
.approve-box .approve-state { font-size: 12.5px; font-weight: 600; color: #b8860b; }
.approve-box .approve-err { width: 100%; color: #d23; font-size: 12.5px; font-weight: 600; }

/* A tool is working on this card right now */
.live-chip { --c: #22c55e; color: #15803d; background: color-mix(in srgb, #22c55e 14%, transparent); border-color: color-mix(in srgb, #22c55e 45%, transparent); font-weight: 700; }
.live-chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livepulse 1.6s infinite; vertical-align: middle; }
.vcard.running { outline: 2px solid #22c55e; outline-offset: 1px; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* card code shown before every title */
.vcode { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78em; font-weight: 700; color: var(--accent, #4f8cff); letter-spacing: 0; white-space: nowrap; }
h3 .vcode, h2 .vcode { font-size: .7em; vertical-align: middle; }

/* evergreen / news */
.chip.kind { font-size: 10px; letter-spacing: .06em; font-weight: 700; }
.chip.kind.news { --c: #ff8a3d; color: #b4530c; background: color-mix(in srgb, #ff8a3d 16%, transparent); border-color: color-mix(in srgb, #ff8a3d 50%, transparent); }
.chip.kind.ever { --c: #3ddc84; color: #1d8a4e; background: color-mix(in srgb, #3ddc84 14%, transparent); border-color: color-mix(in srgb, #3ddc84 45%, transparent); }


/* people grouped by job in tick lists */
.ck-group { margin: 6px 0 10px 0; }
.ck-group .ck-h { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim, #8b94a7); margin: 0 0 6px 0; }

/* plain results table (team import) */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); vertical-align: top; }
.tbl th { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }

/* leg controls in the card panel: the person and the date are picked in place */
/* Editable rows: label | person | date | status. The person and date boxes fill their
   columns; nothing overlaps at the modal's width, and on a phone the row stacks. */
.legs .leg.edit { grid-template-columns: 78px minmax(0, 1fr) 138px; align-items: center; column-gap: 10px; row-gap: 5px; }
.legs .leg.edit .leg-s { grid-column: 2 / -1; flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
.legs .leg .leg-sel { width: 100%; min-width: 0; box-sizing: border-box; font-family: var(--sans); font-size: 12.5px; padding: 6px 26px 6px 9px; }
.legs .leg .leg-date { width: 100%; min-width: 0; box-sizing: border-box; font-family: var(--mono); font-size: 12px; padding: 6px 8px; background: var(--bg2, transparent); color: var(--text); border: 1px solid var(--line, #333); border-radius: 8px; }
.legs .leg .leg-date::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.legs .leg.edit .leg-s { font-size: 11px; line-height: 1.3; }
@media (max-width: 640px) { .legs .leg.edit { grid-template-columns: 1fr 1fr; row-gap: 6px; } .legs .leg.edit .leg-n { grid-column: 1/-1; } .legs .leg.edit .leg-s { grid-column: 1/-1; flex-direction: row; flex-wrap: wrap; gap: 8px; } }

/* schedule modal: one time box per upload of the day */
.wtimes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wtimes .wtime-l { display: flex; flex-direction: column; gap: 4px; flex: 1 1 120px; min-width: 120px; }
.wtimes .wtime-l span { font-size: 11px; color: var(--dim); font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; min-height: 12px; }
.wtimes .wtime { width: 100%; box-sizing: border-box; }
.tmpls .perday.on { background: var(--accent, #6c5ce7); color: #fff; border-color: transparent; }

/* ---------- pipeline filters with a search box ---------- */
.fsel { position: relative; }
.fsel-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 5px 9px; font-size: 12px;
  font-family: var(--mono); color: var(--text); background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsel-btn:hover, .fsel.open .fsel-btn { border-color: var(--accent); }
.fsel-btn.on { color: var(--accent); }
.fsel-btn .cav { opacity: .6; font-size: 10px; }
.fsel-pan { position: absolute; right: 0; top: calc(100% + 5px); z-index: 40; width: 244px; padding: 7px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.34); }
.fsel-q { width: 100%; padding: 6px 9px; font-size: 12.5px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--panel-3); color: var(--text); }
.fsel-list { max-height: 274px; overflow-y: auto; margin-top: 6px; }
.fsel-o { display: block; width: 100%; text-align: left; padding: 6px 9px; font-size: 12.5px; color: var(--text);
  background: none; border: 0; border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsel-o:hover { background: var(--panel-3); }
.fsel [hidden] { display: none !important; }
.fsel-o.sel { color: var(--accent); font-weight: 600; }
.fsel-g { padding: 8px 9px 3px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.fsel-none { padding: 9px; font-size: 12px; color: var(--mut); }
.pf-q { position: relative; display: inline-flex; align-items: center; }
.pf-q input { width: 168px; padding: 5px 26px 5px 9px; font-size: 12px; font-family: var(--mono); border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--panel-3); color: var(--text); }
.pf-q input:focus { border-color: var(--accent); outline: none; }
.pf-q.on input { border-color: var(--accent); color: var(--accent); }
.pf-q button { position: absolute; right: 4px; padding: 0 4px; font-size: 11px; line-height: 1; color: var(--mut);
  background: none; border: 0; cursor: pointer; }
.pf-q button:hover { color: var(--red); }
.vcard .btn.go { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
.chip.nowchip { --c: #7c74ff; }
.vcard[hidden] { display: none !important; }
.pf-q button { opacity: 0; transition: opacity .12s; }
.pf-q.on button { opacity: 1; }
