
:root {
  color: #1b1f24;
  background: #3b434d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.description-image {
  display: block;
  height: auto;
  max-width: 100%;
  border-radius: 4px;
}

body {
  margin: 0;
}

html:has(dialog[open]) {
  overflow: hidden;
}

::selection {
  background: #444444;
  color: #ffffff;
}

:focus-visible {
  box-shadow: 0 0 0 4px #e6e9ee;
  outline: 2px solid #0f4d24;
  outline-offset: 2px;
}

.matrix-cards,
.description-editor,
.ideas-composer__description,
.idea-detail-modal .idea-detail__form,
.idea-detail__description {
  scrollbar-color: #8b949e transparent;
  scrollbar-width: thin;
}

.matrix-cards::-webkit-scrollbar,
.description-editor::-webkit-scrollbar,
.ideas-composer__description::-webkit-scrollbar,
.idea-detail-modal .idea-detail__form::-webkit-scrollbar,
.idea-detail__description::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.matrix-cards::-webkit-scrollbar-track,
.description-editor::-webkit-scrollbar-track,
.ideas-composer__description::-webkit-scrollbar-track,
.idea-detail-modal .idea-detail__form::-webkit-scrollbar-track,
.idea-detail__description::-webkit-scrollbar-track {
  background: transparent;
}

.matrix-cards::-webkit-scrollbar-button,
.description-editor::-webkit-scrollbar-button,
.ideas-composer__description::-webkit-scrollbar-button,
.idea-detail-modal .idea-detail__form::-webkit-scrollbar-button,
.idea-detail__description::-webkit-scrollbar-button {
  display: none;
}

