.timeline-tool-section {
  background: #f8faf9;
  padding-top: 42px;
}

.timeline-tool-container {
  max-width: 980px;
}

.timeline-form {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 32, 39, .04);
}

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

.timeline-needs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.timeline-validation {
  margin: 0;
}

.timeline-form-actions {
  display: flex;
  gap: 10px;
}

.timeline-result {
  margin-top: 34px;
}

.timeline-print-header {
  display: none;
}

.timeline-result-header {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #fff;
}

.timeline-result-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
}

.timeline-summary {
  max-width: 760px;
  color: #41515a;
  font-size: 1.06rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-tags li {
  padding: 4px 9px;
  border: 1px solid #c6d7d3;
  border-radius: 999px;
  background: #f3f8f7;
  font-size: .8rem;
  font-weight: 700;
}

.timeline-start-alert {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 28px;
  border-inline: 1px solid #e1b897;
  border-bottom: 1px solid #e1b897;
  background: #fff5eb;
}

.timeline-alert-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  line-height: 1;
}

.timeline-start-alert h3,
.timeline-start-alert p {
  margin: 0;
}

.timeline-start-alert h3 {
  font-size: 1rem;
}

.timeline-start-alert p {
  margin-top: 3px;
  color: #5f493e;
  font-size: .88rem;
}

.timeline-progress {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(280px, 1fr);
  align-items: center;
  gap: 4px 28px;
  padding: 20px 28px;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--band);
}

.timeline-progress h3,
.timeline-progress p {
  margin: 0;
}

.timeline-progress h3 {
  font-size: .92rem;
}

.timeline-progress strong {
  display: block;
  margin-top: 2px;
}

.timeline-progress progress {
  width: 100%;
  height: 14px;
  accent-color: var(--brand);
}

.timeline-progress p {
  grid-column: 2;
  color: var(--muted);
  font-size: .8rem;
}

.timeline-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 15px 0;
  scrollbar-width: thin;
}

.timeline-filters button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #b9c6cc;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.timeline-filters button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.timeline-phases {
  display: grid;
  gap: 16px;
}

.timeline-phase {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.timeline-phase > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: #f3f7f6;
}

.timeline-phase h3,
.timeline-phase-step {
  margin: 0;
}

.timeline-phase h3 {
  font-size: 1.28rem;
}

.timeline-phase-step {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.timeline-phase time {
  color: #41515a;
  font-size: .88rem;
  font-weight: 750;
  text-align: right;
}

.timeline-task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-task-list li {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.timeline-task-list li:last-child {
  border-bottom: 0;
}

.timeline-task-list li.is-filtered {
  display: none;
}

.timeline-task-list input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 3px 0 0;
  accent-color: var(--brand);
}

.timeline-task-list label {
  display: block;
  cursor: pointer;
}

.timeline-task-list label strong,
.timeline-task-list label span {
  display: block;
}

.timeline-task-list label strong {
  color: var(--ink);
  line-height: 1.35;
}

.timeline-task-list label span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.45;
}

.timeline-task-list input:checked + .timeline-task-content label strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-action {
  display: inline-block;
  margin-top: 7px;
  font-size: .82rem;
  font-weight: 750;
}

.timeline-result-footer {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.timeline-result-footer > p:first-child {
  color: var(--muted);
  font-size: .84rem;
}

.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.timeline-actions .text-button {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.timeline-content {
  background: #fff;
}

.print-only {
  display: none;
}

@media (max-width: 680px) {
  .timeline-form-grid,
  .timeline-needs,
  .timeline-progress {
    grid-template-columns: 1fr;
  }

  .timeline-start-alert {
    padding: 14px 18px;
  }

  .timeline-form,
  .timeline-result-header {
    padding: 18px;
  }

  .timeline-form-actions,
  .timeline-actions {
    display: grid;
  }

  .timeline-progress {
    gap: 9px;
    padding: 16px 18px;
  }


  .timeline-start-alert {
    gap: 7px;
    padding: 5px 0;
    border-inline: 0;
    background: #fff;
  }

  .timeline-alert-icon {
    width: 18px;
    height: 18px;
    font-size: 7pt;
  }

  .timeline-start-alert h3 {
    font-size: 8pt;
  }

  .timeline-start-alert p {
    margin-top: 1px;
    font-size: 6.8pt;
  }

  .timeline-progress p {
    grid-column: 1;
  }

  .timeline-phase > header {
    display: block;
    padding: 15px 16px;
  }

  .timeline-phase time {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .timeline-task-list li {
    min-height: 58px;
    padding: 13px 16px;
  }
}

@media print {
  @page {
    margin: .45in;
  }

  body {
    font-size: 7.8pt;
    line-height: 1.15;
  }

  .timeline-tool-section {
    padding: 0;
    background: #fff;
  }

  .timeline-tool-container {
    width: 100%;
    max-width: none;
  }

  .timeline-print-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--ink);
  }

  .timeline-result {
    margin: 0;
  }

  .timeline-result-header {
    padding: 6px 0 5px;
    border: 0;
  }

  .timeline-result-header h2 {
    font-size: 16pt;
    margin-bottom: 2px;
  }

  .timeline-summary {
    margin-bottom: 3px;
    font-size: 8pt;
  }

  .timeline-tags {
    margin-top: 3px;
  }

  .timeline-tags li {
    padding: 2px 6px;
    font-size: 7pt;
  }

  .timeline-progress {
    display: block;
    padding: 4px 0;
    border: 0;
    border-block: 1px solid var(--line);
    background: #fff;
  }

  .timeline-progress progress,
  .timeline-progress p {
    display: none;
  }

  .timeline-phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-top: 5px;
  }

  .timeline-phase {
    break-inside: avoid;
  }

  .timeline-phase > header {
    padding: 4px 6px;
  }

  .timeline-phase h3 {
    font-size: 9pt;
  }

  .timeline-phase time {
    font-size: 7pt;
  }

  .timeline-phase-step,
  .timeline-task-list label span {
    display: none;
  }

  .timeline-task-list li,
  .timeline-task-list li.is-filtered {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 0;
    padding: 2px 5px;
  }

  .timeline-task-list input {
    width: 11px;
    min-width: 11px;
    height: 11px;
    min-height: 11px;
    margin-top: 1px;
  }

  .timeline-task-list label strong {
    font-size: 6.8pt;
  }

  .print-only {
    display: inline;
    color: var(--muted);
    font-size: 6.5pt;
  }

  .timeline-result-footer {
    margin-top: 5px;
    padding: 4px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
  }
}
