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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input,
select,
textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

[hidden] { display: none !important; }

::selection {
  background: rgba(46, 66, 165, 0.2);
  color: var(--text);
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  user-select: none;
}

.icon-fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20;
}

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.modal-open { overflow: hidden; }

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

.topbar {
  flex: 0 0 auto;
  min-height: var(--topbar-h);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: env(safe-area-inset-top) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  z-index: 20;
  user-select: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mark img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}
.mark.is-wide {
  width: auto;
}
.mark.is-wide img {
  width: auto;
  height: 26px;
}
.login-logo {
  height: 30px;
  width: auto;
  display: block;
}
.rail-ws-mark.is-wide img {
  width: auto;
  height: 16px;
}
@media (max-width: 767px) {
  .mark.is-wide img { height: 20px; }
  .login-logo { height: 24px; }
}
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}

.brand-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--topbar-muted);
}

.search {
  flex: 0 0 auto;
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--topbar-muted);
  transition: background-color var(--dur) ease;
}

.search:hover,
.search:focus-within { background: rgba(255, 255, 255, 0.16); }
.search:focus-within { box-shadow: 0 0 0 1px rgba(214, 191, 144, 0.6); }

.search .material-symbols-outlined {
  font-size: 18px;
  color: var(--topbar-muted);
}

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  color: #fff;
  font-size: 15px;
  outline: none;
  box-shadow: none;
}

.search input::placeholder { color: var(--topbar-muted); }

.kbd {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--topbar-muted);
  border-radius: 4px;
  padding: 1px 5px;
}

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

.viewbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 58px;
  padding: 0 20px 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.viewbar::-webkit-scrollbar { display: none; }

body[data-scope="overall"] .viewbar { display: none; }

.board-head {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.board-crumb {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-name {
  max-width: 440px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-tabs {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.view-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color var(--dur) ease, box-shadow var(--dur) ease;
}

.view-tabs a .material-symbols-outlined { font-size: 19px; }
.view-tabs a:hover { color: var(--text); box-shadow: inset 0 -2px 0 var(--border-strong); }
.view-tabs a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--link); }
.view-tabs a[aria-current="page"] .material-symbols-outlined { color: var(--link); }
.view-tabs a:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 4px; }

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--link);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color var(--dur) ease, transform 120ms var(--ease-out);
}

.primary-btn:hover { background: #0060c2; }
.primary-btn:active { transform: scale(0.97); }

.primary-btn .material-symbols-outlined { font-size: 18px; }

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--topbar-muted);
  padding: 0;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--status-blocked);
  box-shadow: 0 0 0 2px var(--navy);
}

.v-rule {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 2px;
}

.me {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #334155;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

@starting-style {
  .toast { opacity: 0; transform: translate(-50%, -6px); }
}

.popover,
.menu {
  position: fixed;
  z-index: 40;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(4, 18, 54, 0.12);
  min-width: 200px;
  padding: 4px;
}

.popover p,
.menu button,
.menu .menu-note {
  margin: 0;
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.popover p {
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
}

.menu button:hover:not(:disabled) { background: var(--hover); }

.menu button:disabled {
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: not-allowed;
}

.menu .danger { color: var(--text-late); }

.menu-note {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- view frame ---------- */

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 24px 80px;
  width: min(640px, 100%);
  margin: 0 auto;
}

.soon h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.soon p {
  margin: 0;
  color: var(--text-secondary);
}

.bottomnav { display: none; }
.phone-menu { display: none; }
.rail-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  padding: 0;
  background: rgba(4, 18, 54, 0.4);
}

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

.shell {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.shell-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.board-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.board-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.area-rail {
  flex: 0 0 var(--rail-width, 280px);
  width: var(--rail-width, 280px);
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: flex-basis 220ms var(--ease-out), width 220ms var(--ease-out);
}

body.rail-resizing .area-rail { transition: none; }

.area-rail-resize {
  flex: 0 0 6px;
  width: 6px;
  margin: 0 -3px;
  position: relative;
  z-index: 3;
  cursor: col-resize;
  touch-action: none;
}

body.rail-resizing,
body.rail-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.area-rail-resize::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: var(--link);
  opacity: 0;
  transition: opacity var(--dur) ease;
}

.area-rail-resize:hover::after,
body.rail-resizing .area-rail-resize::after { opacity: 1; }

.rail-icon-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease, color 120ms ease;
}

.rail-icon-btn:hover { background: var(--rail-hover); color: var(--text); }
.rail-icon-btn:disabled { opacity: 0.35; background: transparent; cursor: default; }
.rail-icon-btn:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.rail-top {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 8px;
}

.rail-expand { display: none; }

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 120ms ease;
}

.rail-nav a .material-symbols-outlined { flex: 0 0 auto; font-size: 22px; color: var(--text-secondary); }
.rail-nav a:hover { background: var(--rail-hover); }
.rail-nav a[aria-current="page"] { background: var(--rail-active); font-weight: 600; }
.rail-nav a[aria-current="page"] .material-symbols-outlined { color: var(--link); }
.rail-nav a:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.rail-ws {
  flex: 0 0 auto;
  margin: 0 10px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--border);
}

.rail-ws-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 10px 4px;
}

.rail-ws-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail-ws-mark img { width: 20px; height: 20px; display: block; object-fit: contain; }

.rail-ws-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.rail-filter:hover { border-color: var(--border-strong); }
.rail-filter:focus-within { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.rail-filter .material-symbols-outlined { font-size: 19px; }

.rail-filter input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.rail-filter input::placeholder { color: #9699a6; }

.rail-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 4px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

#area-rail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 20px;
}

.rt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rt-list .rt-list { padding-left: 22px; }

.rt-item { position: relative; margin: 0; }

.rt-row {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  transition: background-color 120ms ease;
}

.rt-row:hover { background: var(--rail-hover); }
.rt-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.rt-row[aria-pressed="true"] { background: var(--rail-active); font-weight: 600; }
.rt-row[aria-pressed="true"] .rt-icon { color: var(--link); }

.area-row { font-weight: 600; }

.rt-chev {
  flex: 0 0 auto;
  width: 18px;
  font-size: 18px;
  color: var(--text-secondary);
  border-radius: 4px;
}

.area-board-row .rt-chev:hover { background: rgba(4, 18, 54, 0.08); color: var(--text); }

.rt-icon {
  flex: 0 0 auto;
  width: 24px;
  font-size: 19px;
  text-align: center;
  color: var(--text-secondary);
}

.rt-dot {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rt-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--dot);
}

