/*--------------------------------------------------------------
  Moving Checklist — week groups, progress ring, print styles
--------------------------------------------------------------*/

.checklist-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-10);
  align-items: start;
}

/* --- Filters ----------------------------------------------------------- */

.checklist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.checklist-filter {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}

.checklist-filter:hover { border-color: var(--color-primary); }

.checklist-filter[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* --- Week groups ------------------------------------------------------- */

.checklist-week {
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  overflow: hidden;
}

.checklist-week.is-complete {
  border-color: var(--color-success);
}

.checklist-week-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.checklist-week-head h3 {
  margin: 0;
  font-size: var(--fs-h5);
  flex: 1;
  min-width: 0;
}

.checklist-week-head .when {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 2px;
}

.checklist-week-count {
  flex: none;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.checklist-week.is-complete .checklist-week-count {
  background: rgba(16, 185, 129, 0.14);
  color: var(--color-success);
}

/* --- Tasks ------------------------------------------------------------- */

.checklist-tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-task {
  border-bottom: 1px solid var(--color-border);
}

.checklist-task:last-child { border-bottom: none; }

.checklist-task[hidden] { display: none; }

.checklist-task label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  transition: background var(--t-fast);
}

.checklist-task label:hover { background: var(--color-surface); }

.checklist-task input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checklist-task-body { min-width: 0; }

.checklist-task-body strong {
  display: block;
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.4;
  transition: color var(--t-fast);
}

.checklist-task-body p {
  margin: 2px 0 0;
  font-size: var(--fs-small);
  color: var(--color-muted);
}

.checklist-task input:checked ~ .checklist-task-body strong {
  text-decoration: line-through;
  color: var(--color-muted);
}

.checklist-tag {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* --- Progress rail ----------------------------------------------------- */

.checklist-progress {
  position: sticky;
  top: 100px;
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.checklist-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto var(--space-4);
  display: block;
}

.checklist-ring circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.checklist-ring .track { stroke: var(--color-surface-2); }

.checklist-ring .value {
  stroke: var(--color-primary);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.checklist-ring text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  fill: var(--color-heading);
}

.checklist-progress .done-of {
  color: var(--color-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--space-5);
}

.checklist-next {
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  background: var(--color-primary-light);
  border-radius: var(--radius);
  text-align: left;
}

[data-theme="dark"] .checklist-next {
  background: rgba(255, 87, 34, 0.12);
}

.checklist-next span {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.checklist-next strong {
  color: var(--color-heading);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.checklist-rail-actions {
  display: grid;
  gap: var(--space-3);
}
