/*
 * Weekly focus is intentionally one visual system:
 * blue canvas → project lanes → white task cards → flat checklist rows.
 * This file loads after the legacy prototype styles so experiments elsewhere
 * cannot alter this hierarchy.
 */

#dashboardView .week-section {
  width: auto;
  max-width: none;
  margin-right: -48px;
  margin-left: -48px;
  padding: 30px 48px 34px;
  border-radius: 0;
  background: var(--ice);
}

#dashboardView .week-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

/* Home and Tasks now share one workspace and one card language. */
#dashboardView .unified-workspace {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

#dashboardView .unified-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

#dashboardView .unified-board-head h3 {
  margin: 5px 0 0;
  font: 600 22px "Sora", sans-serif;
}

#dashboardView .board-controls {
  flex: 0 0 auto;
}

#dashboardView .full-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  overflow: visible;
}

#dashboardView .full-kanban .kanban-column {
  min-width: 0;
}

#dashboardView .kanban-task {
  min-width: 0;
}

#dashboardView .kanban-open strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#dashboardView .kanban-parent {
  display: -webkit-box;
  margin: -3px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

#dashboardView .kanban-subtask {
  background: rgba(255, 255, 255, 0.76);
}

#dashboardView .kanban-meta {
  min-width: 0;
}

#dashboardView .project-property {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView .home-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

#dashboardView .home-inbox {
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

#dashboardView .home-inbox h3 {
  margin: 4px 0 0;
  font: 600 17px "Sora", sans-serif;
}

@media (max-width: 1180px) {
  #dashboardView .full-kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #dashboardView .unified-board-head {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboardView .full-kanban,
  #dashboardView .home-support-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Ketchup temporarily turns Home into one focused review canvas. */
#dashboardView.review-mode {
  padding-top: 24px;
}

#dashboardView .home-review-focus[hidden],
#dashboardView .home-dashboard-content[hidden] {
  display: none;
}

#dashboardView .home-review-focus {
  display: grid;
  max-width: 1320px;
  gap: 18px;
  margin: 0 auto;
}

#dashboardView .home-review-focus.is-starting {
  position: relative;
  z-index: 30;
}

#dashboardView .ketchup-hero {
  position: relative;
  min-height: 154px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 32px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--ice);
}

#dashboardView .ketchup-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}

#dashboardView .ketchup-hero-bottle {
  display: grid;
  width: 76px;
  height: 104px;
  flex: 0 0 76px;
  place-items: center;
  margin-left: auto;
}

#dashboardView .ketchup-hero-bottle img {
  display: block;
  width: auto;
  height: 104px;
}

#dashboardView .home-review-focus.is-starting .ketchup-hero {
  overflow: visible;
}

#dashboardView .home-review-focus.is-starting .ketchup-hero-bottle {
  opacity: 0;
}

#dashboardView .ketchup-hero-copy .eyebrow {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #477392;
}

#dashboardView .ketchup-label img {
  width: 16px;
  height: 16px;
}

#dashboardView .ketchup-hero h1 {
  margin: 0 0 7px;
  font-size: clamp(31px, 3vw, 44px);
}

#dashboardView .ketchup-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

#dashboardView .ketchup-hero-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
}

#dashboardView .ketchup-hero .review-people .avatar {
  width: 38px;
  height: 38px;
}

#dashboardView .ketchup-hero .review-people .avatar + .avatar {
  margin-left: -9px;
}

#dashboardView .ketchup-exit {
  padding: 9px 12px;
}

#dashboardView .ketchup-intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 7px;
  border-radius: inherit;
  background: var(--ice);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

#dashboardView .ketchup-intro img {
  width: auto;
  height: 96px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(18px) scale(.72) rotate(-5deg);
}

#dashboardView .ketchup-intro strong {
  font: 600 clamp(26px, 3vw, 40px) "Sora", sans-serif;
  letter-spacing: -0.035em;
  opacity: 0;
  transform: translateY(14px);
}

#dashboardView .home-review-focus.is-starting .ketchup-intro {
  animation: ketchup-intro 1800ms step-end both;
}

#dashboardView .home-review-focus.is-starting .ketchup-intro img {
  animation: ketchup-intro-icon 1800ms cubic-bezier(.18, .8, .2, 1) both;
}

#dashboardView .home-review-focus.is-starting .ketchup-intro strong {
  animation: ketchup-intro-copy 1050ms 260ms ease both;
}

@keyframes ketchup-intro {
  0%, 99% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ketchup-intro-icon {
  0% { opacity: 0; transform: translateY(18px) scale(.72) rotate(-5deg); }
  12% { opacity: 1; }
  33% { opacity: 1; transform: translateY(-78px) scale(1.05) rotate(2deg); }
  50% { opacity: 1; transform: translateY(4px) scale(.98) rotate(-1deg); }
  58%, 64% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  100% { opacity: 1; transform: translate(var(--ketchup-intro-x, 0), var(--ketchup-intro-y, 0)) scale(var(--ketchup-intro-scale, 1)) rotate(0); }
}

@keyframes ketchup-intro-copy {
  0% { opacity: 0; transform: translateY(14px); }
  28%, 68% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

#dashboardView .ketchup-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
}

#dashboardView .ketchup-progress .review-step {
  min-height: 58px;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 0;
  border-right: 1px solid var(--border);
}

#dashboardView .ketchup-progress .review-step:last-child {
  border-right: 0;
}

#dashboardView .ketchup-progress .review-step strong {
  font: 500 13px "Sora", sans-serif;
}

#dashboardView .ketchup-progress .review-step.active {
  background: var(--ice-light);
  color: var(--charcoal);
  box-shadow: inset 0 -3px 0 var(--ice-deep);
}

#dashboardView .ketchup-stage {
  min-height: 420px;
  padding: 30px;
  overflow-x: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
}

#dashboardView .ketchup-stage .review-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#dashboardView .ketchup-stage .review-panel > h2 {
  margin-bottom: 6px;
  font-size: clamp(25px, 2.5vw, 34px);
}

#dashboardView .ketchup-stage .review-panel > p {
  margin-bottom: 24px;
}

#dashboardView .ketchup-project-groups {
  display: grid;
  gap: 18px;
}

#dashboardView .ketchup-project-row {
  padding: 14px;
  overflow-x: auto;
  border: 0;
  border-radius: 15px;
  background: color-mix(in srgb, var(--row-wash, var(--surface-subtle)) 64%, var(--paper));
}

