/* Docket — board app */
:root {
  --bg: #161518;
  --row: #212121;
  --text: #f0f0ee;
  --muted: #989898;
  --head: rgba(152, 152, 152, 0.9);
  --faint: #656565;
  --line: rgba(243, 243, 245, 0.06);
  --hover: rgba(243, 243, 245, 0.05);
  --sort-on: rgba(243, 243, 245, 0.03);
  --field-line: rgba(240, 240, 238, 0.1);
  --link-line: rgba(244, 244, 245, 0.1);
  --dot-off: rgba(240, 240, 238, 0.14);
  --pop: #262628;
  --pop-line: rgba(255, 255, 255, 0.07);
  --pop-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --btn: #f8f8f7;
  --btn-text: #1a1a1a;
  --green: #11a967;
  --red: #ef0d0d;
  --late: #ef0d0d;
  --late-text: #f08a84;

  --b-gray: #b6b6bd;   --b-gray-l: rgba(255, 255, 255, 0.15);
  --b-yellow: #e8b85e; --b-yellow-l: rgba(232, 184, 94, 0.32);
  --b-sky: #6fcdf0;    --b-sky-l: rgba(111, 205, 240, 0.3);
  --b-red: #f08a84;    --b-red-l: rgba(240, 138, 132, 0.3);
  --b-blue: #93a9f5;   --b-blue-l: rgba(147, 169, 245, 0.3);
  --b-green: #6fd49a;  --b-green-l: rgba(111, 212, 154, 0.3);

  --p0: #000000; --p1: #bb1414; --p2: #e88f00;
  --face-ring: #212121;
}