.rt-name {
  flex: 1;
  min-width: 0;
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-count {
  flex: 0 0 auto;
  min-width: 20px;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.rt-more {
  position: absolute;
  top: 5px;
  right: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
}

.rt-item:hover > .rt-more,
.rt-more:focus-visible,
.rt-more[aria-expanded="true"] { display: inline-flex; }

.rt-item:hover > .rt-row,
.rt-item:focus-within > .rt-row { padding-right: 38px; }

.rt-move {
  position: absolute;
  top: 4px;
  right: 2px;
  display: none;
  flex-direction: column;
  align-items: center;
}

.rt-arrow {
  width: 20px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rt-arrow .material-symbols-outlined { font-size: 16px; }
.rt-arrow:hover { background: rgba(4, 18, 54, 0.08); color: var(--text); }
.rt-arrow:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.rt-item:hover > .rt-move,
.rt-move:focus-within { display: inline-flex; }

/* Rows with move arrows make room for both controls. */
.rt-item:has(> .rt-move) > .rt-more { right: 26px; }
.rt-item:has(> .rt-move):hover > .rt-row,
.rt-item:has(> .rt-move):focus-within > .rt-row { padding-right: 62px; }

.rt-more:hover { background: rgba(4, 18, 54, 0.08); color: var(--text); }
.rt-more:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.rail-menu button { display: flex; align-items: center; gap: 10px; }
.rail-menu .material-symbols-outlined { font-size: 19px; color: var(--text-secondary); }

.area-rail-empty {
  margin: 0;
  padding: 8px 6px 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

html.is-rail-drag,
html.is-rail-drag * { cursor: grabbing; }
html.is-rail-drag { user-select: none; }
.rt-item.is-dragging { opacity: 0.45; pointer-events: none; }
.rt-item.is-drop-before > .rt-row { box-shadow: inset 0 2px 0 var(--link); }
.rt-item.is-drop-after > .rt-row { box-shadow: inset 0 -2px 0 var(--link); }

body.rail-hidden .area-rail { flex-basis: 60px; width: 60px; }
body.rail-hidden .area-rail-resize,
body.rail-hidden .rail-ws,
body.rail-hidden #area-rail-body { display: none; }
body.rail-hidden .rail-top { padding: 10px 8px; }
body.rail-hidden .rail-expand { display: inline-flex; width: 44px; height: 40px; margin: 0 0 8px; }
body.rail-hidden .rail-nav a { justify-content: center; gap: 0; padding: 0; }
body.rail-hidden .rail-label { display: none; }

.filters {
  flex: 0 0 auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.filters-inner {
  width: 100%;
  margin: 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.chip-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.chip-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.chip-label .material-symbols-outlined { font-size: 14px; }
.chip-label { padding-top: 4px; }

.chip-label.quiet {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.chip-label.quiet .material-symbols-outlined { font-size: 18px; }

.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chips.wrap {
  flex-wrap: wrap;
  overflow: visible;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: rgba(46, 66, 165, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.chip-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip-count { color: var(--accent); }

.chip-empty {
  font-size: 13px;
  color: var(--text-secondary);
  padding-top: 4px;
}

.seg {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 15px;
  font-weight: 400;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}

.seg:hover { background: var(--hover); }

.seg[aria-pressed="true"] {
  background: var(--picked);
  color: var(--link);
}

.legend {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: block;
  font-style: normal;
}

.board-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.board-scroll {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--canvas);
}

.column {
  flex: 1 0 250px;
  width: 280px;
  max-width: 320px;
  min-width: 250px;
  min-height: 0;
  max-height: 100%;
  background: #eef0f5;
  border: 0;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.column-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px 8px 14px;
  min-height: 46px;
  background: var(--col, var(--status-empty));
  color: var(--col-ink, #fff);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.column-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--canvas);
  border-radius: 999px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}

.column-head .count {
  color: inherit;
  background: color-mix(in srgb, var(--col-ink, #fff) 16%, transparent);
}

.column .icon-btn {
  color: inherit;
  width: 30px;
  height: 30px;
}

.column .icon-btn:hover {
  color: inherit;
  background: color-mix(in srgb, var(--col-ink, #fff) 16%, transparent);
}

.column .icon-btn .material-symbols-outlined { font-size: 16px; }

.rename-input {
  width: 140px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 6px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--accent);
}

.column-cards {
  flex: 1 1 auto;
  min-height: 48px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.column-cards::-webkit-scrollbar { width: 5px; }
.column-cards::-webkit-scrollbar-track { background: transparent; }
.column-cards::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
.column-cards::-webkit-scrollbar-thumb:hover { background: var(--status-todo); }

.empty-col {
  margin: 0;
  padding: 8px 4px 2px;
  font-size: 15px;
  color: var(--text-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  padding: 12px 14px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }
}

.card-status {
  display: inline-block;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 14px;
  font-weight: 500;
}

.card-quiet {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-secondary);
}

.card.is-alert { border-color: rgba(227, 29, 28, 0.35); }

.card.is-done {
  background: rgba(245, 246, 247, 0.75);
  opacity: 0.85;
}

.card.is-done:hover {
  background: #fff;
  opacity: 1;
}

.card.is-lifting {
  position: fixed;
  z-index: 35;
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  opacity: 0.95;
  transform: rotate(2deg);
  box-shadow: 0 18px 40px rgba(4, 18, 54, 0.2);
  outline: 2px solid rgba(46, 66, 165, 0.3);
}

.card-top,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-top { margin-bottom: 8px; }

.dept {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
}

.card.is-alert .dept {
  color: var(--text-late);
  background: #fdecec;
  border-color: rgba(227, 29, 28, 0.2);
}

.card.is-done .dept { background: #fff; }

.pri-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.pri-dot.p1 { background: var(--status-blocked); }
.pri-dot.p2 { background: var(--gold); }
.pri-dot.p3 { background: var(--status-todo); }

.done-check {
  color: var(--text-ok);
  font-size: 15px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

.card.is-done h3 {
  color: var(--text-secondary);
  text-decoration: line-through;
}

.flag {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: -4px 0 10px;
  font-size: 12px;
  line-height: 1.35;
}

.flag .material-symbols-outlined { font-size: 13px; margin-top: 1px; }
.flag.alert { color: var(--text-late); }
.flag.note { color: var(--text-secondary); }

.card-foot {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.card.is-done .card-foot { border-top-color: var(--border); }

.card-foot:has(.card-metas:empty):has(.avatars:empty) { display: none; }

.card-metas { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.card-meta { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.card-meta .material-symbols-outlined { font-size: 16px; }
.due.is-late, .due.is-late .material-symbols-outlined { color: #c4213a; font-weight: 600; }
.card.is-late { box-shadow: inset 3px 0 0 #c4213a, 0 1px 2px rgba(0, 0, 0, 0.08); }
.card-high { flex: none; padding: 1px 8px; border-radius: 4px; background: #401694; color: #fff; font-size: 13px; font-weight: 600; }
.card .avatar.is-ph { width: 26px; height: 26px; color: #c5c7d0; box-shadow: none; }
.card .avatar.is-ph .material-symbols-outlined { font-size: 24px; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.add-column-note { flex: 0 0 200px; align-self: flex-start; margin: 0; padding: 12px; font-size: 14px; line-height: 1.4; color: var(--text-secondary); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

.card h3:last-child { margin-bottom: 0; }

.due {
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.due .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-secondary);
}

.avatars { display: flex; align-items: center; }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
}

.avatar + .avatar { margin-left: -6px; }

.drop-slot {
  height: 80px;
  border: 2px dashed rgba(46, 66, 165, 0.4);
  background: rgba(46, 66, 165, 0.04);
  border-radius: var(--radius);
  color: rgba(46, 66, 165, 0.75);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.drop-slot .material-symbols-outlined { font-size: 16px; }

.column-add {
  flex: 0 0 auto;
  padding: 4px 12px 10px;
}

.add-card {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 7px 8px;
  font-size: 15px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}

.add-card:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.add-card .material-symbols-outlined { font-size: 16px; }

.add-column {
  flex: 0 0 112px;
  width: 112px;
  min-height: 112px;
  align-self: flex-start;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
}

.add-column:hover {
  border-color: rgba(46, 66, 165, 0.6);
  background: #fff;
  color: var(--accent);
}

.add-column .material-symbols-outlined { font-size: 22px; }

.add-column-form {
  flex: 0 0 180px;
  width: 180px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
}

.add-column-form .text-btn { align-self: flex-start; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 18, 54, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}

.modal {
  width: min(672px, 100%);
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(4, 18, 54, 0.18);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
}

.modal-head { border-bottom: 1px solid var(--border); }

.crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.crumb .here {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
}

.crumb .here .material-symbols-outlined { font-size: 15px; }

.crumb code {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-secondary);
}

.modal-tools { display: flex; align-items: center; gap: 2px; }

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-label .material-symbols-outlined { font-size: 16px; }

.field,
.select,
.area {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 15px;
}

.field:focus,
.select:focus,
.area:focus,
.rename-input:focus,
.add-column-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.title-field {
  font-size: 18px;
  font-weight: 600;
  background: var(--canvas);
  padding: 8px 12px;
}

.title-field:focus { background: #fff; }

.title-field.is-invalid { border-color: var(--status-blocked); }

.field-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-late);
}

.area {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
  padding: 12px;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.meta .meta-wide { grid-column: 1 / -1; }

.prios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pri {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 500;
}

.pri[aria-checked="true"] { font-weight: 600; }

.pri.p1[aria-checked="true"] {
  color: var(--text-late);
  background: #fdecec;
  border-color: rgba(227, 29, 28, 0.45);
}

.pri.p2[aria-checked="true"] {
  color: var(--text);
  background: #fbf7ef;
  border-color: var(--gold);
}

.pri.p3[aria-checked="true"] {
  color: var(--text);
  background: var(--canvas);
  border-color: var(--status-todo);
}

.dates {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dates .field {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.dates { align-items: flex-end; }
.date-part {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.arrow {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.dates .arrow { line-height: 40px; }

.assignees {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.person-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font-size: 15px;
  font-weight: 500;
}

.person-pill .avatar {
  width: 22px;
  height: 22px;
  font-size: 10px;
  box-shadow: none;
  color: #fff;
}

.pill-x {
  border: 0;
  background: transparent;
  color: inherit;
  width: 16px;
  height: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-x .material-symbols-outlined { font-size: 13px; }
.pill-x:hover { color: var(--text-late); }

.dashed {
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dashed:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.dashed .material-symbols-outlined { font-size: 14px; }

.pill-add {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.pill-add:hover,
.pill-add[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.pill-add .material-symbols-outlined { font-size: 18px; }

.picker button[aria-pressed="true"] { color: var(--text-secondary); }

.picker {
  position: relative;
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
}

.picker button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 16px;
  font-weight: 400;
}

.picker button:hover { background: var(--hover); }

.picker-empty {
  margin: 0;
  padding: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}

.modal-foot {
  background: var(--canvas);
  border-top: 1px solid var(--border);
}

.edited {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text-secondary);
}

.foot-actions { display: flex; align-items: center; gap: 8px; }

.text-btn,
.ghost-btn {
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color var(--dur) ease, color var(--dur) ease, transform 120ms var(--ease-out);
}

.text-btn:active,
.ghost-btn:active,
.danger-btn:active { transform: scale(0.97); }

.text-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.text-btn:hover { color: var(--text); }

.ghost-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
}

.ghost-btn:hover {
  color: var(--text);
  background: var(--canvas);
}

.danger-btn {
  border: 0;
  background: var(--status-blocked);
  color: #fff;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 500;
}

.confirm-copy {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.confirm-note {
  font-weight: 400;
  color: var(--text-secondary);
}

.danger-btn { transition: background-color var(--dur) ease, transform 120ms var(--ease-out); }
.danger-btn:hover { background: color-mix(in srgb, var(--status-blocked) 86%, #000); }
.danger-btn:disabled,
.ghost-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.foot-start { display: flex; align-items: center; gap: 12px; min-width: 0; }

.quiet-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -10px;
  padding: 6px 10px;
}
.quiet-delete .material-symbols-outlined { font-size: 18px; }
.quiet-delete:hover { color: var(--text-late); background: var(--hover); }

/* ---------- mobile ---------- */

@media (max-width: 767px) {
  body { overflow: hidden; }

  .topbar {
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    padding: calc(4px + env(safe-area-inset-top)) 8px 4px 4px;
  }

  .brand-sub,
  .kbd,
  .brand-text,
  .top-actions .primary-btn .label,
  .top-actions .v-rule { display: none; }

  .phone-menu {
    display: inline-flex;
    flex: none;
    width: 44px;
    height: 44px;
    color: #fff;
  }

  .viewbar {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 8px 12px 0;
    overflow: visible;
  }
  .board-head { flex: 1 1 auto; max-width: 100%; }
  .board-name { font-size: 17px; max-width: 100%; }
  .board-crumb { font-size: 15px; }
  .view-tabs {
    flex: 1 1 100%;
    order: 3;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0;
  }
  .view-tabs::-webkit-scrollbar { display: none; }
  .view-tabs a { min-height: 44px; flex: none; font-size: 15px; }
  .board-access-btn { min-height: 44px; margin-left: 0; }

  .search {
    order: 0;
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
  }
  .search input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }
  .search:focus-within {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0 10px;
    justify-content: flex-start;
    overflow: visible;
  }
  .search:focus-within input {
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
  }

  .top-actions .icon-btn,
  .top-actions .primary-btn,
  .me {
    width: 44px;
    height: 44px;
  }

  .top-actions .primary-btn { justify-content: center; padding: 0; }

  .legend { display: none; }

  .shell { min-width: 0; }
  .shell-main, .view, .page { min-width: 0; max-width: 100%; }

  .area-rail,
  body.rail-hidden .area-rail {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    flex: none;
    width: min(320px, 86vw);
    max-width: 86vw;
    max-height: none;
    height: auto;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: none;
  }
  body.drawer-open .area-rail,
  body.drawer-open.rail-hidden .area-rail { transform: none; box-shadow: 12px 0 32px rgba(4, 18, 54, 0.18); }
  body.drawer-open .rail-backdrop { display: block; }

  body.rail-hidden .rail-ws,
  body.rail-hidden #area-rail-body { display: block; }
  body.rail-hidden .rail-label { display: inline; }
  body.rail-hidden .rail-expand { display: none; }
  body.rail-hidden .rail-nav a { justify-content: flex-start; gap: 12px; padding: 0 10px; height: 44px; }

  .area-rail-resize { display: none; }
  .rail-nav a, .rt-row { min-height: 44px; }

  .rail-ws { margin: 0 12px; padding: 10px 0 6px; }

  .rt-row { height: 44px; }

  .filters-inner { padding: 0 16px; }

  .board-view,
  .board-frame,
  .board-main { min-width: 0; max-width: 100%; overflow-x: hidden; }

  .board-scroll {
    scroll-snap-type: x mandatory;
    padding: 12px;
    gap: 12px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .column,
  .add-column,
  .add-column-form {
    flex: 0 0 100%;
    width: auto;
    min-width: 0;
    max-width: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .add-card,
  .seg,
  .chip,
  .column .icon-btn {
    min-height: 44px;
  }

  .chip { padding: 0 14px; }

  .meta { grid-template-columns: 1fr; }

  .modal-head,
  .modal-foot,
  .modal-body { padding-left: 16px; padding-right: 16px; }

  .modal-foot { flex-wrap: wrap; }

  .bottomnav {
    display: flex;
    flex: 0 0 auto;
    background: var(--navy);
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottomnav::-webkit-scrollbar { display: none; }

  .bottomnav a {
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 8px 10px;
    color: var(--topbar-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
  }

  .bottomnav a .material-symbols-outlined { font-size: 20px; }

  .bottomnav a[aria-current="page"] {
    color: var(--gold);
    box-shadow: inset 0 2px 0 var(--gold);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .card.is-lifting { transform: none; }
}

/* ---------- shared pages ---------- */

.mono { font-variant-numeric: tabular-nums; }

.page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
}

.page-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-head h1,
.area-block h2,
.area-card h3,
.agent-card h3,
.st-card h2 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.page-head h1 { font-size: 24px; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 15px; }
.page.mt .page-head p { font-size: 16px; }
.page-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px 24px 32px; }

.split { flex: 1; min-height: 0; display: flex; }

/* main table */
.mt-searchbox {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--canvas);
  padding: 6px 10px;
  min-width: 220px;
}
.mt-searchbox input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 15px;
  box-shadow: none;
}
.mt-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.mt-group-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.mt-badge { color: #fff; font-size: 13px; font-weight: 700; border-radius: 4px; padding: 2px 8px; }
.mt-wrap { overflow-x: auto; }
.mt-grid {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 88px 120px 72px 80px 150px 80px;
  gap: 8px;
  align-items: center;
  min-width: 920px;
  padding: 0 12px;
}
.mt-cols { height: 32px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); background: var(--canvas); }
.mt-row { min-height: 40px; border-top: 1px solid var(--border); font-size: 13px; }
.mt-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font-size: 17px; }
.mt-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-comments { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 12px; font-weight: 600; }
.mt-comments .material-symbols-outlined { font-size: 12px; }
.mt-status { border: 0; background: var(--canvas); border-radius: 4px; font-size: 13px; font-weight: 600; padding: 4px; }
.pri-pill { font-size: 12px; font-weight: 700; text-align: center; border-radius: 4px; padding: 4px 0; }
.pri-pill.p1 { color: var(--text-late); background: #fdecec; }
.pri-pill.p2 { color: var(--text); background: #fbf7ef; }
.pri-pill.p3 { color: var(--text-secondary); background: var(--canvas); }
.mt-bar { position: relative; height: 20px; background: var(--canvas); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mt-bar i { display: block; height: 100%; background: var(--accent); }
.mt-bar em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text); }
.mt-bar em.on-fill { color: #fff; clip-path: inset(0 calc(100% - var(--fill, 0%)) 0 0); }
.mt-money { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }

/* areas */
.meet-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 6px 10px;
  min-width: 260px;
}
.meet-search:focus-within { border-color: var(--link); }
.meet-search .material-symbols-outlined { font-size: 20px; color: var(--text-secondary); }
.meet-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; }
.dec-filters {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dec-filters .seg .mono { margin-left: 4px; color: var(--text-secondary); }
.dec-filters .select { width: auto; margin-left: 8px; padding: 6px 10px; }
.area-block { margin-bottom: 28px; }
.area-block header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.area-block h2 { font-size: 18px; }
.area-block header p { margin: 0; color: var(--text-secondary); font-size: 15px; }
.area-block .count { margin-left: auto; }
.avatar.lg { width: 32px; height: 32px; font-size: 13px; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.area-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: box-shadow 140ms var(--ease-out), transform 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .area-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
}
.area-card-top, .area-mile, .area-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
button.area-card { display: flex; flex-direction: column; width: 100%; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
button.area-card:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.area-card-name { min-width: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-card-line { display: block; margin: 8px 0 0; color: var(--text-secondary); font-size: 15px; }
.area-progress .track { display: block; }
.health { flex: none; font-size: 13px; font-weight: 600; border-radius: 4px; padding: 3px 10px; color: #fff; }
.health.on-track { background: var(--text-ok); }
.health.at-risk { background: var(--status-doing); color: #202124; }
.health.delayed { background: var(--text-late); }
.area-mile { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 15px; color: var(--text-secondary); }
.area-mile span:nth-child(2) { flex: 1; min-width: 0; }
.area-mile .mono { white-space: nowrap; }
.area-mile .mono.is-late { color: var(--text-late); font-weight: 600; }
.area-mile .material-symbols-outlined { font-size: 18px; }
.area-progress { display: block; margin-top: 12px; font-size: 14px; color: var(--text-secondary); }
.track { height: 8px; background: var(--hover); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.track i { display: block; height: 100%; background: var(--status-done); }
.track i.at-risk { background: var(--status-doing); }
.track i.delayed { background: var(--status-blocked); }

/* agents */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.agent-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.agent-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-card h3 { font-size: 17px; }
.agent-card-top .mono { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.agent-card p { margin: 8px 0 0; color: var(--text-secondary); font-size: 15px; }
.agent-runs { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.agent-runs div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.agent-runs dt { margin: 0; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.agent-runs dd { margin: 0; color: var(--text); font-size: 14px; white-space: nowrap; }
.agent-runs dd.is-none { color: var(--text-secondary); }
.agent-state { flex: none; padding: 2px 10px; border-radius: 4px; background: var(--hover); border: 1px solid var(--border-strong); color: var(--text-secondary); font-size: 13px; font-weight: 600; }

/* timeline */
.view:has(> .page.tl) { min-width: 0; overflow: hidden; }
.page.tl { --tl-name: 340px; position: relative; min-width: 0; background: var(--surface); }
.tl-toolbar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tl-zoom { display: inline-flex; align-items: center; gap: 2px; background: var(--hover); border-radius: 8px; padding: 3px; }
.tl-zoom button { border: 0; background: transparent; border-radius: 6px; padding: 6px 14px; font-size: 15px; font-weight: 500; color: var(--text-secondary); transition: background-color var(--dur) ease, color var(--dur) ease; }
.tl-zoom button:hover { color: var(--text); }
.tl-zoom button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(4, 18, 54, 0.12); }
.tl-tool, .tl-undated { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; transition: background-color var(--dur) ease, border-color var(--dur) ease; }
.tl-tool .material-symbols-outlined, .tl-undated .material-symbols-outlined { font-size: 19px; color: var(--text-secondary); }
.tl-tool:hover, .tl-undated:hover { background: var(--hover); border-color: var(--border-strong); }
.tl-undated[aria-pressed="true"] { background: var(--picked); border-color: #b9dcff; }
.tl-colorby { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-secondary); }
.tl-colorby select { height: 36px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; padding: 0 30px 0 10px; }
.tl-count { margin-left: auto; font-size: 15px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tl-legend { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; color: var(--text); }
.tl-key { display: inline-flex; align-items: center; gap: 6px; }
.tl-key i { width: 14px; height: 14px; border-radius: 4px; }
.tl-board { flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface); outline: none; }
.tl-canvas { position: relative; min-width: 100%; }
.tl-head { position: sticky; top: 0; z-index: 6; display: flex; height: 66px; background: var(--surface); border-bottom: 1px solid var(--border-strong); }
.tl-corner { position: sticky; left: 0; z-index: 7; flex: none; width: var(--tl-name); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 16px 10px 20px; background: var(--surface); border-right: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.tl-scale { position: relative; flex: none; }
.tl-tier { position: absolute; left: 0; right: 0; }
.tl-tier-top { top: 0; height: 30px; }
.tl-tier-unit { top: 30px; height: 36px; }
.tl-top { position: absolute; top: 0; height: 30px; border-left: 1px solid var(--border); font-size: 15px; font-weight: 600; color: var(--text); line-height: 30px; white-space: nowrap; }
.tl-top span { position: sticky; left: calc(var(--tl-name) + 10px); padding: 0 10px; }
.tl-unit { position: absolute; top: 0; height: 36px; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.tl-unit > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; }
.tl-unit.is-now > span { background: var(--link); color: #fff; font-weight: 600; }
.tl-unit.is-now .tl-wk, .tl-unit.is-now .tl-dow { color: rgba(255, 255, 255, 0.8); }
.tl-wk, .tl-dow { font-size: 12px; font-weight: 600; color: #9699a6; }
.page.tl[data-scale="day"] .tl-unit > span { padding: 3px 6px; gap: 3px; }
.tl-body { position: relative; }
.tl-grid { position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none; }
.tl-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-weekend { position: absolute; top: 0; bottom: 0; background: #f7f8fb; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--link); }
.tl-today::before { content: ""; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 999px; background: var(--link); }
.tl-row { position: relative; display: flex; height: 46px; border-bottom: 1px solid var(--border); }
.tl-name { position: sticky; left: 0; z-index: 3; flex: none; width: var(--tl-name); display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 16px 0 22px; border: 0; border-right: 1px solid var(--border); background: var(--surface); box-shadow: inset 5px 0 0 var(--g, var(--border-strong)); color: var(--text); text-align: left; font-size: 17px; transition: background-color 120ms ease; }
.tl-item:hover { background: var(--hover); }
.tl-item:focus-visible, .tl-group-name:focus-visible, .tl-bar:focus-visible, .tl-ms:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.tl-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-when { flex: none; font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.tl-when.is-none { font-style: italic; color: #9699a6; }
.tl-row.is-undated .tl-title { color: var(--text-secondary); }
.tl-track { position: relative; z-index: 1; flex: none; width: var(--tl-scale); height: 100%; }
.tl-bar { position: absolute; top: 8px; height: 29px; display: flex; align-items: center; min-width: 10px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; overflow: hidden; box-shadow: 0 1px 2px rgba(4, 18, 54, 0.12); transition: box-shadow 120ms ease, transform 120ms var(--ease-out); }
.tl-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-bar.is-narrow { padding: 0; }
.tl-bar:hover, .tl-ms:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 4px var(--fill), 0 4px 10px rgba(4, 18, 54, 0.18); }
.tl-bar:active { transform: scale(0.98); }
.tl-ms { position: absolute; top: 13px; width: 19px; height: 19px; margin-left: -9.5px; padding: 0; border: 0; border-radius: 4px; background: var(--fill); transform: rotate(45deg); box-shadow: 0 1px 2px rgba(4, 18, 54, 0.18); }
.tl-out { position: absolute; top: 0; max-width: 340px; overflow: hidden; text-overflow: ellipsis; line-height: 46px; font-size: 15px; color: var(--text); white-space: nowrap; pointer-events: none; }
.tl-out.is-off { visibility: hidden; }
.tl-group-row { height: 50px; border-bottom: 1px solid var(--border); }
.tl-group-row .tl-track { background: color-mix(in srgb, var(--g) 6%, transparent); }
.tl-group-name { gap: 6px; padding-left: 14px; font-size: 18px; font-weight: 600; color: var(--g-ink, var(--g)); }
.tl-group-name .material-symbols-outlined { font-size: 22px; }
.tl-group-name:hover { background: var(--hover); }
.tl-group-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-group-count { flex: none; margin-left: 4px; padding: 1px 9px; border-radius: 999px; background: var(--hover); color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.tl-gbar { position: absolute; top: 19px; height: 12px; border-radius: 6px; background: var(--g); opacity: 0.45; }
.tl-group + .tl-group .tl-group-row { border-top: 10px solid var(--canvas); height: 60px; }
.tl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100%; padding: 64px 24px; text-align: center; color: var(--text-secondary); }
.tl-empty .material-symbols-outlined { font-size: 44px; color: #b0b3c2; }
.tl-empty h2 { margin: 0; font-size: 21px; font-weight: 600; color: var(--text); }
.tl-empty p { margin: 0 0 8px; font-size: 16px; }
.tl-tip { position: absolute; z-index: 20; display: flex; flex-direction: column; gap: 5px; max-width: 340px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 28px rgba(4, 18, 54, 0.16); font-size: 15px; color: var(--text); pointer-events: none; }
.tl-tip strong { font-size: 16px; font-weight: 600; }
.tl-tip-group { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.tl-tip-group i { width: 10px; height: 10px; border-radius: 3px; }
.tl-tip-status { align-self: flex-start; padding: 2px 10px; border-radius: 4px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 500; }
.tl-tip em { font-size: 13px; font-style: normal; color: #676879; }
.tl-away { position: absolute; left: 50%; bottom: 24px; z-index: 12; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 28px rgba(4, 18, 54, 0.16); font-size: 15px; color: var(--text); }
.tl-away[hidden] { display: none; }
.tl-away > .material-symbols-outlined { color: var(--link); font-size: 20px; }

/* stats */
.st-body { display: flex; flex-direction: column; gap: 16px; }
.st-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.st-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; box-shadow: var(--shadow); }
.st-kpi span { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.st-kpi strong { grid-column: 1; font-family: var(--font); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-kpi.hot strong { color: var(--text-late); }
.st-kpi.ok strong { color: var(--text-ok); }
.st-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.st-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.st-card h2 { font-size: 17px; margin-bottom: 14px; }
.st-bar { margin-bottom: 12px; font-size: 15px; }
.st-bar > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.st-bar .track { height: 16px; }
.st-bar .track i { background: var(--accent); }
.st-donut { position: relative; width: 140px; height: 140px; margin: 8px auto; }
.st-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.st-donut div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; color: var(--text-secondary); }
.st-donut .mono { font-family: var(--font); font-size: 26px; font-weight: 600; color: var(--text); }
.st-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.st-legend li { display: flex; align-items: center; gap: 8px; }
.st-legend i { width: 10px; height: 10px; border-radius: 2px; }
.st-legend .mono { margin-left: auto; }

/* login */
.login { min-height: 100dvh; display: flex; flex-direction: column; background: var(--canvas); }
.login-bar { display: flex; gap: 8px; align-items: center; padding: 16px 24px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--text); }
.login-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--gold); }
.login-bar:has(.login-logo) { background: var(--navy); }
.login main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { margin: 0; text-align: center; font-size: 32px; font-weight: 900; color: var(--navy); }
.login-rule { display: block; width: 40px; height: 4px; border-radius: 99px; background: var(--gold); margin: 0 auto; }
.login-card > p { margin: 0; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.login-pass { position: relative; }
.login-pass .field { width: 100%; padding-right: 40px; }
.login-pass button { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; color: var(--text-secondary); }
.login-err { margin: 0; color: var(--text-late); font-size: 12px; }
.login-go, .login-sso { width: 100%; justify-content: center; min-height: 44px; }
.login-sso { margin-top: 4px; }

@media (max-width: 767px) {
  .page-head { padding-left: 16px; padding-right: 16px; }
  .page-scroll { padding: 12px 16px 24px; }
  .split, .st-grid, .st-kpis { display: flex; flex-direction: column; }
  .st-kpis { display: grid; grid-template-columns: 1fr 1fr; }
  .page.tl { --tl-name: 190px; }
  .tl-toolbar { padding: 10px 16px; }
  .tl-when, .tl-corner span + span, .tl-count { display: none; }
}

/* tasks columns */
.page.tk { background: var(--canvas); }
.tk-head { position: relative; z-index: 4; align-items: center; background: var(--surface); }
.tk-person {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  height: 36px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.tk-person select {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  max-width: 240px;
  padding-right: 18px;
}
.tk-person .material-symbols-outlined { position: absolute; right: 6px; font-size: 18px; color: var(--text-secondary); pointer-events: none; }
.tk-person-name { font-size: 15px; font-weight: 600; padding-right: 8px; }
.tk-scope {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(100%, 440px);
}
.tk-picked {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.tk-chip,
.tk-pick-open {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 10px;
  cursor: pointer;
}
.tk-chip:hover,
.tk-pick-open:hover { background: var(--hover); }
.tk-pick-open { color: var(--link); }
.tk-pick {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: min(280px, 80vw);
  max-height: min(320px, 50vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(4, 18, 54, 0.16);
}
.tk-pick button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  padding: 6px 8px;
  cursor: pointer;
}
.tk-pick button:hover { background: var(--hover); }
.tk-pick button[aria-pressed="true"] { background: var(--rail-active); }
.tk-pick .avatar { flex: 0 0 auto; }
.tk-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 16px;
  background: var(--canvas);
}
.page.tk .tk-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.page.tk .tk-col {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 12px;
  padding: 2px 4px 0;
}
.tk-col.is-over { background: rgba(46, 66, 165, 0.06); }
.tk-col-head {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 2px 6px 8px;
  background: var(--canvas);
}
.tk-col-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.tk-count { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tk-col.is-do .tk-col-head h2,
.tk-col.is-do .tk-count { color: #E24B4B; }
.tk-col.is-doing .tk-col-head h2,
.tk-col.is-doing .tk-count { color: #E0920A; }
.tk-col.is-done .tk-col-head h2,
.tk-col.is-done .tk-count { color: #1F9D55; }
.tk-cards {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px 4px;
}
.page.tk .tk-card {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 8px 8px 6px;
  background: #fff;
  border: 1px solid #E6E8F0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  cursor: grab;
}
.tk-card:hover { border-color: var(--border-strong); }
.tk-card.is-dragging { opacity: 0.45; }
.tk-card.is-busy { opacity: 0.6; }
.tk-card.is-done .tk-title { color: var(--text-secondary); text-decoration: line-through; }
.page.tk .tk-check,
.page.tk .tk-star {
  flex: 0 0 auto;
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.tk-check { width: 28px; height: 28px; margin-top: 1px; }
.tk-check:disabled, .tk-star:disabled { opacity: 0.5; }
.tk-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #C5C7D0;
  background: #fff;
  display: grid;
  place-items: center;
}
.tk-check:hover .tk-box { border-color: #1F9D55; }
.tk-check.is-done .tk-box { background: #1F9D55; border-color: #1F9D55; }
.tk-box .material-symbols-outlined {
  font-size: 14px;
  color: #fff;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 20;
}
.tk-main { flex: 1 1 auto; min-width: 0; }
.tk-faces, .ov-faces { flex: 0 0 auto; margin-top: 2px; }
.tk-faces .avatar, .ov-faces .avatar { width: 22px; height: 22px; font-size: 10px; }
.tk-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.tk-title {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: 100%;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  text-align: left;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
}
.tk-title:hover { color: var(--link); }
.tk-where-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin-top: 1px;
}
.tk-where {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-due {
  flex: none;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tk-due.is-late { color: #c4213a; font-weight: 600; }
.tk-duesoon {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c4213a;
  margin: 2px 2px -2px;
}
.tk-card.tk-sub { box-shadow: inset 3px 0 0 var(--accent); }
.tk-card.tk-sub .tk-title { font-weight: 500; }
.tk-pills, .tk-tag-row { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tk-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.tk-pill.is-more { background: var(--hover); color: var(--text-secondary); }
.tk-pill button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.page.tk .tk-star { width: 28px; height: 28px; margin-left: 2px; color: #C5C7D0; }
.tk-star .material-symbols-outlined { font-size: 22px; }
.tk-star.is-on { color: #E8A317; }
.tk-star.is-on .material-symbols-outlined { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.tk-add {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 2px 8px;
}
.tk-add-fields {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tk-send {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0;
  cursor: pointer;
}
.tk-send .material-symbols-outlined { font-size: 20px; }
.tk-send:disabled {
  background: #E6E8F0;
  color: #9AA0B4;
  cursor: default;
}
.tk-input, .tk-project-pick {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: none;
}
.tk-input::placeholder { color: #9AA0B4; }
.tk-project-pick { color: var(--text-secondary); font-size: 13px; }
.tk-back {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(4, 18, 54, 0.35);
}
.tk-sheet {
  width: min(440px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 14px 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(4, 18, 54, 0.18);
}
.tk-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tk-sheet-bar button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  padding: 6px 2px;
}
.tk-sheet-done {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 14px !important;
}
.tk-sheet-title {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font: inherit;
  font-size: 22px;
  font-weight: 650;
  color: var(--text);
  padding: 8px 0 12px;
  outline: none;
}
.tk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  font-size: 15px;
}
.tk-field > span { font-size: 13px; font-weight: 650; letter-spacing: 0.02em; color: var(--text-secondary); }
.tk-field input[type="date"],
.tk-field select,
.tk-tag-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 0 10px;
}
.tk-sheet-star {
  width: auto;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.tk-sheet-note { margin: 8px 0 0; font-size: 15px; color: var(--text-secondary); }
.tk-sheet-delete {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tk-sheet-goboard {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
}

.tk-sheet-goboard + .tk-sheet-delete {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.tk-goboard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
}

.tk-goboard .material-symbols-outlined { font-size: 19px; }
.tk-sheet-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tk-subs label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
}
.tk-subs input { margin-top: 3px; }
.tk-subs li.is-done span { color: var(--text-secondary); text-decoration: line-through; }
@media (max-width: 960px) and (min-width: 768px) {
  .tk-scroll { padding: 16px; }
  .page.tk .tk-cols {
    grid-template-columns: repeat(3, minmax(280px, 78vw));
    width: max-content;
    min-width: 100%;
    height: 100%;
  }
}

/* overview */
.ov-page { background: var(--canvas); min-width: 0; }
.ov-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 24px 28px 48px;
}
.ov-head { min-width: 0; }
.ov-title {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #041236;
  overflow-wrap: anywhere;
}
.ov-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  background: #D6BF90;
}
.ov-summary {
  margin-top: 18px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.ov-stage { margin: 0; font-size: 16px; font-weight: 700; }
.ov-stage.is-track { color: var(--text-ok); }
.ov-stage.is-behind { color: var(--text-late); }
.ov-roll { margin: 4px 0 0; font-size: 15px; color: var(--text); }
.ov-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.ov-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.ov-facts span { font-size: 15px; color: var(--text-secondary); }
.ov-facts strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ov-facts strong.is-late { color: var(--text-late); }
.ov-tasks { margin-top: 26px; min-width: 0; }
.ov-tasks-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.ov-tasks-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.ov-note { margin: 2px 0 0; font-size: 15px; color: var(--text-secondary); }
.ov-switch {
  display: flex;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.ov-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-secondary);
  padding: 8px 14px;
  cursor: pointer;
}
.ov-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.ov-pager { display: none; }
.ov-lanes { min-width: 0; }
.ov-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.ov-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 12px;
  padding: 2px 4px 8px;
}
.ov-col.is-over { background: rgba(46, 66, 165, 0.06); }
.ov-col-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 2px 4px 4px;
}
.ov-col-head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.ov-count { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ov-col.is-do .ov-col-head h3,
.ov-col.is-do .ov-count { color: #E24B4B; }
.ov-col.is-doing .ov-col-head h3,
.ov-col.is-doing .ov-count { color: #E0920A; }
.ov-col.is-done .ov-col-head h3,
.ov-col.is-done .ov-count { color: #1F9D55; }
.ov-cards { display: flex; flex-direction: column; gap: 8px; min-height: 72px; }
.ov-none { margin: 0; padding: 8px 4px; font-size: 15px; color: var(--text-secondary); }
.ov-card {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  background: #fff;
  border: 1px solid #E6E8F0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  cursor: grab;
}
.ov-card.is-dragging { opacity: 0.45; }
.ov-card.is-busy { opacity: 0.6; }
.ov-card.is-done .ov-card-title { color: var(--text-secondary); text-decoration: line-through; }
.ov-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}
.ov-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1F9D55;
  cursor: pointer;
}
.ov-card-main { flex: 1 1 auto; min-width: 0; }
.ov-card-title {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0 0;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.ov-card-title:hover { color: var(--link); }
.ov-where-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
}
.ov-where {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-due {
  flex: none;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ov-due.is-late { color: #c4213a; font-weight: 600; }
.ov-star {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  color: #C5C7D0;
  cursor: pointer;
}
.ov-star .material-symbols-outlined { font-size: 22px; }
.ov-star.is-on { color: #E8A317; }
.ov-star.is-on .material-symbols-outlined { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.ov-check input:disabled, .ov-star:disabled { opacity: 0.5; cursor: default; }
.ov-empty { margin: 12px 0 0; font-size: 15px; color: var(--text-secondary); }

@media (max-width: 767px) {
  .ov-scroll { padding: 16px 16px 32px; overflow-x: hidden; }
  .ov-title { font-size: 26px; }
  .ov-summary { padding: 14px; }
  .ov-facts { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ov-tasks-head { flex-direction: column; align-items: stretch; }
  .ov-switch { width: 100%; }
  .ov-switch button { flex: 1; min-height: 44px; }
  .ov-pager {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }
  .ov-pager button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
  }
  .ov-pager button[aria-current="true"] { background: #fff; box-shadow: inset 0 0 0 1.5px currentColor; }
  .ov-pager button.is-do[aria-current="true"] { color: #E24B4B; }
  .ov-pager button.is-doing[aria-current="true"] { color: #E0920A; }
  .ov-pager button.is-done[aria-current="true"] { color: #1F9D55; }
  .ov-lanes {
    container-type: inline-size;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .ov-lanes::-webkit-scrollbar { display: none; }
  .ov-cols { display: flex; width: max-content; gap: 0; }
  .ov-col {
    flex: 0 0 100cqi;
    width: 100cqi;
    max-width: 100cqi;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 0 16px 8px;
  }
  .ov-check, .ov-star { width: 44px; height: 44px; }
  .ov-check input { width: 22px; height: 22px; }
}

/* list (Monday-style table) */
.page.list { background: var(--surface); }
.ls-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ls-bar-left, .ls-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.ls-bar-right { gap: 12px; }
.ls-total { font-size: 15px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ls-new {
  margin-right: 10px;
  border: 0;
  border-radius: 4px;
  background: var(--link);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 7px 14px;
  transition: background-color var(--dur) ease, transform 120ms var(--ease-out);
}
.ls-new:hover { background: #0060c2; }
.ls-new:active { transform: scale(0.97); }
.ls-tool,
.ls-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  padding: 6px 8px;
  transition: background-color var(--dur) ease;
}
.ls-tool:hover,
.ls-search:hover { background: var(--hover); }
.ls-tool .material-symbols-outlined,
.ls-search .material-symbols-outlined { font-size: 20px; color: var(--text-secondary); }
.ls-tool.is-on { background: var(--picked); color: var(--link); }
.ls-tool.is-on .material-symbols-outlined { color: var(--link); }
.ls-tool .ls-dept {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 15px;
  padding: 0;
  cursor: pointer;
  outline: none;
  field-sizing: content;
  max-width: 220px;
}
.ls-tool:focus-within,
.ls-search:focus-within { box-shadow: inset 0 0 0 1px var(--link); }
.ls-tool.ls-delete:hover,
.ls-tool.ls-delete:hover .material-symbols-outlined { color: var(--text-late); }
.ls-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--canvas);
}
.ls-confirm-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-right: 4px;
  font-size: 15px;
  color: var(--text);
}
.ls-confirm-text strong { font-weight: 600; }
.ls-confirm-names { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; }
.ls-confirm-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ls-confirm-note { color: var(--text-secondary); }
.ls-confirm .ghost-btn,
.ls-confirm .danger-btn { padding: 5px 12px; }
.ls-search input {
  width: 72px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  padding: 0;
  transition: width 160ms var(--ease-out);
}
.ls-search input::placeholder { color: var(--text); }
.ls-search input:focus,
.ls-search.is-on input { width: 180px; }
.ls-search input:focus::placeholder { color: var(--text-secondary); }
.ls-pop { position: relative; }
.ls-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 6;
  min-width: 240px;
  max-height: 60vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform-origin: top left;
  transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out);
}
@starting-style {
  .ls-panel { opacity: 0; transform: scale(0.97); }
}
.ls-panel-title { margin: 4px 8px 6px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.ls-panel hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.ls-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 4px;
  font-size: 16px;
  color: var(--text);
}
.ls-panel label:hover { background: var(--hover); }
.ls-panel input { width: 16px; height: 16px; accent-color: var(--link); }

.page.list .page-scroll { padding: 20px 24px 40px; }
.ls-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}
.ls-col-check { width: 44px; }
.ls-col-item { width: 380px; }
.ls-col-person { width: 96px; }
.ls-col-date { width: 120px; }
.ls-col-status { width: 148px; }
.ls-col-timeline { width: 180px; }
.ls-col-files { width: 96px; }
.ls-col-text { width: 180px; }

.ls-table td,
.ls-table th {
  height: 38px;
  padding: 0 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-table td.ls-title,
.ls-table th.ls-title { text-align: left; }

.ls-table th { position: relative; }
.ls-resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
  cursor: col-resize;
  z-index: 6;
  touch-action: none;
}
.ls-resize:hover { background: rgba(4, 18, 54, 0.16); }
.ls-resize.is-active { background: var(--link); opacity: 0.45; }

.card.is-focus {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  box-shadow: 0 8px 24px -8px rgba(4, 18, 54, 0.35);
}
.ls-table .ls-check {
  padding: 0 0 0 10px;
  border-right: 0;
  box-shadow: inset 6px 0 0 var(--g, var(--border));
}
.ls-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--link); vertical-align: middle; }

.ls-band td {
  height: auto;
  padding: 0 0 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
}
.ls-fold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 2px 6px 2px 0;
  color: var(--g-ink, var(--g));
  border-radius: 4px;
  max-width: 100%;
}
.ls-fold .material-symbols-outlined { font-size: 22px; color: var(--g-ink, var(--g)); transition: transform 140ms var(--ease-out); }
.ls-band-in { position: sticky; left: 0; display: inline-flex; align-items: center; max-width: min(100%, 80vw); }
.ls-table .ls-band:not(.is-closed) td,
.ls-table .ls-add td.ls-title { overflow: visible; }

/* Keep the checkbox + item name pinned while the table scrolls sideways. */
.ls-table td.ls-check,
.ls-table th.ls-check { position: sticky; left: 0; z-index: 2; }
.ls-table td.ls-title,
.ls-table th.ls-title { position: sticky; left: 44px; z-index: 2; box-shadow: 6px 0 6px -6px rgba(4, 18, 54, 0.18); }
.ls-table .ls-add td.ls-title,
.ls-table .ls-add td.ls-check { position: static; box-shadow: none; }
.ls-table .ls-add .ls-check { box-shadow: inset 6px 0 0 var(--g); }
.ls-add button { position: sticky; left: 52px; }
.ls-band.is-closed td.ls-title { box-shadow: 6px 0 6px -6px rgba(4, 18, 54, 0.18); }
.ls-title-in { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ls-title-in .ls-item { flex: 1 1 auto; min-width: 0; width: auto; }
.ls-open {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 120ms ease;
}
.ls-open .material-symbols-outlined { font-size: 17px; }
.ls-row:hover .ls-open,
.ls-open:focus-visible { opacity: 1; }
.ls-open:hover { color: var(--link); border-color: var(--border-strong); background: var(--surface); }
@media (hover: none) { .ls-open { opacity: 1; } }
.ls-fold:active .material-symbols-outlined { transform: scale(0.9); }
.ls-fold-name { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-fold-count { margin-left: 8px; font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ls-fold-meta { margin-left: 10px; font-size: 14px; color: var(--text-secondary); }

.ls-band.is-closed td {
  height: 56px;
  padding: 0 8px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.ls-band.is-closed td.ls-check {
  border-left: 0;
  border-radius: 8px 0 0 8px;
  box-shadow: inset 6px 0 0 var(--g);
  border-right: 0;
}
.ls-band.is-closed td.ls-title { padding-left: 2px; }
.ls-band.is-closed .ls-fold-count { display: block; margin: 0 0 0 26px; font-size: 13px; }
.ls-band.is-closed td:last-child { border-radius: 0 8px 8px 0; }
.ls-sum-label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-secondary); }

.ls-colhead th {
  height: 36px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}
.ls-colhead th.ls-check { border-top-left-radius: 8px; }
.ls-colhead th:last-child { border-top-right-radius: 8px; }

.ls-row td { transition: background-color 120ms ease; }
.ls-row:hover td { background: var(--hover); }
.ls-row.is-picked td { background: var(--picked); }

.ls-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  padding: 4px 6px;
  text-overflow: ellipsis;
}
.ls-row:hover .ls-item { border-color: var(--border-strong); background: var(--surface); }
.ls-item:focus { outline: none; border-color: var(--link); background: var(--surface); }
.ls-item::placeholder { color: var(--text-secondary); }
.ls-table td.ls-title:has(.ls-subs) .ls-item { width: calc(100% - 44px); }
.ls-subs {
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 2px 0;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.ls-subs .material-symbols-outlined { font-size: 18px; }
.ls-subs:hover { background: var(--canvas); color: var(--text); }

.ls-add td { height: 38px; border-right: 0; }
.ls-add td.ls-title { border-right: 1px solid var(--border); }
.ls-add button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 4px;
}
.ls-add button:hover { color: var(--text); background: var(--hover); }
.ls-add .ls-check { box-shadow: inset 6px 0 0 var(--g); opacity: 0.5; }
.ls-add td.ls-check { border-bottom-left-radius: 8px; }

.ls-foot td { height: 44px; background: transparent; border-right: 0; border-bottom: 0; box-shadow: none; }
.ls-foot td.ls-sum { border-right: 1px solid transparent; }
.ls-table .ls-foot .ls-check { box-shadow: none; }
.ls-sum { padding: 0 8px; }
.ls-sumbar {
  display: flex;
  width: 100%;
  height: 22px;
  overflow: hidden;
  border-radius: 2px;
}
.ls-sumbar i { display: block; min-width: 3px; height: 100%; }
.ls-sumbar.is-empty { background: var(--status-empty); }
.ls-sumdate { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ls-gap td { height: 32px; padding: 0; border: 0; background: transparent; box-shadow: none; }

.ls-table td.ls-fill { padding: 0; border-right-color: #fff; }
.ls-status {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 37px;
  border: 0;
  border-radius: 0;
  background: var(--fill, var(--status-empty));
  color: var(--ink, #fff);
  font-size: 15px;
  text-align: center;
  text-align-last: center;
  padding: 0 8px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
}
.ls-status option { background: var(--surface); color: var(--text); }
.ls-status:hover,
.ls-status[aria-expanded="true"] { box-shadow: inset 0 0 0 999px rgba(4, 18, 54, 0.08); }
.ls-status:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.ls-status.is-static { cursor: default; }
.ls-status.is-static:hover { box-shadow: none; }
.ls-status-menu {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.ls-status-menu button {
  border: 0;
  border-radius: 4px;
  min-height: 32px;
  padding: 6px 10px;
  background: var(--fill, var(--status-empty));
  color: var(--ink, #fff);
  font-family: inherit;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.ls-status-menu button[aria-selected="true"] { box-shadow: inset 0 0 0 2px rgba(4, 18, 54, 0.45); }
.ls-status-menu button:hover { box-shadow: inset 0 0 0 999px rgba(4, 18, 54, 0.08); }
.ls-status-menu button[aria-selected="true"]:hover { box-shadow: inset 0 0 0 2px rgba(4, 18, 54, 0.45), inset 0 0 0 999px rgba(4, 18, 54, 0.08); }

.ls-who {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  vertical-align: middle;
}
.ls-faces { display: inline-flex; align-items: center; }
.ls-who .avatar { width: 28px; height: 28px; font-size: 12px; font-weight: 600; box-shadow: 0 0 0 2px var(--surface); }
.ls-who .avatar + .avatar { margin-left: -8px; }
.avatar.is-ph { background: transparent; color: #c5c7d0; box-shadow: none; }
.avatar.is-ph .material-symbols-outlined {
  font-size: 30px;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}
.ls-who select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ls-who:focus-within { box-shadow: 0 0 0 2px var(--link); }

.ls-day,
.ls-tl {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 64px;
  height: 26px;
  border-radius: 4px;
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ls-day input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.ls-day.is-empty::after {
  content: "calendar_today";
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 120ms ease;
}
.ls-row:hover .ls-day.is-empty::after { opacity: 1; }
.ls-day.is-late span { color: var(--text-late); }
.ls-day:focus-within { box-shadow: 0 0 0 2px var(--link); }
.ls-tl {
  width: 100%;
  max-width: 160px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--status-empty);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 120ms ease;
}
.ls-tl:hover { filter: brightness(0.94); }
.ls-tl:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--link); }
.ls-tl.is-set { background: var(--g, var(--accent)); }

.ls-range {
  position: fixed;
  z-index: 40;
  width: 300px;
  max-width: calc(100vw - 16px);
  padding: 14px 16px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  font-size: 15px;
}
.ls-range-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.ls-range-days { display: flex; align-items: flex-end; gap: 8px; }
.ls-range-days label { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.ls-range-days input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ls-range-days input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.ls-range-arrow { flex: none; height: 34px; line-height: 34px; color: var(--text-secondary); }
.ls-range-hint { margin: 8px 0 0; font-size: 13px; color: var(--text-secondary); }
.ls-range-error { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--text-late); }
.ls-range-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ls-range-clear {
  margin-right: auto;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  padding: 6px 4px;
  cursor: pointer;
}
.ls-range-clear:hover { color: var(--text-late); }
.ls-range-clear[hidden] { display: inline-block; visibility: hidden; }
.ls-range-btn {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
}
.ls-range-btn:hover { background: var(--hover); }
.ls-range-btn.is-primary { border-color: var(--link); background: var(--link); color: #fff; }
.ls-range-btn.is-primary:hover { background: #0060c2; }
.ls-files { display: inline-flex; align-items: center; gap: 2px; color: var(--text-secondary); font-size: 14px; }
.ls-files .material-symbols-outlined { font-size: 18px; }
.ls-text {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 15px;
  text-align: center;
  padding: 4px;
}
.ls-row:hover .ls-text { border-color: var(--border-strong); }
.ls-text:focus { outline: none; border-color: var(--link); }

.ls-grip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 26px;
  margin-left: -2px;
  color: #8b90a5;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.ls-row:hover .ls-grip,
.ls-subitem:hover .ls-grip,
.ls-grip:hover { color: var(--text-secondary); }
.ls-grip:active { cursor: grabbing; }
.ls-grip .material-symbols-outlined { font-size: 18px; }
html.is-row-drag, html.is-row-drag * { cursor: grabbing; }
html.is-row-drag { user-select: none; }
.ls-row.is-dragging, .ls-subitem.is-dragging, .ls-subrow.is-dragging { pointer-events: none; }
.ls-row.is-dragging td, .ls-subitem.is-dragging td { opacity: 0.45; }
.ls-row.is-drop-before td, .ls-subitem.is-drop-before td { box-shadow: inset 0 2px 0 var(--link); }
.ls-band.is-drop-into td { box-shadow: inset 0 0 0 2px var(--link); }
.ls-row.is-focus td, .ls-subitem.is-focus td { background: #fff4d6; }
.ls-table td.ls-title:has(.ls-grip) .ls-item,
.ls-table td.ls-title:has(.ls-subs) .ls-item { width: auto; }

.ls-subrow td { background: var(--canvas); padding: 4px 8px 10px 32px; text-align: left; }
.ls-subrow .ls-check { opacity: 0.5; }
.ls-subtable {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: min(760px, 100%);
  font-size: 14px;
  background: var(--surface);
  border-left: 4px solid var(--g);
  border-radius: 4px;
}
.ls-subtable th,
.ls-subtable td {
  height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ls-subtable th { font-size: 13px; font-weight: 400; color: var(--text-secondary); border-top: 1px solid var(--border); }
.ls-sc-grip { width: 28px; }
.ls-sc-done { width: 36px; }
.ls-sc-who { width: 72px; }
.ls-sc-status { width: 120px; }
.ls-sc-date { width: 112px; }
.ls-sc-del { width: 44px; }
.ls-subtable th:first-child,
.ls-subtable td.ls-sub-name { text-align: left; }
.ls-sub-grip { text-align: center; padding: 0; }
.ls-sub-done input { width: 16px; height: 16px; margin: 0; accent-color: var(--link); }
.ls-subitem.is-done .ls-item { color: var(--text-secondary); text-decoration: line-through; }
.ls-sub-del button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  padding: 0;
}
.ls-sub-del button .material-symbols-outlined { font-size: 18px; }
.ls-sub-del button:hover { background: var(--hover); color: var(--text-late); }
.ls-sub-del button.is-asking { width: auto; padding: 0 6px; color: var(--text-late); font-size: 13px; font-weight: 600; }
.ls-subadd td { background: var(--surface); }
.ls-subtable td.ls-fill { padding: 0; }
.ls-subtable .ls-status { min-height: 33px; font-size: 14px; }
.ls-sub-date { font-variant-numeric: tabular-nums; }
.ls-empty { padding: 32px !important; color: var(--text-secondary); }

@media (max-width: 900px) {
  .ls-bar { padding-left: 16px; padding-right: 16px; }
  .page.list .page-scroll { padding: 16px 12px 32px; }
  .ls-col-item { width: 260px; }
}

a.brand {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}
a.brand:hover .brand-name,
a.brand[aria-current="page"] .brand-name { color: var(--gold); }
a.brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.home-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text);
  font-size: 16px;
}
.home-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 32px 48px;
}
.home-wrap { max-width: 1180px; }
.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.home-title {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #041236;
}
.home-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 16px;
  background: #D6BF90;
}
.home-lead {
  margin: 16px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.home-switch {
  display: flex;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.home-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-secondary);
  padding: 8px 14px;
  cursor: pointer;
}
.home-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.home-groups { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.home-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}
.home-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.home-group-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #041236;
}
.home-group-count {
  flex: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-secondary);
}
.home-table { background: #fff; }
.home-cols, .home-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(190px, 1.15fr) 110px minmax(140px, 0.9fr) 80px;
  gap: 12px;
  align-items: center;
  min-width: 760px;
  padding: 12px 16px;
}
.home-cols {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.home-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.home-row:last-child { border-bottom: 0; }
.home-row:hover { background: var(--hover); }
.home-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.home-proj {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 16px;
  font-weight: 650;
  color: #041236;
}
.home-proj i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.home-proj span, .home-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-who { color: var(--text-secondary); font-size: 15px; }
.home-stage { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-stage strong { font-size: 15px; }
.home-stage strong.is-track { color: var(--text-ok); }
.home-stage strong.is-behind { color: var(--text-late); }
.home-stage span { font-size: 14px; color: var(--text-secondary); }
.home-due, .home-late { font-size: 15px; font-variant-numeric: tabular-nums; }
.home-due.is-late, .home-late.is-late { color: var(--text-late); font-weight: 700; }
.home-empty { margin: 0; padding: 22px 16px; font-size: 16px; color: var(--text-secondary); }
@media (max-width: 860px) {
  .home-scroll { padding: 24px 16px 40px; }
  .home-head { align-items: flex-start; flex-direction: column; }
  .home-title { font-size: 32px; }
}

@media (max-width: 767px) {
  .ls-col-item { width: 190px; }
  .page.list .page-scroll { padding: 12px 8px 32px; }
}

/* Access view */
.access-list { display: grid; gap: 18px; max-width: 860px; }
.access-note { color: var(--muted, #777); }
.access-card { border: 1px solid var(--line, #e3ded4); border-radius: 14px; background: var(--surface, #fff); overflow: hidden; }
.access-card-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line, #e3ded4); }
.access-card-head h2 { font-size: 16px; margin: 0; }
.access-email { margin: 2px 0 0; font-size: 12px; color: var(--muted, #777); }
.access-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.access-role { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; background: var(--chip, #f0ece3); color: var(--muted, #777); }
.access-count { font-size: 12px; color: var(--muted, #777); }
.access-save { border: 0; border-radius: 9px; padding: 8px 16px; font-weight: 600; cursor: pointer; background: var(--accent, #2E42A5); color: #fff; }
.access-save:disabled { background: var(--chip, #f0ece3); color: var(--muted, #777); cursor: default; }
.access-tree { padding: 8px 18px 14px; display: grid; gap: 4px; }
.access-area-row { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; padding: 7px 0 3px; cursor: pointer; }
.access-area-row em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted, #777); }
.access-projs { display: grid; gap: 2px; margin: 2px 0 8px 26px; }
.access-proj-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; padding: 2px 0; cursor: pointer; }
.access-proj-row input:disabled + span { color: var(--muted, #777); }
.access-legacy { margin: 0; padding: 10px 18px; font-size: 14px; color: var(--text-secondary); background: var(--canvas); border-bottom: 1px solid var(--border); }

/* Board access: header button + dialog */
.board-access-btn {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.board-access-btn .material-symbols-outlined { font-size: 18px; color: var(--text-secondary); }
.board-access-btn[hidden] { display: none; }

.modal.board-access { width: min(560px, 100%); }
.ba-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ba-kicker { font-size: 14px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.ba-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
}
.ba-close:hover { background: var(--hover); color: var(--text); }
.ba-body { gap: 12px; }
.ba-lede { margin: 0; font-size: 16px; line-height: 1.45; color: var(--text); }
.ba-note,
.ba-empty { margin: 0; font-size: 15px; color: var(--text-secondary); }
.ba-list { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.ba-list li + li { border-top: 1px solid var(--border); }
.ba-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.ba-row:hover { background: var(--hover); }
.ba-row input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--link); }
.ba-row.is-locked { cursor: default; }
.ba-row.is-locked:hover { background: transparent; }
.ba-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ba-who strong { font-size: 15px; font-weight: 600; color: var(--text); }
.ba-who span { font-size: 14px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-tag,
.ba-through,
.ba-hint { flex: 0 0 auto; font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.ba-through { padding: 2px 10px; border-radius: 99px; background: var(--picked); color: var(--accent); font-weight: 500; }
.ba-status { font-size: 15px; color: var(--text-secondary); }
.board-access .primary-btn:disabled { background: var(--border-strong); color: #fff; cursor: default; transform: none; }

.tk-pager { display: none; }

@media (max-width: 767px) {
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .page-head h1,
  .area-card h3,
  .agent-card h3,
  .home-proj span { overflow-wrap: anywhere; }
  .page-scroll,
  .ov-scroll,
  .home-scroll { overflow-x: hidden; }
  .area-grid,
  .agent-grid { grid-template-columns: minmax(0, 1fr); }
  .area-card,
  .agent-card,
  .st-card,
  .ov-summary,
  .ov-card { min-width: 0; max-width: 100%; }
  .st-kpis { grid-template-columns: 1fr 1fr; }
  .st-kpi strong { font-size: 28px; }

  .tk-head { flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .tk-head > div { min-width: 0; }
  .tk-person { max-width: 100%; min-height: 44px; }
  .tk-scope { align-items: stretch; max-width: 100%; }
  .tk-scope .home-switch { width: 100%; }
  .tk-scope .home-switch button { flex: 1; min-height: 44px; }
  .tk-picked { justify-content: flex-start; }
  .tk-pick { left: 0; right: auto; }
  .tk-pager {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 2px 12px 8px;
    background: var(--canvas);
  }
  .tk-pager button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
  }
  .tk-pager button[aria-current="true"] { background: #fff; box-shadow: inset 0 0 0 1.5px currentColor; }
  .tk-pager button.is-do[aria-current="true"] { color: #E24B4B; }
  .tk-pager button.is-doing[aria-current="true"] { color: #E0920A; }
  .tk-pager button.is-done[aria-current="true"] { color: #1F9D55; }
  .tk-scroll {
    container-type: inline-size;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 0 0 8px;
    scrollbar-width: none;
  }
  .tk-scroll::-webkit-scrollbar { display: none; }
  .page.tk .tk-cols {
    display: flex;
    width: max-content;
    height: 100%;
    gap: 0;
  }
  .page.tk .tk-col {
    flex: 0 0 100cqi;
    width: 100cqi;
    max-width: 100cqi;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
    padding: 0 12px;
  }
  .page.tk .tk-check,
  .page.tk .tk-star { width: 44px; height: 44px; }
  .tk-box { width: 22px; height: 22px; }
  .tk-input,
  .tk-project-pick { min-height: 44px; font-size: 16px; }
  .tk-send { width: 44px; height: 44px; }
  .tk-title { font-size: 16px; }

  .page.list .page-scroll { overflow-x: hidden; padding: 12px 12px 28px; }
  .page.list .ls-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }
  .page.list .ls-table colgroup,
  .page.list .ls-colhead,
  .page.list .ls-foot,
  .page.list .ls-gap { display: none; }
  .page.list .ls-band,
  .page.list .ls-add,
  .page.list .ls-row,
  .page.list .ls-subrow { display: block; width: 100%; }
  .page.list .ls-band td,
  .page.list .ls-add td,
  .page.list .ls-row td,
  .page.list .ls-subrow > td { display: none; }
  .page.list .ls-band td.ls-title,
  .page.list .ls-add td.ls-title,
  .page.list .ls-subrow > td[colspan] { display: block; width: auto; height: auto; border: 0; padding: 8px 4px; }
  .page.list .ls-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "status who"
      "date date";
    gap: 6px 10px;
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .page.list .ls-row td.ls-title { display: block; grid-area: title; width: auto; height: auto; border: 0; padding: 0; }
  .page.list .ls-row td.ls-person { display: block; grid-area: who; width: auto; height: auto; border: 0; padding: 0; justify-self: end; }
  .page.list .ls-row td.ls-cell-date { display: block; grid-area: date; width: auto; height: auto; border: 0; padding: 0; }
  .page.list .ls-row td:has([data-status]) { display: block; grid-area: status; width: auto; height: auto; border: 0; padding: 0; }
  .page.list .ls-title-in { min-width: 0; }
  .page.list .ls-item { width: 100%; min-height: 44px; font-size: 16px; }
  .page.list .ls-status,
  .page.list .ls-day { min-height: 44px; font-size: 16px; }
  .page.list .ls-subs { min-width: 44px; min-height: 44px; }
  .page.list .ls-subtable { width: 100%; min-width: 0; }
  .page.list .ls-subtable thead { display: none; }
  .page.list .ls-subtable,
  .page.list .ls-subtable tbody,
  .page.list .ls-subtable tr { display: block; width: 100%; }
  .page.list .ls-subtable tr.ls-subitem,
  .page.list .ls-subtable tr.ls-subadd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }
  .page.list .ls-subtable td {
    display: block;
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }
  .page.list .ls-sub-grip { display: none; }
  .page.list .ls-sub-name { flex: 1 0 100%; }
  .page.list .ls-sub-done input { width: 22px; height: 22px; }
  .ls-bar { padding-left: 12px; padding-right: 12px; }
  .ls-bar-left, .ls-bar-right { min-width: 0; }
  .ls-tool select, .ls-search input:focus, .ls-search.is-on input { max-width: 46vw; }

  .home-scroll { padding: 20px 16px 32px; }
  .home-head { align-items: flex-start; }
  .home-title { font-size: 32px; }
  .home-switch { width: 100%; }
  .home-switch button { flex: 1; min-height: 44px; }
  .home-group,
  .home-table { overflow: visible; }
  .home-cols,
  .home-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    gap: 4px;
  }
  .home-table > .home-cols { display: none; }
  .home-row { min-height: 44px; padding: 14px 16px; }
  .bottomnav a { font-size: 12px; }
}

.people-add { max-width: 520px; margin: 8px 0 20px; }
.people-add-row { display: flex; gap: 8px; align-items: center; }
.people-add-row .field { flex: 1 1 auto; }
.people-list { list-style: none; margin: 0; padding: 0; max-width: 520px; display: flex; flex-direction: column; gap: 6px; }
.people-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.board-name-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.board-rename, .board-delete { width: 28px; height: 28px; }
.board-rename-input { width: min(240px, 40vw); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 18px; font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(4, 18, 54, 0.2); padding: 0; cursor: pointer; }
.swatch.is-on { box-shadow: 0 0 0 2px var(--accent, #2b4361); }
.col-menu { width: 230px; padding: 12px; }
.col-edit { display: flex; flex-direction: column; gap: 8px; }
.quick-add { display: flex; flex-direction: column; gap: 4px; }
.quick-add input[name="title"] { width: 100%; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 7px 8px; color: var(--text); }
.quick-add select, .add-column-form select { width: 100%; }
.col-group-toggle { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary); padding: 4px 2px 6px; cursor: pointer; }
.done-badge, .closed-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; }
.done-badge { background: #e7f6ee; color: #198754; }
.closed-badge { background: #eef2f7; color: var(--text-secondary); }
.is-complete > .rt-row .rt-name, .home-row.is-complete .home-proj > span, .area-project.is-complete .area-project-name { color: var(--text-secondary); text-decoration: line-through; }
button.area-card-open { display: flex; flex-direction: column; width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0; }
.area-projects { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.area-project { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.area-project-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-move { display: inline-flex; gap: 4px; }
.proj-move button { width: 22px; height: 22px; border: 1px solid var(--border); background: #fff; border-radius: 4px; padding: 0; line-height: 1; }
.area-rename { margin-top: 8px; }
.area-rename-btn { margin-top: 8px; border: 0; background: transparent; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.home-closed { margin: 4px 0 12px; }
.home-closed summary { cursor: pointer; color: var(--text-secondary); padding: 8px 16px; }
.rt-closed > .rt-row .rt-name { color: var(--text-secondary); }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti-layer i { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; animation: confetti-fall 1.2s ease-in forwards; }
@keyframes confetti-fall { to { transform: translateY(100vh) rotate(420deg); opacity: .15; } }
.close-offer { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; max-width: calc(100% - 24px); padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 28px rgba(4, 18, 54, 0.16); }
.close-offer p { margin: 0; }
.ls-link { display: inline-flex; align-items: center; gap: 2px; margin: 0 8px 4px 0; color: var(--link); font-size: 13px; text-decoration: none; }
.ls-link .material-symbols-outlined { font-size: 16px; }
.sub-status, .status-select { border: 0; border-radius: 6px; font: inherit; font-weight: 650; padding: 4px 8px; }
.task-links, .task-subs { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link-row .field { flex: 1 1 auto; }
.sub-edit { display: flex; align-items: center; gap: 8px; }
.sub-edit.is-done > span { color: var(--text-secondary); text-decoration: line-through; }
.legacy-files { margin: 0; color: var(--text-secondary); font-size: 13px; }
.tk-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }

.people-name { flex: 1 1 auto; font-weight: 500; }
.people-row .ghost-btn { flex: 0 0 auto; }
.people-empty { color: var(--text-secondary); padding: 8px 0; }
