:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --card: #ffffff;
  --text: #23313a;
  --muted: #66737c;
  --line: #dde3e7;
  --accent: #365c6b;
  --accent-strong: #24444f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.site-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.01em;
}

.site-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.run-link {
  margin-top: 12px !important;
}

.trace-link {
  margin: 12px 0 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(35, 49, 58, 0.05);
}

.article-card + .article-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-card h2,
.article-detail h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.meta,
.source-link,
.source-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 1.4em;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  margin: 0 0 1em;
}

.article-body a {
  word-break: break-word;
}

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

.trace-step-list,
.trace-groups {
  display: grid;
  gap: 16px;
}

.trace-step,
.trace-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fcfbf8;
}

.trace-step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.trace-step h4,
.trace-group h4 {
  margin: 0 0 8px;
}

.step-key {
  color: var(--muted);
  font-size: 0.85rem;
}

.trace-qas {
  display: grid;
  gap: 10px;
}

.trace-qa {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 12px 14px;
}

.trace-qa summary {
  cursor: pointer;
  font-weight: 600;
}

.trace-qa-body {
  margin-top: 12px;
}

.build-output {
  display: grid;
  gap: 20px;
}

.code-block {
  margin: 8px 0 0;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  background: #101820;
  color: #d5e7ef;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.stats {
  padding-left: 20px;
}

@media (max-width: 640px) {
  .page {
    padding: 24px 14px 40px;
  }

  .card {
    padding: 20px;
  }

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

  .trace-step-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
