:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9ded6;
  --panel: #ffffff;
  --accent: #1b766f;
  --accent-2: #a63d40;
  --soft: #e9f3f1;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

p, li {
  line-height: 1.5;
}

.status {
  min-width: 104px;
  text-align: center;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--soft);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.sidebar, .content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

select, input, textarea, button {
  width: 100%;
  font: inherit;
}

select, input, textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

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

.buttonRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.buttonRow button:first-child {
  background: #455a64;
}

.sectionHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.challengeList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.challengeCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  min-height: 138px;
}

.challengeCard:hover, .challengeCard.active {
  border-color: var(--accent);
  background: var(--soft);
}

.badgeRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef1f4;
  color: #344054;
  font-size: 12px;
}

.badge.hot {
  background: #f8e8e8;
  color: var(--accent-2);
}

.detailBody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.detailBlock {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f4f6f3;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-height: 60px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.scoreBox {
  margin-top: 12px;
}

.scoreCard {
  border-left: 4px solid var(--accent);
  background: #f4faf8;
  padding: 12px;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px;
}

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