#dashboardView .ketchup-project-row > header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

#dashboardView .ketchup-project-row > header .project-logo {
  width: 28px;
  height: 28px;
  border-color: color-mix(in srgb, var(--row-accent, var(--muted)) 55%, var(--border));
  background: var(--row-wash, var(--surface-subtle));
  color: var(--row-accent, var(--muted));
  font-size: 10px;
}

#dashboardView .ketchup-project-row > header strong {
  font: 600 14px "Sora", sans-serif;
}

#dashboardView .ketchup-project-row > header small {
  margin-left: auto;
  color: var(--muted);
  font: 500 10px "IBM Plex Mono", monospace;
}

#dashboardView .ketchup-task-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  align-items: start;
  gap: 12px;
  min-width: 1060px;
}

#dashboardView .ketchup-card-complete {
  border-color: color-mix(in srgb, var(--green) 34%, var(--border));
}

#dashboardView .ketchup-card-blocked,
#dashboardView .ketchup-card-overdue {
  border-color: color-mix(in srgb, var(--salmon) 45%, var(--border));
}

#dashboardView .ketchup-empty {
  min-height: 210px;
  display: grid;
  max-width: 620px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  margin: 0 auto;
  color: var(--muted);
  text-align: center;
}

#dashboardView .ketchup-empty > strong {
  color: var(--charcoal);
  font: 600 20px "Sora", sans-serif;
}

#dashboardView .ketchup-empty p {
  max-width: 460px;
  margin: 0;
}

#dashboardView .ketchup-clear-mark {
  color: var(--salmon);
  font-size: 24px;
}

#dashboardView .ketchup-stage .review-actions {
  position: sticky;
  bottom: 16px;
  z-index: 2;
  align-items: center;
  margin-top: 30px;
  padding: 12px 0 0;
  background: linear-gradient(transparent, var(--paper) 26%);
}

html[data-theme="dark"] #dashboardView .ketchup-hero,
html[data-theme="dark"] #dashboardView .ketchup-intro {
  background: #203847;
}

html[data-theme="dark"] #dashboardView .ketchup-progress,
html[data-theme="dark"] #dashboardView .ketchup-stage {
  background: var(--surface-soft);
}

html[data-theme="dark"] #dashboardView .ketchup-progress .review-step.active {
  background: #29485d;
}

html[data-theme="dark"] #dashboardView .ketchup-stage .review-actions {
  background: linear-gradient(transparent, var(--surface-soft) 26%);
}

@media (max-width: 760px) {
  #dashboardView .ketchup-hero {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  #dashboardView .ketchup-hero-copy {
    padding-right: 64px;
  }

  #dashboardView .ketchup-hero-bottle {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 46px;
    height: 72px;
  }

  #dashboardView .ketchup-hero-bottle img {
    height: 72px;
  }

  #dashboardView .ketchup-hero-actions {
    width: 100%;
    justify-content: space-between;
  }

  #dashboardView .ketchup-progress .review-step {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 9px 5px;
    text-align: center;
  }

  #dashboardView .ketchup-progress .review-step strong {
    font-size: 10px;
  }

  #dashboardView .ketchup-stage {
    min-height: 0;
    padding: 22px 16px;
  }

}

@media (prefers-reduced-motion: reduce) {
  #dashboardView .home-review-focus.is-starting .ketchup-intro {
    animation: none;
  }

  #dashboardView .home-review-focus.is-starting .ketchup-intro img,
  #dashboardView .home-review-focus.is-starting .ketchup-intro strong {
    animation: none;
  }

  #dashboardView .home-review-focus.is-starting .ketchup-hero-bottle {
    opacity: 1;
  }
}

.ketchup-cursor-preview {
  position: fixed;
  z-index: 1100;
  width: 54px;
  height: 88px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(.86) rotate(-3deg);
  transform-origin: 50% 85%;
  transition: opacity 140ms ease, transform 180ms cubic-bezier(.18, .8, .2, 1);
}

.ketchup-cursor-preview img {
  display: block;
  width: auto;
  height: 88px;
}

.ketchup-cursor-preview.show {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0);
}

@media (hover: none), (pointer: coarse) {
  .ketchup-cursor-preview {
    display: none;
  }
}

/* A short film-like completion beat makes the review feel consequential without
   turning the workspace into a confetti screen. */
.ketchup-complete-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(20, 23, 25, 0.94);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.ketchup-complete-overlay[hidden] {
  display: none;
}

.ketchup-complete-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ketchup-complete-film {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.ketchup-complete-bottle {
  position: relative;
  display: grid;
  width: 210px;
  height: 220px;
  place-items: center;
  transform: translateY(28px) scale(.72) rotate(-5deg);
}

.ketchup-complete-bottle img {
  display: block;
  width: auto;
  height: 190px;
}

.ketchup-glint {
  position: absolute;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
}

.ketchup-glint-left {
  top: 32px;
  left: 3px;
}

.ketchup-glint-right {
  right: 0;
  bottom: 42px;
  font-size: 20px;
}

.ketchup-complete-film strong {
  font: 600 clamp(38px, 7vw, 84px)/1 "Sora", sans-serif;
  letter-spacing: -0.055em;
  opacity: 0;
  transform: translateY(18px);
}

.ketchup-complete-film p {
  margin: 4px 0 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  opacity: 0;
}

.ketchup-complete-film button {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font: 500 11px "IBM Plex Mono", monospace;
  cursor: pointer;
  opacity: 0;
}

.ketchup-complete-overlay.show .ketchup-complete-bottle {
  animation: ketchup-bottle-pop 850ms cubic-bezier(.18, .8, .2, 1) both;
}

.ketchup-complete-overlay.show .ketchup-glint {
  animation: ketchup-glint 520ms 620ms ease-out both;
}

.ketchup-complete-overlay.show .ketchup-glint-right {
  animation-delay: 740ms;
}

.ketchup-complete-overlay.show .ketchup-complete-film strong,
.ketchup-complete-overlay.show .ketchup-complete-film p,
.ketchup-complete-overlay.show .ketchup-complete-film button {
  animation: ketchup-copy 500ms 360ms ease both;
}

.ketchup-complete-overlay.show .ketchup-complete-film p {
  animation-delay: 470ms;
}

.ketchup-complete-overlay.show .ketchup-complete-film button {
  animation-delay: 600ms;
}

@keyframes ketchup-bottle-pop {
  0% { opacity: 0; transform: translateY(28px) scale(.72) rotate(-5deg); }
  58% { opacity: 1; transform: translateY(-7px) scale(1.04) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ketchup-glint {
  0% { opacity: 0; transform: scale(.35) rotate(-20deg); }
  55% { opacity: 1; transform: scale(1.12) rotate(8deg); }
  100% { opacity: .72; transform: scale(1) rotate(0); }
}

@keyframes ketchup-copy {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ketchup-complete-overlay,
  .ketchup-complete-bottle,
  .ketchup-glint,
  .ketchup-complete-film strong,
  .ketchup-complete-film p,
  .ketchup-complete-film button {
    transition: none;
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* Dark interaction states stay on the shared surface palette. */
html[data-theme="dark"] .toast {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--charcoal);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] #taskDrawer .task-card-sidebar {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--charcoal);
}

html[data-theme="dark"] #taskDrawer .owner-choice.active {
  border-color: var(--ice-deep);
  background: var(--ice-light);
  color: var(--ice);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ice-deep) 32%, transparent);
}