.matrix-cards::-webkit-scrollbar-thumb,
.description-editor::-webkit-scrollbar-thumb,
.ideas-composer__description::-webkit-scrollbar-thumb,
.idea-detail-modal .idea-detail__form::-webkit-scrollbar-thumb,
.idea-detail__description::-webkit-scrollbar-thumb {
  background: transparent;
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.matrix-cards:hover::-webkit-scrollbar-thumb,
.description-editor:hover::-webkit-scrollbar-thumb,
.ideas-composer__description:hover::-webkit-scrollbar-thumb,
.idea-detail-modal .idea-detail__form:hover::-webkit-scrollbar-thumb,
.idea-detail__description:hover::-webkit-scrollbar-thumb,
.matrix-cards:focus-within::-webkit-scrollbar-thumb,
.description-editor:focus-within::-webkit-scrollbar-thumb,
.ideas-composer__description:focus-within::-webkit-scrollbar-thumb,
.idea-detail-modal .idea-detail__form:focus-within::-webkit-scrollbar-thumb,
.idea-detail__description:focus-within::-webkit-scrollbar-thumb {
  background: #8b949e;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #e6e9ee;
  border-bottom: 1px solid #8b949e;
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 8px;
}

.logout {
  margin: 0 0 0 auto;
}

.nav a,
.button {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 12px;
}

.nav .active,
.button.primary {
  background: #1f883d;
  border-color: #2a9147;
  color: #ffffff;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

.page--matrix {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 63px);
  max-width: none;
  padding: 3vh 5vw;
  row-gap: 18px;
  width: 100%;
}

.page--matrix > * {
  justify-self: center;
  width: min(100%, 80vw);
}

.task-status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.task-status-filter .button.small {
  min-height: 32px;
  padding: 5px 12px;
}

.task-status-filter .button.is-active {
  background: #1f883d;
  border-color: #2a9147;
  color: #ffffff;
}

.task-status-filter--toolbar {
  margin-bottom: 0;
}

.task-status-filter[hidden],
.task-selection-summary[hidden] {
  display: none;
}

.task-selection-summary {
  align-items: center;
  color: #1b1f24;
  display: flex;
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
  margin: 0 0 18px;
}

.task-selection-summary--toolbar {
  margin: 0;
}

.page--matrix .matrix-axis {
  height: 100%;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title {
  color: #e6e9ee;
  font-size: 24px;
  margin: 0;
}

.muted {
  color: #b1bac4;
  font-size: 13px;
}

@media (width < 40rem) {
  .topbar {
    padding: 12px 16px;
  }

  .nav {
    flex-basis: 100%;
    order: 3;
  }

  .nav a {
    flex: 1;
    justify-content: center;
  }

  .page {
    padding: 16px;
  }

  .page--matrix {
    height: auto;
    min-height: calc(100vh - 63px);
    padding: 16px;
  }

  .page--matrix .matrix-axis {
    height: auto;
  }

  .page--matrix > * {
    width: 100%;
  }

  .page-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (width >= 40rem) {
  .topbar {
    flex-wrap: nowrap;
  }
}

.matrix {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.page--matrix .error {
  color: #e6e9ee;
}

.matrix-axis {
  background: #aeb8c4;
  border: 1px solid #8b949e;
  border-radius: 8px;
  gap: 12px;
  grid-template-rows: repeat(4, minmax(0, auto));
  min-height: auto;
  padding: 20px;
  position: relative;
}

.axis-line {
  color: #3f4854;
  display: none;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.axis-line::before {
  background: #3f4854;
  content: "";
  position: absolute;
}

.axis-line::after {
  border-color: #3f4854;
  border-style: solid;
  content: "";
  position: absolute;
}

.axis-line span {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 999px;
  padding: 4px 10px;
  position: absolute;
  white-space: nowrap;
}

.axis-line--horizontal {
  inset: 50% 20px auto;
  transform: translateY(-50%);
}

.axis-line--horizontal::before {
  height: 2px;
  left: 0;
  right: 18px;
  top: 0;
}

.axis-line--horizontal::after {
  border-width: 2px 2px 0 0;
  height: 12px;
  right: 4px;
  top: -5px;
  transform: rotate(45deg);
  width: 12px;
}

.axis-line--horizontal span {
  right: 32px;
  top: -38px;
}

.axis-line--vertical {
  inset: 72px auto 72px 50%;
  transform: translateX(-50%);
}

.axis-line--vertical::before {
  bottom: 0;
  left: 0;
  top: 18px;
  width: 2px;
}

.axis-line--vertical::after {
  border-width: 2px 0 0 2px;
  height: 12px;
  left: -5px;
  top: 4px;
  transform: rotate(45deg);
  width: 12px;
}

.axis-line--vertical span {
  left: 12px;
  top: -44px;
}

.area {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
  min-height: 280px;
  padding: 14px;
}

.area--quadrant {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.area--quadrant .matrix-cards {
  flex: 1;
  min-height: 0;
  overflow-y: visible;
}

.area--quadrant::after {
  background: linear-gradient(to bottom, rgb(174 184 196 / 0%), #aeb8c4);
  border-radius: 0 0 6px 6px;
  bottom: 0;
  content: "";
  height: 28px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  transition: opacity 120ms ease;
  z-index: 2;
}

.area--quadrant:hover::after,
.area--quadrant:focus-within::after {
  opacity: 1;
}

.area-create-link {
  inset: 0;
  position: absolute;
  z-index: 0;
}

.matrix-create-link {
  display: none;
  position: absolute;
  z-index: 0;
}

.matrix-create-link--q1 {
  inset: 0 50% 50% 0;
}

.matrix-create-link--q2 {
  inset: 0 0 50% 50%;
}

.matrix-create-link--q3 {
  inset: 50% 50% 0 0;
}

.matrix-create-link--q4 {
  inset: 50% 0 0 50%;
}

.area--quadrant h2,
.area--quadrant .matrix-cards {
  position: relative;
  z-index: 1;
}

.area--q1 {
  grid-column: 1;
  grid-row: 1;
}

.area--q2 {
  grid-column: 1;
  grid-row: 2;
}

.area--q3 {
  grid-column: 1;
  grid-row: 3;
}

.area--q4 {
  grid-column: 1;
  grid-row: 4;
}

.area h2 {
  align-items: center;
  display: flex;
  font-size: 16px;
  justify-content: space-between;
  margin: 0 0 12px;
}

.task-card,
.task-row {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
}

.form-panel,
.side-panel,
.state-card {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
}

.task-card {
  border-color: #1b1f24;
  box-shadow: 0 1px 2px rgb(31 35 40 / 12%);
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  min-height: 72px;
  padding: 12px;
  -webkit-user-select: none;
  user-select: none;
}

.task-card--working,
.task-row--working {
  border-left: 4px solid #0f4d24;
}

.task-card:hover {
  border-color: #1f883d;
  box-shadow: 0 0 0 2px #b7e3c3;
}

.task-card-header {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.task-card.dragging {
  border-color: #1f883d;
  box-shadow: 0 0 0 3px #b7e3c3;
  opacity: 0.72;
}

.matrix-drag-ghost {
  left: 0;
  margin: 0;
  opacity: 0.85;
  pointer-events: none;
  position: fixed;
  top: 0;
  z-index: 100;
}

.matrix-drag-placeholder {
  background: #b7e3c3;
  flex: none;
  margin-bottom: 12px;
  pointer-events: none;
}

.area--quadrant.drop-target {
  background: #f6f8fa;
  border-radius: 8px;
}

.task-title {
  font-weight: 700;
}

.status {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  width: max-content;
}

.area-badge {
  background: transparent;
  border-color: #8b949e;
  color: #3f4854;
}

.status--do {
  background: transparent;
  border-color: #1b1f24;
  color: #1b1f24;
}

.status--done {
  background: #b7e3c3;
  border-color: #4ac26b;
  color: #0f4d24;
}

.status--skip {
  background: #f6f8fa;
  border-color: #8b949e;
  color: #3f4854;
}

.working-badge {
  align-items: center;
  background: transparent;
  border: 1px solid #0f4d24;
  border-radius: 999px;
  color: #0f4d24;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 3px 8px;
  width: max-content;
}

.working-badge::before {
  background: #0f4d24;
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}

.page--ideas {
  background: #3b434d;
  color: #e6e9ee;
  max-width: none;
  min-height: calc(100vh - 63px);
  padding: 48px 16px;
}

.page--ideas-empty {
  display: flex;
  flex-direction: column;
}

.ideas-header {
}

.ideas-composer {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(31 35 40 / 8%);
  color: #3f4854;
  margin: 0 auto 28px;
  width: min(100%, 1008px);
}

.ideas-composer__trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: text;
  display: flex;
  font: inherit;
  font-size: 14px;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  text-align: left;
  width: 100%;
}

.ideas-composer__line {
  border-bottom: 2px solid #3f4854;
  border-top: 2px solid #3f4854;
  height: 8px;
  opacity: 0.7;
  width: 18px;
}

.ideas-composer--open {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  box-shadow: 0 1px 3px rgb(31 35 40 / 8%);
  padding: 0;
}

.ideas-composer--open .ideas-composer__trigger {
  display: none;
}

.ideas-composer__editor {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ideas-composer__editor[hidden] {
  display: none;
}

.ideas-composer__title,
.ideas-composer__description {
  background: transparent;
  border: 0;
  color: #1b1f24;
  font: inherit;
  outline: 0;
  padding: 0;
  width: 100%;
}

.ideas-composer__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.ideas-composer__description {
  field-sizing: content;
  line-height: 1.55;
  max-height: 672px;
  min-height: 24px;
  overflow-y: auto;
  resize: none;
}

.ideas-composer__title:focus,
.ideas-composer__description:focus {
  box-shadow: 0 2px 0 #0f4d24;
}

.ideas-composer__actions {
  display: flex;
  justify-content: flex-end;
}

.ideas-composer__close {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #3f4854;
  cursor: pointer;
  font: inherit;
  padding: 8px 16px;
}

.ideas-composer__close:hover,
.ideas-composer__close:focus-visible {
  background: #f6f8fa;
  color: #0f4d24;
}

.ideas-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-inline: auto;
  position: relative;
  width: 100%;
}

.ideas-group-gap {
  height: 24px;
  margin: 16px 0;
}

.ideas-grid.masonry-ready {
  display: block;
  min-height: 0;
}

.idea-card {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgb(31 35 40 / 8%);
  display: flex;
  flex-direction: column;
  max-height: 672px;
  overflow: hidden;
  position: relative;
  width: auto;
  padding: 16px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.idea-card:nth-child(3n + 2) {
  background: #b6c0cb;
}

.idea-card:nth-child(3n + 3) {
  background: #ccd3dc;
}

.idea-card:hover {
  border-color: #1f883d;
  box-shadow: 0 4px 12px rgb(31 35 40 / 14%);
  transform: translateY(-1px);
}

.idea-card[draggable="true"] {
  cursor: grab;
}

.idea-card.dragging {
  cursor: grabbing;
  opacity: 0.45;
}

.idea-card.drop-target {
  border-color: #1f883d;
}

.idea-card__link {
  column-gap: 8px;
  color: inherit;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  text-decoration: none;
}

.idea-card__pin {
  cursor: pointer;
  display: block;
  fill: #ffffff;
  grid-column: 1;
  height: 18px;
  stroke: #1b1f24;
  stroke-width: 1.5;
  width: 18px;
}

.idea-card[data-pinned="true"] .idea-card__pin {
  fill: #1b1f24;
  stroke: none;
}

.idea-card h2 {
  color: #1b1f24;
  font-size: 17px;
  line-height: 1.4;
  grid-column: 2;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.idea-card__description {
  border-top: 1px solid #8b949e;
  color: #3f4854;
  font-size: 14px;
  grid-column: 1 / -1;
  line-height: 1.55;
  margin: 12px 0 0;
  padding-top: 12px;
  white-space: pre-wrap;
}

.idea-card__description--empty {
  border-top: 0;
  font-style: italic;
  padding-top: 0;
}

.ideas-grid.masonry-ready > .idea-card {
  margin: 0;
  position: absolute;
}

.idea-card__footer {
  align-items: center;
  bottom: 16px;
  color: #3f4854;
  display: flex;
  font-size: 11px;
  justify-content: flex-end;
  margin: 0;
  opacity: 0;
  padding-top: 0;
  position: absolute;
  right: 16px;
  transition: opacity 120ms ease;
}

.idea-card:hover .idea-card__footer,
.idea-card:focus-within .idea-card__footer {
  opacity: 1;
}

.idea-card__more {
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 28px;
  position: relative;
  width: 28px;
}

.idea-card__more:hover {
  background: #8b949e;
}

.idea-card__more span,
.idea-card__more span::before,
.idea-card__more span::after {
  background: #3f4854;
  border-radius: 50%;
  content: "";
  height: 3px;
  left: 13px;
  position: absolute;
  top: 13px;
  width: 3px;
}

.idea-card__more span::before {
  left: -7px;
  top: 0;
}

.idea-card__more span::after {
  left: 7px;
  top: 0;
}

.ideas-empty {
  background: #c1c9d3;
  border: 1px dashed #8b949e;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgb(31 35 40 / 8%);
  color: #1b1f24;
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  min-height: 240px;
  padding: 56px 24px;
  text-align: center;
  width: min(100%, 1008px);
}

.ideas-empty h2 {
  font-size: 18px;
  margin: 0;
}

.ideas-empty p {
  margin: 0;
}

.page--idea-detail {
  background: #3b434d;
  max-width: none;
  min-height: calc(100vh - 63px);
  padding: 24px 5vw 48px;
}

.idea-detail__header {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.idea-detail__title {
  background: transparent;
  border: 0;
  color: #1b1f24;
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  outline: 0;
  padding: 0;
}

.idea-detail__title:focus {
  box-shadow: 0 2px 0 #0f4d24;
}

.idea-detail__pin {
  align-items: center;
  background: transparent;
  border: 0;
  color: #1b1f24;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  padding: 6px;
  width: 36px;
}

.idea-detail__pin svg {
  fill: currentColor;
  height: 22px;
  stroke: none;
  width: 22px;
}

.idea-detail__pin[aria-pressed="true"] {
  color: #1b1f24;
}

.idea-detail__pin[aria-pressed="false"] {
  color: #ffffff;
}

.idea-detail__pin[aria-pressed="false"] svg {
  stroke: #1b1f24;
  stroke-width: 1.5;
}

.idea-detail__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #3f4854;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  min-width: 80px;
  padding: 8px 16px;
  text-decoration: none;
}

.idea-detail-modal {
  background: #c1c9d3;
  color: #1b1f24;
  border: 0;
  border-radius: 8px;
  max-height: calc(100vh - 48px);
  max-width: 720px;
  padding: 0;
  width: calc(100vw - 32px);
}

.idea-detail-modal::backdrop {
  background: rgb(31 35 40 / 65%);
}

.idea-detail-modal .idea-detail__form {
  background: #c1c9d3;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding-bottom: 8px;
}

.idea-detail__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.idea-detail__close:hover,
.idea-detail__close:focus-visible {
  background: #f6f8fa;
  color: #0f4d24;
}

.idea-detail__form {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgb(31 35 40 / 8%);
  padding: 24px;
}

.idea-detail__description {
  background: transparent;
  border: 0;
  border-top: 1px solid #8b949e;
  box-shadow: none;
  line-height: 1.55;
  max-height: calc(100vh - 180px);
  min-height: 240px;
  outline: 0;
  overflow-y: auto;
  padding: 12px 0 0;
  white-space: pre-wrap;
  width: 100%;
}

.idea-detail__description--empty {
  border-top: 0;
  padding-top: 0;
}

.idea-detail__description a {
  color: inherit;
  text-decoration: underline;
}

.idea-detail-modal .idea-detail__description {
  flex: 1 1 auto;
  max-height: none;
}

@media (width < 40rem) {
  .page--ideas {
    padding: 24px 16px 32px;
  }

  .page--idea-detail {
    padding: 16px;
  }

  .ideas-header {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .ideas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .idea-card {
    width: auto;
  }
}

@media (width < 22.5rem) {
  .ideas-grid {
    grid-template-columns: 1fr;
  }
}

@media (width >= 40rem) and (width < 56rem) {
  .ideas-grid {
    grid-template-columns: repeat(2, 240px);
    width: 496px;
  }
}

@media (width >= 56rem) and (width < 72rem) {
  .ideas-grid {
    grid-template-columns: repeat(3, 240px);
    width: 752px;
  }
}

@media (width >= 72rem) and (width < 90rem) {
  .ideas-grid {
    grid-template-columns: repeat(4, 240px);
    width: 1008px;
  }
}

@media (width >= 90rem) and (width < 110rem) {
  .ideas-grid {
    grid-template-columns: repeat(5, 240px);
    width: 1264px;
  }
}

@media (width >= 97rem) and (width < 113rem) {
  .ideas-grid {
    grid-template-columns: repeat(6, 240px);
    width: 1520px;
  }
}

@media (width >= 113rem) and (width < 129rem) {
  .ideas-grid {
    grid-template-columns: repeat(7, 240px);
    width: 1776px;
  }
}

@media (width >= 129rem) {
  .ideas-grid {
    grid-template-columns: repeat(8, 240px);
    width: 2032px;
  }
}
.list {
  background: #aeb8c4;
  border: 1px solid #8b949e;
  border-radius: 8px;
  overflow: hidden;
}

.task-list-empty {
  color: #3f4854;
  margin: 0;
  padding: 24px;
  text-align: center;
}

.task-row {
  align-items: center;
  border-radius: 0;
  border-width: 0 0 1px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 68px;
  padding: 12px 14px;
}

.task-row.is-selected {
  background: #aeb8c4;
  box-shadow: inset 3px 0 0 #0f4d24;
}

.task-row-selection {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0;
}

.task-row-selection input,
.task-select-all input {
  accent-color: #0f4d24;
  height: 20px;
  margin: 0;
  width: 20px;
}

.task-row-link {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.task-row-link:focus-visible,
.task-row-selection:has(input:focus-visible) {
  outline: 2px solid #0f4d24;
  outline-offset: 2px;
}

.task-row-main {
  display: grid;
  gap: 4px;
}

.task-row-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 6px;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-list-shell {
  min-width: 0;
}

.task-list-toolbar {
  align-items: center;
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 48px;
  padding: 8px 12px;
}

.task-select-all {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.task-select-all input {
  flex: 0 0 auto;
}

.task-selection-count {
  white-space: nowrap;
}

.task-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.task-bulk-actions [data-task-bulk-actions] {
  display: flex;
}

.task-bulk-actions [data-task-bulk-actions] {
  align-items: center;
  gap: 6px;
}

.task-bulk-actions button:disabled {
  color: #8c959f;
  cursor: default;
  opacity: 0.7;
}

.task-label-filter {
  position: relative;
}

.task-label-filter summary {
  cursor: pointer;
  list-style: none;
}

.task-label-filter summary::-webkit-details-marker {
  display: none;
}

.task-label-filter summary::after {
  content: "▾";
  margin-left: 6px;
}

.task-label-filter.is-active summary {
  background: #b7e3c3;
  border-color: #0f4d24;
  color: #0f4d24;
}

.task-label-menu {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(31 35 40 / 18%);
  display: grid;
  gap: 2px;
  min-width: 140px;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 3;
}

.task-label-menu a {
  border-radius: 4px;
  padding: 7px 8px;
}

.task-label-menu a:hover,
.task-label-menu a.is-selected {
  background: #eaeef2;
}

.task-bulk-menu {
  position: relative;
}

.task-bulk-menu summary {
  cursor: pointer;
  list-style: none;
}

.task-bulk-menu summary::-webkit-details-marker {
  display: none;
}

.task-bulk-menu summary::after {
  content: "▾";
  margin-left: 6px;
}

.task-bulk-menu-items {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(31 35 40 / 18%);
  display: grid;
  gap: 2px;
  min-width: 120px;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 3;
}

.task-bulk-menu-items button {
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
}

.task-bulk-menu-items button:hover {
  background: #eaeef2;
}

.task-bulk-actions[hidden],
.task-selection-feedback[hidden] {
  display: none;
}

.task-selection-feedback {
  background: #b7e3c3;
  border: 1px solid #4ac26b;
  border-radius: 6px;
  color: #0f4d24;
  margin: 0 0 10px;
  padding: 8px 12px;
}

.task-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.task-search input {
  flex: 1;
  min-width: 0;
}

.task-search-button {
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 7px;
}

.task-search-button svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.button--danger {
  color: #1b1f24;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.pagination .button.small.is-active {
  background: #1f883d;
  border-color: #2a9147;
  color: #ffffff;
}

.pagination .button.small.is-disabled {
  color: #8c959f;
  cursor: default;
}

.pagination-ellipsis {
  color: #b1bac4;
  font-weight: 700;
  padding: 0 4px;
}

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

.form-panel,
.side-panel,
.state-card {
  padding: 16px;
}

.side-panel--popover-open {
  position: relative;
}

.meta-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.meta-row-link {
  border-radius: 6px;
  margin: -6px -6px 0;
  padding: 6px;
}

.meta-row-link:hover {
  background: #eaeef2;
  cursor: pointer;
}

.meta-row-link::marker {
  content: "";
}

.meta-row-link::-webkit-details-marker {
  display: none;
}

.meta-row h2 {
  font-size: 16px;
  margin: 0;
}

.meta-row--spaced {
  border-top: 1px solid #8b949e;
  margin-top: 16px;
  padding-top: 16px;
}

.meta-caret {
  align-items: center;
  border: 0;
  color: #3f4854;
  display: inline-flex;
  font-size: 20px;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
}

label {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  margin-bottom: 14px;
}

input,
textarea,
select,
.description-editor {
  background: #cfd6de;
  border: 1px solid #8b949e;
  border-radius: 6px;
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  min-height: 180px;
}

.description-editor {
  background: #c1c9d3;
  min-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

.description-editor a {
  color: inherit;
  text-decoration: underline;
}

textarea[data-description-value] {
  display: none;
}

.page--new,
.page--detail {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: calc(100vh - 63px);
}

.page--new .detail-grid,
.page--detail .detail-grid {
  flex: 1;
  min-height: 0;
}

.page--new .form-panel,
.page--detail .form-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page--new .form-panel > label:has([data-description-editor]),
.page--detail .form-panel > label:has([data-description-editor]) {
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 180px;
}

.page--new textarea,
.page--detail textarea,
.page--new .description-editor,
.page--detail .description-editor {
  height: 100%;
  min-height: 180px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-actions .button {
  flex: 1 1 140px;
  justify-content: center;
}

.status-menu {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.status-option {
  border: 1px solid #8b949e;
  border-radius: 6px;
  padding: 10px;
}

.popover {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgb(31 35 40 / 18%);
  display: grid;
  gap: 0;
  margin-top: 10px;
  min-width: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 0;
  position: absolute;
  right: 0;
  top: 78px;
  z-index: 2;
}

details:not([open]) .popover {
  display: none;
}

.popover h3 {
  font-size: 16px;
  margin: 0;
  padding: 16px 16px 8px;
}

.status-group-title {
  background: #f6f8fa;
  border-bottom: 1px solid #8b949e;
  border-top: 1px solid #8b949e;
  color: #3f4854;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
}

.status-choice {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px 16px 1fr;
  padding: 12px 16px;
}

.status-choice.selected {
  background: #f6f8fa;
  box-shadow: inset 4px 0 0 #0f4d24;
}

button.status-choice {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.check {
  align-items: center;
  background: #1f883d;
  border-radius: 4px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.box {
  border: 1px solid #8c959f;
  border-radius: 4px;
  display: inline-flex;
  height: 20px;
  width: 20px;
}

.status-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 16px;
  margin-top: 2px;
  width: 16px;
}

.status-dot--do {
  background: #1b1f24;
}

.status-dot--one {
  background: #aeb8c4;
}

.status-dot--two {
  background: #8b949e;
}

.status-dot--three {
  background: #6e7781;
}

.status-dot--four {
  background: #57606a;
}

.status-dot--done {
  background: #0f4d24;
}

.status-dot--skip {
  background: #4a5260;
}

@media (width >= 48rem) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .page--new,
  .page--detail {
    height: calc(100vh - 63px);
    min-height: 480px;
  }

  .form-actions .button {
    flex: 0 0 auto;
  }
}

.state-map {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.drop-line {
  border: 2px dashed #0f4d24;
  border-radius: 6px;
  color: #0f4d24;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 10px;
  text-align: center;
}

.matrix-menu {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(31 35 40 / 18%);
  display: grid;
  min-width: 220px;
  padding: 6px;
  position: fixed;
  z-index: 50;
}

.matrix-menu-item {
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 10px;
  text-align: left;
}

.matrix-menu-item:hover {
  background: #eaeef2;
}

.matrix-menu-item--delete {
  color: #1b1f24;
}

.matrix-modal-backdrop {
  align-items: center;
  background: rgb(31 35 40 / 45%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.matrix-modal {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgb(31 35 40 / 30%);
  display: flex;
  flex-direction: column;
  height: 160px;
  justify-content: space-between;
  max-width: 90vw;
  padding: 16px 20px;
  width: 320px;
}

.matrix-modal-text {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.matrix-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.matrix-modal-button {
  border: 1px solid #8b949e;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 34px;
  padding: 7px 16px;
}

.matrix-modal-button--cancel {
  background: #c1c9d3;
}

.matrix-modal-button--cancel:hover {
  background: #eaeef2;
}

.matrix-modal-button--danger {
  background: #1b1f24;
  border-color: #1b1f24;
  color: #ffffff;
}

.matrix-modal-button--danger:hover {
  background: #1b1f24;
}

@media (width >= 40rem) {
  .matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-axis {
    gap: 54px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 0;
    padding: 72px 20px;
  }

  .axis-line,
  .matrix-create-link {
    display: block;
  }

  .area--q2 {
    grid-column: 2;
    grid-row: 1;
  }

  .area--q3 {
    grid-column: 1;
    grid-row: 2;
  }

  .area--q4 {
    grid-column: 2;
    grid-row: 2;
  }

  .area--quadrant .matrix-cards {
    overflow-y: auto;
  }
}

.error { color: #1b1f24; font-weight: 700; }
button { font: inherit; }

@media (width < 40rem) {
  .task-list-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-status-filter--toolbar {
    flex: 1;
    margin-bottom: 0;
  }

  .task-bulk-actions {
    margin-left: 0;
    width: 100%;
  }

  .task-bulk-actions .button {
    flex: 1;
  }

  .task-bulk-actions [data-task-bulk-actions] {
    flex: 1;
  }

  .task-bulk-menu {
    flex: 1;
  }

  .task-bulk-menu summary {
    justify-content: center;
    width: 100%;
  }
}

.login {
  align-items: center;
  background: #3b434d;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: #c1c9d3;
  border: 1px solid #8b949e;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  max-width: 360px;
  padding: 24px;
  width: 100%;
}

.login-card label {
  display: grid;
  font-size: 14px;
  font-weight: 600;
  gap: 6px;
}

.login-card input {
  border: 1px solid #8b949e;
  border-radius: 6px;
  font: inherit;
  min-height: 34px;
  padding: 6px 10px;
}
