.weekly-plans {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.weekly-plans h2 {
  color: var(--ink);
  font-size: clamp(1.85rem, 5vw, 2.45rem);
}

.weekly-plans-selection,
.weekly-plans-form {
  display: grid;
  gap: 11px;
}

.weekly-plans-selection label,
.weekly-plans-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--ink);
  font-weight: 700;
}

.weekly-plans-selection select,
.weekly-plans-selection input,
.weekly-plans-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid #dcd9cf;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.weekly-plans-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.weekly-plans-status,
.weekly-plans-latest {
  color: var(--muted);
  font-size: .95rem;
}

.weekly-plans-status:empty {
  display: none;
}

.weekly-plans-status[data-state="error"] {
  color: #8c281b;
}

.weekly-plans-status[data-state="success"] {
  color: #265839;
  font-weight: 700;
}

.weekly-plans-setup {
  justify-self: start;
  color: var(--gold-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.weekly-plans-latest {
  margin-bottom: 9px;
}

.weekly-plans .weekly-plans-form .button {
  justify-content: center;
  min-height: 44px;
  margin-top: 0;
}

.weekly-plans-history {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.weekly-plans-history summary {
  padding: 9px 11px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.weekly-plans-history [data-revisions] {
  padding: 0 11px 9px;
}

.weekly-plans-more {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 0 11px 11px;
}

.weekly-plans-revision {
  border-top: 1px solid var(--line);
}

.weekly-plans-revision summary {
  padding-inline: 0;
  font-size: .9rem;
}

.weekly-plans-revision dl {
  margin: 0;
}

.weekly-plans-revision dt {
  color: var(--ink);
  font-weight: 700;
}

.weekly-plans-revision dd {
  margin: 1px 0 9px;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (min-width: 460px) {
  .weekly-plans-selection {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
}