html[data-theme="dark"] #taskDrawer .owner-choice.active > span {
  background: color-mix(in srgb, var(--ice-deep) 30%, var(--surface-muted));
  color: var(--charcoal);
}

html[data-theme="dark"] #taskDrawer .subtask-name-button,
html[data-theme="dark"] .task-tree-depth-1 .project-task-copy strong {
  color: var(--charcoal);
}

html[data-theme="dark"] #taskDrawer .subtask-row.is-done .subtask-name-button {
  color: var(--muted);
}

/* Final dark-surface reconciliation. weekly-focus.css loads last, so every
   reusable surface that previously inherited a light-only literal is resolved
   against the shared dark tokens here. */
html[data-theme="dark"] :where(.mini-progress, .subtask-meter, .segmented-progress .progress-piece, .milestone-progress, .task-progress, .subtask-progress) {
  background: var(--surface-muted);
}

html[data-theme="dark"] #dashboardView .project-card {
  border-color: var(--border);
  background: color-mix(in srgb, var(--project-accent) 8%, var(--paper));
  color: var(--charcoal);
}

html[data-theme="dark"] #dashboardView .project-card:hover,
html[data-theme="dark"] #dashboardView .project-card:focus-visible {
  border-color: color-mix(in srgb, var(--project-accent) 46%, var(--border));
  background: color-mix(in srgb, var(--project-accent) 13%, var(--paper));
}

html[data-theme="dark"] #dashboardView .project-facts {
  border-color: var(--border);
}

html[data-theme="dark"] .thoughts-card {
  border-color: var(--border);
  background: var(--paper);
  color: var(--charcoal);
}

html[data-theme="dark"] .thoughts-card > p,
html[data-theme="dark"] .thoughts-card .eyebrow {
  color: var(--muted);
}

html[data-theme="dark"] .thoughts-card .idea-preview,
html[data-theme="dark"] .thoughts-card .secondary-button {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--charcoal);
}

html[data-theme="dark"] .review-header {
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--charcoal);
}

html[data-theme="dark"] .review-header p {
  color: var(--muted);
}

html[data-theme="dark"] #taskDrawer .task-card-sidebar {
  border-color: var(--border);
  background: var(--surface-subtle);
}

html[data-theme="dark"] #taskDrawer :where(.select-trigger, .owner-choice, input[type="date"]) {
  border-color: var(--border);
  background: var(--paper);
  color: var(--charcoal);
}

html[data-theme="dark"] .milestone-quick-task {
  border-color: var(--border);
  background: var(--surface-subtle);
}

html[data-theme="dark"] .milestone-quick-task :where(input, button) {
  border-color: var(--border);
  background: var(--paper);
  color: var(--charcoal);
}

html[data-theme="dark"] .milestone-quick-task input:focus {
  border-color: var(--ice-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ice-deep) 22%, transparent);
}

html[data-theme="dark"] #taskModal .task-project-choices button,
html[data-theme="dark"] #taskModal .task-quick-fields input[type="date"] {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--charcoal);
}

html[data-theme="dark"] #taskModal .task-project-choices button > span {
  background: var(--surface-muted);
  color: var(--ink-soft);
}

html[data-theme="dark"] #taskModal .task-project-choices button:hover {
  border-color: color-mix(in srgb, var(--ice-deep) 45%, var(--border));
  background: var(--surface-soft);
}

html[data-theme="dark"] #taskModal .task-project-choices button.active {
  border-color: var(--ice-deep);
  background: var(--ice-light);
  color: var(--ice);
}

html[data-theme="dark"] .project-detail.editing .context-done-action {
  border-color: var(--ice-deep);
  background: var(--ice-deep);
  color: #15191c;
}

html[data-theme="dark"] .project-detail.editing .context-done-action:hover,
html[data-theme="dark"] .project-detail.editing .context-done-action:focus-visible {
  background: color-mix(in srgb, var(--ice-deep) 88%, white);
  color: #15191c;
}

html[data-theme="dark"] .project-detail.editing .context-add-package {
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
}

html[data-theme="dark"] .roadmap-project-review span {
  border-color: color-mix(in srgb, var(--salmon) 40%, var(--border));
  background: color-mix(in srgb, var(--salmon) 14%, var(--paper));
  color: color-mix(in srgb, var(--salmon) 84%, white);
}

html[data-theme="dark"] .roadmap-package-review {
  border-color: color-mix(in srgb, var(--project-accent) 46%, var(--border));
  background: color-mix(in srgb, var(--project-accent) 15%, var(--paper));
  color: var(--charcoal);
}

html[data-theme="dark"] .roadmap-package-review i {
  border-color: var(--paper);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--project-accent) 42%, transparent);
}

html[data-theme="dark"] .roadmap-project-review i {
  background: var(--paper);
  color: var(--salmon);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--salmon) 34%, transparent);
}

html[data-theme="dark"] .roadmap-project-review:hover span {
  border-color: color-mix(in srgb, var(--salmon) 62%, var(--border));
  background: color-mix(in srgb, var(--salmon) 22%, var(--paper));
}

html[data-theme="dark"] .roadmap-package-review:hover {
  border-color: var(--project-accent);
  background: color-mix(in srgb, var(--project-accent) 24%, var(--paper));
}

