* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  margin: 0;
  padding: 0;
}

.app-header {
  background: #0b3d5c;
  color: #ffffff;
  padding: 1.5rem 2rem;
}

.app-header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0;
  color: #cfe3f0;
  font-size: 0.95rem;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 800px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
}

.input-panel,
.results-panel {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
}

label {
  display: block;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

textarea,
select,
input[type="file"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

textarea {
  resize: vertical;
}

.file-status {
  font-size: 0.85rem;
  color: #666;
  margin: 0.35rem 0 0 0;
}

button#generate-btn {
  margin-top: 1.5rem;
  background: #0b3d5c;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

button#generate-btn:hover {
  background: #08304a;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.results-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

button#copy-btn {
  background: #fff;
  color: #0b3d5c;
  border: 1px solid #0b3d5c;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

button#copy-btn:hover {
  background: #eef4f8;
}

#results-area .placeholder {
  color: #888;
  font-style: italic;
}

.app-footer {
  text-align: center;
  padding: 1.5rem;
  color: #888;
  font-size: 0.85rem;
}

/* ---- Generated report ---- */

.report-headline {
  margin-top: 0;
  font-size: 1.15rem;
}

.rag-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.rag-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-transform: uppercase;
}

.rag-red {
  background: #c62828;
}

.rag-amber {
  background: #f9a825;
  color: #1a1a1a;
}

.rag-green {
  background: #2e7d32;
}

.rag-reason {
  font-size: 0.9rem;
  color: #333;
}

.report h4 {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  border-top: 1px solid #eee;
  padding-top: 0.85rem;
}

.report ul,
.report ol.risk-list {
  margin: 0 0 0.5rem 0;
  padding-left: 1.25rem;
}

.empty-note {
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.risk-list li {
  margin-bottom: 0.5rem;
}

.risk-list .risk-text {
  display: block;
}

.risk-list .mitigation {
  display: block;
  font-size: 0.85rem;
  color: #555;
}

.actions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.actions-table th,
.actions-table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #eee;
}

.not-specified {
  color: #999;
  font-style: italic;
}

/* ---- Differentiator 1: Traceability ---- */

.sources {
  margin: 0.2rem 0 0.6rem 0;
  font-size: 0.78rem;
  color: #666;
  font-style: italic;
}

.sources.missing {
  color: #b45309;
}

.traceable-list li {
  margin-bottom: 0.4rem;
}

/* ---- Differentiator 2: Action hygiene check ---- */

.hygiene-banner {
  background: #fff4e5;
  color: #8a5200;
  border: 1px solid #f3c98b;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin: 0 0 0.6rem 0;
}

.hygiene-ok {
  background: #eaf6ec;
  color: #1e5e2c;
  border: 1px solid #b7ddbe;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin: 0 0 0.6rem 0;
}

.actions-table tr.action-issue {
  background: #fffaf0;
}

/* ---- Differentiator 3: Watermelon warning ---- */

.watermelon-banner {
  background: #fdecea;
  color: #7a1f1f;
  border: 1px solid #f1b3ab;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
