/* Baytna Outreach Board — design system + layout */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

:root {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --surface-3: #f1f1f4;
  --line: #e8e8ec;
  --line-2: #dcdce2;
  --ink: #16161a;
  --ink-2: #55555f;
  --ink-3: #8b8b96;
  --brand: #e3002f;
  --brand-2: #b80026;
  --brand-soft: #ffe8ed;
  --brand-ink: #ffffff;
  --ok: #15803d;
  --shadow-1: 0 1px 2px rgba(16, 16, 22, .05), 0 1px 3px rgba(16, 16, 22, .04);
  --shadow-2: 0 10px 30px -12px rgba(16, 16, 22, .25), 0 2px 8px rgba(16, 16, 22, .06);
  --shadow-3: -24px 0 60px -30px rgba(16, 16, 22, .45);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h: 62px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #0c0c10;
  --surface: #191920;
  --surface-2: #202028;
  --surface-3: #282831;
  --line: #2f2f3a;
  --line-2: #3d3d4a;
  --ink: #f3f3f6;
  --ink-2: #b4b4c0;
  --ink-3: #85858f;
  --brand: #ff4d68;
  --brand-2: #e3002f;
  --brand-soft: #331016;
  --brand-ink: #ffffff;
  --ok: #4ade80;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 12px 34px -14px rgba(0, 0, 0, .8), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-3: -24px 0 60px -30px rgba(0, 0, 0, .9);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--ink); }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- app shell */

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  flex: 0 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 30;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}

.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.brand .wordmark {
  font-weight: 700; letter-spacing: -.02em; font-size: 15.5px; white-space: nowrap;
}
.brand .wordmark span { color: var(--ink-3); font-weight: 500; }

.search {
  flex: 1 1 auto;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}
.search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.search .clear {
  position: absolute; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-3);
}
.search .clear:hover { background: var(--surface-3); color: var(--ink); }

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

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background .13s, color .13s, border-color .13s;
  flex: 0 0 auto;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); }

.presence { display: flex; align-items: center; margin-right: 4px; }
.presence .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.presence .av:first-child { margin-left: 0; }
.presence .live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  margin-left: 8px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
}
.presence .live.off { background: var(--ink-3); box-shadow: none; }

/* ---------------------------------------------------------------- filters */

.filters {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 20;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .13s;
  flex: 0 0 auto;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }
.chip[aria-pressed="true"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--ink); color: #101014; }
.chip .n {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  opacity: .65;
}
.chip.brandy[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.chip-select {
  height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 30px 0 12px; font-size: 13px; font-weight: 500;
  color: var(--ink-2); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8b96' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 13px;
  flex: 0 0 auto;
  cursor: pointer;
}
.chip-select:hover { border-color: var(--line-2); color: var(--ink); }
.filters .spacer { flex: 1 1 auto; }
.count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- board */

.board { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.board-inner { padding: 0 0 96px; }
@media (min-width: 900px) { .board-inner { padding: 0 0 40px; } }

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

.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, var(--surface));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); text-align: left; padding: 9px 12px; white-space: nowrap;
}
.tbl thead th:first-child { padding-left: 16px; }
.tbl tbody tr { background: var(--surface); }
.tbl tbody td { border-bottom: 1px solid var(--line); padding: 11px 12px; vertical-align: middle; }
.tbl tbody td:first-child { padding-left: 16px; border-left: 1px solid var(--line); }
.tbl tbody td:last-child { border-right: 1px solid var(--line); }
.tbl tbody tr:first-child td { border-top: 1px solid var(--line); }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.is-open { background: var(--surface-2); }
.tbl tbody tr.is-prio td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

.c-rank { width: 52px; }
.rank {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px;
  color: var(--ink-3); display: inline-block; min-width: 20px;
}
.rank.top { color: var(--brand); }

.c-name { min-width: 220px; }
.nm { font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; }
.sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; display: flex; gap: 6px; flex-wrap: wrap; }
.sub .dot { opacity: .5; }