/* Quiet Home canvas: the work itself is the strongest visual element. */
#dashboardView .week-section {
  width: auto;
  margin: 0;
  padding: 30px 0 34px;
  background: transparent;
}

#dashboardView .unified-workspace {
  padding: 22px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(31, 31, 31, 0.035);
  backdrop-filter: none;
}

#dashboardView .unified-board-head {
  margin-bottom: 20px;
}

/* Trello-like density: no empty reserved rows and no artificial card height. */
#dashboardView .kanban-task {
  display: flex;
  min-height: 0;
  padding: 15px;
  gap: 10px;
  flex-direction: column;
}

#dashboardView .kanban-open strong {
  min-height: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

#dashboardView .kanban-parent {
  margin: -3px 0 0;
}

#dashboardView .kanban-status-slot {
  min-height: 0;
}

#dashboardView .kanban-progress-slot {
  min-height: 0;
}

#dashboardView .kanban-progress-slot.is-empty {
  display: none;
}

#dashboardView .kanban-meta {
  display: flex;
  min-height: 28px;
  margin-top: 2px;
  align-items: center;
  justify-content: space-between;
}

#dashboardView .kanban-properties {
  margin-left: auto;
}

#dashboardView .full-kanban .kanban-column {
  align-self: start;
  padding-bottom: 12px;
}

/* Project Pulse prioritises live state rather than descriptive copy. */
#dashboardView .project-card {
  display: flex;
  min-height: 235px;
  padding: 20px;
  flex-direction: column;
  text-align: left;
}

#dashboardView .project-facts {
  display: grid;
  margin-top: 24px;
  padding: 13px 0;
  border-top: 1px solid rgba(31, 31, 31, 0.08);
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
  grid-template-columns: 1.45fr 0.7fr 0.7fr;
}

#dashboardView .project-facts > span {
  display: grid;
  gap: 3px;
}

#dashboardView .project-facts small {
  color: var(--muted);
  font-size: 9px;
}

#dashboardView .project-facts strong {
  font: 500 12px "Host Grotesk", sans-serif;
}

#dashboardView .health-reason {
  display: grid;
  min-height: 38px;
  margin: 13px 0 16px;
  gap: 2px;
}

#dashboardView .health-reason strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

#dashboardView .health-reason span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#dashboardView .project-card .progress-meta {
  margin-top: auto;
}

/* Needs Attention and Inbox use the same quiet, flat-panel treatment. */
#dashboardView .home-support-grid {
  align-items: start;
}

#dashboardView .attention-card,
#dashboardView .home-inbox {
  padding: 20px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(31, 31, 31, 0.035);
  backdrop-filter: none;
}

#dashboardView .attention-card {
  display: block;
}

#dashboardView .attention-head {
  padding: 0 0 13px;
  border-bottom: 1px solid var(--border);
}

#dashboardView .attention-item {
  display: grid;
  min-height: 58px;
  padding: 11px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

#dashboardView .attention-item + .attention-item {
  border-top: 1px solid var(--border);
}

#dashboardView .attention-item strong {
  font-size: 12px;
}

#dashboardView .attention-item .status-symbol {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

#dashboardView .home-inbox .section-heading {
  min-height: 53px;
  margin-bottom: 0;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

#dashboardView .home-inbox .inbox-list {
  border: 0;
  border-radius: 0;
}

#dashboardView .home-inbox .inbox-row {
  min-height: 58px;
  padding: 11px 0;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
}

#dashboardView .home-inbox .inbox-symbol {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--ice-light);
  color: #47728f;
}

#dashboardView .home-inbox .inbox-open strong {
  font-size: 12px;
  font-weight: 500;
}

#dashboardView .home-inbox .inbox-open small {
  margin-top: 2px;
  font-size: 10.5px;
}

#dashboardView .task-list-card {
  overflow: visible;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

#dashboardView .list-tabs {
  width: fit-content;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

#dashboardView #weekTaskList {
  overflow: visible;
  border-radius: 0;
}

#dashboardView .week-project-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#dashboardView .week-project-column,
#dashboardView .week-project-column:first-child,
#dashboardView .week-project-column:last-child {
  overflow: visible;
  min-width: 0;
  border: 0;
  border-right: 1px solid rgba(48, 93, 124, 0.12);
  border-radius: 0;
  background: transparent;
}

#dashboardView .week-project-column:last-child {
  border-right: 0;
}

#dashboardView .week-project-column > header {
  min-height: 45px;
  padding: 7px 12px 11px;
  border: 0;
  border-bottom: 1px solid rgba(48, 93, 124, 0.12);
  background: transparent;
}

#dashboardView .week-project-column > header .project-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

#dashboardView .week-project-column > header strong {
  overflow: hidden;
  font: 600 12px "Sora", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView .week-project-column > header small {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
}

#dashboardView .week-project-cards {
  gap: 8px;
  padding: 10px 9px;
}

#dashboardView .week-kanban-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(31, 31, 31, 0.075);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 7px rgba(31, 31, 31, 0.02);
}

#dashboardView .week-kanban-card .week-task {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 13px 12px 11px;
  border: 0;
}

#dashboardView .week-kanban-card .week-task > .task-check {
  width: 21px;
  height: 21px;
  margin-top: 1px;
  border-radius: 50%;
}

#dashboardView .week-kanban-card .task-open {
  min-width: 0;
}

#dashboardView .week-kanban-card .task-main strong {
  display: -webkit-box;
  overflow: hidden;
  font: 500 14px/1.28 "Host Grotesk", sans-serif;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#dashboardView .week-kanban-card .task-main small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #777d81;
  font-size: 10.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboardView .week-kanban-card .week-task > .row-properties {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 4px;
}

#dashboardView .week-kanban-card .property-pill {
  min-height: 25px;
  padding: 5px 8px;
  font-size: 9.5px;
}

#dashboardView .week-kanban-card .date-pill {
  min-width: 0;
  padding-right: 2px;
  padding-left: 2px;
  background: transparent;
}

#dashboardView .week-kanban-card .owner-property {
  width: 25px;
  padding: 0;
  margin-left: auto;
}

#dashboardView .week-subtasks {
  margin: 0 12px 5px 42px;
  border: 0;
  border-top: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 0;
  background: transparent;
}

