:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --panel: #ffffff;
  --ink: #222426;
  --muted: #6b6f76;
  --line: #d9d7cf;
  --accent: #1f6f68;
  --accent-ink: #ffffff;
  --danger: #a23b3b;
  --soft: #ece8dc;
  --shadow: 0 10px 28px rgba(22, 24, 26, 0.08);
}

* {
  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;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand h1 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
}

.brand span {
  color: var(--muted);
  font-size: 14px;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.grid {
  display: grid;
  gap: 16px;
}

.projects {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  padding: 18px;
}

.project-card h2 {
  font-size: 18px;
  margin: 0;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.status {
  align-items: center;
  background: var(--soft);
  border-radius: 999px;
  color: #4d4b45;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  min-height: 28px;
  padding: 4px 10px;
  width: fit-content;
}

.status.ready {
  background: #dbeee9;
  color: #1d5f55;
}

.status.error {
  background: #f3dddd;
  color: var(--danger);
}

.button,
button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  color: var(--accent-ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
}

.button.secondary,
button.secondary {
  background: #e6e2d5;
  color: #262521;
}

.button.danger,
button.danger {
  background: var(--danger);
}

form {
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 700;
}

input,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.participant {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.participant h3,
.section-title {
  font-size: 17px;
  margin: 0;
}

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

.artifact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.artifact {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.artifact img {
  background: #eeece4;
  border-radius: 6px;
  display: block;
  height: auto;
  width: 100%;
}

.message {
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.message.error {
  background: #f5dddd;
  color: #7d2929;
}

.message.info {
  background: #dfeeea;
  color: #245c55;
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login .panel {
  max-width: 420px;
  width: min(420px, calc(100vw - 32px));
}

.spacer {
  flex: 1;
}

.pre {
  background: #232624;
  border-radius: 8px;
  color: #f6f5f1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .shell {
    padding: 18px;
  }

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

  .columns {
    grid-template-columns: 1fr;
  }
}
