﻿.todo-card.is-selected {
  border-color: rgba(201, 255, 240, 0.46);
  background: rgba(255, 255, 255, 0.06);
}

.todo-open:hover,
.todo-open:focus-visible {
  background: none;
}

.todo-detail {
  display: grid;
  gap: 14px;
}

.todo-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.todo-meta-card,
.todo-description,
.todo-alert,
.todo-sections,
.todo-checklist,
.raw-note-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  background-image: none;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 20px;
  box-shadow: none;
  backdrop-filter: blur(24px) saturate(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.04);
}

.todo-checklist.detail-body,
.raw-note-panel.detail-body {
  max-height: min(34vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.todo-sections.detail-body {
  max-height: none;
  overflow: visible;
}

.raw-note-panel.detail-body {
  max-height: min(58vh, 620px);
}

.raw-note-panel .note-editor {
  padding: 0;
}

.todo-meta-card > span:not(.priority-dots) {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.todo-meta-card strong {
  display: block;
  margin-top: 5px;
  color: #f3f4f6;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.priority-dots {
  display: flex;
  gap: 4px;
  margin-top: 9px;
}

.todo-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.todo-list-meta .priority-dots {
  margin-top: 0;
}

.eta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background-image: none;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.76rem;
}

.priority-dot {
  flex: 0 0 20px;
  color: inherit;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.priority-dot:hover,
.priority-dot:focus-visible {
  transform: none;
}

.priority-dot.is-active,
.priority-dot.is-preview-active {
  border-color: currentColor;
  background: currentColor;
  box-shadow: none;
}

.priority-level-1 {
  color: var(--good);
}

.priority-level-2 {
  color: #e7d66a;
}

.priority-level-3 {
  color: #f2a65a;
}

.priority-level-4 {
  color: #f06476;
}

.priority-dots.is-interactive .priority-dot:not(.is-active) {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.detail-utility-card .priority-dots {
  gap: 30px;
}

.detail-utility-card .priority-dots.is-interactive .priority-dot:not(.is-active) {
  opacity: 0.34;
}

.detail-utility-card .priority-dots.is-interactive:not(.is-previewing) .priority-dot.is-active {
  border-color: currentColor;
  background: currentColor;
  opacity: 1;
}

.priority-dots.is-interactive.is-previewing .priority-dot {
  color: inherit;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.priority-dots.is-interactive.is-previewing .priority-dot.is-preview-active {
  border-color: currentColor;
  background: currentColor;
}

.priority-dots.is-interactive:has(.priority-dot:nth-child(1):is(:hover, :focus-visible)) {
  color: var(--good);
}

.priority-dots.is-interactive:has(.priority-dot:nth-child(2):is(:hover, :focus-visible)) {
  color: #e7d66a;
}

.priority-dots.is-interactive:has(.priority-dot:nth-child(3):is(:hover, :focus-visible)) {
  color: #f2a65a;
}

.priority-dots.is-interactive:has(.priority-dot:nth-child(4):is(:hover, :focus-visible)) {
  color: #f06476;
}

.priority-dots.is-interactive:has(.priority-dot:nth-child(1):is(:hover, :focus-visible)) .priority-dot:nth-child(-n + 1),
.priority-dots.is-interactive:has(.priority-dot:nth-child(2):is(:hover, :focus-visible)) .priority-dot:nth-child(-n + 2),
.priority-dots.is-interactive:has(.priority-dot:nth-child(3):is(:hover, :focus-visible)) .priority-dot:nth-child(-n + 3),
.priority-dots.is-interactive:has(.priority-dot:nth-child(4):is(:hover, :focus-visible)) .priority-dot:nth-child(-n + 4) {
  border-color: currentColor;
  background: currentColor;
  box-shadow: none;
}

.priority-dots.is-static .priority-dot {
  box-shadow: none;
}

.todo-description h3,
.todo-sections h3,
.todo-checklist h3 {
  margin-bottom: 8px;
}

.todo-alert {
  border-color: rgba(240, 100, 118, 0.34);
}

.todo-alert p:last-child {
  margin: 0;
  color: #ffd4da;
}

.todo-note-section {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.todo-note-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.todo-note-section:last-child {
  padding-bottom: 0;
}

.todo-note-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.todo-note-section summary::-webkit-details-marker {
  display: none;
}

.todo-note-section summary::after {
  content: "+";
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.95rem;
}

.todo-note-section[open] summary::after {
  content: "-";
}

.todo-note-section h3 {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
}

.todo-note-section p {
  margin: 0;
  color: #f3f4f6;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.todo-note-section .todo-section-list {
  color: #f3f4f6;
}

.todo-section-paragraph + .todo-section-paragraph,
.todo-section-paragraph + .todo-section-list,
.todo-section-list + .todo-section-paragraph,
.todo-section-list + .todo-section-list {
  margin-top: 10px;
}

.todo-section-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.45;
  list-style: none;
}

.todo-section-list-ordered {
  padding-left: 20px;
  list-style: decimal;
}

.todo-section-list li {
  overflow-wrap: anywhere;
}

.todo-section-list:not(.todo-section-list-ordered) li {
  position: relative;
  padding-left: 16px;
}

.todo-section-list:not(.todo-section-list-ordered, .todo-section-checklist) li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(201, 255, 240, 0.72);
  content: "";
}

.todo-section-list small,
.todo-section-check small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.5);
}

.todo-section-checklist {
  gap: 9px;
}

.todo-section-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding-left: 0;
}

.todo-section-check::before {
  display: none;
}

.todo-section-checkmark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  line-height: 1;
}

.todo-section-check.is-checked .todo-section-checkmark {
  border-color: rgba(201, 255, 240, 0.56);
  background: rgba(201, 255, 240, 0.1);
}

.check-row {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.check-row:first-of-type {
  border-top: 0;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.check-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  max-height: min(58vh, 560px);
}