#dashboardView .week-subtask {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 38px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(31, 31, 31, 0.055);
  border-radius: 0;
  background: transparent;
}

#dashboardView .week-subtask:last-child {
  border-bottom: 0;
}

#dashboardView .week-subtask-branch {
  display: none;
}

#dashboardView .week-subtask .task-check {
  width: 18px;
  height: 18px;
  border-width: 1.5px;
  border-radius: 50%;
}

#dashboardView .week-subtask .task-main strong {
  display: -webkit-box;
  overflow: hidden;
  color: #454a4d;
  font: 500 12px/1.25 "Host Grotesk", sans-serif;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#dashboardView .week-subtask.is-done .task-main strong {
  color: #949897;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

#dashboardView .week-subtask-properties {
  display: flex;
  gap: 2px;
  align-items: center;
}

#dashboardView .week-subtask-properties .property-pill {
  min-height: 22px;
  padding: 3px 5px;
  background: transparent;
  color: #777c80;
  font-size: 8.5px;
}

#dashboardView .week-subtask-properties .owner-property {
  width: 22px;
  margin-left: 0;
}

#dashboardView .add-inline {
  width: auto;
  margin-top: 8px;
  padding: 7px 2px;
  border: 0;
  background: transparent;
  color: #3d6f90;
}

#dashboardView .attention-card {
  margin-top: 0;
}

/* Subtasks in task details are a checklist, not a nested form. */
.drawer-subtasks-top {
  margin: 18px 0 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.drawer-subtasks-top .drawer-section-title {
  margin-bottom: 8px;
}

.drawer-subtasks-top .drawer-section-title > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.drawer-subtasks-top .drawer-section-title strong {
  font: 500 14px "Host Grotesk", sans-serif;
}

.drawer-subtasks-top .drawer-section-title small {
  font-size: 10px;
}

.drawer-subtasks-top .subtask-list {
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.drawer-subtasks-top .subtask-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 26px;
  gap: 9px;
  min-height: 46px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.drawer-subtasks-top .subtask-row .task-check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
}

.drawer-subtasks-top .subtask-name-button {
  width: 100%;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--charcoal);
  font: 500 13px/1.35 "Host Grotesk", sans-serif;
  text-align: left;
  cursor: pointer;
}

.drawer-subtasks-top .subtask-row.is-done .subtask-name-button {
  color: #8a8e8d;
  text-decoration: line-through;
}

.drawer-subtasks-top .subtask-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 8px;
}

.drawer-subtasks-top .subtask-add input {
  height: 38px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font: 400 13px "Host Grotesk", sans-serif;
}

.drawer-subtasks-top .subtask-add input:focus {
  border-bottom-color: #6ca8cf;
  box-shadow: none;
}

.drawer-subtasks-top .subtask-add .small-button {
  height: 36px;
  align-self: center;
  padding: 0 12px;
  border-radius: 9px;
}

/* Project-first task capture with a short, progressive quick path. */
#taskModal .task-compose-modal {
  width: min(760px, calc(100vw - 48px));
  padding: 26px 28px;
}

#taskModal .modal-header {
  margin-bottom: 20px;
}

#taskModal .task-project-first {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

#taskModal .task-project-first legend,
#taskModal .task-quick-fields label > span:first-child,
#taskModal .optional-details label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font: 500 11px "Host Grotesk", sans-serif;
}

#taskModal .task-project-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

#taskModal .task-project-choices button {
  display: flex;
  min-width: 0;
  height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fafafa;
  color: #64696d;
  font: 500 10.5px "Sora", sans-serif;
  cursor: pointer;
}

#taskModal .task-project-choices button > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 8px;
  background: #efefee;
  color: #50565a;
  font: 500 9px "IBM Plex Mono", monospace;
}

#taskModal .task-project-choices button:hover {
  border-color: #b8ccda;
  background: #f6fbfe;
}

#taskModal .task-project-choices button.active {
  border-color: #72aeda;
  background: var(--ice-light);
  color: #346b91;
  box-shadow: 0 0 0 2px rgba(114, 174, 218, 0.13);
}

#taskModal .project-choice-hint {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: #7b8084;
  font-size: 10.5px;
}

#taskModal #taskForm.project-choice-error .task-project-choices {
  padding: 3px;
  border-radius: 13px;
  box-shadow: 0 0 0 2px rgba(210, 88, 76, 0.2);
}

#taskModal #taskForm.project-choice-error .project-choice-hint {
  color: #b45148;
}

#taskModal .title-input {
  padding: 13px 14px;
  font-size: 15px;
}

#taskModal .task-quick-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 18px;
  align-items: start;
  margin: 20px 0 17px;
}

#taskModal .task-quick-fields input[type="date"] {
  height: 42px;
  background: #fafafa;
}

#taskModal .task-quick-fields .priority-choices {
  min-height: 42px;
}

#taskModal .task-quick-fields .priority-choice {
  min-height: 42px;
}

#taskModal .form-date-shortcuts {
  flex-wrap: wrap;
}

#taskModal .details-toggle {
  padding: 7px 0;
  color: #3f7193;
  font: 500 11px "Sora", sans-serif;
}

#taskModal .optional-details.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 13px;
  padding-top: 17px;
}

#taskModal .optional-details .form-row {
  display: contents;
}

#taskModal .optional-details .form-row > label,
#taskModal .optional-details .full-field {
  min-width: 0;
  margin: 0;
}

#taskModal .optional-details .full-field {
  grid-column: 1 / -1;
}

#taskModal .optional-details textarea {
  min-height: 76px;
}

#taskModal .modal-footer {
  margin-top: 18px;
  padding-top: 15px;
}

/* A single contextual plus keeps project capture fast without another toolbar. */
#dashboardView .week-project-add-button {
  display: grid;
  width: 30px;
  height: 30px;
  margin: 2px 10px 11px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.42);
  color: #3d7092;
  font-size: 18px;
  cursor: pointer;
}

#dashboardView .week-project-add-button:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.task-drawer .drawer-date-field {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  #dashboardView .week-project-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboardView .week-project-column:nth-child(2) {
    border-right: 0;
  }

  #dashboardView .week-project-column:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(48, 93, 124, 0.12);
  }
}

