:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #1c232b;
  --muted: #65717e;
  --border: #d9e0e6;
  --accent: #1f7a6d;
  --accent-2: #c05131;
  --ok: #2f855a;
  --shadow: 0 14px 40px rgba(31, 42, 55, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 48px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.1; }
h2 { font-size: 18px; }
.topbar p, .row p, .review-item p, .section-title span, .empty { color: var(--muted); }

button {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

button:hover { filter: brightness(0.95); }

.layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 48px) 44px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.span-2 { grid-column: span 2; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--surface-2);
}

.row:first-child { border-top: 0; }

.prescription {
  border-top: 1px solid var(--surface-2);
  padding: 12px 0;
}

.prescription:first-child { border-top: 0; }

.prescription ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.prescription li { margin: 4px 0; }

.output {
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
}

.status {
  align-self: start;
  min-width: 58px;
  text-align: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.status.done { background: #e6f4ed; color: var(--ok); }

.review-item {
  border-top: 1px solid var(--surface-2);
  padding: 12px 0;
}

.review-item:first-of-type { border-top: 0; }

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.inline-actions button {
  background: white;
  color: var(--accent);
}

.inline-actions button[value="forgotten"] {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.profile {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 0;
}

dt { font-weight: 750; }
dd { margin: 0; color: var(--muted); }

.evidence-form {
  display: grid;
  gap: 12px;
}

.compact-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-2);
}

.grid-2, .grid-3 {
  display: grid;
  gap: 10px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--text);
  background: white;
  font: inherit;
}

textarea { resize: vertical; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

@media (max-width: 620px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
}
