:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #202020;
  background: #fff;
  font-size: 13px;
  --accent: #3c485c;
  --muted: #888;
  --line: #e9e9e9;
  --danger: #d1453b;
  --sidebar: 192px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:hover {
  background: #f4f4f4;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 1px solid #aaa;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border-radius: 5px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: #777;
  border-radius: 5px;
}
.muted {
  color: #777;
}
.chevron {
  color: #999;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
}
.primary:hover {
  background: #303c50;
}
.secondary {
  background: #f4f4f4;
  border-radius: 6px;
  padding: 8px 12px;
}
.danger {
  background: var(--danger);
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
}
.danger:hover {
  background: #b93b32;
}
.danger-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--danger);
}
.danger-text svg {
  width: 16px;
  height: 16px;
}
.danger-text:hover {
  background: #fdf0ef;
}
.brand-mark {
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 22px;
  font-weight: 700;
}
#app {
  display: flex;
  min-height: 100vh;
}
#sidebar {
  width: var(--sidebar);
  height: 100dvh;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fafafa;
  padding: 12px 11px 8px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 38px;
  margin-bottom: 18px;
}
.account-name {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
  border-radius: 6px;
  min-width: 0;
}
.account-name strong {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  width: 27px;
  height: 27px;
  background: #e8ded7;
  border: 2px solid #fff;
  outline: 1px solid #d7ccc3;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 31px;
  padding: 5px 7px;
  width: 100%;
  border-radius: 5px;
  text-align: left;
  line-height: 18px;
}
.nav-row svg {
  color: #888;
}
.nav-row .label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-row .count {
  margin-left: auto;
  font-size: 12px;
  color: #aaa;
}
.nav-row.active {
  background: #e1e2e5;
  color: #3c485c;
}
.nav-row.active svg,
.nav-row.active .count {
  color: #3c485c;
}
.add-main {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.add-main svg {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  padding: 2px;
  width: 25px;
  height: 25px;
}
.sidebar-scroll {
  overflow: auto;
  flex: 1;
  padding-top: 22px;
}
.group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #777;
  padding: 14px 8px 7px;
}
.group-heading .icon-button {
  margin-left: auto;
  height: 22px;
}
.workspace-badge {
  width: 21px;
  height: 21px;
  background: #93be38;
  border-radius: 5px;
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.project-hash {
  font-size: 21px;
  line-height: 18px;
  color: #b19a65;
  width: 20px;
  text-align: center;
  font-weight: 300;
}
.project-row {
  padding-left: 12px;
}
footer {
  padding-top: 12px;
  font-size: 12px;
}
main {
  margin-left: var(--sidebar);
  width: calc(100% - var(--sidebar));
  min-width: 0;
}
.topbar {
  height: 49px;
  padding: 0 19px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #888;
}
.top-left,
.top-right {
  display: flex;
  gap: 12px;
  align-items: center;
}
#back {
  font-size: 30px;
  font-weight: 200;
}
#breadcrumb {
  font-size: 13px;
}
#expand {
  display: none;
}
.page-heading {
  padding: 12px 36px 8px;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
  margin: 0;
  font-weight: 700;
}
.page-heading p {
  margin: 13px 0 0;
  color: #999;
}
.page-heading p:empty {
  display: none;
}
#workspace {
  padding: 0 36px 30px;
}
.board {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  overflow: auto;
  min-height: 65vh;
  padding: 0 3px 24px;
  margin: 0 -3px;
}
.column {
  width: 238px;
  flex: 0 0 238px;
  min-height: 150px;
}
.column-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  margin-bottom: 8px;
}
.column-head h2 {
  font-size: 14px;
  font-weight: 650;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.column-head .count {
  color: #999;
  font-size: 13px;
}
.column-head .icon-button {
  margin-left: auto;
}
.cards {
  min-height: 8px;
}
.task-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  margin-bottom: 8px;
  background: white;
  box-shadow: 0 2px 4px #00000006;
  position: relative;
  display: flex;
  gap: 10px;
  cursor: pointer;
  min-height: 41px;
}
.task-card:hover {
  border-color: #ccc;
  box-shadow: 0 2px 6px #0000000b;
}
.task-card:focus-visible {
  outline: 2px solid var(--accent);
}
.task-check {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  border: 1px solid #c6c6c6;
  border-radius: 50%;
  margin-top: 1px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #999;
}
.task-check:hover {
  background: #eee;
}
.task-check.high {
  border-color: #c6c6c6;
  background: #fff;
}
.task-check.low {
  border-color: #c6c6c6;
}
.task-check.done,
.completing .task-check {
  background: #d6d6d6;
  border-color: #d6d6d6;
  color: white;
  font-size: 12px;
}
.task-check.done:hover {
  background: #c4c4c4;
}
.completing .task-check::after {
  content: "✓";
}
.task-card {
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.task-card.completing {
  opacity: 0.55;
}
.task-card.removing {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}
.task-body {
  min-width: 0;
  flex: 1;
}
.task-title {
  font-size: 14px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.done-title {
  text-decoration: line-through;
  color: #999;
}
.task-notes {
  font-size: 12px;
  color: #888;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #999;
  margin-top: 7px;
}
.task-meta svg {
  width: 13px;
  height: 13px;
}
.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #63804d;
}
.due.overdue {
  color: #ff5148;
}
.task-actions {
  position: absolute;
  right: 5px;
  top: 5px;
  background: white;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.12s;
}
.task-actions .icon-button {
  width: 26px;
  height: 26px;
}
.task-actions svg {
  width: 16px;
  height: 16px;
}
.task-card:hover .task-actions,
.task-card:focus-within .task-actions {
  opacity: 1;
}
.task-delete:hover,
.comment-delete:hover {
  color: var(--danger);
  background: #fdf0ef;
}
.grip {
  flex: 0 0 20px;
  align-self: flex-start;
  height: 20px;
  margin: 0 -4px 0 -10px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #bbb;
  border-radius: 4px;
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.grip svg {
  width: 14px;
  height: 18px;
  stroke-width: 3.2;
}
.grip:hover {
  background: none;
  color: #666;
}
.task-card:hover .grip,
.grip:focus-visible {
  opacity: 1;
}
.task-card.sorting {
  z-index: 2;
  border-color: #ccc;
  box-shadow: 0 8px 24px #0002;
  transition: none;
}
.sorting-active,
.sorting-active * {
  user-select: none;
  cursor: grabbing !important;
}
/* Touch has no hover: delete lives in the task dialog there. */
@media (hover: none) {
  .task-actions {
    display: none;
  }
  .grip {
    opacity: 1;
    flex-basis: 28px;
    height: 28px;
    margin: -5px -4px -5px -8px;
  }
}
.add-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999;
  padding: 10px 8px;
  width: 100%;
  text-align: left;
  border-radius: 6px;
}
.add-inline svg {
  color: #63718a;
  width: 18px;
}
.add-inline:hover {
  color: var(--accent);
}
.add-section {
  min-width: 220px;
  justify-content: flex-start;
  align-self: flex-start;
  margin-top: 8px;
  color: #999;
  padding: 12px 16px;
  border-radius: 7px;
  background: #fafafa;
  display: flex;
  gap: 10px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: #888;
}
.empty svg {
  width: 44px;
  height: 44px;
  color: #dca89b;
  margin-bottom: 15px;
}
.empty h2 {
  font-size: 18px;
  color: #444;
  font-weight: 600;
}
.empty p {
  line-height: 1.6;
  max-width: 340px;
  margin: 10px auto;
}
.list {
  max-width: 850px;
  margin: auto;
}
.list .column {
  width: 100%;
  margin-bottom: 22px;
}
.list .column-head {
  border-bottom: 1px solid #eee;
}
.list .task-card {
  border: 0;
  border-bottom: 1px solid #eee;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  padding: 12px 3px;
}
.list .task-notes {
  max-width: 650px;
}
.composer {
  border: 1px solid #aaa;
  border-radius: 11px;
  padding: 12px;
  margin: 8px 0 12px;
  background: #fff;
}
.composer input[name="title"],
.composer textarea {
  border: 0;
  width: 100%;
  padding: 3px 0;
  resize: vertical;
  background: none;
}
.composer input[name="title"] {
  font-weight: 600;
}
.composer textarea {
  font-size: 12px;
  min-height: 36px;
}
.composer input:focus,
.composer textarea:focus {
  outline: 0;
}
.composer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0 12px;
}
.composer-options label {
  font-size: 11px;
  color: #888;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.composer-options input,
.composer-options select {
  min-width: 0;
  max-width: 155px;
  font-size: 12px;
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  padding: 5px;
  background: white;
  color: #666;
}
.composer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}
.composer-error {
  color: var(--accent);
  font-size: 12px;
}
.drop-target {
  background: #f1f2f4;
  border-radius: 10px;
}
.dragging {
  opacity: 0.4;
}
#search {
  width: 100%;
  max-width: 700px;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 12px;
  margin-top: 20px;
}
#popover {
  position: fixed;
  z-index: 60;
  width: 240px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 8px 32px #0002;
  padding: 7px;
}
#popover button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px;
  width: 100%;
  border-radius: 5px;
}
#popover .menu-title {
  color: #888;
  font-size: 12px;
  padding: 5px 7px;
}
#popover button.danger {
  background: none;
  color: var(--danger);
  font-weight: 400;
  border-radius: 5px;
}
#popover button.danger:hover {
  background: #fdf0ef;
}
#popover:not([hidden]) {
  animation: pop-in 0.12s ease-out;
}
#toast {
  position: fixed;
  inset: auto auto 24px 50%;
  margin: 0;
  border: 0;
  overflow: visible;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  border-radius: 7px;
  padding: 12px 18px;
  z-index: 100;
  box-shadow: 0 4px 20px #0002;
  max-width: 90vw;
  width: max-content;
}
#toast:empty {
  display: none;
}
#toast:popover-open {
  animation: toast-in 0.18s ease-out;
}
dialog {
  border: 1px solid #eee;
  border-radius: 13px;
  padding: 0;
  width: min(760px, 94vw);
  max-height: 88dvh;
  box-shadow: 0 20px 80px #0003;
  color: #333;
}
dialog::backdrop {
  background: #0005;
}
dialog[open] {
  animation: pop-in 0.16s ease-out;
}
dialog[open]::backdrop {
  animation: fade-in 0.16s ease-out;
}
#confirm {
  width: min(420px, 92vw);
  padding: 22px 22px 18px;
}
#confirm h2 {
  font-size: 17px;
  margin: 0 0 10px;
}
#confirm p {
  margin: 0 0 20px;
  line-height: 1.5;
  color: #555;
  overflow-wrap: anywhere;
}
.confirm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
  color: #888;
}
.dialog-content {
  padding: 25px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 30px;
}
.detail-main input[name="title"] {
  width: 100%;
  font-size: 21px;
  font-weight: 650;
  border: 0;
  padding: 6px 0;
}
.detail-main textarea {
  width: 100%;
  min-height: 95px;
  border: 0;
  resize: vertical;
  padding: 10px 0;
  line-height: 1.6;
}
.detail-fields {
  background: #fafafa;
  padding: 14px;
  border-radius: 8px;
}
.detail-fields label,
.simple-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
  font-size: 12px;
  color: #777;
}
.detail-fields input,
.detail-fields select,
.simple-form input,
.simple-form select {
  width: 100%;
  padding: 7px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
}
.detail-actions {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}
.detail-section {
  border-top: 1px solid #eee;
  margin-top: 20px;
  padding-top: 16px;
}
.detail-section h3 {
  font-size: 13px;
}
.comment {
  position: relative;
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
  padding-right: 34px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-delete {
  position: absolute;
  top: -4px;
  right: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.comment-delete svg {
  width: 16px;
  height: 16px;
}
.comment:hover .comment-delete,
.comment-delete:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .comment-delete {
    opacity: 1;
  }
}
.comment strong {
  display: block;
  font-size: 12px;
}
.comment-form {
  display: flex;
  gap: 8px;
}
.comment-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px;
}
.simple-form {
  padding: 25px;
}
.simple-form h2 {
  margin: 0 0 22px;
  font-size: 20px;
}
#login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #fafafa;
}
#login-form {
  width: min(370px, 90vw);
  padding: 30px;
  background: white;
  border: 1px solid #eee;
  border-radius: 14px;
}
#login-form h1 {
  font-size: 25px;
  margin-top: 22px;
}
#login-form p {
  color: #888;
  line-height: 1.5;
}
#login-form label {
  display: block;
  margin-top: 18px;
  font-size: 13px;
}
#login-form input {
  display: block;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 8px;
  padding: 11px;
}
#login-form .primary {
  width: 100%;
  margin-top: 15px;
}
.collapsed #sidebar {
  display: none;
}
.collapsed main {
  margin-left: 0;
  width: 100%;
}
.collapsed #expand {
  display: inline-flex;
}
@media (max-width: 760px) {
  /* visibility flips only after the slide-out, so closing animates too. */
  #sidebar {
    visibility: hidden;
    transform: translateX(-100%);
    transition:
      transform 0.16s,
      visibility 0s linear 0.16s;
  }
  body.nav-open #sidebar {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.16s;
  }
  main {
    margin-left: 0;
    width: 100%;
  }
  #expand {
    display: inline-flex;
  }
  .topbar {
    height: 56px;
    padding: 0 16px;
  }
  .top-left,
  .top-right {
    gap: 5px;
  }
  #back {
    display: none;
  }
  .page-heading {
    padding: 18px 22px;
  }
  h1 {
    font-size: 26px;
  }
  #workspace {
    padding: 0 22px 30px;
  }
  .board {
    gap: 18px;
    min-height: 70vh;
  }
  .column {
    width: 285px;
    flex-basis: 285px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .detail-fields label {
    margin: 0;
  }
  .dialog-content {
    padding: 18px;
  }
  body.nav-open #scrim {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #0005;
    z-index: 19;
    animation: fade-in 0.16s ease-out;
  }
  .top-right .text-button {
    font-size: 12px;
  }
  #breadcrumb {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .collapsed #sidebar {
    display: flex;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::backdrop {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Desktop dimensions follow the 2x macOS reference capture. */
@media (min-width: 761px) {
  #collapse {
    position: absolute;
    right: 11px;
    top: 12px;
  }
  .account-name strong {
    max-width: 100px;
  }
  .avatar {
    width: 23px;
    height: 23px;
  }
  .add-main svg {
    width: 21px;
    height: 21px;
  }
  .nav-row {
    gap: 8px;
  }
  .nav-row svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-scroll {
    padding-top: 20px;
  }
  .task-check {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
  }
  .task-card {
    gap: 7px;
  }
  .column-head .count {
    font-size: 12px;
  }
  .add-section {
    min-width: 170px;
  }
}