@media (max-width: 720px) {
  #dashboardView .week-section {
    margin-right: -18px;
    margin-left: -18px;
    padding: 24px 18px 28px;
  }

  #dashboardView .week-project-board {
    grid-template-columns: minmax(0, 1fr);
  }

  #dashboardView .task-list-card {
    padding: 12px;
    border-radius: 15px;
  }

  #dashboardView .week-project-column,
  #dashboardView .week-project-column:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(48, 93, 124, 0.12);
  }

  #dashboardView .week-project-column:last-child {
    border-bottom: 0;
  }

  #taskModal .task-compose-modal {
    width: min(100%, calc(100vw - 24px));
    padding: 22px 18px;
  }

  #taskModal .task-project-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #taskModal .task-quick-fields,
  #taskModal .optional-details.open {
    grid-template-columns: minmax(0, 1fr);
  }

  #taskModal .optional-details .full-field {
    grid-column: 1;
  }
}

/* Trello-inspired task focus card: work on the left, organisation on the right. */
#taskDrawerBackdrop {
  background: rgba(24, 28, 30, 0.38);
  backdrop-filter: blur(3px);
}

#taskDrawer.task-drawer {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(900px, calc(100vw - 64px));
  max-height: min(88vh, 860px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 31, 31, 0.1);
  border-radius: 22px;
  background: white;
  box-shadow: 0 30px 100px rgba(22, 29, 33, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 18px)) scale(0.985);
  transition: opacity 170ms ease, transform 190ms ease;
}

#taskDrawer.task-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#taskDrawerContent,
#taskDrawer #drawerTaskForm {
  height: min(88vh, 860px);
  min-height: 0;
}

#taskDrawer #drawerTaskForm {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#taskDrawer .task-card-header {
  align-items: flex-start;
  gap: 24px;
  margin: 0;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: white;
}

#taskDrawer .task-card-heading {
  min-width: 0;
  flex: 1;
}

#taskDrawer .task-card-title-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 7px;
}

#taskDrawer .task-card-complete {
  width: 32px;
  height: 32px;
}

#taskDrawer .drawer-title-input {
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.2;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

#taskDrawer .drawer-title-input:hover {
  background: #f8f8f7;
}

#taskDrawer .drawer-title-input:focus {
  border-color: #92bdd9;
  background: white;
  box-shadow: 0 0 0 3px rgba(108, 168, 207, 0.14);
}

#taskDrawer .connection-path {
  margin: 6px 0 0 48px;
}

#taskDrawer .parent-link {
  margin-left: 48px;
}

#taskDrawer .close-button {
  flex: 0 0 auto;
}

#taskDrawer .task-card-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow: hidden;
}

#taskDrawer .task-card-main,
#taskDrawer .task-card-sidebar {
  min-height: 0;
  overflow-y: auto;
}

#taskDrawer .task-card-main {
  padding: 24px 28px 32px;
}

#taskDrawer .task-card-sidebar {
  padding: 25px 22px 30px;
  border-left: 1px solid var(--border);
  background: #fafafa;
}

#taskDrawer .task-card-section {
  margin: 0;
  padding: 0 0 25px;
  border: 0;
}

#taskDrawer .task-card-section + .task-card-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

#taskDrawer .task-card-section-title,
#taskDrawer .drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

#taskDrawer .task-card-section-title strong,
#taskDrawer .drawer-section-title strong {
  font: 500 15px "Sora", sans-serif;
}

#taskDrawer .drawer-section-title > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

#taskDrawer .drawer-section-title small {
  color: var(--muted);
  font-size: 11px;
}

#taskDrawer .subtask-progress {
  width: 110px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e9e8;
}

#taskDrawer .subtask-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-confirm);
}

#taskDrawer .subtask-list {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

#taskDrawer .subtask-row {
  min-height: 48px;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  padding: 5px 2px;
  border-bottom: 1px solid #ececeb;
}

#taskDrawer .subtask-row:first-child {
  border-top: 1px solid #ececeb;
}

#taskDrawer .subtask-name-button {
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font: 400 13px "Host Grotesk", sans-serif;
  text-align: left;
  cursor: pointer;
}

#taskDrawer .subtask-row.is-done .subtask-name-button {
  color: #858a88;
  text-decoration: line-through;
}

#taskDrawer .subtask-delete {
  opacity: 0;
}

#taskDrawer .subtask-row:hover .subtask-delete,
#taskDrawer .subtask-delete:focus-visible {
  opacity: 1;
}

#taskDrawer .subtask-add {
  margin-top: 9px;
}

#taskDrawer .subtask-add input {
  height: 39px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
}

#taskDrawer .subtask-add input:hover,
#taskDrawer .subtask-add input:focus {
  border-color: var(--border);
  background: #fafafa;
}

#taskDrawer .task-card-description {
  width: 100%;
  min-height: 112px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  outline: none;
  resize: vertical;
  background: #f8f8f7;
  color: var(--charcoal);
  font: 400 13px/1.55 "Host Grotesk", sans-serif;
}

#taskDrawer .task-card-description:hover,
#taskDrawer .task-card-description:focus {
  border-color: #c9dce8;
  background: white;
}

#taskDrawer .task-link-section input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #fafafa;
  font: 400 12px "Host Grotesk", sans-serif;
}

#taskDrawer .task-link-list {
  display: grid;
  gap: 8px;
}

#taskDrawer .task-link-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(180px, 1fr) 34px 30px;
  gap: 7px;
  align-items: center;
}

#taskDrawer .task-link-row a,
#taskDrawer .task-link-row button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f2f3f3;
  color: #477392;
  text-decoration: none;
  cursor: pointer;
}

#taskDrawer .task-link-row button {
  color: var(--muted);
}

#taskDrawer .task-link-row a:hover,
#taskDrawer .task-link-row button:hover {
  background: var(--ice-light);
}

#taskDrawer .task-card-meta-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0 0;
}

#taskDrawer .task-card-meta-fields > label,
#taskDrawer .task-card-organisation > label {
  min-width: 0;
}

#taskDrawer .task-card-meta-fields label > span:first-child,
#taskDrawer .task-card-organisation label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

#taskDrawer .drawer-owner-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

#taskDrawer .drawer-date-field {
  grid-column: auto;
}

#taskDrawer .drawer-date-field input {
  width: 100%;
}

#taskDrawer .drawer-date-field .form-date-shortcuts {
  flex-wrap: wrap;
  margin: 0 0 7px;
  overflow: visible;
  opacity: 1;
}

