/* Stax — styles for individual screens. */

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

.page { padding: 28px 32px 80px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; }

/* -------------------------------------------------- project header */

.project-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.project-header { display: flex; align-items: center; gap: 8px; padding: 18px 24px 8px; flex-wrap: wrap; }
.project-tile { width: 36px; height: 36px; border-radius: 9px; border: 0; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.project-tile:hover { filter: brightness(.94); }
.project-name { font-size: 20px; font-weight: 600; padding: 3px 6px; border-radius: 6px; cursor: text; border: 1px solid transparent; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-name:hover { border-color: var(--border); }
.project-name-input { font: 600 20px/1.25 var(--font); padding: 2px 6px; border: 1px solid var(--primary); border-radius: 6px; outline: none; min-width: 260px; }
.members-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 0; }
.tabs { display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; flex-shrink: 0; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 10px 9px; color: var(--text-2); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 24px; flex-shrink: 0; }
.project-body { flex: 1; min-height: 0; overflow: auto; position: relative; }

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

.list { padding: 0 24px 120px; min-width: 760px; }
.list-head, .task-row { display: grid; grid-template-columns: minmax(280px, 1fr) 170px 120px 110px; }
.list-head {
  position: sticky; top: 0; z-index: 3; background: var(--bg);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); height: 34px; align-items: center;
}
.list-head .cell { padding: 0 10px; height: 100%; display: flex; align-items: center; border-left: 1px solid var(--border); }
.list-head .cell:first-child { border-left: 0; padding-left: 28px; }
.section { margin-top: 18px; }
.section-head { display: flex; align-items: center; gap: 2px; min-height: 40px; }
.section-name { font-size: 15px; font-weight: 600; background: none; border: 1px solid transparent; padding: 3px 6px; border-radius: 5px; cursor: text; text-align: left; }
.section-name:hover { border-color: var(--border); }
.section-name.static { cursor: default; border: 0; }
.section-name-input { font: 600 15px/1.3 var(--font); padding: 3px 6px; border: 1px solid var(--primary); border-radius: 5px; outline: none; min-width: 220px; }
.section-count { color: var(--text-3); font-size: 13px; margin-left: 4px; }
.section-tools { display: flex; gap: 2px; margin-left: 6px; opacity: 0; transition: opacity .1s; }
.section-head:hover .section-tools, .column-head:hover .section-tools, .section-tools:focus-within { opacity: 1; }
.collapse-btn { color: var(--text-2); }
.section-body { border-top: 1px solid var(--border); min-height: 6px; }
.task-row {
  min-height: 38px; border-bottom: 1px solid var(--border); cursor: pointer; background: var(--bg);
  align-items: stretch; transition: background .08s;
}
.task-row:hover { background: var(--hover); }
.task-row.selected { background: var(--selected); }
.task-row.saving { opacity: .7; }
.task-row .cell { display: flex; align-items: center; padding: 0 6px; border-left: 1px solid var(--border); min-width: 0; }
.task-row .cell-name { border-left: 0; gap: 8px; padding-left: 4px; padding-right: 8px; }
.drag-handle { opacity: 0; cursor: grab; color: var(--text-3); width: 16px; display: flex; justify-content: center; touch-action: none; flex-shrink: 0; }
.task-row:hover .drag-handle, .subtask-row:hover .drag-handle { opacity: 1; }
.task-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row.done .task-title { color: var(--text-2); }
.parent-hint { color: var(--text-3); font-size: 12px; }
.row-open { opacity: 0; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-2); padding: 2px 4px 2px 8px; border-radius: 4px; flex-shrink: 0; }
.task-row:hover .row-open { opacity: 1; }
.task-row:hover .row-open:hover { background: var(--bg-3); }
.add-task-row {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px;
  border: 0; border-bottom: 1px solid transparent; background: none; padding-left: 30px;
  color: var(--text-3); cursor: pointer; text-align: left; font-size: 14px;
}
.add-task-row:hover { color: var(--text-2); background: var(--hover); }
.task-row.adding { display: flex; align-items: center; gap: 8px; padding-left: 24px; cursor: default; background: var(--selected); }
.inline-add-input { flex: 1; border: 0; outline: none; font: inherit; background: transparent; height: 36px; color: var(--text); min-width: 0; }
.add-section-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; border: 0; background: none; color: var(--text-2); font-weight: 600; padding: 8px 6px; border-radius: 6px; cursor: pointer; }
.add-section-btn:hover { background: var(--hover); color: var(--text); }
.add-section { margin-top: 18px; }

.cell-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; background: none; padding: 2px 6px; border-radius: 5px;
  cursor: pointer; min-height: 28px; max-width: 100%; font-size: 13px; color: var(--text);
}
.cell-btn:hover { border-color: var(--border-2); background: var(--bg); }
.cell-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-placeholder { display: inline-flex; gap: 6px; align-items: center; color: var(--text-3); }
.ghost-icon { color: var(--text-3); opacity: 0; }
.task-row:hover .ghost-icon, .card:hover .ghost-icon, .subtask-row:hover .ghost-icon, .cell-btn:focus-visible .ghost-icon { opacity: 1; }
.assignee-btn.empty .avatar-empty { opacity: 0; }
.task-row:hover .assignee-btn.empty .avatar-empty, .card:hover .assignee-btn.empty .avatar-empty { opacity: 1; }
.due-overdue { color: var(--red) !important; }
.due-today { color: var(--green) !important; }
.due-soon { color: var(--amber) !important; }
.cell-assignee .cell-btn { width: 100%; justify-content: flex-start; }

/* My tasks / compact lists */
.my-list { padding: 0; min-width: 0; }
.my-head, .my-row { grid-template-columns: minmax(240px, 1fr) 190px 120px 100px; }
.my-head { margin: 0; }
.my-head .cell:first-child { padding-left: 32px; }
.my-row .cell-name { padding-left: 8px; }
.cell-project { overflow: hidden; }
.my-tasks .list-head { position: sticky; top: 0; }
.bucket-overdue .section-name { color: var(--red); }
.compact-list .my-row { grid-template-columns: minmax(0, 1fr) minmax(0, max-content) auto; }
.compact-list .my-row .cell-project { max-width: 130px; }
.compact-list .my-row .project-chip { overflow: hidden; text-overflow: ellipsis; }
.compact-list .my-row .cell-priority { display: none; }
.compact-list .section-body { border-top: 0; }
.compact-list .my-row .cell { border-left: 0; }

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

.board { display: flex; gap: 12px; padding: 4px 24px 24px; height: 100%; overflow-x: auto; align-items: flex-start; }
.column { flex: 0 0 290px; background: var(--bg-2); border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; border: 1px solid var(--border); }
.column-head { display: flex; align-items: center; gap: 2px; padding: 10px 8px 6px 8px; }
.column-head .section-tools { margin-left: auto; }
.column-body { overflow-y: auto; padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px 8px;
  cursor: pointer; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .1s, border-color .1s;
}
.card:hover { border-color: var(--border-2); box-shadow: 0 3px 10px rgba(30, 31, 33, .08); }
.card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card.saving { opacity: .7; }
.card-top { display: flex; gap: 8px; align-items: flex-start; }
.card-top .check { margin-top: 2px; }
.card-title { flex: 1; word-break: break-word; line-height: 1.4; }
.card.done .card-title { color: var(--text-2); }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-foot { display: flex; align-items: center; gap: 2px; min-height: 28px; margin: 0 -6px; }
.card.adding { flex-direction: row; align-items: center; padding: 6px 12px; cursor: default; border-color: var(--primary); }
.add-card-btn { border: 0; background: none; color: var(--text-2); padding: 8px; border-radius: 7px; text-align: left; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.add-card-btn:hover { background: var(--bg-3); color: var(--text); }
.column-add { background: transparent; border: 0; }
.board-add-section { margin-top: 4px; }
.drag-ghost.card { transform-origin: 30% 30%; rotate: 2deg; }

/* --------------------------------------------------------- calendar */

.calendar { display: flex; flex-direction: column; height: 100%; padding: 0 24px 16px; min-width: 660px; }
.cal-toolbar { display: flex; align-items: center; gap: 6px; padding: 0 0 10px; }
.cal-title { font-size: 18px; margin-left: 8px; }
.cal-wrap { display: flex; gap: 16px; flex: 1; min-height: 0; }
.cal-grid { flex: 1; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.cal-dow span { padding: 6px 8px; }
.cal-week { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 104px; border-bottom: 1px solid var(--border); }
.cal-week:last-child { border-bottom: 0; }
.cal-day { border-left: 1px solid var(--border); padding: 4px 4px 6px; display: flex; flex-direction: column; min-width: 0; }
.cal-day:first-child { border-left: 0; }
.cal-day.weekend { background: var(--bg-weekend); }
.cal-day.other { background: var(--bg-2); }
.cal-day.other .cal-date { color: var(--text-3); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; height: 24px; padding-left: 4px; font-size: 12px; }
.cal-day.today .cal-date { background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.cal-add { opacity: 0; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-day-tasks { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 24px; }
.cal-chip { display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 5px; background: var(--primary-soft); border-radius: 5px; cursor: pointer; min-width: 0; border: 1px solid transparent; }
.cal-chip:hover { border-color: var(--primary-border); }
.cal-chip.selected { border-color: var(--primary); }
.cal-chip.prio-high { background: var(--red-faint); }
.cal-chip.prio-medium { background: var(--amber-soft); }
.cal-chip.done { opacity: .55; }
.cal-chip.done .cal-chip-title { text-decoration: line-through; }
.cal-chip-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { border: 0; background: none; color: var(--text-2); font-size: 12px; text-align: left; padding: 2px 4px; cursor: pointer; }
.cal-more:hover { color: var(--text); }
.cal-input { height: 26px; font-size: 12px; border: 1px solid var(--primary); border-radius: 5px; padding: 0 6px; background: var(--bg); }
.cal-tray { width: 230px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; }
.cal-tray h3 { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.cal-tray .count { color: var(--text-3); font-weight: 400; }
.cal-tray p { margin: 4px 0 10px; }
.cal-tray-list { display: flex; flex-direction: column; gap: 4px; min-height: 80px; flex: 1; }

/* --------------------------------------------------------- overview */

.overview { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 16px 24px 80px; }
.ov-main, .ov-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; background: var(--bg); }
.ov-card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ov-desc { width: 100%; min-height: 110px; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; margin: -4px -10px; width: calc(100% + 20px); font: inherit; resize: none; color: var(--text); background: transparent; line-height: 1.55; }
.ov-desc:hover { border-color: var(--border); }
.ov-desc:focus { outline: none; border-color: var(--primary); }
.progress { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.progress.big { height: 10px; border-radius: 5px; margin-bottom: 8px; }
.progress-bar { height: 100%; background: var(--green); border-radius: inherit; transition: width .3s ease; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--bg-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.stat strong { font-size: 22px; font-weight: 600; }
.stat span { color: var(--text-2); font-size: 12px; }
.stat.good strong { color: var(--green); }
.stat.bad strong { color: var(--red); }
.ov-sections { list-style: none; padding: 0; margin: 0; }
.ov-sections li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ov-sections li:last-child { border-bottom: 0; }
.ov-members { display: flex; flex-direction: column; gap: 8px; }
.ov-details { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.ov-details dt { color: var(--text-2); }
.ov-details dd { margin: 0; }
.member-list { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; max-height: 50vh; overflow-y: auto; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 8px; }
.member-row:hover { background: var(--bg-2); }
.member-row.compact { padding: 2px 0; }
.member-row.compact:hover { background: transparent; }
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-info small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.privacy-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-2); border-radius: 10px; }
.privacy-row > div { flex: 1; display: flex; flex-direction: column; }
.privacy-row small { color: var(--text-2); }

/* -------------------------------------------------------- task pane */

/* Out of the page grid: as a grid item it wrapped onto a second row and stole height (white band at the bottom). */
.pane-host { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.pane {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0;
  width: var(--pane-w); max-width: 100vw;
  background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: -10px 0 34px rgba(30, 31, 33, .1);
  display: flex; flex-direction: column; z-index: 50;
  transform: translateX(20px); opacity: 0; transition: transform .16s ease, opacity .16s ease;
  outline: none;
}
.pane.open { transform: none; opacity: 1; }
.pane-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pane-actions { display: flex; gap: 2px; }
.complete-btn {
  display: inline-flex; gap: 6px; align-items: center;
  border: 1px solid var(--border-2); background: var(--bg); padding: 0 12px; height: 32px;
  border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text);
}
.complete-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.complete-btn.done { background: var(--green); border-color: var(--green); color: #fff; }
.complete-btn.done:hover { background: var(--green-2); }
.pane-scroll { flex: 1; overflow-y: auto; padding: 18px 28px 28px; }
.done-banner { display: flex; gap: 8px; align-items: center; background: var(--green-soft); color: var(--green); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.parent-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--text-2); font-size: 13px; padding: 2px 4px; margin: 0 0 6px -4px; border-radius: 4px; cursor: pointer; max-width: 100%; }
.parent-link:hover { background: var(--hover); color: var(--text); }
.parent-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-title {
  display: block; width: calc(100% + 16px); margin: 0 -8px 10px;
  border: 1px solid transparent; border-radius: 8px; padding: 4px 8px;
  font: 600 22px/1.3 var(--font); color: var(--text); background: transparent;
  resize: none; overflow: hidden; letter-spacing: -.01em;
}
.pane-title:hover { border-color: var(--border); }
.pane-title:focus { outline: none; border-color: var(--primary); }
.pane.is-done .pane-title { color: var(--text-2); }
.pane-fields { display: flex; flex-direction: column; margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; min-height: 40px; }
.field-label { color: var(--text-2); font-size: 13px; }
.field-value { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.field-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; background: none; padding: 4px 8px 4px 4px; border-radius: 6px;
  cursor: pointer; color: var(--text); font-size: 14px; max-width: 100%;
}
.field-btn:hover { border-color: var(--border-2); }
.field-btn.empty { color: var(--text-3); }
.date-circle { width: 24px; height: 24px; border: 1.5px dashed currentColor; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; opacity: .8; }
.clear-btn { opacity: 0; }
.field-row:hover .clear-btn { opacity: 1; }
.section-select { border: 1px solid var(--border); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 13px; background: var(--bg); color: var(--text); max-width: 200px; cursor: pointer; }
.block-title { font-size: 15px; font-weight: 600; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.block-title .count { color: var(--text-3); font-weight: 400; font-size: 13px; }
.desc-view {
  min-height: 64px; padding: 8px 10px; margin: 0 -10px;
  border: 1px solid transparent; border-radius: 8px;
  white-space: pre-wrap; word-break: break-word; cursor: text; line-height: 1.55;
}
.desc-view:hover { border-color: var(--border); }
.desc-view.empty { color: var(--text-3); }
.desc-edit { display: block; width: calc(100% + 20px); margin: 0 -10px; min-height: 120px; font: inherit; line-height: 1.55; border: 1px solid var(--primary); border-radius: 8px; padding: 8px 10px; resize: none; outline: none; }
.hint { display: block; margin-top: 6px; }
.subtask-list { border-top: 1px solid var(--border); }
.subtask-list:empty { border-top: 0; }
.subtask-row { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 4px 0 0; border-bottom: 1px solid var(--border); cursor: pointer; background: var(--bg); }
.subtask-row:hover { background: var(--hover); }
.subtask-row.done .subtask-title { color: var(--text-2); }
.subtask-row.adding { cursor: default; padding-left: 20px; }
.subtask-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subtask-row .chev { color: var(--text-3); opacity: 0; display: flex; }
.subtask-row:hover .chev { opacity: 1; }
.subtask-input { flex: 1; border: 0; outline: none; font: inherit; height: 36px; background: transparent; }
.add-row-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); padding: 8px 6px; border-radius: 6px; cursor: pointer; margin-top: 4px; font-size: 13px; }
.add-row-btn:hover { background: var(--hover); color: var(--text); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%;
  border: 1.5px dashed var(--border-2); background: var(--bg-2); border-radius: 10px;
  padding: 18px; color: var(--text-2); cursor: pointer;
}
.dropzone:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.dropzone small { color: var(--text-3); }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.attachment { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; position: relative; background: var(--bg); }
.attachment-thumb { display: grid; place-items: center; width: 100%; height: 104px; border: 0; padding: 0; background: var(--bg-2); cursor: pointer; overflow: hidden; }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-icon { position: relative; color: var(--text-3); display: grid; place-items: center; }
.file-icon em { position: absolute; bottom: -2px; font: 700 9px/1 var(--font); font-style: normal; color: var(--primary); background: var(--bg); padding: 1px 3px; border-radius: 3px; }
.attachment-info { padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.attachment-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-info small { color: var(--text-3); font-size: 11px; }
.attachment-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.attachment:hover .attachment-actions, .attachment.uploading .attachment-actions { opacity: 1; }
.attachment-actions .icon-btn { background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: var(--shadow-sm); }
.attachment .progress { height: 3px; border-radius: 0; }
.attachment .progress-bar { background: var(--primary); }
.pane-feed { margin-top: 8px; }
.feed-more { margin-bottom: 8px; }
.feed-activity { display: grid; grid-template-columns: 32px 1fr auto; align-items: baseline; gap: 0 10px; padding: 5px 0; font-size: 13px; color: var(--text-2); }
.feed-activity .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); justify-self: center; align-self: center; }
.feed-activity strong { color: var(--text); font-weight: 500; }
.feed-activity time, .comment-head time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.feed-empty { margin: 10px 0 0 42px; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.comment-menu { margin-left: auto; opacity: 0; }
.comment:hover .comment-menu { opacity: 1; }
.comment-body { word-break: break-word; line-height: 1.5; }
.comment.sending { opacity: .65; }
.comment.failed .comment-body { color: var(--red); }
.comment-edit { display: flex; flex-direction: column; gap: 6px; }
.comment-edit textarea { border: 1px solid var(--primary); border-radius: 8px; }
.pane-bottom { border-top: 1px solid var(--border); padding: 12px 20px 12px; background: var(--bg-2); flex-shrink: 0; }
.composer { display: flex; gap: 10px; align-items: flex-start; }
.composer-box { flex: 1; min-width: 0; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); transition: border-color .1s, box-shadow .1s; }
.composer-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.composer-input { display: block; width: 100%; border: 0; resize: none; font: inherit; padding: 8px 12px; outline: none; background: transparent; min-height: 38px; max-height: 220px; overflow-y: auto; line-height: 1.45; }
.composer-foot { display: none; justify-content: space-between; align-items: center; padding: 0 6px 6px 12px; color: var(--text-3); }
.composer-box:focus-within .composer-foot { display: flex; }
.composer-send { opacity: .55; pointer-events: none; }
.composer-send.ready { opacity: 1; pointer-events: auto; }
.pane-collab { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-left: 38px; }
.add-collab { border: 1.5px dashed var(--border-2); border-radius: 50%; width: 24px; height: 24px; }
.collab-stack { border: 0; background: none; padding: 2px; border-radius: 14px; cursor: pointer; display: inline-flex; align-items: center; }
.collab-stack:hover, .collab-stack:focus-visible { background: var(--hover); }
.collab-pop { width: 290px; max-width: 86vw; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.collab-pop-head { display: flex; flex-direction: column; }
.collab-list { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; }
.collab-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.collab-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.collab-name > span, .collab-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collab-remove { color: var(--text-3); }
.collab-remove:hover { color: var(--red); }
.collab-add { align-self: flex-start; }
.pane-drop { display: none; }
.pane.dropping .pane-drop {
  display: flex; position: absolute; inset: 10px; z-index: 5; pointer-events: none;
  border: 2px dashed var(--primary); border-radius: 12px; background: color-mix(in srgb, var(--primary-soft) 94%, transparent);
  align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--primary); font-weight: 600;
}

/* ------------------------------------------------------------- home */

.home-hero { text-align: center; padding: 12px 0 28px; }
.home-hero h1 { font-size: 30px; font-weight: 500; letter-spacing: -.02em; margin: 4px 0 14px; }
.hero-stats { display: inline-flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 22px; padding: 6px; flex-wrap: wrap; justify-content: center; }
.hero-stats span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 16px; font-size: 13px; color: var(--text-2); }
.hero-stats strong { color: var(--text); }
.hero-stats .bad strong { color: var(--red); }
.hero-stats .good strong, .hero-stats .good { color: var(--green); }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.home-card { min-width: 0; }
.home-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px 14px; display: flex; flex-direction: column; min-height: 300px; background: var(--bg); }
.home-card:last-child { grid-column: 1 / -1; min-height: 0; }
.home-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.home-card-head h2 { font-size: 18px; font-weight: 600; }
.home-card-head h2 a { color: var(--text); }
.mini-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.mini-tabs button { border: 0; background: none; padding: 6px 0 8px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.mini-tabs button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.card-link { margin-top: auto; align-self: flex-start; padding-top: 10px; }
.compact-list { padding: 0; min-width: 0; }
.compact-list .task-row { min-height: 40px; }
.project-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.project-tile-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.project-tile-card:hover { background: var(--hover); }
.tile-icon { width: 44px; height: 44px; border-radius: 11px; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.tile-icon.dashed { border: 1.5px dashed var(--border-2); color: var(--text-2); }
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tile-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-text small { color: var(--text-2); font-size: 12px; min-height: 16px; }
.team-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.team-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: 12px; background: var(--bg-2); }
.team-tile .avatar { margin-bottom: 4px; }

/* ------------------------------------------------------------ inbox */

.inbox { max-width: 860px; }
.inbox-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.inbox-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; background: var(--bg); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: var(--hover); }
/* Only the row whose task is open on the right is blue, with a bar down its left side. Unread = bold + blue dot. */
.inbox-item.selected, .inbox-item.selected:hover { background: var(--selected); box-shadow: inset 4px 0 0 var(--primary); }
.inbox-item.unread .inbox-line strong { font-weight: 700; }
.inbox-item.unread .inbox-task-title { font-weight: 600; }
.inbox-earlier { margin-top: 4px; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-earlier-count { color: var(--text-2); font-weight: 500; }
.inbox-avatar { position: relative; }
.inbox-type { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--border); display: grid; place-items: center; color: var(--text-2); }
.inbox-main { flex: 1; min-width: 0; }
.inbox-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.inbox-line strong { color: var(--text); font-weight: 500; }
.inbox-task { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; }
.inbox-task-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-task-title.done { text-decoration: line-through; color: var(--text-2); }
.inbox-item time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.read-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border-2); }
.read-dot.on { background: var(--primary); border-color: var(--primary); }

