* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background: #f0f4f8;
  color: #1a1a2e;
}

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

.header {
  text-align: center; margin-bottom: 30px;
  background: #1F3864; color: white;
  padding: 30px; border-radius: 12px;
}
.header h1 { font-size: 28px; margin-bottom: 8px; }
.header p  { font-size: 14px; opacity: 0.8; }

.card {
  background: white; border-radius: 12px;
  padding: 28px; margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.card h2 { font-size: 18px; color: #1F3864; margin-bottom: 20px;
  padding-bottom: 10px; border-bottom: 2px solid #e8f0fb; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: #444; }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px; border: 1.5px solid #dde3ec; border-radius: 8px;
  font-size: 14px; font-family: Arial, sans-serif;
  transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #2E75B6;
}

.btn-generate {
  margin-top: 20px; width: 100%; padding: 14px;
  background: #1F3864; color: white; border: none;
  border-radius: 8px; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-generate:hover:not(:disabled) { background: #2E75B6; }
.btn-generate:disabled { background: #999; cursor: not-allowed; }

.progress-bar-wrapper {
  background: #e8f0fb; border-radius: 20px;
  height: 12px; margin-bottom: 16px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: #2E75B6;
  border-radius: 20px; transition: width 0.5s ease;
  width: 0%;
}

.phase-badge {
  display: inline-block; padding: 6px 16px;
  background: #e8f0fb; color: #1F3864;
  border-radius: 20px; font-size: 13px;
  font-weight: 600; margin-bottom: 16px;
}

.log-container {
  max-height: 280px; overflow-y: auto;
  background: #f8fafc; border-radius: 8px;
  padding: 12px; font-size: 13px;
}
.log-entry {
  padding: 6px 10px; margin-bottom: 4px;
  border-radius: 6px; border-left: 4px solid #ddd;
}
.log-node {
  font-weight: 700; font-size: 11px;
  margin-right: 8px; opacity: 0.7;
}

.node-plan       { border-color: #6b3fa0; background: #f3eefe; }
.node-research   { border-color: #2E75B6; background: #e8f0fb; }
.node-draft      { border-color: #7B4444; background: #fdf0f0; }
.node-validate   { border-color: #C55A11; background: #fdf3ec; }
.node-redraft    { border-color: #c0392b; background: #fde8e8; }
.node-supervisor { border-color: #4a235a; background: #f5eef8; }
.node-finalize   { border-color: #1a5c2a; background: #eaf5ec; }
.node-router     { border-color: #888;    background: #f5f5f5; }
.node-default    { border-color: #ccc; }
.error           { border-color: #e74c3c; background: #fde8e8; color: #c0392b; }

.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.global-score {
  grid-column: 1 / -1; padding: 20px;
  background: #f8fafc; border-radius: 10px;
  display: flex; align-items: center; gap: 20px;
}
.score-number { font-size: 42px; font-weight: 700; }
.score-label  { font-size: 16px; font-weight: 600; color: #444; }
.score-meta   { font-size: 13px; color: #666; margin-top: 4px; }

.article-score-card {
  padding: 14px; background: #f8fafc;
  border-radius: 8px; border: 1px solid #e8f0fb;
}
.article-score-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px;
}
.article-id    { font-weight: 700; color: #1F3864; font-size: 13px; }
.article-badge {
  color: white; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px;
}
.article-critique { font-size: 12px; color: #555; line-height: 1.5; }

.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.btn-download {
  padding: 8px 18px; background: #1a5c2a; color: white;
  border: none; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-download:hover { background: #236b33; }

.contract-output {
  background: #f8fafc; border-radius: 8px; padding: 20px;
  font-family: monospace; font-size: 13px; line-height: 1.7;
  max-height: 500px; overflow-y: auto;
  white-space: pre-wrap; border: 1px solid #e8f0fb;
}