#taskDrawer .task-card-organisation {
  display: grid;
  gap: 13px;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

#taskDrawer .task-card-footer {
  margin: 0;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: white;
}

#taskDrawer .autosave-note {
  color: var(--muted);
  font-size: 10px;
}

/* The sidebar describes the selected package, or the whole project on General. */
.project-side-heading > div {
  display: grid;
  gap: 4px;
}

.project-side-heading > div > strong {
  font: 600 15px "Sora", sans-serif;
}

.direct-tasks-head {
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.direct-tasks-head h3 {
  margin-bottom: 0;
}

.direct-tasks-empty {
  padding: 20px;
}

@media (max-width: 820px) {
  #taskDrawer.task-drawer {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 17px;
  }

  #taskDrawerContent,
  #taskDrawer #drawerTaskForm {
    height: calc(100vh - 24px);
  }

  #taskDrawer .task-card-body {
    display: block;
    overflow-y: auto;
  }

  #taskDrawer .task-card-main,
  #taskDrawer .task-card-sidebar {
    overflow: visible;
  }

  #taskDrawer .task-card-sidebar {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  #taskDrawer .task-card-header {
    padding: 20px 18px 16px;
  }

  #taskDrawer .task-card-main {
    padding: 20px 18px 25px;
  }
}

/* Final unified-board rules. Keep these last so legacy experiments cannot
   reintroduce fixed card heights or narrow four-column layouts. */
#dashboardView .week-section {
  width: auto;
  margin: 0;
  padding: 30px 0 34px;
  background: transparent;
}

#dashboardView .unified-workspace {
  padding: 22px;
  border: var(--surface-border);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--surface-shadow);
  backdrop-filter: none;
}

#dashboardView .full-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  align-items: start;
  gap: 14px;
  min-width: 0;
  overflow: visible;
}

#dashboardView .full-kanban .kanban-column {
  align-self: start;
  min-width: 0;
  padding-bottom: 10px;
}

#dashboardView .kanban-task {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: var(--card-padding);
  gap: var(--card-gap);
  flex-direction: column;
}

#dashboardView .kanban-open strong {
  display: block;
  min-height: 0;
  margin: 0;
  overflow: visible;
  font-size: 13px;
  line-height: 1.4;
  -webkit-line-clamp: unset;
}

#dashboardView .kanban-parent {
  display: -webkit-box;
  margin: -3px 0 0;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#dashboardView .kanban-status-slot,
#dashboardView .kanban-progress-slot {
  min-height: 0;
}

#dashboardView .kanban-progress-slot.is-empty {
  display: none;
}

#dashboardView .kanban-meta {
  display: flex;
  min-height: 28px;
  margin-top: 2px;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
}

#dashboardView .kanban-properties {
  margin-left: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#dashboardView .full-kanban[data-mode="status"] .kanban-properties {
  margin-left: auto;
  justify-content: flex-end;
}


#dashboardView .kanban-add-task {
  width: calc(100% - 20px);
  margin: 3px 10px 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #646a6d;
  font: 500 11px "Sora", sans-serif;
  text-align: left;
  cursor: pointer;
}

#dashboardView .kanban-add-task:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--charcoal);
}

#dashboardView .home-support-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#dashboardView .attention-card,
#dashboardView .home-inbox {
  border: var(--surface-border);
  background: var(--paper);
  box-shadow: var(--surface-shadow);
}

@media (max-width: 900px) {
  #dashboardView .home-support-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep the project overview as four stable lanes. Narrow windows scroll the
   board instead of turning projects into a vertical feed. */
#dashboardView .full-kanban {
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  min-width: 1060px;
}

#dashboardView .unified-workspace {
  overflow-x: auto;
  scrollbar-color: rgba(31, 31, 31, 0.18) transparent;
  scrollbar-width: thin;
}

/* Quick choices remain visible. The native picker opens only when requested. */
#inlinePopover .date-shortcuts {
  margin: 0 0 12px;
}

#inlinePopover .popover-calendar-field {
  display: grid;
  gap: 6px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

#inlinePopover .popover-calendar-field > span {
  color: var(--muted);
  font-size: 10px;
}

#inlinePopover .popover-date {
  height: var(--control-height);
  font-size: 12px;
}

/* Status view needs the full project name to remain readable. */
#dashboardView .full-kanban[data-mode="status"] .kanban-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

#dashboardView .full-kanban[data-mode="status"] .project-property {
  justify-self: start;
  max-width: 100%;
  overflow: visible;
  flex: none;
  text-overflow: clip;
}

#dashboardView .full-kanban[data-mode="status"] .kanban-properties {
  width: 100%;
  margin-left: 0;
  justify-content: space-between;
}

#dashboardView .kanban-task[data-open-task] {
  cursor: pointer;
}

#dashboardView .kanban-task[data-open-task]:hover {
  border-color: color-mix(in srgb, var(--column-accent, #7eaed0) 46%, var(--border));
  box-shadow: 0 5px 16px rgba(31, 31, 31, 0.055);
}

#dashboardView .kanban-task[data-open-task]:focus-visible {
  outline: 2px solid var(--column-accent, var(--ice-deep));
  outline-offset: 2px;
}

#dashboardView .kanban-package {
  display: block;
  margin: -4px 0 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep dashboard-specific rules inside the shared dark surface system. This
   file loads after styles.css, so its dark exceptions must live here too. */
html[data-theme="dark"] #dashboardView .full-kanban .kanban-column,
html[data-theme="dark"] #dashboardView .week-project-column {
  border-color: var(--border);
  background: color-mix(in srgb, var(--column-accent, #7eaed0) 9%, var(--paper));
}

html[data-theme="dark"] #dashboardView .week-project-column > header {
  border-bottom-color: var(--border);
}

html[data-theme="dark"] #dashboardView .week-project-column > header .project-logo,
html[data-theme="dark"] #dashboardView .week-project-column > header small {
  background: #34383c;
  color: var(--ink-soft);
}

html[data-theme="dark"] #dashboardView .kanban-task,
html[data-theme="dark"] #dashboardView .week-kanban-card {
  border-color: var(--border);
  background: #25282b;
}

html[data-theme="dark"] #dashboardView .kanban-task[data-open-task]:hover,
html[data-theme="dark"] #dashboardView .week-kanban-card:hover {
  border-color: color-mix(in srgb, var(--column-accent, var(--ice-deep)) 52%, var(--border));
  background: #2b2f32;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] #dashboardView .kanban-add-task:hover,