:root[data-theme="light"] {
  --bg: #f5f5f2;
  --row: #fafaf9;
  --text: #1a191d;
  --muted: #6f6d67;
  --head: rgba(111, 109, 103, 0.9);
  --faint: #a8a6a0;
  --line: rgba(26, 25, 29, 0.08);
  --hover: rgba(26, 25, 29, 0.05);
  --sort-on: rgba(26, 25, 29, 0.04);
  --field-line: rgba(38, 38, 35, 0.12);
  --link-line: rgba(38, 38, 35, 0.12);
  --dot-off: rgba(26, 25, 29, 0.14);
  --pop: #ffffff;
  --pop-line: rgba(38, 38, 35, 0.1);
  --pop-shadow: 0 14px 36px rgba(30, 28, 20, 0.12), 0 2px 6px rgba(30, 28, 20, 0.06);
  --btn: #1f1e1b;
  --btn-text: #ffffff;
  --late-text: #c7362e;

  --b-gray: #5a5d66;   --b-gray-l: #d4d5da;
  --b-yellow: #9a6a12; --b-yellow-l: #efd594;
  --b-sky: #1a7da6;    --b-sky-l: #a6def2;
  --b-red: #c03a32;    --b-red-l: #f2c1bd;
  --b-blue: #3b57c4;   --b-blue-l: #c4cff5;
  --b-green: #18834a;  --b-green-l: #b4e3c8;

  --face-ring: #fafaf9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px "Inter", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--b-sky); outline-offset: 1px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { padding: 26px; min-height: 100vh; }
.board {
  position: relative;
  width: 960px;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 34px;
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
}

/* header */
.header { height: 36px; display: flex; align-items: center; justify-content: space-between; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title { margin: 0; font-size: 22px; font-weight: 500; line-height: 20px; letter-spacing: -0.44px; }
.title-copy { width: 16px; height: 16px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity 0.15s; position: relative; }
.title-row:hover .title-copy, .title-copy:focus-visible { opacity: 1; }
.title-copy[data-done]::after {
  content: "Link copied"; position: absolute; left: 22px; top: -2px; white-space: nowrap;
  font-size: 10px; line-height: 20px; color: var(--muted);
}
.header-actions { display: flex; align-items: center; gap: 20px; }
.pile { display: flex; padding-left: 6px; }
.pile .face { margin-left: -7px; }
.pile .face:first-child { margin-left: -6px; }
.face {
  width: 21px; height: 21px; border-radius: 999px; display: grid; place-items: center;
  font-size: 8px; font-weight: 600; letter-spacing: 0.08px; color: #fff;
  box-shadow: 0 0 0 2px var(--bg);
}
.face.me { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #3fbfa0; }
.chrome { display: flex; gap: 12px; }
.icon-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent;
  display: grid; place-items: center; color: var(--muted); transition: background-color 0.15s, color 0.15s;
}
.icon-toggle:hover { background: var(--hover); color: var(--text); }
.icon-toggle svg { width: 18px; height: 18px; }

/* view switch */
.switch-row { margin-top: 20px; height: 32px; display: flex; align-items: center; justify-content: space-between; }
.view-switch { display: flex; gap: 22px; }
.view-btn {
  position: relative; display: flex; align-items: center; gap: 5px;
  padding: 5px 0 7px; font-size: 11px; font-weight: 450; line-height: 20px; color: var(--muted);
}
.view-btn.active { color: var(--text); }
.view-btn .count { font-size: 10px; color: var(--faint); }
.view-btn.active .count { color: var(--muted); }
.view-switch { position: relative; }
.view-btn { transition: color 0.18s; }
.view-indicator {
  position: absolute; left: 0; bottom: 2px; height: 1px; width: 44px; border-radius: 1px; background: var(--text);
  transition: transform 0.42s cubic-bezier(0.22, 1.2, 0.36, 1), width 0.42s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.odo { display: inline-flex; height: 10px; line-height: 10px; overflow: hidden; font-variant-numeric: tabular-nums; }
.odo-digit { display: block; height: 10px; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15); }
.odo-strip span { height: 10px; }

.btn {
  height: 30px; padding: 0 8px; border-radius: 10px; border: 1px solid transparent;
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 450; line-height: 20px; letter-spacing: -0.22px;
  background: var(--btn); color: var(--btn-text);
  transition: transform 0.12s ease, filter 0.15s;
}
.btn > span { padding: 0 4px; }
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: scale(0.97); }
.btn.green { background: var(--green); border-color: var(--green); color: #1a1a1a; }
.btn.red { background: var(--red); border-color: var(--red); color: #1a1a1a; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--link-line); }
.kbd { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* columns */
.board-stage { margin-top: 20px; }
.grid {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 148px 113px 64px 104px;
  column-gap: 14px;
  align-items: center;
}
.col-head {
  height: 40px; padding: 6px 16px 14px;
  font-size: 11px; font-weight: 450; line-height: 20px; letter-spacing: 0.11px; color: var(--head);
}
.col-head > span { display: flex; }
.col-head > span:last-child { justify-content: flex-end; }
.sort {
  height: 28px; margin: -4px 0 -4px -8px; padding: 4px 8px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 4px; color: inherit; transition: background-color 0.15s, color 0.15s;
}
.col-head > span:last-child .sort { margin: -4px 0; }
.sort:hover { background: var(--hover); color: var(--text); }
.sort.on { background: var(--sort-on); color: var(--text); }
.sort svg { width: 9px; height: 9px; opacity: 0; }
.sort.on svg { opacity: 1; }
.sort.desc svg { transform: rotate(180deg); }

/* list */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row-item { position: relative; border-radius: 15px; }
.row-item.dragging { z-index: 5; }
.row-item.shifting { transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
.grip {
  position: absolute; left: -30px; top: 5px; width: 24px; height: 32px; padding: 1px 6px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted); opacity: 0; cursor: grab; touch-action: none;
  transition: opacity 0.15s, background-color 0.15s;
}
.row-item:hover .grip, .grip:focus-visible, .row-item.dragging .grip { opacity: 1; }
.grip:hover { background: var(--hover); }
.row-item.dragging .grip { cursor: grabbing; }
.row {
  position: relative; overflow: hidden;
  background: var(--row); border: 1px solid transparent; border-radius: 15px;
  transition: box-shadow 0.2s, transform 0.2s, background-color 0.3s;
}
:root[data-theme="light"] .row { border-color: rgba(38, 38, 35, 0.1); }
.row-item.dragging .row { transform: scale(1.012); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
:root[data-theme="light"] .row-item.dragging .row { box-shadow: 0 16px 40px rgba(30, 28, 20, 0.16); }
.row.expanded { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.row-main { position: relative; height: 42px; }
.row-toggle { position: absolute; inset: 0; width: 100%; cursor: pointer; }
.row-grid { position: relative; height: 42px; padding: 0 16px; pointer-events: none; }
.row-grid > span { display: flex; align-items: center; min-width: 0; }
.row-grid > span:last-child { justify-content: flex-end; }
.row-grid button { pointer-events: auto; }
.row.is-new .row-toggle { background: rgba(111, 205, 240, 0.04); }

.trig {
  margin-left: -5px; padding: 3px 5px; border-radius: 8px;
  display: inline-flex; align-items: center; transition: background-color 0.15s;
  font-size: 12px; line-height: 16px;
}
.trig:hover, .trig[aria-expanded="true"] { background: var(--hover); }
.pri svg { width: 16px; height: 16px; display: block; }
.name-btn {
  margin-left: -7px; padding: 5px 7px; border-radius: 8px; max-width: calc(100% + 7px);
  font-size: 11px; font-weight: 450; line-height: 20px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.15s;
}
.name-btn:hover { background: var(--hover); }
.name-btn.placeholder { color: var(--faint); }
.new-dot {
  margin-left: 4px; padding: 1px 5px 0; border-radius: 5px; font-size: 8.5px; font-weight: 600; line-height: 13px;
  color: #6fa8ff; background: rgba(37, 99, 235, 0.18); letter-spacing: 0.2px; flex: none;
}
:root[data-theme="light"] .new-dot { color: #2563eb; background: #d8e4f8; }
.name-input {
  width: 100%; margin-left: -7px; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--field-line);
  background: transparent; color: var(--text); font: 450 11px/18px "Inter", system-ui, sans-serif; outline: none; pointer-events: auto;
}

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 1px 7px; border-radius: 5px;
  font-size: 10px; font-weight: 450; line-height: 13.5px; letter-spacing: 0.1px; white-space: nowrap;
  border: 1px solid; background: transparent;
}
.b-gray { color: var(--b-gray); border-color: var(--b-gray-l); }
.b-yellow { color: var(--b-yellow); border-color: var(--b-yellow-l); }
.b-sky { color: var(--b-sky); border-color: var(--b-sky-l); }
.b-red { color: var(--b-red); border-color: var(--b-red-l); }
.b-blue { color: var(--b-blue); border-color: var(--b-blue-l); }
.b-green { color: var(--b-green); border-color: var(--b-green-l); }

.owner-trig { margin-left: -5px; padding: 3px 5px; border-radius: 8px; display: inline-flex; transition: background-color 0.15s; }
.owner-trig:hover, .owner-trig[aria-expanded="true"] { background: var(--hover); }
.faces { display: flex; gap: 3px; }
.avatar {
  width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; flex: none;
  font-size: 9px; font-weight: 600; line-height: 9px; letter-spacing: 0.09px; color: #fff;
  box-shadow: 0 0 0 2px var(--face-ring);
}
.dash { font-size: 11px; font-weight: 450; line-height: 20px; color: var(--faint); }

.dots { display: flex; gap: 2px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--dot-off); }
.dots i.on { background: var(--text); }

.due-trig {
  margin-right: -7px; padding: 5px 7px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 5px; color: var(--muted);
  font-size: 11px; font-weight: 450; line-height: 20px; transition: background-color 0.15s;
}
.due-trig:hover, .due-trig[aria-expanded="true"] { background: var(--hover); }
.due-trig svg { width: 13px; height: 13px; opacity: 0; transition: opacity 0.15s; flex: none; }
.due-trig:hover svg { opacity: 1; }
.flip { display: block; height: 20px; overflow: hidden; text-align: right; }
.flip-stack { display: flex; flex-direction: column; transition: transform 0.28s cubic-bezier(0.3, 0.8, 0.3, 1); }
.flip-stack > span { height: 20px; display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; }
.due-trig:hover .flip-stack { transform: translateY(-20px); }
.due-text { color: var(--text); }
.due-full { color: var(--text); }
.due-full.late { color: var(--late-text); }
.late-pill {
  height: 17px; padding: 1px 7px 0; border-radius: 5px; background: var(--late); color: #fff;
  font-size: 10px; font-weight: 500; line-height: 16px; letter-spacing: 0.4px; font-variant-numeric: tabular-nums;
}

/* editor */
.editor { border-top: 1px solid var(--line); padding: 4px 18px 20px; }
.editor-fields { display: flex; flex-direction: column; gap: 6px; }
.desc {
  min-height: 66px; padding: 12px; border-radius: 6px; border: 1px solid var(--field-line);
  font-size: 11px; font-weight: 450; line-height: 16px; outline: none; white-space: pre-wrap;
}
.desc:focus { border-color: var(--b-sky-l); }
.desc:empty::before { content: attr(data-placeholder); color: var(--faint); }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.link-add, .link-chip {
  height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--link-line);
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 11px; font-weight: 450; line-height: 20px;
}
.link-add svg { width: 13px; height: 13px; }
.link-add:hover, .link-chip:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.link-input { width: 280px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--field-line); background: transparent; color: var(--text); font: 450 11px/20px "Inter", system-ui, sans-serif; outline: none; }
.editor-foot { margin-top: 16px; padding-top: 4px; display: flex; justify-content: space-between; align-items: center; }
.editor-foot .left { display: flex; gap: 8px; }

/* complete / kill */
.sweep { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left center; pointer-events: none; border-radius: 15px; }
.sweep.green { background: var(--green); }
.sweep.red { background: #4a1414; }
.row-item.collapsing { overflow: hidden; transition: height 0.26s ease, margin 0.26s ease, opacity 0.2s ease; }
.row-item.burning .row { transition: transform 0.5s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.5s ease; }
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }

/* popover */
.pop {
  position: fixed; z-index: 50; min-width: 160px; padding: 4px; border-radius: 9px;
  background: var(--pop); box-shadow: 0 0 0 1px var(--pop-line), var(--pop-shadow);
  font-size: 11px; font-weight: 450; line-height: 20px;
  transform-origin: top left; animation: pop-in 0.14s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-3px) scale(0.98); } }
.pop-list { padding: 4px; display: flex; flex-direction: column; }
.pop-item {
  min-height: 32px; padding: 5px 8px; border-radius: 9px; display: flex; align-items: center; gap: 8px; text-align: left; width: 100%;
}
.pop-item:hover, .pop-item.kb { background: var(--hover); }
.pop-item .check { margin-left: auto; width: 12px; height: 12px; color: var(--text); }
.pop-item .hint { margin-left: auto; color: var(--faint); font-size: 10px; }
.pop-divider { height: 1px; margin: 7px 6px; background: var(--line); }
.pop-date { width: 100%; height: 32px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--field-line); background: transparent; color: var(--text); font: 450 11px/20px "Inter", system-ui, sans-serif; color-scheme: dark; }
:root[data-theme="light"] .pop-date { color-scheme: light; }
.pop-input { width: 100%; height: 32px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--field-line); background: transparent; color: var(--text); font: 450 11px/20px "Inter", system-ui, sans-serif; outline: none; }

/* cursors */
.cursors { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.cursors.hidden { display: none; }
.cursor { position: absolute; left: 0; top: 0; transition: transform 1.4s cubic-bezier(0.45, 0.05, 0.25, 1); }
.cursor svg { position: absolute; left: -2px; top: -2px; width: 18px; height: 18px; }
.cursor .avatar { position: absolute; left: 20px; top: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

/* empty, tour, footer */
.empty { padding: 72px 0; text-align: center; color: var(--muted); font-size: 11px; font-weight: 450; }
.tour {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  font-size: 11px; font-weight: 450; line-height: 20px; color: var(--muted);
  transition: opacity 0.3s, transform 0.3s;
}
.tour.gone { display: none; }
.tour {
  position: sticky; left: auto; bottom: 18px; transform: none; align-self: center;
  margin: 0 0 18px; padding: 4px 4px 4px 14px; border-radius: 14px; background: var(--bg);
  animation: fade-up 0.5s cubic-bezier(0.16, 0.84, 0.28, 1) both;
}
.footer { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-pad { height: 40px; flex: none; }
.footer-row { height: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; line-height: 13.5px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand svg { width: 18px; height: 14px; display: block; }
.brand p, .footer-meta { margin: 0; }
.brand strong { font-weight: 500; }
.footer-meta { display: flex; gap: 7px; }


/* ---------- title rename ---------- */
.title-btn { font: inherit; letter-spacing: inherit; line-height: inherit; text-align: left; border-radius: 6px; padding: 0 4px; margin-left: -4px; transition: background-color 0.15s; }
.title-btn:hover { background: var(--hover); }
.title-input {
  font: 500 22px/20px "Inter", system-ui, sans-serif; letter-spacing: -0.44px; color: var(--text);
  width: 320px; padding: 0 4px; margin-left: -4px; height: 28px; border: 0; border-radius: 6px; outline: 1px solid var(--field-line); background: transparent;
}

/* ---------- motion helpers ---------- */
.fade-in { animation: fade-up 0.5s cubic-bezier(0.16, 0.84, 0.28, 1) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } }
.cursor { animation: cursor-in 0.4s ease-out both; }
@keyframes cursor-in { from { opacity: 0; } }
.pile .face { transition: margin-left 0.24s cubic-bezier(0.22, 1, 0.36, 1), transform 0.16s; }
.pile:hover .face { margin-left: 2px; }
.pile:hover .face:first-child { margin-left: -6px; }
.pile .face:hover { transform: translateY(-2px); }
.new-slot { display: inline-flex; max-width: 40px; margin-right: 6px; overflow: hidden; flex: none; animation: slot-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.new-slot .new-dot { margin-left: 0; animation: chip-in 0.4s 0.08s cubic-bezier(0.22, 1.3, 0.36, 1) both; }
@keyframes slot-in { from { max-width: 0; margin-right: 0; } }
@keyframes chip-in { from { opacity: 0; transform: scale(0.5); } }
.editor { overflow: hidden; }
.editor-inner { will-change: transform, opacity; }
.row-item.settling { z-index: 5; }
#new-row.coach { position: relative; animation: coach 2.2s ease-in-out infinite; }
@keyframes coach { 0%, 100% { box-shadow: 0 0 0 0 rgba(111, 205, 240, 0); } 50% { box-shadow: 0 0 0 5px rgba(111, 205, 240, 0.22); } }
.theme-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; }
.theme-flash.light { background: #ffffff; }
.theme-flash.dark { background: #000000; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 6px 0 14px; border-radius: 12px; white-space: nowrap;
  background: var(--pop); box-shadow: 0 0 0 1px var(--pop-line), var(--pop-shadow);
  font-size: 11px; font-weight: 450; line-height: 20px; max-width: calc(100vw - 32px);
}
.toast > span { overflow: hidden; text-overflow: ellipsis; }
.toast.lifted { bottom: 66px; }
.toast-undo { height: 26px; padding: 0 10px; border-radius: 8px; background: var(--hover); font-weight: 500; }
.toast-undo:hover { background: var(--line); }

/* ---------- welcome ---------- */
body.onboarding .switch-row, body.onboarding .board-stage, body.onboarding .pile, body.onboarding .title-row { visibility: hidden; }
.welcome { width: 400px; max-width: 100%; margin: 56px auto 0; display: flex; flex-direction: column; }
.w-in { animation: fade-up 0.6s cubic-bezier(0.16, 0.84, 0.28, 1) both; animation-delay: calc(0.12s + var(--i) * 70ms); }
.w-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--row); color: var(--text); }
:root[data-theme="light"] .w-mark { box-shadow: 0 0 0 1px rgba(38, 38, 35, 0.1); }
.welcome h2 { margin: 18px 0 6px; font-size: 22px; font-weight: 500; line-height: 28px; letter-spacing: -0.44px; }
.w-lede { margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 18px; }
.w-label { font-size: 11px; font-weight: 450; line-height: 20px; color: var(--muted); margin-bottom: 6px; }
.w-input {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--row);
  color: var(--text); font: 450 13px/20px "Inter", system-ui, sans-serif; outline: none; margin-bottom: 18px; transition: border-color 0.15s, box-shadow 0.15s;
}
.w-input:focus { border-color: var(--b-sky-l); box-shadow: 0 0 0 3px rgba(111, 205, 240, 0.12); }
.w-input.invalid { border-color: var(--b-red-l); }
.w-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 22px; }
.w-idea {
  height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--link-line); color: var(--muted);
  font-size: 11px; font-weight: 450; transition: color 0.15s, background-color 0.15s, transform 0.12s;
}
.w-idea:hover { color: var(--text); background: var(--hover); }
.w-idea:active { transform: scale(0.96); }
.w-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.w-actions .btn { height: 36px; padding: 0 12px; }
.w-alt { color: var(--muted); font-size: 11px; font-weight: 450; }
.w-alt:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- empty board ---------- */
.empty-board { list-style: none; padding: 64px 0 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.keycap {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--row); color: var(--text); font-size: 14px; font-weight: 500;
  box-shadow: 0 0 0 1px var(--line), 0 3px 0 rgba(0, 0, 0, 0.35);
  animation: key-press 2.6s ease-in-out infinite;
}
:root[data-theme="light"] .keycap { box-shadow: 0 0 0 1px rgba(38, 38, 35, 0.12), 0 3px 0 #d6d5cf; }
@keyframes key-press { 0%, 70%, 100% { transform: none; } 76% { transform: translateY(2px); box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(0, 0, 0, 0.35); } 84% { transform: none; } }
.empty-title { margin: 0 0 4px; font-size: 13px; font-weight: 500; line-height: 20px; }
.empty-sub { margin: 0; font-size: 11px; font-weight: 450; line-height: 18px; color: var(--muted); }
.kbd-inline { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 4px; background: var(--row); box-shadow: 0 0 0 1px var(--line); color: var(--text); text-align: center; font-size: 10px; line-height: 16px; }
.link-btn { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); font-size: inherit; }
.link-btn:hover { text-decoration-color: var(--text); }

