* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  color: #1f2937;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

h1,
h2 {
  margin-top: 0;
}

#pageSubtitle {
  white-space: pre-line;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  margin-bottom: 10px;
  font-size: 14px;
}

button {
  cursor: pointer;
  border: 0;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

button:hover {
  background: #1d4ed8;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 6px 12px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hidden {
  display: none;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.history-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.history-toggle {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.history-toggle:hover {
  background: #f1f5f9;
  color: #475569;
}

.history-section.history-collapsed .history-panel {
  display: none;
}

.scenario-fetch-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.scenario-fetch-row button {
  width: auto;
  max-width: 280px;
  margin-bottom: 0;
  background: #64748b;
}

.scenario-fetch-row button:hover {
  background: #475569;
}

.scenario-fetch-row .btn-secondary {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.scenario-fetch-row .btn-secondary:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.muted {
  padding: 10px;
  border-radius: 6px;
  background: #f3f4f6;
}

.muted ul {
  margin: 8px 0 0 16px;
  padding: 0;
}

pre {
  white-space: pre-wrap;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
}

.recommendations {
  display: grid;
  gap: 10px;
}

.recommendation {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}

.recommendation h3 {
  margin: 0 0 8px 0;
}

.recommendation a {
  display: inline-block;
  margin-top: 6px;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.recommendation a:hover {
  text-decoration: underline;
}

.checkbox-group {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  margin: 0;
}

.checkbox-row input {
  width: auto;
  margin: 2px 0 0 0;
}

.resource-list {
  display: grid;
  gap: 10px;
}

.resource-card {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.resource-card h3 {
  margin: 0 0 8px 0;
}

.resource-card p {
  margin: 6px 0;
}

.resource-card a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.resource-card a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .grid,
  .actions {
    grid-template-columns: 1fr;
  }
}
