.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.saved-plans-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.saved-plans-action-status {
  margin: 0;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
}

.saved-plan-actions-select {
  min-width: 9rem;
}

.output-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.entry-breakdown-table,
.saved-plans-table {
  border-collapse: collapse;
  min-width: 32rem;
  width: 100%;
}

.saved-plans-table {
  min-width: 120rem;
}

.entry-breakdown-table caption,
.saved-plans-table caption {
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-align: left;
}

.entry-breakdown-table th,
.entry-breakdown-table td,
.saved-plans-table th,
.saved-plans-table td {
  border: 1px solid #cccccc;
  padding: 0.4rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

.plan-summary dl {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: max-content 1fr;
  margin: 0;
}

.plan-summary dt {
  font-weight: 600;
}

.plan-summary dd {
  margin: 0;
}

.plan-summary .is-hidden-summary-row {
  display: none;
}

.trading-checklist {
  margin-top: 1.25rem;
}

.trading-checklist p {
  margin-top: 0;
}

.checklist-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
  border: 1px solid #cccccc;
  background: #f9f9f9;
}

.checklist-status p {
  margin: 0;
}

.checklist-status .status-ready,
.checklist-status .status-review {
  display: inline-block;
  font-weight: 600;
  border: 1px solid #cccccc;
  border-radius: 9999px;
  padding: 0.15rem 0.65rem;
}

.checklist-status .status-ready {
  color: #166534;
  border-color: #16a34a;
  background: #dcfce7;
}

.checklist-status .status-review {
  color: #92400e;
  border-color: #f59e0b;
  background: #fef3c7;
}

.checklist-grid {
  border: 1px solid #cccccc;
}

.checklist-grid-head,
.checklist-row {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) minmax(5rem, auto) minmax(13rem, 2fr) minmax(8rem, 1fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #cccccc;
}

.checklist-grid-head {
  font-weight: 600;
  background: #f9f9f9;
}

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

.checklist-cell-label {
  display: none;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.checklist-row input[type="text"],
.checklist-row select {
  width: 100%;
  box-sizing: border-box;
}

.checklist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.ratio-note {
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .entry-breakdown-table {
    min-width: 28rem;
  }

  .saved-plans-table {
    min-width: 90rem;
  }

  .plan-summary dl {
    grid-template-columns: 1fr;
  }

  .checklist-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .checklist-grid {
    border: 0;
  }

  .checklist-grid-head {
    display: none;
  }

  .checklist-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    border: 1px solid #cccccc;
    margin-bottom: 0.55rem;
  }

  .checklist-cell-label {
    display: block;
  }
}