/* ---------- getting started ---------- */
.steps { margin-top: 16px; padding: 16px 18px 14px; border-radius: 15px; border: 1px dashed var(--field-line); }
.steps-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 450; line-height: 20px; }
.steps-title { font-weight: 500; }
.steps-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.steps-bar { height: 2px; margin: 8px 0 12px; border-radius: 2px; background: var(--line); overflow: hidden; }
.steps-bar i { display: block; height: 100%; background: var(--green); transform-origin: left; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 8px; align-items: flex-start; }
.step-check {
  width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 1px; display: grid; place-items: center;
  border: 1px solid var(--field-line); color: transparent; transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.step-check svg { width: 10px; height: 10px; }
.step.done .step-check { background: var(--green); border-color: var(--green); color: #fff; }
.step-text { display: flex; flex-direction: column; font-size: 11px; line-height: 16px; }
.step-text b { font-weight: 500; transition: color 0.25s; }
.step-text span { color: var(--muted); font-size: 10px; line-height: 15px; }
.step.done .step-text b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.steps-foot { margin-top: 12px; display: flex; gap: 8px; font-size: 10px; color: var(--faint); }
.steps-foot .link-btn { color: var(--muted); }

/* ---------- search, filter, chips ---------- */
.tools { display: flex; align-items: center; gap: 8px; }
.search {
  position: relative; height: 30px; width: 168px; padding: 0 8px 0 9px; border-radius: 10px; border: 1px solid var(--link-line);
  display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: text;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s, background-color 0.15s;
}
.search:hover { background: var(--hover); }
.search:focus-within { width: 236px; border-color: var(--field-line); background: var(--hover); color: var(--text); }
.search svg { width: 13px; height: 13px; flex: none; }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text);
  font: 450 11px/20px "Inter", system-ui, sans-serif;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-key {
  font: 450 10px/14px "Inter", system-ui, sans-serif; color: var(--faint); padding: 0 4px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line);
  transition: opacity 0.15s;
}
.search:focus-within .search-key, .search-clear:not([hidden]) ~ .search-key { opacity: 0; }
.search-clear { position: absolute; right: 6px; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.search-clear:hover { color: var(--text); background: var(--hover); }
.search-clear svg { width: 9px; height: 9px; }
.search-clear[hidden] { display: none; }
.tool-btn {
  height: 30px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--link-line); color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 450; line-height: 20px;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.tool-btn svg { width: 13px; height: 13px; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { color: var(--text); background: var(--hover); }
.tool-btn.on { color: var(--text); border-color: var(--field-line); }
.filter-count {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--btn); color: var(--btn-text);
  font-size: 9.5px; font-weight: 600; line-height: 16px; text-align: center; animation: chip-in 0.3s cubic-bezier(0.22, 1.3, 0.36, 1) both;
}
.filter-count[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.chips[hidden] { display: none; }
.chip {
  height: 24px; padding: 0 6px 0 10px; border-radius: 999px; border: 1px solid var(--link-line);
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 450; color: var(--text);
  animation: chip-in 0.28s cubic-bezier(0.22, 1.3, 0.36, 1) both; transition: background-color 0.15s;
}
.chip svg { width: 8px; height: 8px; color: var(--muted); }
.chip:hover { background: var(--hover); }
.chip:hover svg { color: var(--text); }
.chips-clear { font-size: 10.5px; margin-left: 4px; color: var(--muted); }
mark { background: rgba(232, 184, 94, 0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
:root[data-theme="light"] mark { background: #f6e3b4; }

.pop-head { padding: 6px 8px 2px; font-size: 10px; font-weight: 500; letter-spacing: 0.2px; color: var(--faint); text-transform: uppercase; }
.pop-row { display: flex; gap: 6px; padding: 4px 8px 6px; }
.pop-pill {
  height: 26px; padding: 0 9px 0 6px; border-radius: 999px; border: 1px solid var(--link-line);
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 450; transition: background-color 0.15s, border-color 0.15s;
}
.pop-pill:hover { background: var(--hover); }
.pop-pill.on { border-color: var(--text); background: var(--hover); }
.pop-note { padding: 4px 8px 8px; font-size: 10.5px; line-height: 15px; color: var(--muted); }
.pop-input + .pop-divider, .pop-note + .pop-input { margin-top: 0; }
.pop-plus { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed var(--field-line); color: var(--muted); }
.pop-plus svg { width: 11px; height: 11px; }
.pop-board { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop .pop-input[readonly] { color: var(--muted); }

/* ---------- people, presence, boards ---------- */
.board-switch { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); margin-left: -6px; transition: background-color 0.15s, color 0.15s; }
.board-switch:hover, .board-switch[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.board-switch[hidden] { display: none; }
.face.away { opacity: 0.45; }
.face.online { position: relative; }
body.cloud .face.online:not(.me)::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px var(--bg);
}
.face.more { background: var(--row); color: var(--muted); font-size: 8px; }
.face.add {
  margin-left: 4px !important; background: transparent; color: var(--muted); border: 1px dashed var(--field-line); box-shadow: none;
  font-size: 13px; font-weight: 400; line-height: 1; transition: color 0.15s, border-color 0.15s, transform 0.16s;
}
.face.add:hover { color: var(--text); border-color: var(--text); transform: scale(1.08); }
.cursor.live { transition: transform 0.12s linear, opacity 0.4s; }
.cursor.idle { opacity: 0; }
body.cloud .local-only { display: none; }

/* ---------- sign-in ---------- */
.w-err { min-height: 16px; margin: -10px 0 8px; font-size: 11px; line-height: 16px; color: var(--b-red); }
.w-err:empty { margin: -10px 0 0; min-height: 0; }
.w-code { letter-spacing: 6px; font-size: 18px; font-variant-numeric: tabular-nums; }
.w-code::placeholder { letter-spacing: 6px; color: var(--faint); }
.btn.busy { opacity: 0.6; pointer-events: none; }
.btn.busy span::after { content: "…"; }
.welcome b { color: var(--text); font-weight: 500; }

/* ---------- parity additions ---------- */
.avatar, .face { position: relative; overflow: hidden; }
.avatar img, .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.row-item.held .name-btn { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.row-item.held .c-pri, .row-item.held .c-effort, .row-item.held .c-due { opacity: 0.45; }
#clear-done { color: var(--b-green); border-color: var(--b-green-l); animation: chip-in 0.3s cubic-bezier(0.22, 1.3, 0.36, 1) both; }
#clear-done:hover { background: var(--hover); }
#clear-done[hidden] { display: none; }
.btn.armed { animation: arm 0.32s ease; }
@keyframes arm { 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.c-name { gap: 6px; }
.new-actions { display: inline-flex; gap: 4px; flex: none; pointer-events: auto; animation: fade-up 0.3s ease both; }
.mini-btn { height: 24px; padding: 0 8px; border-radius: 7px; background: var(--btn); color: var(--btn-text); font-size: 10.5px; font-weight: 500; }
.mini-btn.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--link-line); }
.mini-btn:hover { filter: brightness(0.94); }
.mini-btn.ghost:hover { color: var(--text); }

.handle-field { display: flex; gap: 6px; }
.handle-field .pop-input { flex: 1; min-width: 0; }
.pop-select {
  height: 32px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--field-line); background: var(--pop); color: var(--text);
  font: 450 11px/20px "Inter", system-ui, sans-serif;
}
.pop .pop-head + .pop-input, .pop .pop-head + .handle-field { margin-bottom: 4px; }

.drawer-host, .sheet-host { position: fixed; inset: 0; z-index: 90; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, 0.45); }
:root[data-theme="light"] .drawer-backdrop { background: rgba(30, 28, 20, 0.18); }
.drawer {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: 380px; max-width: calc(100vw - 20px); overflow-y: auto;
  padding: 18px 20px 24px; border-radius: 16px; background: var(--pop); box-shadow: 0 0 0 1px var(--pop-line), var(--pop-shadow);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.3px; }
.set-close { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.set-close:hover { background: var(--hover); color: var(--text); }
.set-close svg { width: 10px; height: 10px; }
.set-sec { padding: 16px 0; border-top: 1px solid var(--line); }
.set-sec:first-of-type { border-top: 0; }
.set-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 500; }
.set-help { margin: -4px 0 10px; font-size: 10.5px; line-height: 15px; color: var(--muted); }
.set-meta { margin-left: auto; font-size: 10px; color: var(--faint); }
.set-input {
  width: 100%; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--field-line); background: transparent;
  color: var(--text); font: 450 12px/20px "Inter", system-ui, sans-serif; outline: none;
}
.set-input:focus { border-color: var(--b-sky-l); }
.set-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.set-person { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 11.5px; font-weight: 450; }
.set-person .avatar { box-shadow: none; }
.set-x { margin-left: auto; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--faint); }
.set-x:hover { color: var(--b-red); background: var(--hover); }
.set-x svg { width: 9px; height: 9px; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.set-toggle { display: flex; align-items: flex-start; gap: 10px; font-size: 11.5px; line-height: 17px; cursor: pointer; }
.set-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 30px; height: 18px; border-radius: 999px; background: var(--line); box-shadow: inset 0 0 0 1px var(--field-line); position: relative; transition: background-color 0.2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform 0.28s cubic-bezier(0.22, 1.3, 0.36, 1); }
.set-toggle input:checked + .switch { background: var(--green); box-shadow: none; }
.set-toggle input:checked + .switch::after { transform: translateX(12px); background: #fff; }
.set-toggle input:focus-visible + .switch { outline: 2px solid var(--b-sky); outline-offset: 2px; }
.set-sec.danger .set-label { color: var(--b-red); }
.set-sec .link-btn { font-size: 11.5px; }

.sheet {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 360px; max-width: calc(100vw - 32px);
  padding: 18px 20px 14px; border-radius: 16px; background: var(--pop); box-shadow: 0 0 0 1px var(--pop-line), var(--pop-shadow);
}
.keys { list-style: none; margin: 4px 0 0; padding: 0; }
.keys li { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: 11.5px; }
.keys li:first-child { border-top: 0; }
.keys kbd { min-width: 22px; padding: 1px 6px; border-radius: 6px; background: var(--row); box-shadow: 0 0 0 1px var(--line), 0 1px 0 var(--line); text-align: center; font: 500 10.5px/18px "Inter", system-ui, sans-serif; }

.me-tip {
  position: absolute; z-index: 85; width: 230px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--btn); color: var(--btn-text); font-size: 11px; line-height: 16px; box-shadow: var(--pop-shadow);
}
.me-tip b { font-weight: 600; }
.me-tip::before { content: ""; position: absolute; top: -5px; left: calc(var(--arrow, 200px) - 5px); width: 10px; height: 10px; background: var(--btn); transform: rotate(45deg); border-radius: 2px; }

@media (max-width: 760px) {
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 85vh; }
  #clear-done span { font-size: 10px; }
}

@media (max-width: 760px) {
  .switch-row { height: auto; flex-wrap: wrap; row-gap: 10px; }
  .tools { width: 100%; }
  .search { flex: 1; width: auto; }
  .search:focus-within { width: auto; }
  .search-key { display: none; }
  .tool-btn span:not(.filter-count) { display: none; }
}

@media (max-width: 760px) {
  .steps-list { grid-template-columns: 1fr 1fr; }
  .welcome { margin-top: 28px; }
  .title-input { width: 200px; }
}

@media (max-width: 760px) {
  .page { padding: 16px; }
  .board { padding-left: 0; min-height: calc(100vh - 32px); }
  .grid { grid-template-columns: 26px minmax(0, 1fr) auto 64px; column-gap: 10px; }
  .grid > .c-owner, .grid > .c-effort { display: none; }
  .grip { display: none; }
  .header-actions { gap: 10px; }
  .chrome { gap: 2px; }
  .pile { display: none; }
  .footer-row { height: auto; flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-meta { flex-wrap: wrap; }
  .tour { bottom: 14px; }
}

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