.c-cat { width: 210px; }
.cats { display: flex; flex-wrap: wrap; gap: 4px; max-width: 210px; }
.cat {
  font-size: 11.5px; padding: 2px 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.c-stage { width: 132px; }
.c-owner { width: 78px; }
.c-touch { width: 160px; }
.c-last { width: 96px; text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* stage pill ------------------------------------------------------------ */

.tone-slate   { --tone: #64748b; --tone-bg: #eef1f5; }
.tone-indigo  { --tone: #4f46e5; --tone-bg: #eef0ff; }
.tone-amber   { --tone: #a16207; --tone-bg: #fdf5e3; }
.tone-sky     { --tone: #0369a1; --tone-bg: #e8f4fb; }
.tone-violet  { --tone: #6d28d9; --tone-bg: #f3ecff; }
.tone-green   { --tone: #15803d; --tone-bg: #e8f7ee; }
.tone-rose    { --tone: #be123c; --tone-bg: #fdeaf0; }
[data-theme="dark"] .tone-slate  { --tone: #a3b1c2; --tone-bg: #232a33; }
[data-theme="dark"] .tone-indigo { --tone: #a5b4fc; --tone-bg: #232544; }
[data-theme="dark"] .tone-amber  { --tone: #fbbf24; --tone-bg: #36290c; }
[data-theme="dark"] .tone-sky    { --tone: #7dd3fc; --tone-bg: #0d2b3d; }
[data-theme="dark"] .tone-violet { --tone: #c4b5fd; --tone-bg: #2a2145; }
[data-theme="dark"] .tone-green  { --tone: #6ee7a0; --tone-bg: #10301f; }
[data-theme="dark"] .tone-rose   { --tone: #fda4af; --tone-bg: #3b1220; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px 0 8px; border-radius: 999px;
  background: var(--tone-bg); color: var(--tone);
  font-size: 12px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; transition: filter .13s, transform .06s;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
button.pill { cursor: pointer; }
button.pill:hover { filter: brightness(.96); }
button.pill:active { transform: scale(.97); }
.pill.big { height: 32px; font-size: 13px; padding: 0 12px 0 10px; }

/* owner avatar ---------------------------------------------------------- */

.av {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #fff;
  letter-spacing: .02em; flex: 0 0 auto;
  user-select: none;
}
.av.m1 { background: #e3002f; }
.av.m2 { background: #0e7490; }
.av.both { background: linear-gradient(135deg, #e3002f 0 50%, #0e7490 50% 100%); }
.av.none {
  background: transparent; border: 1.5px dashed var(--line-2); color: var(--ink-3);
  font-size: 13px; font-weight: 500;
}
.av.lg { width: 32px; height: 32px; font-size: 12px; }

.owner-btn { display: inline-flex; align-items: center; gap: 6px; padding: 2px; border-radius: 999px; }
.owner-btn:hover .av.none { border-color: var(--brand); color: var(--brand); }

/* contact actions ------------------------------------------------------- */

.touches { display: flex; gap: 4px; }
.touch {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink-2); background: var(--surface-3); transition: all .12s;
}
.touch svg { width: 14.5px; height: 14.5px; }
.touch:hover { background: var(--ink); color: var(--surface); }
.touch.wa:hover { background: #25d366; color: #fff; }
.touch.mail:hover { background: #2563eb; color: #fff; }
.touch.web:hover { background: var(--ink); }
.touch.ig:hover { background: #d62976; color: #fff; }
.touch.cmt { background: transparent; color: var(--ink-3); gap: 3px; width: auto; padding: 0 6px; }
.touch.cmt.has { color: var(--ink-2); background: var(--surface-3); }
.touch.cmt span { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* cards (mobile) -------------------------------------------------------- */

.cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px 10px;
  box-shadow: var(--shadow-1);
  position: relative;
  transition: box-shadow .15s, transform .1s;
  text-align: left;
  width: 100%;
  display: block;
}
.card:active { transform: scale(.995); }
.card.is-prio::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-rank {
  font-size: 11px; font-weight: 700; color: var(--ink-3);
  min-width: 18px; padding-top: 2px; font-variant-numeric: tabular-nums;
}
.card.is-prio .card-rank { color: var(--brand); }
.card-title { flex: 1 1 auto; min-width: 0; }
.card-title .nm { font-size: 15px; line-height: 1.25; }
.card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.card-foot {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  padding-top: 9px; border-top: 1px dashed var(--line);
}
.card-foot .grow { flex: 1 1 auto; }

/* empty / loading ------------------------------------------------------- */

.empty {
  display: grid; place-items: center; text-align: center;
  padding: 64px 24px; color: var(--ink-3); gap: 10px;
}
.empty .em-title { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.empty p { margin: 0; font-size: 13.5px; max-width: 34ch; }

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

.scrim {
  position: fixed; inset: 0; background: rgba(10, 10, 14, .38);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
  z-index: 60; backdrop-filter: blur(2px);
}
.scrim.on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  z-index: 70;
  display: flex; flex-direction: column;
  transform: translateX(102%);
  transition: transform .28s var(--ease);
  border-left: 1px solid var(--line);
}
.drawer.on { transform: translateX(0); }

@media (max-width: 899px) {
  .drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 94dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-left: 0; border-top: 1px solid var(--line);
    transform: translateY(102%);
    box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .4);
  }
  .drawer.on { transform: translateY(0); }
}

.drawer-head {
  flex: 0 0 auto; padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
  position: relative;
}
.drawer-grab {
  display: none; width: 38px; height: 4px; border-radius: 3px;
  background: var(--line-2); margin: -6px auto 10px;
}
@media (max-width: 899px) { .drawer-grab { display: block; } }

.drawer-head .row1 { display: flex; align-items: flex-start; gap: 10px; }
.drawer-head h2 {
  margin: 0; font-size: 19px; line-height: 1.22; letter-spacing: -.02em; font-weight: 700;
  flex: 1 1 auto; padding-right: 8px;
}
.drawer-body { flex: 1 1 auto; overflow: auto; padding: 0 18px calc(28px + env(safe-area-inset-bottom)); }

.sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-title {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 10px; display: flex; align-items: center; gap: 8px;
}
.sec-title .grow { flex: 1 1 auto; }

.stage-grid { display: flex; flex-wrap: wrap; gap: 6px; }

.seg { display: flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button {
  flex: 1 1 auto; height: 30px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); padding: 0 8px; transition: all .13s;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.kv { display: flex; flex-direction: column; gap: 2px; }
.kv-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; min-height: 44px;
  border-bottom: 1px dashed var(--line);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: 0 0 auto; }
.kv-row .ico svg { width: 15px; height: 15px; }
.kv-row .tv { flex: 1 1 auto; min-width: 0; }
.kv-row .tv .k { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.kv-row .tv .v { font-size: 13.5px; overflow-wrap: anywhere; }
.kv-row .acts { display: flex; gap: 2px; flex: 0 0 auto; }

.btn {
  height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: all .13s;
}
.btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: #be123c; border-color: color-mix(in srgb, #be123c 30%, var(--line)); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.icon { width: 32px; padding: 0; }

.tasks { display: flex; flex-direction: column; gap: 2px; }
.task {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 6px;
  border-radius: 9px; text-align: left; min-height: 42px; width: 100%;
  transition: background .12s;
}
.task:hover { background: var(--surface-2); }
.box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; flex: 0 0 auto; transition: all .13s;
  background: var(--surface);
}
.task[aria-checked="true"] .box { background: var(--ok); border-color: var(--ok); }
.box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.5); transition: all .13s; }
.task[aria-checked="true"] .box svg { opacity: 1; transform: scale(1); }
.task .lbl { flex: 1 1 auto; font-size: 13.5px; font-weight: 500; }
.task[aria-checked="true"] .lbl { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.task .who { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.note-list { display: flex; flex-direction: column; gap: 12px; }
.note { display: flex; gap: 10px; }
.note .body { flex: 1 1 auto; min-width: 0; }
.note .meta { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; }
.note .who { font-size: 12.5px; font-weight: 600; }
.note .when { font-size: 11.5px; color: var(--ink-3); }
.note .txt { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.note .del { opacity: 0; font-size: 11px; color: var(--ink-3); }
.note:hover .del { opacity: 1; }

.composer { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.composer textarea {
  flex: 1 1 auto; min-height: 40px; max-height: 140px; resize: none;
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  background: var(--surface-2); font-size: 13.5px; line-height: 1.4;
}
.composer textarea:focus {
  outline: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

.prose { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.prose + .prose { margin-top: 8px; }
.reason {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5;
}
.flag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  background: color-mix(in srgb, #b45309 12%, transparent); color: #a16207;
  padding: 3px 8px; border-radius: 6px; font-weight: 600;
}
[data-theme="dark"] .flag { color: #fbbf24; }
.srcs { display: flex; flex-wrap: wrap; gap: 5px; }
.src { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); }

/* ---------------------------------------------------------------- login */

.login {
  min-height: 100dvh; display: grid; grid-template-columns: 1fr;
  background: var(--bg);
}
@media (min-width: 900px) { .login { grid-template-columns: 1.05fr .95fr; } }

.login-art {
  display: none; position: relative; overflow: hidden;
  background: #121216; color: #fff; padding: 48px;
  flex-direction: column; justify-content: space-between;
}
@media (min-width: 900px) { .login-art { display: flex; } }
.login-art::before {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 0, 47, .55), transparent 62%);
  top: -180px; right: -180px; filter: blur(20px);
}
.login-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.login-art img { width: 44px; height: 44px; border-radius: 11px; position: relative; z-index: 1; }
.login-art .pitch { position: relative; z-index: 1; max-width: 30ch; }
.login-art h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 700; }
.login-art p { color: rgba(255, 255, 255, .68); font-size: 14.5px; line-height: 1.6; margin: 0; }
.login-art .bullets { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; position: relative; z-index: 1; }
.login-art .bullets div { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.login-art .bullets svg { width: 16px; height: 16px; color: #ff4d68; flex: 0 0 auto; }

.login-form { display: flex; align-items: center; justify-content: center; padding: 28px 20px; }
.login-card { width: 100%; max-width: 390px; }
.login-card .mark { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px; }
.login-card h2 { font-size: 23px; letter-spacing: -.025em; margin: 0 0 6px; }
.login-card .lede { color: var(--ink-3); font-size: 13.5px; margin: 0 0 22px; }

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.who button {
  height: 62px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; font-size: 13.5px; font-weight: 600;
  transition: all .13s;
}
.who button .sub2 { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.who button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.who button:hover { border-color: var(--line-2); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input {
  height: 46px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 14px; font-size: 16px; letter-spacing: .01em;
  transition: all .13s; width: 100%;
}
.field input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
}
.field.err input { border-color: #be123c; box-shadow: 0 0 0 3px rgba(190, 18, 60, .12); }
.err-msg { font-size: 12.5px; color: #be123c; min-height: 17px; margin: -6px 0 8px; }
.login-submit {
  width: 100%; height: 46px; border-radius: 11px; background: var(--brand); color: #fff;
  font-size: 14.5px; font-weight: 600; transition: background .13s;
}
.login-submit:hover { background: var(--brand-2); }
.login-submit:disabled { opacity: .6; }
.login-foot { margin-top: 18px; font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.6; }

/* ---------------------------------------------------------------- overlays */

.sheet {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 18px; background: rgba(10, 10, 14, .42); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease);
}
.sheet.on { opacity: 1; pointer-events: auto; }
.sheet-card {
  width: min(460px, 100%); max-height: 84dvh; overflow: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-2);
  border: 1px solid var(--line); padding: 20px;
  transform: translateY(10px) scale(.99); transition: transform .2s var(--ease);
}
.sheet.on .sheet-card { transform: none; }
.sheet-card h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.02em; }
.sheet-card .lede { color: var(--ink-3); font-size: 13px; margin: 0 0 16px; }
.sheet-close { position: absolute; top: 14px; right: 14px; }

.qr-wrap { display: grid; place-items: center; padding: 10px 0 4px; }
.qr-wrap .qr {
  background: #fff; padding: 14px; border-radius: 14px; box-shadow: var(--shadow-1);
  line-height: 0; max-width: 260px;
}
.qr-wrap .qr svg { width: 100%; height: auto; display: block; }
.qr-url {
  margin-top: 14px; font-size: 11.5px; color: var(--ink-3); word-break: break-all;
  text-align: center; font-family: var(--mono); line-height: 1.5;
}

.menu {
  position: fixed; z-index: 90; min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 5px;
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
  transition: opacity .13s, transform .13s;
}
.menu.on { opacity: 1; transform: none; pointer-events: auto; }
.menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; min-height: 38px;
}
.menu button:hover { background: var(--surface-2); }
.menu button[aria-checked="true"] { background: var(--surface-3); font-weight: 600; }
.menu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 6px 10px 3px; }
.menu .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--ink-3)); }

.toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(440px, calc(100vw - 24px));
}
.toast {
  background: #1c1c22; color: #fff; font-size: 13px; font-weight: 500;
  padding: 10px 14px; border-radius: 11px; box-shadow: var(--shadow-2);
  display: flex; align-items: center; gap: 8px;
  animation: toast-in .22s var(--ease);
  max-width: 100%;
}
.toast .who { color: #ff8ba0; font-weight: 600; }
[data-theme="dark"] .toast { background: #f3f3f6; color: #16161a; }
[data-theme="dark"] .toast .who { color: #b80026; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.activity { display: flex; flex-direction: column; }
.act {
  display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px; align-items: flex-start;
}
.act:last-child { border-bottom: 0; }
.act .txt { flex: 1 1 auto; min-width: 0; }
.act .txt b { font-weight: 600; }
.act .txt .what { color: var(--ink-2); }
.act .when { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.banner {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px;
  background: #fff7e6; color: #92400e; font-size: 12.5px; font-weight: 500;
  border-bottom: 1px solid #fde68a; flex: 0 0 auto;
}
.banner svg { width: 14px; height: 14px; }
[data-theme="dark"] .banner { background: #3a2a0a; color: #fbbf24; border-color: #5a4010; }

.install-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 0;
  font-size: 13px; color: var(--ink-2); line-height: 1.5;
}
.install-row .num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
  margin-top: 1px;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .c-cat { display: none; }
}
@media (max-width: 1020px) {
  .c-last { display: none; }
  .c-touch { width: 130px; }
}
@media (max-width: 899px) {
  :root { --header-h: 56px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand .wordmark { display: none; }
  .search { max-width: none; }
  .topbar-right .desk-only { display: none; }
  .filters { padding: 8px 12px; gap: 6px; }
  .c-owner, .c-touch, .c-stage, .c-cat, .c-last { display: none; }
  .drawer-body { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================ additions */

/* due chips ------------------------------------------------------- */
.due {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  padding: 2px 6px; border-radius: 6px;
  background: var(--tone-bg); color: var(--tone); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sub .due { margin-right: 6px; }
.due-chip.has { border-color: color-mix(in srgb, #b45309 35%, var(--line)); color: #a16207; }

.unseen {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

/* next step ------------------------------------------------------- */
.due-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.chip.ghost { border-color: transparent; color: var(--ink-3); }
.due-custom { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.due-custom input[type="date"] {
  height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px;
  background: var(--surface-2); font-size: 13px; color: var(--ink);
  color-scheme: light dark;
}

/* quick log ------------------------------------------------------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.quick-btn {
  min-height: 42px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--ink-2);
  transition: all .13s;
}
.quick-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.quick-btn:active { transform: scale(.98); }
@media (max-width: 520px) { .quick-grid { grid-template-columns: 1fr 1fr; } }

/* custom tasks ---------------------------------------------------- */
.task.todo { position: relative; }
.task.todo:hover { background: var(--surface-2); }
.del-todo {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  color: var(--ink-3); opacity: 0; transition: opacity .12s;
}
.del-todo svg { width: 13px; height: 13px; }
.task.todo:hover .del-todo { opacity: 1; }
@media (hover: none) { .del-todo { opacity: .55; } }

.todo-add { display: flex; gap: 6px; margin-top: 8px; }
.todo-add input {
  flex: 1 1 auto; height: 36px; border: 1px dashed var(--line-2); border-radius: 9px;
  padding: 0 11px; background: transparent; font-size: 13px;
}
.todo-add input:focus {
  outline: none; border-style: solid; border-color: var(--brand);
  background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

/* timeline -------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 4px; }
.tl { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; position: relative; }
.tl-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line-2);
  margin-top: 7px; flex: 0 0 auto; position: relative; z-index: 1;
}
.tl:not(:last-child)::before {
  content: ""; position: absolute; left: 3px; top: 16px; bottom: -6px;
  width: 1px; background: var(--line);
}
.tl-txt { flex: 1 1 auto; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; min-width: 0; }
.tl-txt b { font-weight: 600; color: var(--ink); }
.tl-when { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.del-prospect {
  width: 100%; height: 40px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: #be123c; background: color-mix(in srgb, #be123c 7%, transparent);
  border: 1px solid color-mix(in srgb, #be123c 20%, transparent);
  transition: background .13s;
}
.del-prospect:hover { background: color-mix(in srgb, #be123c 13%, transparent); }
[data-theme="dark"] .del-prospect { color: #fda4af; }

/* fab ------------------------------------------------------------- */
.fab {
  display: none;
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 10px 26px -8px rgba(227, 0, 47, .6), var(--shadow-2);
  z-index: 40; place-items: center;
  transition: transform .12s;
}
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.94); }
@media (max-width: 899px) { .fab { display: grid; } }

/* swipe affordance ------------------------------------------------ */
.card { touch-action: pan-y; will-change: transform; position: relative; }
.card[data-swipe="right"]::after,
.card[data-swipe="left"]::after {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; pointer-events: none;
}
.card[data-swipe="right"]::after { content: "take"; left: 12px; background: #e3002f; color: #fff; }
.card[data-swipe="left"]::after { content: "next stage"; right: 12px; background: #15803d; color: #fff; }

/* command palette ------------------------------------------------- */
.palette {
  position: fixed; inset: 0; z-index: 95; padding: 12vh 16px 16px;
  background: rgba(10, 10, 14, .45); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: flex-start;
  opacity: 0; transition: opacity .16s var(--ease);
}
.palette.on { opacity: 1; }
.palette-card {
  width: min(560px, 100%); background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow-3), var(--shadow-2); border: 1px solid var(--line);
  overflow: hidden; transform: translateY(-8px) scale(.99); transition: transform .16s var(--ease);
  display: flex; flex-direction: column; max-height: 70dvh;
}
.palette.on .palette-card { transform: none; }
.palette-input {
  display: flex; align-items: center; gap: 9px; padding: 0 14px;
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.palette-input svg { width: 17px; height: 17px; color: var(--ink-3); flex: 0 0 auto; }
.palette-input input {
  flex: 1 1 auto; height: 52px; border: 0; background: none; font-size: 15px; outline: none;
}
.palette-list { overflow: auto; padding: 6px; flex: 1 1 auto; }
.pal-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px; min-height: 40px;
}
.pal-item span:first-of-type { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item em { font-style: normal; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.pal-item.on { background: var(--surface-3); }
.pal-empty { padding: 22px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.palette-foot {
  display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--ink-3); flex: 0 0 auto; background: var(--surface-2);
}
kbd {
  font-family: var(--font); font-size: 10px; padding: 1px 4px; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--line-2); margin-right: 3px;
}

/* toast action ---------------------------------------------------- */
.toast-act {
  margin-left: 6px; font-size: 12.5px; font-weight: 700; color: #ff9db0;
  text-decoration: underline; text-underline-offset: 2px; padding: 2px 4px; border-radius: 5px;
}
.toast-act:hover { color: #fff; }
[data-theme="dark"] .toast-act { color: #b80026; }

/* drawer mobile polish -------------------------------------------- */
@media (max-width: 899px) {
  .drawer-body { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .drawer-head h2 { font-size: 18px; }
  .kv-row .acts .btn:not(.icon) { padding: 0 8px; }
}

/* print ------------------------------------------------------------ */
@media print {
  .topbar, .filters, .fab, .drawer, .scrim, .toasts, .palette { display: none !important; }
  .board { overflow: visible; height: auto; }
  body, #app { height: auto; overflow: visible; }
}

/* ------------------------------------------------------------------ polish */

.brand img { border-radius: 0; }
.login-art img, .login-card .mark { border-radius: 0; }

/* resting stage pills read as neutral, with a coloured dot */
.stage-grid .pill {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
}
.stage-grid .pill::before { background: var(--tone); opacity: .9; }
.stage-grid .pill:hover { border-color: var(--line-2); color: var(--ink); }
.stage-grid .pill[aria-pressed="true"] {
  background: var(--tone-bg);
  border-color: transparent;
  color: var(--tone);
  font-weight: 700;
}

/* clock inside due chips */
.due svg { width: 11px; height: 11px; margin-right: 3px; }
.chip svg { width: 13px; height: 13px; }

/* denser table */
.tbl tbody td { padding: 8px 12px; }
.tbl .nm { font-size: 14px; }
.tbl .sub { margin-top: 0; }

/* tighter cards on phones */
.card { padding: 12px 13px 9px; }
.card-meta { margin-top: 6px; }
.card-foot { margin-top: 8px; padding-top: 8px; }
.card-title .nm { font-size: 14.5px; }

/* desktop-only add button */
.chip-add { display: none; background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600; }
.chip-add:hover { background: var(--ink); color: var(--surface); opacity: .9; }
@media (min-width: 900px) { .chip-add { display: inline-flex; } }

/* login headline breathing room */
.login-art .pitch { max-width: 22rem; }
.login-art h1 { font-size: 33px; }
.who button { height: 56px; }

/* login: sit near the top on phones, neutral focus ring so red means error only */
@media (max-width: 899px) {
  .login-form { align-items: flex-start; padding-top: 15vh; }
}
.field input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}
.field.err input:focus { border-color: #be123c; box-shadow: 0 0 0 3px rgba(190, 18, 60, .12); }

/* keep toasts clear of the floating add button on phones */
@media (max-width: 899px) {
  .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
.unseen { width: 5px; height: 5px; opacity: .85; }

/* ============================================================ funky layer */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: "Space Grotesk", var(--font);
  --bg: #f7f2ea;
  --surface: #fffdfa;
  --surface-2: #fbf6ee;
  --surface-3: #f2ebdf;
  --line: #ecdfcd;
  --line-2: #dcc9b2;
  --ink: #1b1611;
  --ink-2: #5d5145;
  --ink-3: #8d7f70;
  --brand: #e3002f;
  --brand-2: #b80026;
  --brand-soft: #ffe7ea;
  --pop1: #ff8a3d;
  --pop2: #12b3a3;
  --pop3: #7c3aed;
  --pop4: #2563eb;
  --pop5: #f4b400;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 26px;
  --shadow-1: 0 1px 0 var(--line), 0 8px 18px -14px rgba(70, 40, 15, .45);
  --shadow-2: 0 2px 0 var(--line-2), 0 20px 44px -26px rgba(70, 40, 15, .55);
}

[data-theme="dark"] {
  --bg: #14100e;
  --surface: #1e1916;
  --surface-2: #26201c;
  --surface-3: #2f2722;
  --line: #3b2f28;
  --line-2: #4d3d33;
  --ink: #f9f2e9;
  --ink-2: #c4b6a7;
  --ink-3: #918275;
  --brand: #ff3b57;
  --brand-2: #e3002f;
  --brand-soft: #3a1119;
  --shadow-1: 0 1px 0 #2f2722, 0 8px 20px -14px rgba(0, 0, 0, .9);
  --shadow-2: 0 2px 0 #3b2f28, 0 22px 48px -28px rgba(0, 0, 0, .95);
}

/* display type where it earns its keep */
.brand .wordmark, .login-card h2, .login-art h1, .drawer-head h2, .sheet-card h3,
.nm, .rank, .stat b, .pulse .hello, .login-submit, .pm-num {
  font-family: var(--display);
  letter-spacing: -.025em;
}
.brand .wordmark { font-size: 16.5px; font-weight: 700; }
.nm { font-weight: 700; }

/* a hand-drawn squiggle under the wordmark */
.brand { position: relative; }
.brand .wordmark span { position: relative; }
.brand .wordmark span::after {
  content: ""; position: absolute; left: 0; right: 2px; bottom: -3px; height: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='4'%3E%3Cpath d='M0 2.5c5-3 10 2 15-1s10 2 15-1 10 2 10 0' fill='none' stroke='%23e3002f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 40px 4px;
  opacity: .85;
}

/* pulse strip ------------------------------------------------------ */
.pulse {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 180% at 0% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.pulse .hello { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.pulse .hello b { color: var(--brand); }
.sparks { display: flex; gap: 6px; align-items: center; overflow: hidden; }
.spark {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 11.5px; color: var(--ink-2); background: var(--surface-3);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.spark b { font-size: 12.5px; color: var(--ink); font-weight: 700; }
.spark.hot b { color: var(--brand); }
.meter { display: flex; gap: 3px; margin-left: auto; align-items: center; padding-left: 10px; }
.meter i {
  display: block; width: 13px; height: 9px; border-radius: 3px;
  background: var(--surface-3); cursor: pointer;
  transition: transform .14s var(--ease), background .14s;
}
.meter i.on { background: var(--tone); }
.meter i:hover { transform: scaleY(2.1); }
@media (max-width: 899px) {
  .pulse { padding: 7px 12px; gap: 8px; }
  .pulse .hello { font-size: 13px; }
  .spark.extra, .meter { display: none; }
}

/* stage tones, a little more alive --------------------------------- */
.tone-slate  { --tone: #6b7280; --tone-bg: #eeeae3; }
.tone-indigo { --tone: #5b3df6; --tone-bg: #ebe7ff; }
.tone-amber  { --tone: #b06a00; --tone-bg: #ffefcf; }
.tone-sky    { --tone: #0b7fbf; --tone-bg: #ddf1ff; }
.tone-violet { --tone: #8b2fd6; --tone-bg: #f5e3ff; }
.tone-green  { --tone: #0f8a45; --tone-bg: #d8f7e3; }
.tone-rose   { --tone: #d01b45; --tone-bg: #ffe2e9; }
[data-theme="dark"] .tone-slate  { --tone: #b6bcc6; --tone-bg: #2b2722; }
[data-theme="dark"] .tone-indigo { --tone: #b7a6ff; --tone-bg: #241f3d; }
[data-theme="dark"] .tone-amber  { --tone: #ffc247; --tone-bg: #3a2b0d; }
[data-theme="dark"] .tone-sky    { --tone: #67ccff; --tone-bg: #0d2c3f; }
[data-theme="dark"] .tone-violet { --tone: #d3a4ff; --tone-bg: #2e1c40; }
[data-theme="dark"] .tone-green  { --tone: #59e58f; --tone-bg: #0f3320; }
[data-theme="dark"] .tone-rose   { --tone: #ff89a3; --tone-bg: #3d1220; }

/* top-3 ranks become stickers ------------------------------------- */
.rank.top {
  display: inline-grid; place-items: center;
  width: 23px; height: 23px; border-radius: 8px;
  background: linear-gradient(135deg, var(--pop1), var(--brand));
  color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 0 rgba(120, 20, 0, .28);
  transform: rotate(-5deg);
}
.rank.top:nth-of-type(2) { filter: hue-rotate(-12deg); }

/* cards: chunkier, sticker-ish ------------------------------------ */
.card {
  border-radius: 18px;
  box-shadow: 0 1px 0 var(--line-2), 0 10px 22px -18px rgba(70, 40, 15, .6);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 2px 0 var(--line-2), 0 16px 28px -18px rgba(70, 40, 15, .55); }
}
.card.is-prio::before { background: linear-gradient(180deg, var(--pop1), var(--brand)); width: 4px; }

/* buttons with a hard bottom edge -------------------------------- */
.btn.primary, .login-submit, .fab {
  box-shadow: 0 2px 0 rgba(120, 0, 22, .35), 0 12px 24px -14px rgba(227, 0, 47, .7);
}
.btn.primary:active, .login-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(120, 0, 22, .35); }
.fab { background: linear-gradient(135deg, #ff3b57, var(--brand)); }

/* tick: a little pop --------------------------------------------- */
@keyframes tick-pop { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
.task[aria-checked="true"] .box svg { animation: tick-pop .34s var(--ease); }

/* paper texture behind the board -------------------------------- */
.board-inner {
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  background-position: 4px 4px;
}
[data-theme="dark"] .board-inner {
  background-image: radial-gradient(rgba(249, 242, 233, .05) 0.7px, transparent 0.7px);
}

/* confetti ------------------------------------------------------- */
.confetti {
  position: fixed; width: 8px; height: 8px; z-index: 120; pointer-events: none;
  border-radius: 2px; top: 0; left: 0;
}

/* login: warmer, bolder ------------------------------------------ */
.login-art {
  background:
    radial-gradient(90% 80% at 85% 8%, rgba(255, 138, 61, .5), transparent 55%),
    radial-gradient(80% 70% at 5% 95%, rgba(124, 58, 237, .35), transparent 60%),
    #16110f;
}
.login-art::before { background: radial-gradient(circle, rgba(227, 0, 47, .6), transparent 62%); }
.login-art h1 { font-size: 38px; letter-spacing: -.035em; font-weight: 700; }
.login-art .bullets svg { color: var(--pop1); }
.login-art .chiplet {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; width: fit-content;
}
.who button[aria-pressed="true"] { box-shadow: 0 2px 0 var(--line-2); }

/* small delight on the empty state -------------------------------- */
.empty img { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .empty img { animation: none; }
  .task[aria-checked="true"] .box svg { animation: none; }
}

/* stronger resting pills inside the drawer */
.stage-grid .pill {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.stage-grid .pill[aria-pressed="true"] {
  background: var(--tone-bg);
  border-color: color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--tone);
}
/* a slightly bigger pipeline meter */
.meter i { width: 15px; height: 10px; border-radius: 4px; }
/* warmer, bolder table head */
.tbl thead th { color: var(--ink-3); }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--brand) 3%, var(--surface)); }

/* "Not a fit" gets its own muted tone, distinct from New and Passed */
.tone-stone { --tone: #78716c; --tone-bg: #efeae4; }
[data-theme="dark"] .tone-stone { --tone: #b8ada2; --tone-bg: #2e2823; }

/* checklist now lives inside the Stage section */
.mini-label {
  display: flex; align-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 14px 0 6px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.mini-label .grow { flex: 1 1 auto; }
.mini-label .count { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* two-column checklist on desktop so Next step stays above the fold */
@media (min-width: 900px) {
  .sec .tasks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .sec .tasks .task { min-height: 38px; }
}

/* ---------------------------------------------------------------- multi-select */
.c-check { width: 40px; padding-right: 0 !important; }
.pick {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2);
  display: inline-grid; place-items: center; background: var(--surface);
  color: transparent; cursor: pointer; transition: all .12s; vertical-align: middle;
}
.pick svg { width: 13px; height: 13px; }
.pick.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pick:hover { border-color: var(--brand); }
tr.is-selected td { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.card.is-selected { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }

.selbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 8px 10px; z-index: 55;
  max-width: min(760px, calc(100vw - 20px));
}
.selbar .selcount { font-size: 13px; color: var(--ink-2); padding: 0 4px; white-space: nowrap; }
.selbar .selcount b { color: var(--ink); font-variant-numeric: tabular-nums; }
.selbar select {
  height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 12.5px; padding: 0 8px; color: var(--ink-2);
}
.selbar .btn[disabled] { opacity: .4; pointer-events: none; }
@media (max-width: 899px) {
  .selbar { bottom: calc(80px + env(safe-area-inset-bottom)); padding: 7px 8px; gap: 6px; }
  .selbar .btn.sm { height: 30px; padding: 0 8px; font-size: 11.5px; }
}

/* selection mode: hide the add button, keep the bar compact on phones */
.selecting .fab { display: none; }
@media (max-width: 899px) {
  .selbar {
    left: 8px; right: 8px; transform: none; max-width: none;
    bottom: calc(10px + env(safe-area-inset-bottom));
    justify-content: space-between; gap: 6px; padding: 7px 8px;
  }
  .selbar .selcount { font-size: 12px; }
  .selbar .btn.sm { height: 30px; padding: 0 9px; font-size: 12px; }
  .selbar select { height: 30px; font-size: 12px; flex: 1 1 auto; min-width: 0; }
}

/* ------------------------------------------------------- channel tracker */
.channels { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 4px; }
.ch-chip {
  font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3);
  cursor: pointer; transition: all .13s; display: inline-flex; align-items: center; gap: 5px;
}
.ch-chip svg { width: 11px; height: 11px; }
.ch-chip:hover { border-color: var(--brand); color: var(--brand); }
.ch-chip.on {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--brand);
}
.touch.used { position: relative; }
.touch.used::after {
  content: ""; position: absolute; top: 2px; right: 2px;
  width: 6px; height: 6px; border-radius: 50%; background: #2f9e5f;
  box-shadow: 0 0 0 1.5px var(--surface);
}
