:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #657282;
  --line: #d8dee6;
  --soft: #f5f7fa;
  --paper: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warning: #9a5b00;
  --danger: #a43b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #eef2f6;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.panel {
  background: #fbfcfe;
  border-right: 1px solid var(--line);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 24px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 700;
  border-radius: 8px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.1; }
h2 { font-size: 19px; line-height: 1.2; }
p { color: var(--muted); line-height: 1.45; }

.steps {
  display: grid;
  gap: 6px;
  margin: 24px 0;
}

.steps a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.steps a:hover { background: var(--soft); }

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.notice h2 {
  font-size: 15px;
  margin-bottom: 8px;
}

.workspace {
  padding: 28px;
}

.form {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.band {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.section-head span {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
}

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

label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #c7d0db;
  border-radius: 7px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: white;
}

textarea { resize: vertical; line-height: 1.45; }
.wide { margin-top: 16px; }

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

.drop {
  border: 1px dashed #aeb9c6;
  border-radius: 8px;
  padding: 16px;
  background: #fafbfd;
}

button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }

.secondary {
  background: #e8eef3;
  color: var(--ink);
}

.secondary:hover { background: #d9e2eb; }

.analysis, .preview, .download, .checklist {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 16px;
}

.analysis h3, .preview h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: white;
  color: var(--muted);
  font-size: 13px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #e8edf2;
}

.check:last-child { border-bottom: 0; }
.check strong { color: var(--accent); }
.check.warn strong { color: var(--warning); }
.check.bad strong { color: var(--danger); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.preview {
  white-space: pre-wrap;
  line-height: 1.5;
}

.download a {
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { padding: 16px; }
  .grid, .upload-grid { grid-template-columns: 1fr; }
}