/* ------------------------------------------------------------- team */

.team-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.team-row { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(160px, 1fr) 150px 110px 200px; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row.head { background: var(--bg-2); font-size: 12px; color: var(--text-2); font-weight: 500; padding: 8px 16px; }
.team-row.inactive { background: var(--bg-2); }
.team-row.inactive .team-name { opacity: .6; }
.team-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-name > span { display: flex; flex-direction: column; min-width: 0; }
.team-name small { color: var(--text-2); font-size: 12px; }
.team-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.team-row .tag + .tag { margin-left: 4px; }
.team-actions { display: flex; justify-content: flex-end; gap: 4px; }

/* ---------------------------------------------------------- profile */

.profile { max-width: 920px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.profile-avatar { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.profile-avatar strong { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-2); font-weight: 500; }

/* ----------------------------------------------------------- search */

.search-group { margin-bottom: 28px; }
.search-group h3 { font-size: 14px; color: var(--text-2); margin-bottom: 10px; }
.search-projects { display: flex; gap: 8px; flex-wrap: wrap; }
.search-page .my-list .section-body { border-top: 1px solid var(--border); }

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

@media (max-width: 1279px) {
  .calendar { height: auto; }
  .cal-wrap { flex-direction: column; }
  .cal-grid { min-height: 560px; }
  .cal-tray { width: auto; }
  .cal-tray-list { flex-direction: row; flex-wrap: wrap; min-height: 40px; }
  .cal-tray-list .cal-chip { max-width: 260px; }
}
@media (max-width: 1100px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
  .team-row { grid-template-columns: minmax(180px, 1fr) minmax(140px, 1fr) 120px 170px; }
  .team-row > :nth-child(5) { display: none; } /* Last active */
}
@media (max-width: 900px) {
  .home-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .home-grid > *, .profile-grid > *, .overview > * { min-width: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root { --pane-w: 100vw; }
  .pane { top: 0; z-index: 130; border-left: 0; }
  .pane-scroll { padding: 14px 16px 20px; }
  .pane-bottom { padding: 10px 12px; }
  .pane-collab { padding-left: 0; }
  .field-row { grid-template-columns: 92px minmax(0, 1fr); }
  .page { padding: 18px 16px 80px; }
  .project-header, .tabs, .toolbar { padding-left: 16px; padding-right: 16px; }
  .list { padding: 0 16px 100px; min-width: 0; }
  .list-head, .task-row { grid-template-columns: minmax(0, 1fr) 44px 92px; }
  .cell-priority, .list-head .cell-priority { display: none !important; }
  .cell-assignee .cell-text { display: none; }
  .list-head .cell-assignee { font-size: 0; }
  .task-row .badges { display: none; }
  .row-open { display: none; }
  .drag-handle { opacity: .5; }
  .my-head, .my-row { grid-template-columns: minmax(0, 1fr) 92px; }
  .my-row .cell-project, .my-head .cell-project, .my-row .cell-priority { display: none !important; }
  .board { padding: 4px 16px 16px; }
  .column { flex-basis: 82vw; }
  .calendar { padding: 0 16px 16px; }
  .team-row { grid-template-columns: minmax(0, 1fr) auto; }
  .team-row > :nth-child(2), .team-row > :nth-child(3) { display: none; }
  .team-row.head { display: none; }
  .home-hero h1 { font-size: 24px; }
  .inbox-item time { display: none; }
}

/* ===================================================== v1.1 additions */

/* ---- task names editable in rows */
.row-title {
  flex: 0 1 auto; min-width: 3ch; max-width: 100%;
  field-sizing: content;
  font: inherit; color: inherit; background: transparent;
  border: 1px solid transparent; border-radius: 4px; padding: 3px 5px; margin-left: -5px;
  text-overflow: ellipsis; cursor: text;
}
.row-title:hover { border-color: var(--border-2); background: var(--bg); }
.row-title:focus { outline: none; border-color: var(--primary); background: var(--bg); box-shadow: 0 0 0 2px var(--primary-soft); }
.task-row.done .row-title, .subtask-row.done .row-title { color: var(--text-2); }
.title-spacer { flex: 1 1 0; min-width: 8px; align-self: stretch; }
.subtask-row .row-title { padding: 2px 5px; }
/* "subtask of …" shrinks with … instead of pushing the row wider than the screen */
.parent-hint { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .view { overflow-x: hidden; } /* nothing on a page may slide sideways on a phone (the board has its own scroller) */
  html, body { overflow-x: hidden; max-width: 100%; }
  .task-row .cell-name { min-width: 0; overflow: hidden; }
  /* a task name fills its row but never sets the row's width (Safari sizes the box by the whole name) */
  .task-row .row-title { width: 100%; min-width: 0; }
  .list, .section-body, .compact-list, .task-row { min-width: 0; max-width: 100%; }
  /* the task's own name gets the room; "subtask of …" goes on a line of its own under it */
  .task-row .cell-name:has(> .parent-hint) { flex-wrap: wrap; row-gap: 0; padding-top: 4px; padding-bottom: 4px; }
  .task-row .cell-name > .parent-hint { order: 9; flex: 1 1 100%; max-width: none; padding-left: 30px; margin-top: -2px; }
  .task-row .cell-name:has(> .parent-hint) > .row-title { flex: 1 1 0; min-width: 0; }
  .task-row .cell-name:has(> .parent-hint) > .title-spacer { display: none; }
}

/* ---- rich text (descriptions & comments) */
.rich { line-height: 1.55; word-break: break-word; overflow-wrap: anywhere; }
.rich img, .rich video, .rich iframe { max-width: 100%; height: auto; }
.rich table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.rich p, .rich div { margin: 0; }
.rich ul, .rich ol { margin: 4px 0; padding-left: 24px; }
.rich li { margin: 2px 0; }
.rich blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid var(--border-2); color: var(--text-2); }
.rich code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; }
.rich pre { background: var(--bg-3); padding: 10px 12px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; }
.rich pre code { background: none; padding: 0; }
.rich hr { border: 0; border-top: 1px solid var(--border-2); margin: 12px 0; }
.rich a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.mention { color: var(--primary); background: var(--primary-soft); border-radius: 4px; padding: 0 3px; font-weight: 500; white-space: nowrap; }

/* ---- editor */
.editor { position: relative; display: flex; flex-direction: column; }
.editor-area { order: 1; position: relative; outline: none; min-height: 1.6em; cursor: text; }
.editor-area.is-empty::before { content: attr(data-placeholder); position: absolute; color: var(--text-3); pointer-events: none; }
.editor-bar { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 4px 6px; border-top: 1px solid var(--border); }
.editor-btn { width: 28px; height: 28px; border: 0; background: none; border-radius: 5px; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.editor-btn:hover { background: var(--bg-3); color: var(--text); }
.editor-btn.on { background: var(--primary-soft); color: var(--primary); }
.editor-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.link-pop { padding: 10px; width: 300px; display: flex; flex-direction: column; gap: 6px; }
.mention-menu { width: 270px; padding: 6px; z-index: 320; }

/* description: borderless until you hover / click; toolbar while editing */
.desc-slot .editor { border: 1px solid transparent; border-radius: 8px; margin: 0 -10px; transition: border-color .1s, box-shadow .1s; }
.desc-slot .editor:hover { border-color: var(--border); }
.desc-slot .editor.focused { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.desc-slot .editor-area { padding: 8px 10px; min-height: 76px; }
.desc-slot .editor-bar { display: none; }
.desc-slot .editor.focused .editor-bar { display: flex; }

/* comment box */
.composer-editor .editor-area { padding: 10px 12px; min-height: 76px; max-height: 300px; overflow-y: auto; }
/* Comment box toolbar is always there: formatting, 📎 attach, and the Comment button on the right. */
.composer-editor .editor-bar { display: flex; border-top: 1px solid var(--border); padding: 5px 6px 5px 6px; }
.editor-bar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-left: 6px; }

/* editing an existing comment */
.comment-editor { border: 1px solid var(--primary); border-radius: 8px; box-shadow: 0 0 0 3px var(--primary-soft); }
.comment-editor .editor-area { padding: 8px 10px; min-height: 60px; max-height: 320px; overflow-y: auto; }

/* ---- comment tools & emoji reactions */
.comment-tools { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.comment:hover .comment-tools, .comment-tools:focus-within { opacity: 1; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px;
  border-radius: 13px; border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: background .1s, border-color .1s, transform .1s;
}
.reaction:hover { border-color: var(--border-2); background: var(--bg-2); }
.reaction:active { transform: scale(.94); }
.reaction.mine { border-color: var(--primary-border); background: var(--primary-soft); color: var(--primary); }
.reaction-emoji { font-size: 15px; line-height: 1; }
.reaction.add { color: var(--text-3); padding: 0 7px; gap: 0; }
.reaction.add:hover { color: var(--text-2); }
.emoji-pop { display: grid; grid-template-columns: repeat(5, 38px); gap: 2px; padding: 6px; }
.emoji-btn { width: 38px; height: 38px; border: 0; background: none; border-radius: 8px; font-size: 21px; cursor: pointer; transition: transform .1s, background .1s; }
.emoji-btn:hover { background: var(--bg-3); transform: scale(1.15); }
.emoji-btn.mine { background: var(--primary-soft); }

/* ---- resizable task panel */
.pane-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 6; touch-action: none; }
.pane-resize::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: transparent; transition: background .12s; }
.pane-resize:hover::after, .pane-resizing .pane-resize::after { background: var(--primary); }
.pane-resizing, .pane-resizing * { cursor: col-resize !important; user-select: none !important; }
.pane-resizing .view, .pane-resizing .pane { transition: none !important; }
@media (max-width: 700px) {
  .pane-resize { display: none; }
}

/* ===================================================== v1.2 additions */

/* ---- profile photos */
.avatar.has-photo { background: var(--bg-3) !important; overflow: hidden; }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.photo-editor { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; }
.photo-overlay { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(30, 31, 33, .45); color: #fff; opacity: 0; transition: opacity .12s; }
.photo-btn:hover .photo-overlay, .photo-btn:focus-visible .photo-overlay { opacity: 1; }
.photo-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.photo-actions small { width: 100%; }
.profile-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.profile-color { margin-top: 18px; }

/* ---- v1.17 What's new: the tour (whatsnew.js) and release notes (Help → What's new) */
.whatsnew.modal { position: relative; overflow: hidden; }
.whatsnew .modal-head { position: absolute; top: 8px; right: 8px; padding: 0; border: 0; background: none; z-index: 2; }
.whatsnew .modal-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.whatsnew .modal-head .icon-btn { background: color-mix(in srgb, var(--bg) 80%, transparent); }
.whatsnew .modal-body { padding: 0; }
.wn-hero { display: grid; place-items: center; min-height: 170px; padding: 26px 26px 0;
  background: radial-gradient(420px 220px at 15% 0%, var(--glow-1), transparent 70%), radial-gradient(420px 240px at 100% 100%, var(--glow-2), transparent 70%), var(--bg-2); }
.wn-hero.has-shot { padding: 22px 26px 0; }
.wn-hero img { display: block; width: 100%; height: auto; border-radius: 10px 10px 0 0; border: 1px solid var(--border); border-bottom: 0; box-shadow: 0 -6px 30px rgba(30, 31, 33, .12); }
.wn-badge { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: #fff; margin-bottom: 26px;
  background: linear-gradient(135deg, var(--accent), var(--purple)); box-shadow: 0 10px 30px rgba(240, 106, 106, .35); animation: wn-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes wn-pop { from { transform: scale(.6) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.wn-slide { animation: wn-in .25s ease both; }
@keyframes wn-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wn-text { padding: 20px 26px 4px; }
.wn-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.wn-date { color: var(--text-3); font-weight: 500; text-transform: none; letter-spacing: 0; }
.wn-text h2 { font-size: 22px; margin: 8px 0 8px; }
.wn-text p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.wn-list { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.wn-list strong { color: var(--text); }
.wn-foot { display: flex; align-items: center; gap: 8px; padding: 18px 26px 22px; flex-wrap: wrap; }
.wn-dots { display: flex; gap: 6px; }
.wn-dot { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: var(--border-2); cursor: pointer; transition: width .2s, background .2s; }
.wn-dot.on { width: 22px; background: var(--primary); }
.wn-all { font-size: 13px; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1000; }
@media (prefers-reduced-motion: reduce) { .wn-badge, .wn-slide { animation: none; } }
@media (max-width: 520px) { .wn-text h2 { font-size: 19px; } .wn-foot .spacer { display: none; } .wn-foot { justify-content: flex-end; } .wn-dots { width: 100%; justify-content: center; margin-bottom: 4px; } }
.help-action { margin: 4px 0 18px; }
.release { padding: 16px 0 6px; border-top: 1px solid var(--border); }
.release:first-of-type { border-top: 0; }
.release-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.release-head h2 { font-size: 16px; margin: 0; }
.release-head time { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.release-version { font: 600 12px/1 var(--font); padding: 4px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.release .help-list { margin-top: 8px; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-option { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; text-align: left; color: var(--text); }
.theme-option:hover { border-color: var(--border-2); }
.theme-option.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.theme-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.theme-option.on .theme-label { color: var(--primary); }
.theme-preview { display: flex; height: 54px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.tp-side { width: 26%; background: #1e1f21; }
.tp-main { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 9px 8px; background: #fff; }
.tp-main span { height: 6px; border-radius: 3px; background: #e8e6e4; }
.tp-main span:last-child { width: 60%; }
.tp-dark .tp-side { background: #161719; }
.tp-dark .tp-main { background: #1e1f22; }
.tp-dark .tp-main span { background: #3a3b40; }
.tp-system .tp-main { background: linear-gradient(135deg, #fff 50%, #1e1f22 50%); }
.tp-system .tp-main span { background: #9a999b; }
@media (max-width: 420px) { .theme-options { grid-template-columns: minmax(0, 1fr); } .theme-preview { height: 40px; } }

/* ---- switches & setting rows */
.switch {
  position: relative; flex-shrink: 0; width: 38px; height: 22px; border-radius: 11px;
  border: 0; padding: 0; background: var(--switch-off); cursor: pointer; transition: background .15s;
}
.switch.on { background: var(--green); }
.switch:disabled { opacity: .6; cursor: default; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch.on .switch-knob { transform: translateX(16px); }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.ov-card h3 + .setting-row { border-top: 0; padding-top: 2px; }
.setting-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.setting-text small { color: var(--text-2); font-size: 12px; line-height: 1.45; }
.setting-row .default-project { flex: 0 1 300px; min-width: 200px; }
.setting-note { max-width: 260px; margin: 0; text-align: right; }
.setting-link { margin: -4px 0 6px; }
.warn-text { color: var(--amber) !important; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.email-card { margin-bottom: 20px; }
.email-card h3 { display: flex; align-items: center; gap: 8px; }
.email-from { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0 6px; border-top: 1px solid var(--border); }
.email-from .field { flex: 1 1 260px; margin: 0; }
.team-row { grid-template-columns: minmax(200px, 1.4fr) minmax(160px, 1fr) 150px 70px 110px 200px; }
.team-emails { display: flex; align-items: center; }

/* ---- comment attachments */
.composer-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px 0; }
.pending-file { position: relative; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2); max-width: 220px; }
.pending-file.is-image { width: 64px; height: 64px; overflow: hidden; }
.pending-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pending-name { display: flex; align-items: center; gap: 6px; padding: 6px 26px 6px 8px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-remove { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(30, 31, 33, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pending-remove:hover { background: var(--red); }
.composer-box.drop-here { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--primary-soft); }


.comment-files { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.comment-images { display: flex; flex-wrap: wrap; gap: 6px; }
.comment-image { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-2); width: 132px; height: 100px; cursor: zoom-in; }
.comment-images.single .comment-image { width: auto; max-width: min(100%, 360px); height: auto; max-height: 260px; }
.comment-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comment-images.single .comment-image img { width: auto; max-width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.comment-image:hover { border-color: var(--border-2); }
.comment-image.uploading { cursor: default; }
.comment-image.uploading img { opacity: .6; }
.comment-image .progress, .comment-file .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0; }
.comment-image .progress-bar, .comment-file .progress-bar { background: var(--primary); }
.comment-file {
  position: relative; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; max-width: 100%;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  color: var(--text); text-decoration: none !important; font-size: 13px; overflow: hidden;
}
.comment-file:hover { border-color: var(--border-2); background: var(--bg-2); }
.comment-file .icon { color: var(--text-3); }
.comment-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.comment-file .attachment-info { padding: 0; color: var(--text-3); white-space: nowrap; }

@media (max-width: 1100px) {
  .team-row { grid-template-columns: minmax(180px, 1fr) minmax(140px, 1fr) 120px 70px 170px; }
}
@media (max-width: 700px) {
  .team-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .setting-row { flex-wrap: wrap; }
  .setting-note { text-align: left; max-width: none; }
}

/* ---- nested lists: each level looks different (bullets ● ○ ■, numbers 1. a. i.) */
.rich li > ul, .rich li > ol { margin: 2px 0 4px; }
.rich ul { list-style-type: disc; }
.rich ul ul { list-style-type: circle; }
.rich ul ul ul { list-style-type: square; }
.rich ol { list-style-type: decimal; }
.rich ol ol, .rich ul ol { list-style-type: lower-alpha; }
.rich ol ol ol, .rich ul ol ol, .rich ol ul ol, .rich ul ul ol { list-style-type: lower-roman; }
.rich li::marker { color: var(--text-2); }

/* ---- v1.3 labels */
.label-chip {
  --lc: #6d6e6f;
  display: inline-flex; align-items: center; gap: 5px; max-width: 180px; height: 20px;
  padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--bg-3); /* fallback */
  background: color-mix(in srgb, var(--lc) 18%, var(--bg));
  color: color-mix(in srgb, var(--lc) 45%, var(--text));
  flex-shrink: 0;
}
.label-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lc); flex-shrink: 0; }
.label-name { overflow: hidden; text-overflow: ellipsis; }
.label-x { display: inline-flex; border: 0; background: none; padding: 1px; margin-right: -4px; border-radius: 50%; color: inherit; opacity: .6; cursor: pointer; }
.label-x:hover { opacity: 1; background: rgba(0, 0, 0, .08); }
.label-chips { display: inline-flex; gap: 4px; min-width: 0; overflow: hidden; flex-shrink: 1; }
.label-more { font-size: 12px; color: var(--text-3); align-self: center; }
.task-row .label-chips .label-chip { max-width: 140px; }
.card-tags .label-chips { flex-wrap: wrap; overflow: visible; }
.pane-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; }
.labels-btn { flex-wrap: wrap; height: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 900px) { .task-row .label-chips { display: none; } }

.label-picker .picker-option { gap: 8px; }
.label-picker .label-chip { max-width: 220px; }
.label-check {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0;
  border: 1.5px solid var(--border-2); border-radius: 4px; color: #fff;
}
.label-check.on { background: var(--primary); border-color: var(--primary); }
.label-create { color: var(--primary); }
.label-create .picker-name strong { color: var(--text); }
.picker-foot {
  display: flex; align-items: center; gap: 6px; width: calc(100% + 20px); margin: 8px -10px -10px; padding: 9px 12px;
  border: 0; border-top: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); font-size: 13px; cursor: pointer;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.picker-foot:hover { background: var(--hover); color: var(--text); }

.labels-manage { display: flex; flex-direction: column; gap: 14px; }
.labels-add { display: flex; gap: 8px; }
.labels-add .input { flex: 1; }
.labels-rows { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.labels-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.labels-row .input { flex: 1; }
.label-swatch { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0; }
.label-swatch:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--border-2); }
.labels-count { width: 72px; text-align: right; white-space: nowrap; }
.input-sm { height: 30px; font-size: 13px; padding: 0 8px; }

/* ---- v1.3 templates: create dialogs */
.create-template { display: flex; justify-content: flex-end; margin-bottom: -4px; }
.create-template-on {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px;
}
.create-template-text { flex: 1; color: var(--text); }
.template-pick {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); margin-top: 2px;
}
.template-pick-info { display: flex; flex-direction: column; gap: 2px; font-size: 13px; flex: 1 1 200px; }
.template-start { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.template-start .input-btn { height: 32px; }
.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-list .check-row { align-items: flex-start; }
.check-list .check-row input { margin: 3px 0 0; }
.check-list .check-row small { display: block; font-size: 12px; }
.check-list .check-row input:disabled + span { color: var(--text-2); }
.danger-text { color: var(--red) !important; }

/* ---- v1.3 templates page */
.templates-page { max-width: 1200px; }
.page-sub { margin: -12px 0 24px; max-width: 720px; }
.tpl-group { margin-bottom: 32px; }
.tpl-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tpl-group-head h2 { font-size: 17px; margin: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tpl-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg); box-shadow: var(--shadow-sm); min-width: 0;
}
.tpl-card:hover { border-color: var(--border-2); }
.tpl-card-top { display: flex; align-items: flex-start; gap: 10px; }
.tpl-tile { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.tpl-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tpl-card-title strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.tpl-card-title small { font-size: 12px; }
.tpl-card-desc { margin: 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-card-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.tpl-empty { padding: 18px; border: 1px dashed var(--border-2); border-radius: var(--radius-lg); margin: 0; }

/* ---- v1.3 template editor */
.tpl-modal .modal-body { max-height: calc(100vh - 190px); overflow-y: auto; }
.tpl-modal .modal-foot .spacer { flex: 1; }
.tpl-editor { display: flex; flex-direction: column; gap: 12px; }
.tpl-h3 { font-size: 14px; margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.tpl-h3 small { font-weight: 400; }
.tpl-h { font-size: 13px; font-weight: 600; margin: 4px 0 0; color: var(--text-2); }
.tpl-task { display: flex; flex-direction: column; gap: 10px; }
.tpl-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.tpl-field { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.tpl-field .field-label { width: 72px; flex-shrink: 0; color: var(--text-2); font-size: 13px; }
.tpl-field .field-value { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tpl-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.offset { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.offset-input { width: 64px; height: 30px; padding: 0 6px; text-align: center; }
.offset-input.input-sm { width: 52px; height: 26px; }
.tpl-desc .editor { border: 1px solid var(--border); border-radius: 8px; }
.tpl-desc .editor-area { min-height: 70px; }
.tpl-subtasks { display: flex; flex-direction: column; gap: 4px; }
.tpl-sub { display: flex; align-items: center; gap: 6px; }
.tpl-sub > .input { flex: 1; }
.offset-mini { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); }
.tpl-add { border-style: dashed; }
.tpl-files { display: flex; flex-direction: column; gap: 4px; }
.tpl-file { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tpl-file .icon { color: var(--text-3); }
.tpl-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tpl-sections { display: flex; flex-direction: column; gap: 14px; }
.tpl-section { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; background: var(--bg-2); }
.tpl-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tpl-section-name { flex: 1; height: 32px; font-weight: 600; background: var(--bg); }
.tpl-section-tasks { display: flex; flex-direction: column; gap: 4px; }
.tpl-row { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.tpl-row.open { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.tpl-row.open > .tpl-task { padding: 4px 12px 12px 36px; }
.tpl-row-head { display: flex; align-items: center; gap: 4px; padding: 3px 4px; }
.tpl-row-head .drag-handle { cursor: grab; color: var(--text-3); display: inline-flex; padding: 2px; }
.tpl-row-title { flex: 1; border-color: transparent; background: transparent; font-weight: 500; }
.tpl-row-title:hover { border-color: var(--border); }
.tpl-bits { border: 0; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; padding: 2px 6px; border-radius: 4px; }
.tpl-bits:hover { background: var(--hover); color: var(--text-2); }
.tpl-add-row { padding-top: 2px; }
.tpl-add-row .tpl-add { width: 100%; background: transparent; }
@media (max-width: 700px) {
  .tpl-meta { grid-template-columns: minmax(0, 1fr); }
  .tpl-row.open > .tpl-task { padding-left: 12px; }
  .tpl-bits { display: none; }
}

/* ---- v1.4 AI "Check my work" */
.composer-actions { display: inline-flex; align-items: center; gap: 6px; }
.composer-check { color: var(--purple); border-color: var(--purple-border); background: var(--purple-soft); }
.composer-check:hover { background: var(--purple-soft-2); border-color: var(--purple-border-2); color: var(--purple-2); }
.composer-check[hidden] { display: none; }
.composer-box.locked { opacity: .65; }
.composer-box.locked .editor-area { cursor: progress; }

.ai-slot { margin-bottom: 10px; }
.ai-check {
  border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); overflow: hidden;
  box-shadow: var(--shadow-sm); font-size: 13px;
}
.ai-check.running { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-color: var(--purple-border); background: var(--purple-soft); }
.ai-check-text { display: flex; flex-direction: column; gap: 2px; }
.ai-check-text small { color: var(--text-2); }
.ai-spinner {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid var(--purple-border); border-top-color: var(--purple); animation: ai-spin .8s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-spinner { animation-duration: 2.4s; } }
.ai-check-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; }
.ai-check-head small { margin-left: 2px; }
.ai-check.pass .ai-check-head { background: var(--green-soft); color: var(--green); }
.ai-check.needs-work .ai-check-head { background: var(--amber-soft); color: var(--amber-text); }
.ai-check.error .ai-check-head { background: var(--red-soft); color: var(--red); }
.ai-check-head strong { color: var(--text); }
.ai-check-body { padding: 4px 14px 2px; max-height: min(28vh, 300px); overflow-y: auto; }
.ai-check.collapsed .ai-check-body { display: none; }
.ai-check-head .ai-collapse { margin-left: -6px; }
.ai-check-error { margin: 8px 14px; color: var(--text-2); }
.ai-check-actions { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ai-check-actions .spacer { flex: 1; }

.ai-result { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.ai-summary { margin: 0; font-size: 13.5px; }
.ai-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-item { display: flex; gap: 8px; align-items: flex-start; }
.ai-item small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 1px; }
.ai-item-req { font-weight: 500; }
.ai-item-icon { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.ai-item.is-done .ai-item-icon { background: var(--green-soft); color: var(--green); }
.ai-item.is-missing .ai-item-icon { background: var(--red-soft); color: var(--red); }
.ai-item.is-unclear .ai-item-icon { background: var(--amber-soft); color: var(--amber-text); }
.ai-done summary { cursor: pointer; color: var(--text-2); font-size: 12.5px; padding: 2px 0; }
.ai-done .ai-list { margin-top: 6px; }
.ai-sub { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 4px; }
.ai-links { display: flex; flex-direction: column; gap: 4px; }
.ai-link { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: baseline; }
.ai-link a, .ai-link > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ai-link small { grid-column: 2; color: var(--text-2); font-size: 12px; }
.ai-link-status { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: var(--bg-3); color: var(--text-2); white-space: nowrap; }
.ai-link.is-ok .ai-link-status { background: var(--green-soft); color: var(--green); }
.ai-link.is-broken .ai-link-status { background: var(--red-soft); color: var(--red); }
.ai-link.is-private .ai-link-status { background: var(--amber-soft); color: var(--amber-text); }
.ai-suggestions ul { margin: 0; padding-left: 18px; color: var(--text-2); }

.ai-badge {
  display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; white-space: nowrap;
  font-size: 11.5px; font-weight: 500; padding: 1px 8px 1px 6px; border-radius: 10px;
}
.ai-badge.passed { background: var(--purple-soft-2); color: var(--purple-2); }
.ai-badge.flagged { background: var(--amber-soft); color: var(--amber-text); }
.ai-badge:hover { filter: brightness(.96); }
.ai-verdict { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; }
.ai-verdict small { display: block; color: var(--text-2); font-size: 12px; }
.ai-verdict.pass { background: var(--green-soft); color: var(--green); }
.ai-verdict.needs-work { background: var(--amber-soft); color: var(--amber-text); }
.ai-verdict strong { color: var(--text); }
.ai-report .modal-body { max-height: calc(100vh - 200px); overflow-y: auto; }

/* ---- v1.4 video transcript */
.transcript-block { margin-top: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.transcript-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; flex-wrap: wrap; }
.transcript-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 6px 6px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 14px; color: var(--text);
}
.transcript-toggle:hover { background: var(--hover); }
.transcript-toggle .count { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.transcript-head .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.transcript-body { display: none; padding: 0 10px 10px; }
.transcript-block.open .transcript-body { display: block; }
.transcript-input { width: 100%; min-height: 120px; max-height: 360px; resize: vertical; font-size: 13px; line-height: 1.5; background: var(--bg); }
.loom-ask { width: 320px; display: flex; flex-direction: column; gap: 8px; }
.loom-ask p { margin: 0; }
.loom-ask .btn { align-self: flex-end; }
.subtask-picks { max-height: 55vh; overflow-y: auto; }

/* ---- v1.4 admin AI settings card (Team page) */
.ai-card h3 .tag { margin-left: 6px; font-weight: 400; }
.ai-setting { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--border); }
.ai-setting-head { display: flex; align-items: center; gap: 8px; }
.ai-key-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-key-row .input[type="password"] { flex: 1 1 260px; max-width: 420px; }
.ai-limit { width: 90px; }
.ai-dollar { color: var(--text-2); }
.ai-reviewers { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-reviewer {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--border-2);
  border-radius: 16px; cursor: pointer; font-size: 13px; user-select: none;
}
.ai-reviewer input { margin: 0 0 0 4px; }
.ai-reviewer.on, .ai-reviewer:has(input:checked) { border-color: var(--purple-border-2); background: var(--purple-soft); }
.ai-card textarea { resize: vertical; }

/* ---- v1.5 AI connector (was “Claude connector”) */
.connector-url { display: flex; align-items: center; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.connector-url code {
  flex: 1 1 240px; min-width: 0; padding: 7px 10px; border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--bg-2); font-size: 13px; overflow-wrap: anywhere; user-select: all;
}
.connector-steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.connector-steps .connector-url { margin-top: 6px; }
.connector-how summary, .connector-advanced summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 500; margin-top: 4px; }
.connector-advanced summary { color: var(--text-2); }
.connector-advanced[open] { display: flex; flex-direction: column; gap: 6px; }
.connection-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.connection-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.connection-row:last-child { border-bottom: 0; }
.connection-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--clay-soft); color: var(--clay); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.connection-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.connection-main strong { font-size: 14px; }
.connection-main small { font-size: 12px; }
.via-tag { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ---- v1.6 repeating tasks */
.badge-repeat { color: var(--primary); }
.repeat-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repeat-field .icon { vertical-align: -2px; }
.repeat-form { display: flex; flex-direction: column; gap: 14px; }
.repeat-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.repeat-row > span:first-child { min-width: 44px; color: var(--text-2); }
.repeat-n { width: 64px; text-align: center; }
.day-chips { display: inline-flex; gap: 4px; }
.day-chip {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--bg);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.day-chip:hover { border-color: var(--primary); color: var(--primary); }
.day-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.repeat-options { display: flex; flex-direction: column; gap: 8px; }
.repeat-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; flex-wrap: wrap; }
.repeat-radio input[type="radio"] { margin: 0; }
.repeat-radio .repeat-n { width: 56px; height: 28px; }
.repeat-preview {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 8px;
  background: var(--primary-soft); border: 1px solid var(--primary-border); min-height: 44px;
}
.repeat-preview strong { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.repeat-preview small { font-size: 12.5px; color: var(--text-2); }
.repeat-modal .modal-foot .spacer { flex: 1; }
.scheduler-status { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; }
.scheduler-status small { display: block; color: var(--text-2); font-size: 12.5px; }
.scheduler-status.ok { background: var(--green-soft); color: var(--green); }
.scheduler-status.warn { background: var(--amber-soft); color: var(--amber-text); }
.scheduler-status strong { color: var(--text); }
.scheduler-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ---- v1.7 inbox: tabs, bookmark / snooze / archive, reminders */
.inbox-tabs { margin: -6px 0 14px; border-bottom: 1px solid var(--border); padding: 0; }
.inbox-tabs .tab { border: 0; background: none; font: inherit; cursor: pointer; }
/* phones: the four Inbox tabs fit across without sliding */
@media (max-width: 480px) { .inbox-tabs { justify-content: space-between; } .inbox-tabs .tab { padding: 10px 4px 9px; gap: 4px; font-size: 13.5px; } .inbox-tabs .tab .icon { display: none; } }
.tab-count { margin-left: 2px; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 9px; background: var(--primary); color: #fff; line-height: 17px; }
.inbox-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.inbox-actions .icon-btn:not(.inbox-toggle) { opacity: 0; transition: opacity .1s; }
.inbox-item:hover .inbox-actions .icon-btn, .inbox-actions .icon-btn:focus-visible, .inbox-actions .icon-btn.on { opacity: 1; }
.inbox-actions .icon-btn.on { color: var(--primary); }
.inbox-actions .icon-btn.on .icon { fill: currentColor; }
@media (hover: none) { .inbox-actions .icon-btn { opacity: 1; } }
.inbox-system { background: #fff; box-shadow: 0 0 0 1px var(--border); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.inbox-system img { width: 22px; height: 22px; }
.inbox-tag { margin-left: 8px; font-size: 11px; vertical-align: 1px; }
.inbox-bookmark-mark { color: var(--primary); margin-left: 6px; vertical-align: -1px; }
.inbox-bookmark-mark .icon { fill: currentColor; }
.inbox-until { display: inline-flex; align-items: center; gap: 4px; color: var(--amber) !important; }
.snooze-pick { display: flex; flex-direction: column; gap: 8px; width: 260px; }
.snooze-pick .btn { align-self: flex-end; }
.reminder-row { border-top: 0; padding-top: 0; }
@media (max-width: 700px) {
  .inbox-actions .icon-btn:not(.inbox-toggle) { opacity: 1; }
  .inbox-item { gap: 10px; padding: 12px; flex-wrap: wrap; }
  .inbox-actions { width: 100%; justify-content: flex-end; margin-top: -6px; }
}

/* ---- v1.8 filter bar, sort, saved views */
.toolbar { flex-wrap: wrap; row-gap: 6px; }
.filter-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.filter-count { margin-left: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px;
  background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 280px;
}
.filter-chip { overflow: hidden; text-overflow: ellipsis; }
.filter-chip-x { display: inline-flex; border: 0; background: none; color: inherit; padding: 3px; border-radius: 50%; cursor: pointer; opacity: .7; }
.filter-chip-x:hover { opacity: 1; background: rgba(69, 115, 210, .14); }
.filter-clear { font-size: 12.5px; }
.popover-filter { padding: 0; }
.filter-panel { width: 340px; max-height: min(70vh, 560px); overflow-y: auto; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.filter-section { display: flex; flex-direction: column; gap: 6px; }
.filter-title { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.filter-options { display: flex; flex-direction: column; gap: 2px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.filter-option:hover { background: var(--hover); }
.filter-option input { margin: 0; }
.filter-option.on { font-weight: 500; }
.filter-labels { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.filter-labels .filter-option { padding: 2px 6px 2px 4px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill { border: 1px solid var(--border-2); background: var(--bg); border-radius: 12px; padding: 3px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text-2); }
.filter-pill.on { border-color: transparent; font-weight: 600; }
.filter-pill.pill-high.on { background: var(--red-pill); color: var(--red-pill-text); }
.filter-pill.pill-medium.on { background: var(--amber-soft-2); color: var(--amber-text); }
.filter-pill.pill-low.on { background: var(--teal-pill); color: var(--teal-pill-text); }
.filter-pill.pill-none.on { background: var(--bg-3); color: var(--text); }
.filter-range { display: flex; align-items: center; gap: 6px; }
.filter-range .input { flex: 1; min-width: 0; }
.filter-panel .segmented { align-self: flex-start; }
.views-btn { max-width: 240px; }
.views-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.views-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.list.sorted .drag-handle { visibility: hidden; }

/* cross-project views */
.saved-view .page-head { align-items: center; }
.view-tile { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.view-toolbar { padding: 0 0 12px; border: 0; }
.view-head, .view-row { grid-template-columns: minmax(240px, 1fr) 170px 150px 110px 100px; }
.view-head .cell:first-child { padding-left: 32px; }
.view-row .cell-name { padding-left: 8px; }
.saved-view .section-head a.section-name { color: inherit; text-decoration: none; }
.saved-view .section-head a.section-name:hover { text-decoration: underline; }
.saved-view .section-head .avatar { margin-left: 2px; }
.sb-view-icon { color: var(--sb-text-2); flex-shrink: 0; }
a.sb-empty { display: block; text-align: center; text-decoration: none; font-size: 12.5px; }
@media (max-width: 900px) {
  .view-head, .view-row { grid-template-columns: minmax(0, 1fr) 110px 90px; }
  .view-head .cell-project, .view-row .cell-project, .view-head .cell-assignee, .view-row .cell-assignee { display: none; }
}

/* ---- v1.9 task pane tabs, Settings page, saved views on Home, automations */
.feed-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin: 22px 0 6px; }
/* the Comments / Activity tabs stay at the top of the panel while you scroll a long conversation */
.pane-feed .feed-tabs { position: sticky; top: -18px; z-index: 3; background: var(--bg); padding-top: 12px; margin-top: 10px; }
@media (max-width: 700px) { .pane-feed .feed-tabs { top: -14px; } }
.feed-tab { border: 0; background: none; font: inherit; font-size: 14px; color: var(--text-2); padding: 6px 0 9px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.feed-tab:hover { color: var(--text); }
.feed-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.feed-tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-3); color: var(--text-2); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.feed-tab.active .feed-tab-count { background: var(--text); color: var(--bg); }
.pane-feed .feed-more { margin: 4px 0 6px; }
.pane-feed .feed-empty { margin: 14px 0 4px; }
.feed-activity .feed-auto-icon { color: var(--amber); justify-self: center; align-self: center; }
.bot-avatar { border-radius: 50%; background: var(--amber-soft); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comment.by-automation .comment-body { color: var(--text-2); }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1060px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; }
.settings-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none !important; font-weight: 500; }
.settings-link:hover { background: var(--hover); color: var(--text); }
.settings-link.active { background: var(--selected); color: var(--primary); }
.settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-blurb { margin: 0; }
.settings-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-card h3 .right { margin-left: auto; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; }
  .settings-link { white-space: nowrap; }
}

/* Saved views on Home, and "Save as view" in the filter bar */
.home-card.wide { grid-column: 1 / -1; min-height: 0; }
.view-links { display: flex; flex-direction: column; }
.view-link { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.view-link:hover { background: var(--hover); }
.view-link .project-dot { margin: 0 3px; }
.view-link-icon { color: var(--primary); flex-shrink: 0; }
.view-link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.view-link-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-link-text small { font-size: 12px; }
.view-link-lock { color: var(--text-3); display: inline-flex; }
.views-empty { text-align: left; padding: 6px 2px; max-width: none; }
.views-empty p { margin: 0 0 8px; }
.save-view-link { font-size: 12.5px; display: inline-flex; align-items: center; gap: 3px; }
.link-btn.muted { color: var(--text-2); font-size: 12.5px; }

/* Automations */
.auto-btn .filter-count { margin-left: 2px; }
.auto-modal .modal-body { max-height: min(72vh, 680px); overflow-y: auto; }
.auto-intro { margin: 0 0 14px; }
.auto-list { display: flex; flex-direction: column; gap: 8px; }
.auto-rule { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 12px 12px 12px 14px; background: var(--bg); }
.auto-rule.off { background: var(--bg-2); }
.auto-rule.off .auto-rule-main { opacity: .6; }
.auto-rule-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auto-rule-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.auto-rule-name { font-weight: 600; }
.auto-sentence { font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 1px; }
.auto-kw { font-weight: 600; color: var(--text); }
.auto-error { display: inline-flex; align-items: center; gap: 4px; }
.auto-rule-side { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.auto-subhead { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.auto-subhead small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.auto-subhead a { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 13px; }
.auto-subhead .link-btn { text-transform: none; letter-spacing: 0; font-size: 12.5px; margin-left: auto; display: inline-flex; align-items: center; gap: 3px; }
.auto-suggest { display: flex; flex-direction: column; gap: 6px; }
.auto-suggest .auto-subhead { margin-top: 4px; }
.auto-idea { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px dashed var(--border-2); border-radius: 10px; background: var(--bg); padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.auto-idea:hover { border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.auto-idea > span { flex: 1; }
.auto-idea svg:first-child { color: var(--amber); flex-shrink: 0; }
.auto-idea svg:last-child { color: var(--text-3); }
.auto-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.auto-card-head h3 { margin: 0; }

.auto-editor { display: flex; flex-direction: column; gap: 14px; }
.auto-step { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.auto-step-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.auto-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; }
.auto-badge.when { background: var(--amber-soft); color: var(--amber-text); }
.auto-badge.if { background: var(--bg-3); color: var(--text-2); }
.auto-badge.then { background: var(--primary-soft); color: var(--primary); }
.auto-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.auto-row.wrap { flex-wrap: wrap; }
.auto-row > select, .auto-row > input { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.auto-action { display: flex; align-items: flex-start; gap: 8px; }
.auto-action > .auto-row { flex: 1; }
.auto-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-3); color: var(--text-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 4px; }
.auto-col { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; min-width: 0; }
.auto-col .auto-multi { align-self: flex-start; }
.auto-text { width: 100%; flex: 1 1 100%; resize: vertical; font: inherit; }
.auto-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.auto-multi { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-multi-title { color: var(--text-2); }
.auto-multi.filter-on .auto-multi-title { color: inherit; }
.auto-pick { width: 280px; }
.auto-pick .label-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.auto-name { margin: 0; }
@media (max-width: 640px) {
  .auto-rule { flex-wrap: wrap; }
  .auto-rule-side { width: 100%; justify-content: flex-end; }
  .auto-btn-label { display: none; }
}

/* ---- Help page */
.help .page-head { align-items: flex-end; }
.help-search { width: 260px; max-width: 100%; }
.help-layout { max-width: 1120px; }
.help-nav .settings-link span:first-of-type { flex: 1; min-width: 0; }
.help-admin { font-size: 10.5px; padding: 1px 6px; }
.help-none { padding: 8px 10px; margin: 0; }
.help-article { max-width: 780px; min-width: 0; display: flex; flex-direction: column; gap: 14px; line-height: 1.6; font-size: 14.5px; }
.help-head { display: flex; align-items: center; gap: 12px; }
.help-head h1 { font-size: 24px; letter-spacing: -.01em; }
.help-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-intro { font-size: 16px; color: var(--text-2); margin: 0; }
.help-article p { margin: 0; }
.help-article h2 { font-size: 17px; margin-top: 12px; }
.help-article code { font-size: 12.5px; background: var(--bg-3); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.help-list, .help-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.help-steps li::marker { font-weight: 600; color: var(--primary); }
.help-tip { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; }
.help-tip svg { color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.help-shot { margin: 4px 0; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.help-shot-btn { display: block; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; box-shadow: var(--shadow-sm); }
.help-shot-btn:hover { border-color: var(--border-2); }
.help-shot-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.help-shot img { display: block; width: 100%; height: auto; }
.help-shot figcaption { font-size: 12.5px; color: var(--text-2); }
.help-keys { margin: 0; }
.help-pager { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.help-pager a { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.help-lightbox .lightbox-body img { max-height: 82vh; }
.shortcuts-more { margin: 14px 0 0; }
@media (max-width: 760px) {
  .help .page-head { align-items: stretch; flex-direction: column; }
  .help-search { width: 100%; }
}

/* ---- v1.11 vault */
.vault .page-head { align-items: center; }
.vault-head-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vault-search { width: 240px; max-width: 100%; }
.vault-gate { max-width: 440px; margin: 6vh auto 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.vault-gate h2 { font-size: 22px; }
.vault-gate p { margin: 0; line-height: 1.55; }
.vault-gate .form { gap: 12px; }
.vault-gate-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--amber-soft); color: var(--amber); display: inline-flex; align-items: center; justify-content: center; }
.vault-gate .link-btn { align-self: flex-start; font-size: 13px; }
.vault-note { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-soft); color: var(--amber-text-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.vault-note svg { flex-shrink: 0; margin-top: 2px; }
.vault-layout { max-width: 1120px; }
.vault-nav .settings-link { position: relative; }
.vault-folder-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-admins { font-size: 10px; padding: 1px 6px; display: inline-flex; align-items: center; gap: 3px; }
.vault-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.vault-folder-menu { opacity: 0; margin-right: -4px; }
.vault-nav .settings-link:hover .vault-folder-menu, .vault-folder-menu:focus-visible { opacity: 1; }
.vault-new-folder { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 6px 10px; }
.vault-waiting { padding: 4px 10px; margin: 6px 0 0; }
.vault-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-width: 0; background: var(--bg); }
.vault-list > .empty-state { border: 0; }
.vault-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; min-width: 0; }
.vault-row:last-child { border-bottom: 0; }
.vault-row:hover, .vault-row:focus-visible { background: var(--hover); outline: none; }
.vault-tile { width: 32px; height: 32px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vault-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vault-row-main strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-row-folder { white-space: nowrap; }
.vault-row-actions { display: flex; gap: 2px; flex-shrink: 0; }
.row-center { display: flex; justify-content: center; gap: 8px; }
.vault-modal .modal-body { max-height: min(74vh, 720px); overflow-y: auto; }
.vault-title { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.vault-entry { display: flex; flex-direction: column; gap: 2px; }
.vault-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.vault-field:last-of-type { border-bottom: 0; }
.vault-label { color: var(--text-2); font-size: 13px; }
.vault-value { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.vault-value a { overflow-wrap: anywhere; margin-right: 4px; }
.vault-text { overflow-wrap: anywhere; margin-right: 4px; }
.vault-secret.hidden-secret { letter-spacing: 2px; color: var(--text-2); }
.vault-totp { font-size: 20px; letter-spacing: 1px; margin-right: 6px; }
.vault-notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.5; }
.vault-meta { margin: 10px 0 0; }
.vault-form .input-group .input { min-width: 0; }
.vault-import { display: flex; flex-direction: column; gap: 14px; }
.vault-import > p { margin: 0; }
.vault-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.vault-map .filter-title { grid-column: 1 / -1; }
.vault-map-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }
.vault-map-row select { min-width: 0; }
.vault-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.vault-warn svg { flex-shrink: 0; margin-top: 2px; }
.vault-preview { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }
.vault-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vault-preview-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vault-preview-table th { text-align: left; color: var(--text-3); font-weight: 600; padding: 4px 8px 4px 0; }
.vault-preview-table td { padding: 5px 8px 5px 0; border-top: 1px solid var(--border); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 8px; color: var(--green); }
.vault-done h3 { color: var(--text); }
.vault-done p { color: var(--text-2); margin: 0; max-width: 46ch; }
.vault-history { display: flex; flex-direction: column; }
.vault-history-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.vault-history-row:last-child { border-bottom: 0; }
.vault-history-row time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
@media (max-width: 760px) {
  .vault-search { width: 100%; order: 10; }
  .vault-row-folder { display: none; }
  .vault-map { grid-template-columns: minmax(0, 1fr); }
  .vault-field { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

.vault-decrypted { display: flex; gap: 8px; align-items: flex-start; color: var(--green); margin: 0; }
.vault-decrypted svg { flex-shrink: 0; margin-top: 2px; }
.vault-decrypted span { color: var(--text); }
.vault-legacy { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--amber-border); background: var(--amber-faint); border-radius: 10px; padding: 10px 12px; }

.vault-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vault-pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vault-pager.top { gap: 6px; }
.vault-pager .vault-range { font-variant-numeric: tabular-nums; }
.vault-pager .vault-page { min-width: 34px; justify-content: center; font-variant-numeric: tabular-nums; }
.vault-pager .vault-gap { padding: 0 4px; }

/* ---- v1.18 command box (palette.js) */
.palette-backdrop { position: fixed; inset: 0; z-index: 450; background: rgba(30, 31, 33, .32); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette { width: 100%; max-width: 620px; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; animation: wn-in .14s ease both; }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.palette-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); }
.palette-list { overflow-y: auto; padding: 6px; }
.palette-group { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); min-width: 0; }
.palette-item .icon { color: var(--text-2); }
.palette-item.active { background: var(--selected); }
.palette-item.active .icon { color: var(--primary); }
.palette-item.done .palette-label { text-decoration: line-through; color: var(--text-2); }
.palette-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-sub { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.palette-empty { padding: 18px 12px; color: var(--text-2); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; flex-wrap: wrap; }
.palette-foot kbd { margin-right: 2px; }
@media (max-width: 560px) { .palette-backdrop { padding-top: 8vh; } .palette-foot { display: none; } }

/* ---- v1.18 link previews (linkpreview.js) */
.link-previews { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-width: 520px; }
.link-previews[hidden] { display: none; }
.desc-previews { margin-top: 10px; }
.lp { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden; color: var(--text); text-decoration: none !important; }
a.lp:hover { border-color: var(--border-2); background: var(--hover); }
.lp-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--bg-3); cursor: pointer; overflow: hidden; }
.lp-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-thumb-blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.lp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(30, 31, 33, .72); color: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); transition: transform .12s, background .12s; }
.lp-video .lp-play .icon { fill: currentColor; }
.lp-thumb:hover .lp-play { transform: translate(-50%, -50%) scale(1.07); background: var(--accent); }
.lp-dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 600; }
.lp-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-meta { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; min-width: 0; }
.lp-provider { font-size: 11.5px; font-weight: 600; color: var(--accent); flex-shrink: 0; }
.lp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.lp-link { display: flex; align-items: stretch; }
.lp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; }
.lp-site { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lp-icon { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.lp-link .lp-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; }
.lp-desc { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-image { width: 112px; flex-shrink: 0; object-fit: cover; border-left: 1px solid var(--border); background: var(--bg-3); }
.lp-doc { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.lp-doc-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.lp-doc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lp-doc-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-doc-text small { color: var(--text-3); }
.lp-out { color: var(--text-3); }
@media (max-width: 520px) { .lp-image { width: 84px; } }

/* ---- v1.18 workload (admins) */
.workload { max-width: 1100px; }
.workload .page-head p { margin: 4px 0 0; }
.wl-project { max-width: 240px; }
.wl-summary { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 14px; color: var(--text-2); }
.wl-summary strong { color: var(--text); font-size: 16px; margin-right: 2px; }
.wl-summary .warn strong { color: var(--red); }
.wl-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.wl-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.wl-table th { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 8px; border-bottom: 1px solid var(--border); background: var(--bg-2); white-space: nowrap; }
.wl-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: center; }
.wl-table tr:last-child td { border-bottom: 0; }
.wl-table th.wl-person, .wl-table td.wl-person { text-align: left; }
.wl-person { white-space: nowrap; }
td.wl-person > * { vertical-align: middle; }
td.wl-person .avatar { margin-right: 10px; }
td.wl-person { font-weight: 500; }
.wl-nobody-avatar { width: 26px; height: 26px; background: var(--bg-3); color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; }
.wl-nobody td.wl-person { color: var(--text-2); font-weight: 400; }
.wl-count { min-width: 40px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--primary) calc(var(--heat) * 34% + 6%), var(--bg)); }
.wl-overdue .wl-count { background: color-mix(in srgb, var(--red) calc(var(--heat) * 34% + 8%), var(--bg)); color: var(--red-pill-text); }
.wl-count:hover { border-color: var(--border-2); }
.wl-cell.open .wl-count { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.wl-zero { color: var(--text-3); }
.wl-total { font-weight: 600; }
.wl-done { color: var(--green); font-weight: 600; }
.wl-detail td { background: var(--bg-2); padding: 0 8px 10px; text-align: left; }
.wl-tasks { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.wl-tasks-head { display: flex; gap: 10px; align-items: baseline; padding: 2px 8px 6px; }
.wl-task { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; min-width: 0; width: 100%; }
.wl-task:hover { background: var(--hover); }
.wl-task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-due { font-size: 12.5px; color: var(--text-2); min-width: 64px; text-align: right; }
.wl-due.due-overdue { color: var(--red); }
.wl-due.due-today { color: var(--green); }

/* ---- v1.18 recycle bin */
.trash { max-width: 900px; }
.trash .page-head p { margin: 4px 0 0; max-width: 560px; }
.trash-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.trash-row:last-child { border-bottom: 0; }
.trash-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); color: var(--text-2); flex-shrink: 0; }
.trash-project { background: var(--primary-soft); color: var(--primary); }
.trash-main { flex: 1; min-width: 0; }
.trash-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trash-title strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.trash-actions { display: flex; gap: 4px; flex-shrink: 0; }
@media (max-width: 600px) { .trash-row { flex-wrap: wrap; } .trash-actions { width: 100%; justify-content: flex-end; } }

/* ---- v1.18 backups card + push devices */
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.backup-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.backup-row:last-child { border-bottom: 0; }
.backup-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-devices { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 8px; }
.push-device { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.push-device .icon { color: var(--text-2); }

/* ---- v1.19 celebrations (celebrate.js) */
.celebration { position: fixed; z-index: 1001; bottom: -90px; font-size: 76px; line-height: 1; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.celebration.from-left { left: -90px; animation: fly-right 1.9s cubic-bezier(.25, .6, .35, 1) forwards; }
.celebration.from-right { right: -90px; animation: fly-left 1.9s cubic-bezier(.25, .6, .35, 1) forwards; }
@keyframes fly-right {
  0% { transform: translate(0, 0) rotate(-18deg); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translate(55vw, calc(var(--rise) * -1)) rotate(6deg); }
  100% { transform: translate(115vw, calc(var(--rise) * -1.35)) rotate(20deg); opacity: .9; }
}
@keyframes fly-left {
  0% { transform: translate(0, 0) rotate(18deg) scaleX(-1); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translate(-55vw, calc(var(--rise) * -1)) rotate(-6deg) scaleX(-1); }
  100% { transform: translate(-115vw, calc(var(--rise) * -1.35)) rotate(-20deg) scaleX(-1); opacity: .9; }
}

/* ---- v1.19 kudos */
.kudos-btn { font-size: 17px; line-height: 1; }
.kudos-emoji { display: flex; flex-wrap: wrap; gap: 6px; }
.kudos-emoji-btn { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--bg); font-size: 20px; cursor: pointer; }
.kudos-emoji-btn:hover { border-color: var(--border-2); }
.kudos-emoji-btn.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.kudos-about { margin: 0 0 4px; }
.kudos-week { margin: 0 0 8px; }
.kudos-list { display: flex; flex-direction: column; }
.kudos-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.kudos-row:first-child { border-top: 0; }
.kudos-big { font-size: 22px; line-height: 1.2; width: 28px; text-align: center; flex-shrink: 0; }
.kudos-main { flex: 1; min-width: 0; font-size: 13.5px; }
.kudos-msg { color: var(--text); margin-top: 2px; overflow-wrap: anywhere; }
.kudos-task { font-size: 12.5px; padding: 0; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---- v1.19 duplicate */
.dup-options { display: flex; flex-direction: column; gap: 8px; }
.dup-option { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.dup-option input { margin-top: 3px; }
.dup-option span { display: flex; flex-direction: column; }
.dup-option strong { font-weight: 500; }

/* ---- v1.19 audit log */
.audit-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.audit-filters .input { max-width: 220px; }
.audit-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.audit-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.audit-row:last-child { border-bottom: 0; }
.audit-sys { width: 26px; height: 26px; background: var(--bg-3); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.audit-main { flex: 1; min-width: 0; }
.audit-text { font-size: 13.5px; overflow-wrap: anywhere; }
.audit-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.audit-area { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
.audit-more { margin-top: 10px; }
@media (max-width: 600px) { .audit-area { display: none; } }

/* ---- v1.19 Ask Stax */
.ask-btn .icon { color: var(--purple); }
.ask-modal .modal-body { padding: 0; }
.ask-title { display: inline-flex; align-items: center; gap: 8px; }
.ask-title .icon { color: var(--purple); }
.ask-body { display: flex; flex-direction: column; max-height: min(70vh, 640px); }
.ask-convo { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 180px; }
.ask-empty { text-align: center; color: var(--text-2); padding: 10px 0; }
.ask-badge { width: 56px; height: 56px; border-radius: 16px; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--purple), var(--primary)); margin-bottom: 8px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.ask-chip { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 16px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ask-chip:hover { border-color: var(--purple-border-2); background: var(--purple-soft); }
.ask-q { align-self: flex-end; max-width: 85%; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; overflow-wrap: anywhere; }
.ask-a { align-self: flex-start; max-width: 100%; background: var(--bg-2); border: 1px solid var(--border); padding: 10px 14px; border-radius: 14px 14px 14px 4px; }
.ask-answer > :first-child { margin-top: 0; }
.ask-answer > :last-child { margin-bottom: 0; }
.ask-error { color: var(--red); background: var(--red-faint); border-color: transparent; }
.ask-thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.ask-dots { display: inline-flex; gap: 4px; }
.ask-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); animation: ask-dot 1s infinite ease-in-out; }
.ask-dots i:nth-child(2) { animation-delay: .15s; }
.ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.ask-looked { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.ask-looked ul { margin: 4px 0 0; padding-left: 18px; }
.ask-bar { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.ask-input { flex: 1; resize: none; }
@media (max-width: 560px) { .ask-btn span { display: none; } }

/* ---- v1.19 passwords linked to projects and clients */
.pw-btn { white-space: nowrap; }
.pw-btn .icon { color: var(--amber); }
.pw-pop { width: 320px; max-width: 86vw; display: flex; flex-direction: column; gap: 8px; }
.pw-head { display: flex; align-items: center; gap: 6px; }
.pw-unlock { display: flex; gap: 6px; }
.pw-unlock .input { flex: 1; min-width: 0; }
.pw-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.pw-row { display: flex; align-items: center; gap: 2px; padding: 4px 0; border-top: 1px solid var(--border); }
.pw-row:first-child { border-top: 0; }
.pw-name { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.pw-name:hover { background: var(--hover); }
.pw-name strong, .pw-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-name strong { font-weight: 500; }
.pw-all { align-self: flex-start; }
.vault-links-edit, .vault-links-view { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vault-link-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 12px; background: var(--bg-3); font-size: 12.5px; max-width: 100%; }
.vault-link-chip a { color: var(--text); }
.vault-link-x { border: 0; background: none; padding: 0; color: var(--text-2); cursor: pointer; display: inline-flex; }
.vault-link-picker { width: 300px; max-width: 86vw; display: flex; flex-direction: column; gap: 6px; }
.vault-link-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.vault-link-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.vault-link-opt span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-link-opt:hover { background: var(--hover); }
.vault-link-opt.on { color: var(--primary); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .celebration { display: none; } .ask-dots i { animation: none; } }

/* ---- v1.20 voice notes (voice.js) */
.voice-note { display: inline-flex; align-items: center; gap: 8px; min-width: 0; width: 280px; max-width: 100%; padding: 5px 8px 5px 6px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); }
.voice-note.playing { border-color: var(--primary-border); background: var(--primary-soft); }
.vn-mic { color: var(--text-3); display: inline-flex; padding-left: 2px; }
.vn-play { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
.vn-play:hover { background: var(--primary-2); }
.vn-play .icon { fill: currentColor; }
.vn-bar { position: relative; flex: 1; min-width: 40px; height: 6px; border-radius: 3px; background: var(--bg-3); cursor: pointer; }
.vn-bar:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.vn-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--primary); }
.vn-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vn-speed { border: 0; background: none; color: var(--text-2); font: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 4px; border-radius: 6px; cursor: pointer; min-width: 30px; }
.vn-speed:hover { background: var(--hover); color: var(--text); }
.voice-note.vn-error .vn-play { background: var(--text-3); }
.comment-voice { position: relative; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; }
.comment-voice.uploading .voice-note { opacity: .75; }
.comment-voice .progress { position: absolute; left: 14px; right: 14px; bottom: -4px; height: 3px; }
.comment-voice .progress-bar { background: var(--primary); }
.pending-file.is-voice { max-width: 320px; border: 0; background: none; padding-right: 22px; }
.pending-file.is-voice .voice-note { width: 260px; }
.pending-file.is-voice .pending-remove { top: 50%; transform: translateY(-50%); right: 0; }
.file-icon.voice-icon { color: var(--primary); }
.listen-body { display: flex; justify-content: center; padding: 8px 0; }
.listen-body .voice-note { width: 100%; }
/* recording */
.rec-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.rec-bar[hidden] { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rec-pulse 1.1s ease-in-out infinite; }
@keyframes rec-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.rec-label { font-weight: 600; color: var(--red); }
.rec-time { font-variant-numeric: tabular-nums; color: var(--text-2); }
.rec-stop .icon { fill: currentColor; }
.composer-box.recording { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ---- v1.20 pinned comments */
.pinned-box { margin: 4px 0 12px; border: 1px solid var(--amber-border); background: var(--amber-faint); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.pinned-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--amber-text); }
.pinned-head .icon { transform: rotate(35deg); }
.pinned-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.pinned-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; flex-wrap: wrap; }
.pinned-meta .link-btn { font-size: 12.5px; }
.pinned-body { font-size: 13.5px; max-height: 4.6em; overflow: hidden; overflow-wrap: anywhere; }
.pinned-body > :first-child { margin-top: 0; }
.pinned-body > :last-child { margin-bottom: 0; }
.pinned-item.open .pinned-body { max-height: none; }
.pinned-more { align-self: flex-start; font-size: 12.5px; }
.pin-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-text); }
.comment.flash { animation: comment-flash 1.6s ease-out; border-radius: 8px; }
@keyframes comment-flash { 0%, 30% { background: var(--amber-soft); } 100% { background: transparent; } }

/* ---- v1.20 birthdays & work anniversaries (occasions.js) */
.home-card.occasions-card { min-height: 0; }
.occasion-today { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; background: linear-gradient(120deg, var(--purple-soft), var(--primary-soft)); flex-wrap: wrap; }
.occasion-today.anniversary { background: linear-gradient(120deg, var(--amber-soft), var(--green-soft)); }
.occasion-big { font-size: 28px; line-height: 1; }
.occasion-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.occasion-today .occasion-main { flex: 1 1 150px; }
.occasion-today .occasion-main strong { white-space: normal; }
.occasion-today .btn { margin-left: auto; }
.occasion-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occasion-list { display: flex; flex-direction: column; }
.occasion-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.occasion-row:first-child { border-top: 0; }
.occasion-when { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 500; white-space: nowrap; }
.occasion-empty { margin: 0 0 8px; }
.occasion-ask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: 13px; }
.occasion-ask .icon { color: var(--purple); }
.occasion-ask span { flex: 1 1 180px; }
.birthday-field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.birthday-field .input { width: auto; min-width: 80px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-pair { grid-template-columns: minmax(0, 1fr); } }

/* ---- v1.20 your month in Stax (recap.js) */
.recap.modal { overflow: hidden; }
.recap .modal-head { position: absolute; top: 8px; right: 8px; padding: 0; border: 0; background: none; z-index: 2; }
.recap .modal-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.recap .modal-head .icon-btn { color: #fff; background: rgba(0, 0, 0, .18); }
.recap.modal { position: relative; }
.recap .modal-body { padding: 0; }
.recap .modal-foot { align-items: center; gap: 8px; flex-wrap: wrap; }
.recap-month { width: auto; max-width: 170px; }
.recap-stage { min-height: 440px; display: flex; }
.recap-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 32px 36px; color: #fff; cursor: pointer; user-select: none; animation: recap-in .35s ease-out; }
@keyframes recap-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.recap-slide.loading { cursor: default; }
.recap-slide.g0 { background: linear-gradient(150deg, var(--purple), var(--primary)); }
.recap-slide.g1 { background: linear-gradient(150deg, var(--green), var(--primary)); }
.recap-slide.g2 { background: linear-gradient(150deg, var(--amber), var(--red)); }
.recap-slide.g3 { background: linear-gradient(150deg, var(--primary), var(--purple)); }
.recap-slide.g4 { background: linear-gradient(150deg, var(--red), var(--purple)); }
.recap-slide.g5 { background: linear-gradient(150deg, var(--accent), var(--green)); }
.recap-emoji { font-size: 64px; line-height: 1; margin-bottom: 14px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.recap-person { margin-bottom: 14px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .6); }
.recap-big { font-size: 64px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.recap-big.smaller { font-size: 36px; }
.recap-title { font-size: 20px; font-weight: 600; margin-top: 6px; opacity: .95; }
.recap-text { font-size: 15px; line-height: 1.5; margin: 14px 0 0; max-width: 320px; opacity: .92; }
.recap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 20px; width: 100%; }
.recap-stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.recap-stat strong { font-size: 22px; font-weight: 700; }
.recap-stat small { font-size: 11px; opacity: .9; line-height: 1.25; }
.recap-dots { display: flex; gap: 5px; }
.recap-dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; background: var(--border-2); cursor: pointer; }
.recap-dot.on { background: var(--primary); width: 18px; border-radius: 4px; }
.recap-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(120deg, var(--purple-soft), var(--primary-soft)); border: 1px solid var(--purple-border); }
.recap-banner-emoji { font-size: 28px; line-height: 1; }
.recap-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recap-banner-text small { color: var(--text-2); }
.recap-card .btn { margin-right: 6px; }
@media (max-width: 560px) {
  .recap-stage { min-height: 400px; }
  .recap-big { font-size: 52px; }
  .recap-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .recap-banner { flex-wrap: wrap; }
  .recap .modal-foot .recap-dots { order: -1; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .rec-dot, .recap-slide, .comment.flash { animation: none; } }

/* ---- v1.21 project icons (projecticons.js) */
.project-badge { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 28%; background: var(--pc); color: var(--pic, #fff); line-height: 1; }
.project-badge.is-emoji { background: color-mix(in srgb, var(--pc) 20%, transparent); }
/* the icon keeps the project's icon colour, whatever list it's in (the sidebar greys its own icons) */
.project-badge .icon { flex-shrink: 0; color: inherit !important; opacity: 1 !important; }
.project-emoji { line-height: 1; }
.project-badge.tile-icon { border-radius: 11px; }
.project-badge.project-tile { border-radius: 9px; }
.project-tile-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 9px; display: inline-flex; flex-shrink: 0; }
.project-tile-btn:hover .project-badge { filter: brightness(.94); }
.project-tile-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.project-chip .project-badge { border-radius: 4px; }
.picon-pop { width: 340px; max-width: 88vw; max-height: min(72vh, 580px); overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.picon-head { display: flex; align-items: center; gap: 10px; }
.picon-colors .swatches { gap: 6px; }
.picon-label { margin-top: 4px; }
.picon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.picon-btn { aspect-ratio: 1; border: 0; border-radius: 8px; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.picon-btn:hover { background: var(--hover); color: var(--text); }
.picon-btn.on { background: var(--pc); color: var(--pic, #fff); }
.picon-colors.dim { opacity: .5; }
.swatch-btn.light { box-shadow: inset 0 0 0 1px var(--border-2); color: var(--text); }
.swatch-btn.light.selected { box-shadow: inset 0 0 0 1px var(--border-2), 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.picon-btn.emoji.on { background: color-mix(in srgb, var(--pc) 22%, transparent); box-shadow: inset 0 0 0 2px var(--pc); }
.new-project-look { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ov-icon-btn { align-self: flex-start; margin-bottom: 10px; }

/* ---- v1.21.5 links in the editor, phones */
.link-bubble { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; max-width: min(360px, 86vw); }
.link-bubble-open { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 13px; font-weight: 500; }
.link-bubble-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-scroll { overflow-x: hidden; }
/* iPhone zooms in on any box with text smaller than 16px when you tap it (and the page then scrolls sideways) */
@media (hover: none) and (pointer: coarse) {
  input:not(.pane-title):not(.input-lg):not([type=checkbox]):not([type=radio]), textarea:not(.pane-title), select, [contenteditable="true"] { font-size: 16px !important; }
}

/* ---- v1.22 saved replies (replies.js) */
.replies-pop { width: 360px; max-width: 90vw; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.replies-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px 2px; }
.replies-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.replies-sub { padding: 8px 6px 2px; }
.reply-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 6px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.reply-item:hover, .reply-item:focus-visible { background: var(--hover); outline: none; }
.reply-line { display: flex; align-items: flex-start; gap: 2px; }
.reply-line .reply-item { flex: 1; min-width: 0; }
.reply-edit { margin-top: 5px; opacity: .6; }
.reply-line:hover .reply-edit, .reply-edit:focus-visible { opacity: 1; }
.reply-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.reply-var { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); font: inherit; color: var(--text); cursor: pointer; }
.reply-var:hover { border-color: var(--primary); background: var(--primary-soft); }
.reply-var small { color: var(--text-2); }
.reply-num { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; background: var(--bg-3); color: var(--text-2); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.reply-num:empty { visibility: hidden; }
.reply-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.reply-text strong { font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reply-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-done { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--green); }
.reply-key { flex-shrink: 0; margin-top: 1px; }
.replies-empty { display: flex; flex-direction: column; gap: 6px; padding: 2px 4px; }
.replies-empty p { margin: 0 0 2px; }
.reply-starter { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border: 1px dashed var(--border-2); border-radius: 8px; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.reply-starter:hover { border-color: var(--primary); background: var(--primary-soft); }
.reply-starter span { display: flex; flex-direction: column; min-width: 0; }
.reply-starter small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replies-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
.reply-complete-chip { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 10px; border-bottom: 1px solid var(--border); background: var(--green-soft); color: var(--green); font-size: 12.5px; font-weight: 500; border-radius: 10px 10px 0 0; }
.reply-complete-chip[hidden] { display: none; }
.reply-complete-chip span { flex: 1; }
.replies-card-head { display: flex; align-items: center; gap: 8px; }
.replies-card-head h3 { margin: 0; }
.replies-card .icon { vertical-align: -2px; }
.reply-rows { display: flex; flex-direction: column; }
.reply-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.reply-row:first-child { border-top: 0; }
.reply-preview { font-size: 13px; color: var(--text-2); max-height: 3.2em; overflow: hidden; }
.reply-preview > :first-child { margin-top: 0; }
.reply-actions { display: flex; gap: 2px; flex-shrink: 0; }
.replies-team-title { margin: 14px 0 2px; font-size: 13px; color: var(--text-2); }
.icon.flip { transform: rotate(180deg); }

/* ---- v1.22.1 task numbers */
.task-num { flex-shrink: 0; border: 0; background: none; padding: 1px 4px; border-radius: 4px; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-3); cursor: pointer; line-height: 1.4; }
.task-num:hover { color: var(--primary); background: var(--primary-soft); }
.task-row.done .task-num { opacity: .7; }
.card-foot .task-num { font-size: 11.5px; }
.pane-num { font-size: 13px; margin-left: 8px; }
@media (max-width: 700px) { .task-row .task-num { font-size: 11.5px; padding: 1px 2px; } }

/* ---- v1.23 announcements (announce.js) */
.ann-backdrop { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px;
  background: rgba(15, 16, 18, 0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: background .3s ease, backdrop-filter .3s ease; }
.ann-backdrop.in { background: rgba(15, 16, 18, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ann-backdrop.leaving { background: rgba(15, 16, 18, 0); backdrop-filter: blur(0); }
.ann-card { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(24px) scale(.92); }
.ann-backdrop.in .ann-card { animation: ann-in .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.ann-card.leaving { animation: ann-out .3s ease-in forwards !important; }
@keyframes ann-in { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes ann-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-12px) scale(.96); } }
.ann-hero { position: relative; height: 128px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--purple)); }
.ann-celebrate .ann-hero { background: linear-gradient(135deg, var(--amber), var(--accent), var(--purple)); }
.ann-important .ann-hero { background: linear-gradient(135deg, var(--red), var(--amber)); }
.ann-orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); animation: ann-float 6s ease-in-out infinite; }
.ann-orb.o1 { width: 140px; height: 140px; left: -30px; top: -50px; }
.ann-orb.o2 { width: 90px; height: 90px; right: 30px; bottom: -40px; animation-delay: -2s; }
.ann-orb.o3 { width: 46px; height: 46px; right: 26%; top: 14px; animation-delay: -4s; }
@keyframes ann-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -8px); } }
.ann-icon { position: relative; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .2); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); opacity: 0; }
.ann-backdrop.in .ann-icon { animation: ann-pop .7s .18s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes ann-pop { 0% { opacity: 0; transform: scale(.3) rotate(-18deg); } 100% { opacity: 1; transform: none; } }
.ann-important .ann-icon::after { content: ''; position: absolute; inset: -6px; border-radius: 26px; border: 2px solid rgba(255, 255, 255, .7); animation: ann-ring 1.6s ease-out infinite; }
@keyframes ann-ring { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.ann-main { padding: 18px 24px 6px; overflow-y: auto; }
.ann-from { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.ann-title { font-size: 22px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
.ann-text { font-size: 15px; color: var(--text); line-height: 1.6; }
.ann-text > :first-child { margin-top: 0; }
.ann-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px 20px; flex-wrap: wrap; }
.ann-ack { height: 42px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.ann-important .ann-ack { background: var(--red); border-color: var(--red); }
@media (max-width: 560px) { .ann-foot .ann-ack { width: 100%; justify-content: center; } .ann-title { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .ann-backdrop.in .ann-card, .ann-backdrop.in .ann-icon { animation: none; opacity: 1; transform: none; }
  .ann-orb, .ann-important .ann-icon::after { animation: none; }
}
/* writing one (and a saved reply): the message box looks like the other boxes */
.ann-editor, .reply-editor { border: 1px solid var(--border-2); border-radius: 8px; background: var(--bg); }
.ann-editor:focus-within, .reply-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ann-editor .editor-area, .reply-editor .editor-area { padding: 8px 10px; min-height: 96px; max-height: 300px; overflow-y: auto; }
.ann-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ann-style { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ann-style small { color: var(--text-2); font-size: 11.5px; }
.ann-style.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ann-style-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; margin-bottom: 4px; background: linear-gradient(135deg, var(--primary), var(--purple)); }
.ann-style.ann-celebrate .ann-style-icon { background: linear-gradient(135deg, var(--amber), var(--accent)); }
.ann-style.ann-important .ann-style-icon { background: linear-gradient(135deg, var(--red), var(--amber)); }
.ann-who { display: flex; flex-direction: column; gap: 8px; }
.ann-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; max-height: 200px; overflow-y: auto; }
.ann-person { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.ann-person:hover { background: var(--hover); }
.ann-compose .modal-foot .spacer { flex: 1; }
@media (max-width: 560px) { .ann-styles { grid-template-columns: minmax(0, 1fr); } }
/* Settings → Announcements */
.ann-card-head { display: flex; align-items: center; gap: 8px; }
.ann-card-head h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.ann-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.ann-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--bg); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ann-row:last-child { border-bottom: 0; }
.ann-row:hover { background: var(--hover); }
.ann-row.ended { opacity: .65; }
.ann-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ann-row-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ann-row-acks { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ann-dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--purple)); }
.ann-dot.ann-celebrate { background: linear-gradient(135deg, var(--amber), var(--accent)); }
.ann-dot.ann-important { background: linear-gradient(135deg, var(--red), var(--amber)); }
.ann-progress { display: block; height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; margin: 10px 0 4px; }
.ann-progress.small { width: 70px; height: 6px; margin: 0; }
.ann-progress span { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .3s; }
.ann-detail-head { display: flex; align-items: center; gap: 10px; }
.ann-detail-head div { display: flex; flex-direction: column; min-width: 0; }
.ann-people-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; margin: 6px 0 12px; }
.ann-person-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ann-person-row:first-child { border-top: 0; }
.ann-acked { display: inline-flex; align-items: center; gap: 4px; color: var(--green); }
.ann-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---- v1.24 Inbox: tick several rows and act on them at once (inbox.js) */
.inbox-check { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 36px; margin: 0 -6px 0 -4px; cursor: pointer; opacity: 0; transition: opacity .1s; }
.inbox-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--primary); }
.inbox-item:hover .inbox-check, .inbox-check:focus-within, .inbox.picking .inbox-check { opacity: 1; }
@media (hover: none) { .inbox-check { opacity: 1; } }
.inbox-item.picked, .inbox-item.picked:hover { background: var(--selected); }
.inbox-selbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 7px 10px 7px 16px; margin: -4px 0 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); box-shadow: var(--shadow-sm); }
.inbox-selbar[hidden] { display: none; }
.inbox-selbar .inbox-check { opacity: 1; width: auto; height: 30px; margin: 0 4px 0 0; }
.inbox-selbar-count { font-size: 13.5px; white-space: nowrap; }
.inbox-selbar-all { font-size: 13px; margin-left: 4px; white-space: nowrap; }
@media (max-width: 700px) {
  .inbox-selbar { padding-left: 12px; }
  .inbox-selbar-text { display: none; }
  .inbox-selbar .btn { padding-left: 9px; padding-right: 9px; }
  .inbox-check { margin: 0 -2px 0 -2px; }
}
@media (max-width: 480px) { .inbox-selbar-all { display: none; } .inbox-selbar { gap: 4px; } } /* the tick box on the left selects all */

/* ---- v1.25 SOPs (sops.js, views/sops.js) */
.sb-badge.sb-badge-quiet { background: var(--primary); }
.sops-page, .sop-page { max-width: 920px; }
.sop-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sop-search { flex: 1 1 240px; max-width: 360px; }
.seg-count { margin-left: 6px; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.sop-tagbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sop-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; line-height: 18px; padding: 1px 9px; border-radius: 10px; background: var(--bg-3); color: var(--text-2); border: 1px solid transparent; white-space: nowrap; font-family: inherit; }
button.sop-tag { cursor: pointer; }
button.sop-tag:hover { border-color: var(--border-2); }
button.sop-tag.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.sop-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sop-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; background: var(--bg); }
.sop-row:last-child { border-bottom: 0; }
.sop-row:hover { background: var(--hover); }
.sop-row.needs { box-shadow: inset 3px 0 0 var(--primary); }
.sop-tile { flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.sop-tile.small { width: 28px; height: 28px; border-radius: 7px; }
.sop-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sop-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sop-row-title strong { font-size: 15px; }
.sop-row-excerpt { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sop-row-meta { font-size: 12px; }
.sop-row-status { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.sop-status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.sop-status.please { background: var(--primary-soft); color: var(--primary); }
.sop-status.done { color: var(--green); }
.sop-status.review { background: var(--amber-soft-2); color: var(--amber-text); }
.sop-readcount { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
@media (max-width: 640px) {
  .sop-row { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .sop-row-main { flex-basis: calc(100% - 50px); }
  .sop-row-status { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; padding-left: 46px; }
  .sop-search { max-width: none; }
}

/* reading one */
.sop-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sop-back:hover { color: var(--text); }
.sop-head { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.sop-title-row { display: flex; align-items: flex-start; gap: 10px; }
.sop-title { font-size: 26px; line-height: 1.25; letter-spacing: -.01em; min-width: 0; overflow-wrap: anywhere; }
.sop-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sop-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.sop-meta-owner { display: inline-flex; align-items: center; gap: 6px; }
.sop-review { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.sop-review.overdue { padding: 8px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-text); }
.sop-review-actions { display: inline-flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.sop-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--primary-soft); color: var(--text); font-size: 14px; flex-wrap: wrap; }
.sop-banner > .icon { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.sop-banner > span:not(.spacer) { flex: 1 1 260px; }
.sop-banner.quiet { background: var(--bg-3); }
.sop-banner.quiet > .icon { color: var(--text-2); }
.sop-body { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.rich h2 { font-size: 19px; line-height: 1.3; font-weight: 650; margin: 22px 0 8px; letter-spacing: -.005em; }
.rich h3 { font-size: 16px; line-height: 1.35; font-weight: 650; margin: 16px 0 6px; }
.rich h2:first-child, .rich h3:first-child { margin-top: 0; }
.sop-ack { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0 8px; padding: 18px; border: 1px dashed var(--border-2); border-radius: 12px; }
.sop-ack.done { border-style: solid; background: var(--green-soft); border-color: transparent; }
.sop-ack-btn { padding: 10px 18px; font-size: 15px; }
.sop-acked { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 500; }
.sop-section { margin-top: 30px; }
.sop-section h3 { font-size: 15px; margin-bottom: 10px; }
.sop-people { max-height: 360px; }
.sop-section-actions { display: flex; gap: 8px; margin-top: 10px; }
.sop-versions { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sop-version { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.sop-version:last-child { border-bottom: 0; }
.sop-version-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sop-version-view .sop-body { margin-top: 8px; }
.sop-version-title { font-size: 18px; margin: 6px 0; }
.sop-version-modal .modal-body { max-height: 70vh; overflow-y: auto; }

/* writing one */
.sop-title-input { font-size: 20px; font-weight: 600; padding: 10px 12px; margin-bottom: 12px; }
.sop-editor { border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); }
.sop-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.sop-editor .editor-bar { order: 0; position: sticky; top: 0; z-index: 2; background: var(--bg); border-top: 0; border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; padding: 6px 8px; }
.sop-editor .editor-area { padding: 14px 16px; min-height: 320px; font-size: 15px; line-height: 1.6; }
.sop-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; margin-top: 20px; }
.sop-change { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.sop-edit-foot { display: flex; gap: 8px; margin-top: 22px; }
.tag-input { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 38px; padding: 4px 8px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--bg); cursor: text; }
.tag-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tag-input-field { flex: 1 1 120px; min-width: 100px; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); padding: 4px 2px; }
.tag-x { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; padding: 0; }
.tag-x:hover { background: var(--hover); color: var(--text); }
@media (max-width: 700px) { .sop-fields { grid-template-columns: minmax(0, 1fr); } .sop-title { font-size: 22px; } }

/* search results */
.search-sop-tag { margin-left: 6px; font-size: 10.5px; padding: 0 6px; }
.search-sops { display: flex; flex-direction: column; gap: 2px; }
.search-sop { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.search-sop:hover { background: var(--hover); }
.search-sop-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-sop-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-sop .sop-status { margin-left: 6px; }

/* the gentle "please read" card */
.sop-prompt { position: fixed; right: 20px; bottom: 20px; z-index: 350; width: 340px; max-width: calc(100vw - 24px); background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.sop-prompt.in { opacity: 1; transform: none; }
.sop-prompt.leaving { opacity: 0; transform: translateY(12px); }
.sop-prompt-head { display: flex; align-items: center; gap: 8px; }
.sop-prompt-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.sop-prompt-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.sop-prompt-body p { margin: 4px 0 0; }
.sop-prompt-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.sop-prompt-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
@media (max-width: 700px) { .sop-prompt { left: 12px; right: 12px; width: auto; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .sop-prompt { transition: none; } }

/* ---- v1.26 SOPs: who has acknowledged, what changed (docparts.js), and what's waiting on Home (sops.js) */
.readers-panel { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 18px; background: var(--bg); overflow: hidden; }
.readers-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; flex-wrap: wrap; }
.readers-head.static { cursor: default; }
.readers-head:not(.static):hover { background: var(--hover); }
.readers-head > .icon { color: var(--text-2); flex-shrink: 0; }
.readers-line { flex: 1 1 240px; min-width: 0; }
.readers-bar { width: 120px; flex-shrink: 0; }
.readers-chev { color: var(--text-3) !important; }
.readers-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.readers-group-head { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 4px; font-size: 13px; }
.readers-group .ann-people-list { max-height: 260px; }
@media (max-width: 640px) { .readers-body { grid-template-columns: minmax(0, 1fr); } .readers-bar { width: 100%; } }
.sop-readcount-line { margin-top: 14px; }
.sop-version-actions { display: inline-flex; gap: 2px; flex-shrink: 0; }
@media (max-width: 520px) { .sop-version { flex-wrap: wrap; } .sop-version-actions { width: 100%; justify-content: flex-end; } }

/* what changed */
.compare-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.compare-bar .input { width: auto; }
.compare-key { display: inline-flex; gap: 6px; font-size: 12px; }
.compare-key span { padding: 1px 8px; border-radius: 6px; }
.key-add, .diff ins { background: var(--green-soft); color: var(--green-2); }
.key-del, .diff del { background: var(--red-soft); color: var(--red-2); }
.compare-meta { margin: 0 0 8px; }
.compare-notes { margin: 0 0 12px; padding-left: 18px; color: var(--text-2); }
.compare-title ins, .compare-title del { padding: 0 3px; border-radius: 3px; }
.diff { font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.diff-block { padding: 3px 10px 3px 12px; margin: 0; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; }
.diff-block + .diff-block { margin-top: 2px; }
.diff-block.same { color: var(--text-2); }
.diff-block.add { background: var(--green-soft); border-left-color: var(--green); }
.diff-block.del { background: var(--red-soft); border-left-color: var(--red); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 55%, transparent); }
.diff-block.mod { background: var(--bg-2); border-left-color: var(--amber); }
.diff ins { text-decoration: none; border-radius: 3px; padding: 0 1px; }
.diff del { border-radius: 3px; padding: 0 1px; }
h2.diff-block, h3.diff-block { margin-top: 10px; }
.diff-li { display: flex; gap: 8px; }
.diff-text { flex: 1; min-width: 0; }
.diff-mark { color: var(--text-3); flex-shrink: 0; min-width: 16px; text-decoration: none; display: inline-block; }
.diff-fold { display: flex; align-items: center; gap: 6px; width: 100%; margin: 4px 0; padding: 4px 12px; border: 1px dashed var(--border-2); border-radius: 6px; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.diff-fold:hover { background: var(--hover); color: var(--text); }

/* Home: what's waiting for you to read */
.reading-card { border-color: var(--primary-border); }
.reading-card .home-card-head h2 { margin-right: 6px; }
.reading-list { display: flex; flex-direction: column; }
.reading-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.reading-row:first-child { border-top: 0; }
.reading-row:hover { background: var(--hover); }
.reading-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reading-main > span { overflow: hidden; text-overflow: ellipsis; }
.reading-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading-kind { margin-right: 8px; font-size: 10.5px; padding: 0 6px; }
@media (max-width: 520px) { .reading-card .home-card-head small { display: none; } }

/* ---- v1.27 Files (files.js, views/files.js) and SOP templates */
.fx-page { max-width: 1240px; display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-h) - 40px); }
.fx-head-row { gap: 8px; flex-wrap: wrap; }
.fx-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 20px; font-weight: 650; min-width: 0; }
.fx-crumb { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; color: var(--text-2); text-decoration: none !important; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.fx-crumb:hover { background: var(--hover); color: var(--text); }
.fx-crumb.current { color: var(--text); }
.fx-crumb.drop-on { background: var(--primary-soft); color: var(--primary); outline: 2px dashed var(--primary); }
.fx-crumb-sep { color: var(--text-3); flex-shrink: 0; }
.fx-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.fx-search { flex: 1 1 220px; max-width: 320px; }
.fx-sort { width: auto; }
.fx-views button { padding: 0 9px; }
.fx-note { margin: -4px 0 10px; }
.fx-body { position: relative; flex: 1; min-height: 260px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; outline: none; background: var(--bg); }
.fx-body:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft); }
.fx-drop-hint { display: none; position: absolute; inset: 0; border-radius: 12px; background: color-mix(in srgb, var(--primary-soft) 88%, transparent); border: 2px dashed var(--primary); color: var(--primary);
  flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; z-index: 3; }
.fx-body.dropping .fx-drop-hint, .fx-body.drop-on > .fx-drop-hint { display: flex; }
.fx-status { font-size: 12.5px; color: var(--text-2); padding: 6px 4px 0; }
.fx-empty { padding: 40px 10px; }

/* big icons */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.fx-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 8px; border-radius: 10px; border: 1px solid transparent; cursor: default; user-select: none; min-width: 0; outline: none; }
.fx-tile:hover { background: var(--hover); }
.fx-tile.picked { background: var(--primary-soft); border-color: var(--primary-border); }
.fx-tile.drop-on { background: var(--primary-soft); border-color: var(--primary); border-style: dashed; }
.fx-tile-thumb { position: relative; width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.fx-tile.folder .fx-tile-thumb, .fx-tile.general .fx-tile-thumb, .fx-tile.sop .fx-tile-thumb { background: transparent; }
.fx-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-thumb-icon { display: inline-grid; place-items: center; gap: 2px; color: var(--fx, var(--text-2)); }
.fx-thumb-icon.big small { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; background: var(--fx, var(--text-2)); color: #fff; }
.fx-thumb-icon.folder { color: #e3a008; }
.fx-thumb-icon.folder .icon { fill: color-mix(in srgb, #e3a008 22%, transparent); }
.fx-thumb-icon.sop { color: var(--primary); }
.fx-thumb-icon.big.sop, .fx-thumb-icon.big.folder { width: 64px; height: 64px; }
.fx-shortcut { position: absolute; left: 50%; top: 58%; margin-left: 12px; width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border-2); color: var(--text-2); }
.fx-tile-name { width: 100%; text-align: center; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fx-tile-sub { color: var(--text-3); font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tile.sop.needs .fx-tile-sub { color: var(--primary); font-weight: 600; }
.fx-more { position: absolute; top: 4px; right: 4px; opacity: 0; background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.fx-tile:hover .fx-more, .fx-tile.picked .fx-more, .fx-row:hover .fx-more, .fx-row.picked .fx-more { opacity: 1; }
@media (pointer: coarse), (max-width: 700px) { .fx-more { opacity: 1; } }

/* details */
.fx-list { display: flex; flex-direction: column; }
.fx-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 120px 90px 32px; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; font-size: 13.5px; border: 1px solid transparent; user-select: none; outline: none; }
.fx-row:not(.fx-head):hover { background: var(--hover); }
.fx-row.picked { background: var(--primary-soft); border-color: var(--primary-border); }
.fx-row.drop-on { background: var(--primary-soft); border-color: var(--primary); border-style: dashed; }
.fx-row.fx-head { font-size: 12px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 4px; }
.fx-row-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-row-icon { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 5px; overflow: hidden; }
.fx-row-icon .fx-thumb-img { width: 28px; height: 28px; }
.fx-row-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-col-date, .fx-col-type, .fx-col-size { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-row .fx-more { position: static; box-shadow: none; }
@media (max-width: 700px) {
  .fx-row { grid-template-columns: minmax(0, 1fr) 70px 32px; }
  .fx-col-date, .fx-col-type { display: none; }
  .fx-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .fx-crumbs { font-size: 17px; }
  .fx-search { max-width: none; }
}
.fx-menu-spot { position: fixed; width: 1px; height: 1px; pointer-events: none; }

/* picking a folder */
.fx-picker { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.fx-pick-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fx-pick-row:hover { background: var(--hover); }
.fx-pick-row.on { background: var(--primary-soft); color: var(--primary); }
.fx-pick-row.off { opacity: .45; cursor: not-allowed; }
.fx-pick-row > .icon { color: #e3a008; }
.fx-pick-empty { padding: 10px; }
.fx-sop-folders { min-height: 38px; }

/* uploads */
.fx-uploads { position: fixed; right: 20px; bottom: 20px; z-index: 360; width: 320px; max-width: calc(100vw - 24px); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); padding: 10px 12px; }
.fx-uploads-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fx-uploads-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.fx-upload { display: grid; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 8px; font-size: 12.5px; }
.fx-upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-upload.done > .icon { color: var(--green); justify-self: end; }
.fx-upload-error { color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
@media (max-width: 700px) { .fx-uploads { left: 12px; right: 12px; width: auto; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); } }

/* the preview */
.fx-viewer { position: fixed; inset: 0; z-index: 500; background: rgba(14, 15, 17, .97); color: #fff; display: flex; flex-direction: column; outline: none; }
.fx-view-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; }
.fx-view-head .icon-btn { color: #fff; }
.fx-view-head .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.fx-view-title { display: flex; flex-direction: column; min-width: 0; }
.fx-view-title strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-view-title small { color: rgba(255, 255, 255, .65); font-size: 12px; }
.fx-view-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px 24px; }
.fx-view-img, .fx-view-video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; background: #000; }
.fx-view-pdf { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
.fx-view-text { width: min(1000px, 100%); height: 100%; overflow: auto; margin: 0; padding: 16px 18px; border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.fx-view-audio, .fx-view-none { display: flex; flex-direction: column; align-items: center; gap: 16px; color: rgba(255, 255, 255, .85); text-align: center; }
.fx-view-none .fx-thumb-icon { color: #fff; }
.fx-view-none .fx-thumb-icon .icon { width: 64px; height: 64px; }
.fx-view-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.fx-view-nav:hover { background: rgba(255, 255, 255, .18); }
.fx-view-nav.prev { left: 8px; }
.fx-view-nav.next { right: 8px; }
@media (max-width: 700px) { .fx-view-stage { padding: 0 8px 12px; } .fx-view-nav { width: 36px; height: 52px; background: rgba(0, 0, 0, .4); } }

/* SOPs: where they're filed, and a template's steps */
.sop-meta-files a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-2); }
.sop-meta-files a:hover { color: var(--text); }
.sop-starter ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }