/* metareview-autoresearch — project dashboard
 * Academic single-page style. Serif body, muted palette.
 */

:root {
  --bg: #fbf9f4;
  --fg: #1c1c1c;
  --muted: #555;
  --rule: #d8d2c4;
  --accent: #7a1f27;
  --accent-soft: #f1e6e2;
  --card: #ffffff;
  --code-bg: #f2ede2;
  --max-width: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Charter", "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 17px;
  line-height: 1.55;
}

#root {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* Masthead */
#masthead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

#project-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

#project-subtitle {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

#snapshot-bar {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

#snapshot-bar .sep {
  margin: 0 0.5rem;
  color: var(--rule);
}

#repo-link {
  margin: 0;
  font-size: 0.92rem;
}

#repo-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

#repo-link a:hover { border-bottom-color: var(--accent); }

/* Sections */
section {
  margin: 2.5rem 0;
}

section > h2 {
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.35rem;
  margin: 0 0 1.25rem;
}

/* Timeline */
#phase-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: phase;
}

#phase-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 3rem;
  border-bottom: 1px dotted var(--rule);
  counter-increment: phase;
}

#phase-list li:last-child { border-bottom: none; }

#phase-list li::before {
  content: counter(phase);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}

#phase-list li.done::before {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

#phase-list li.in-progress::before {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.phase-name {
  font-weight: 600;
  font-size: 1.02rem;
}

.phase-status {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-left: 0.75rem;
}

.phase-status.done { color: var(--accent); }
.phase-status.in-progress { color: var(--accent); font-style: italic; }

.phase-goal, .phase-outcome {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.phase-outcome strong { color: var(--fg); font-weight: 600; }

.phase-shard {
  font-size: 0.85rem;
  font-family: "Menlo", "Consolas", monospace;
  color: var(--muted);
  margin-top: 0.3rem;
}

.phase-shard a { color: var(--accent); text-decoration: none; }
.phase-shard a:hover { text-decoration: underline; }

/* Corpus grid */
#corpus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.corpus-cell {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 0.85rem 1rem;
  border-radius: 2px;
}

.corpus-cell .n {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  display: block;
  line-height: 1.1;
}

.corpus-cell .label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  display: block;
}

/* Papers */
.paper {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  border-radius: 2px;
}

.paper-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.paper-id {
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
}

.paper-status {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--muted);
  white-space: nowrap;
}

.paper-status.drafting { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.paper-status.scoped { background: var(--card); }
.paper-status.deferred { background: var(--code-bg); font-style: italic; }

.paper-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.15rem 0 0.6rem;
  line-height: 1.35;
}

.paper-venue {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.paper-ideas {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.94rem;
}

.paper-ideas li { margin: 0.25rem 0; }

/* Decisions table */
#decision-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

#decision-table th {
  text-align: left;
  border-bottom: 2px solid var(--fg);
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

#decision-table td {
  border-bottom: 1px dotted var(--rule);
  padding: 0.6rem;
  vertical-align: top;
}

#decision-table td.date {
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.85rem;
  white-space: nowrap;
  color: var(--muted);
}

#decision-table td.decision { font-weight: 600; }

/* Questions */
.question {
  border-left: 3px solid var(--rule);
  padding: 0.4rem 0 0.4rem 0.85rem;
  margin-bottom: 0.85rem;
}

.question.open { border-left-color: var(--accent); }
.question.resolved { border-left-color: var(--rule); opacity: 0.85; }

.question-header {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  margin-bottom: 0.15rem;
}

.question-id {
  font-family: "Menlo", "Consolas", monospace;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.question-status {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.question.resolved .question-status { color: var(--muted); }

.question-text {
  margin: 0.15rem 0 0.3rem;
  font-size: 0.98rem;
}

.question-note {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
  font-style: italic;
}

/* Recent artifacts */
#shard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#shard-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.92rem;
}

#shard-list li:last-child { border-bottom: none; }

#shard-list .shard-date {
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 0.6rem;
}

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

#shard-list a:hover { text-decoration: underline; }

.footnote {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.75rem;
}

code {
  background: var(--code-bg);
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 0.88em;
}

/* Colophon */
#colophon {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

#colophon code {
  background: transparent;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 600px) {
  html, body { font-size: 16px; }
  #root { padding: 2rem 1rem 3rem; }
  #project-title { font-size: 1.55rem; }
  .paper-header { flex-direction: column; gap: 0.2rem; }
  #decision-table { font-size: 0.85rem; }
  #decision-table th, #decision-table td { padding: 0.4rem 0.3rem; }
}
