:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1b2330;
  --muted: #5e6b78;
  --line: #d9e2ec;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 960px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
}

.title {
  margin: 0 0 16px;
  font-size: 2rem;
  line-height: 1.2;
}

.lead {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.info-box {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
}

.info-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.info-value {
  font-weight: bold;
  word-break: break-word;
}

.actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

.button {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background: var(--primary);
  color: white;
  transition: background 0.2s ease;
}

.button:hover {
  background: var(--primary-hover);
}

.note {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  color: #1d4ed8;
  display: none;
}

.message.show {
  display: block;
}

.message-warning {
  background: #fff8e8;
  border-color: #f3cf87;
  color: #9a5d00;
}

.consent-list {
  margin: 16px 0 0 20px;
  padding: 0;
  color: var(--text);
  line-height: 1.7;
}

.consent-list li {
  margin-bottom: 10px;
}

.consent-intro {
  margin-bottom: 12px;
}

.consent-actions {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.button-secondary {
  background: #e5e7eb;
  color: var(--text);
}

.button-secondary:hover {
  background: #d1d5db;
}

.button-danger {
  background: #dc2626;
  color: white;
}

.button-danger:hover {
  background: #b91c1c;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.task-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
}

.task-panel-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.task-statement,
.task-summary {
  margin: 0 0 12px;
  line-height: 1.7;
}

.task-label {
  display: block;
  margin-top: 24px;
  margin-bottom: 10px;
  font-weight: bold;
}

.task-textarea {
  width: 100%;
  border: 1px solid #c7d2df;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.task-actions {
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.confidence-bar-wrap {
  margin-top: 12px;
}

.confidence-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.confidence-bar-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.fill-truthful {
  background: #3b82f6;
}

.fill-deceptive {
  background: #ef4444;
}

.confidence-bar-pct {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
}

.feedback-panel {
  margin-top: 16px;
}

.feedback-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--fill),
    #ddd var(--fill),
    #ddd 100%
  );
}

.feedback-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.feedback-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
}

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

  .task-meta {
    flex-direction: column;
  }
}