html[data-theme="dark"] #dashboardView .week-project-add-button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--charcoal);
}

html[data-theme="dark"] #taskDrawer.task-drawer,
html[data-theme="dark"] #taskDrawer .task-card-header,
html[data-theme="dark"] #taskDrawer .task-card-footer,
html[data-theme="dark"] #taskDrawer .drawer-title-input:focus,
html[data-theme="dark"] #taskDrawer .task-card-description:hover,
html[data-theme="dark"] #taskDrawer .task-card-description:focus {
  background: var(--paper);
}

html[data-theme="dark"] #taskDrawer .drawer-title-input:hover,
html[data-theme="dark"] #taskDrawer .task-card-description,
html[data-theme="dark"] #taskDrawer .subtask-add input:hover,
html[data-theme="dark"] #taskDrawer .subtask-add input:focus,
html[data-theme="dark"] #taskDrawer .task-link-section input {
  background: var(--surface-subtle);
}

html[data-theme="dark"] #taskDrawer .task-link-row a,
html[data-theme="dark"] #taskDrawer .task-link-row button {
  background: var(--surface-muted);
}

/* Focused Home hierarchy: work starts immediately after one compact header. */
#dashboardView {
  padding-top: 24px;
}

#dashboardView .week-section {
  padding: 0 0 24px;
}

#dashboardView .home-week-header {
  display: flex;
  max-width: 1320px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 12px;
}

#dashboardView .home-week-header h1 {
  margin: 0;
  font-size: clamp(27px, 2.5vw, 34px);
  line-height: 1.15;
}

#dashboardView .home-week-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

#dashboardView .home-review-button {
  flex: 0 0 auto;
  padding: 8px 0;
  white-space: nowrap;
}

#dashboardView .unified-board-head {
  justify-content: space-between;
  margin-bottom: 8px;
}

#dashboardView .home-owner-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#dashboardView .home-owner-filter button {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--ice-light);
  color: #3c6887;
  font: 600 9px "Sora", sans-serif;
  cursor: pointer;
}

#dashboardView .home-owner-filter button:hover {
  border-color: var(--ice-deep);
  background: var(--ice-light);
  color: #315f7e;
}

#dashboardView .home-owner-filter button.active {
  border-color: var(--ice-deep);
  background: var(--ice);
  color: #244f6c;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ice-deep) 22%, transparent);
}

#dashboardView .home-owner-filter button:focus-visible {
  outline: 2px solid var(--ice-deep);
  outline-offset: 2px;
}

html[data-theme="dark"] #dashboardView .home-owner-filter button:hover,
html[data-theme="dark"] #dashboardView .home-owner-filter button.active {
  border-color: var(--ice-deep);
  background: #29485d;
  color: #b9ddf4;
}

html[data-theme="dark"] #dashboardView .home-owner-filter button {
  background: #34383c;
  color: #c6c9cb;
}

@media (max-width: 760px) {
  #dashboardView .unified-board-head {
    align-items: flex-start;
  }
}

#dashboardView .unified-workspace {
  min-height: 0;
  padding: 14px;
}

#dashboardView .full-kanban {
  min-height: 0;
}

#dashboardView .full-kanban .kanban-column {
  height: auto;
  min-height: 0;
}

#dashboardView .kanban-task {
  height: auto;
  min-height: 0;
}

#dashboardView .kanban-add-task {
  min-height: 38px;
}

@media (max-width: 760px) {
  #dashboardView .home-week-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  #dashboardView .home-week-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Final task-card navigation and metadata hierarchy. */
#dashboardView .kanban-task {
  container-name: task-card;
  container-type: inline-size;
}

.task-breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

#dashboardView .task-breadcrumbs.kanban-package {
  display: flex;
}

.task-breadcrumb {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.task-breadcrumb:hover,
.task-breadcrumb:focus-visible {
  color: #356f98;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.task-breadcrumb:focus-visible {
  border-radius: 4px;
  outline: 2px solid color-mix(in srgb, var(--ice-deep) 44%, transparent);
  outline-offset: 2px;
}

.task-breadcrumb-separator {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--muted) 62%, transparent);
}

#taskDrawer .connection-path .task-breadcrumbs {
  display: contents;
}

#dashboardView .kanban-meta,
#dashboardView .full-kanban[data-mode="status"] .kanban-meta {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

#dashboardView .kanban-priority-slot {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

#dashboardView .kanban-meta-right {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

#dashboardView .kanban-meta-right .owner-property {
  flex: 0 0 auto;
  margin: 0;
}

#dashboardView .task-link-indicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
}

#dashboardView .task-link-indicator .chain-icon {
  transform: scale(0.78);
}

#dashboardView .task-link-indicator b {
  font: 600 9px "IBM Plex Mono", monospace;
}

#dashboardView .kanban-meta-right .date-pill {
  flex: 0 1 auto;
  min-width: 0;
  padding-right: 2px;
  padding-left: 2px;
  overflow: hidden;
  background: transparent;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-label-short {
  display: none;
}

@container task-card (max-width: 255px) {
  #dashboardView .date-label-long {
    display: none;
  }

  #dashboardView .date-label-short {
    display: inline;
  }
}

/* Owner filters begin neutral, then borrow blue only for hover and selection. */
#dashboardView .home-owner-filter button,
html[data-theme="dark"] #dashboardView .home-owner-filter button {
  border-color: color-mix(in srgb, var(--muted) 30%, var(--border));
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

#dashboardView .home-owner-filter button:hover,
html[data-theme="dark"] #dashboardView .home-owner-filter button:hover {
  border-color: color-mix(in srgb, var(--ice-deep) 46%, var(--border));
  background: var(--ice-light);
  color: #356f98;
}

#dashboardView .home-owner-filter button.active,
html[data-theme="dark"] #dashboardView .home-owner-filter button.active {
  border-color: var(--ice-deep);
  background: color-mix(in srgb, var(--ice) 42%, var(--paper));
  color: #285f86;
  box-shadow: none;
}

html[data-theme="dark"] #dashboardView .home-owner-filter button:hover {
  background: #263b49;
  color: #add6f1;
}

html[data-theme="dark"] #dashboardView .home-owner-filter button.active {
  background: #29485d;
  color: #b9ddf4;
}
