/* SciencePlots-inspired minimal CSS — clean, no-latex aesthetic */
:root {
  --bg: #fafafa;
  --fg: #1a1a2e;
  --muted: #555;
  --accent: #2c3e6b;
  --accent-light: #4a6a9e;
  --pass: #2d7a3e;
  --fail: #c0392b;
  --warn: #d4881a;
  --border: #d0d4dc;
  --card-bg: #ffffff;
  --bar-bg: #e8e8ec;
  --code-bg: #f4f4f8;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK SC', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a2744 0%, #2c3e6b 50%, #1a2744 100%);
  color: #e8ecf4;
  padding: 48px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 1.55em;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero .subtitle {
  font-size: 0.92em;
  color: #a8b8d8;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.stat-pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  min-width: 100px;
}

.stat-pill .num {
  font-family: var(--mono);
  font-size: 1.6em;
  font-weight: 700;
  color: #fff;
  display: block;
}

.stat-pill .label {
  font-size: 0.72em;
  color: #a8b8d8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section */
section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

h2 {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

h3 {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--fg);
  margin: 18px 0 8px;
}

p {
  margin-bottom: 12px;
  color: var(--fg);
}

.en-term {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Methodology cards */
.method-grid {
  display: grid;
  gap: 12px;
}

.method-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
}

.method-card h3 {
  margin: 0 0 6px;
  font-size: 0.95em;
}

.method-card p {
  font-size: 0.88em;
  margin: 0;
  color: var(--muted);
}

/* Tournament table */
.tournament-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82em;
  margin-top: 12px;
  overflow-x: auto;
  display: block;
}

.tournament-table th {
  background: var(--accent);
  color: #fff;
  padding: 8px 6px;
  text-align: center;
  font-weight: 600;
  font-size: 0.92em;
  white-space: nowrap;
}

.tournament-table td {
  padding: 7px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.9em;
}

.tournament-table tr:nth-child(even) { background: #f5f5f8; }

.tournament-table .method-name {
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.tournament-table .type {
  font-size: 0.82em;
  color: var(--muted);
  font-weight: 400;
}

.verdict-pass {
  color: var(--pass);
  font-weight: 700;
  font-family: var(--sans);
}

.verdict-fail {
  color: var(--fail);
  font-weight: 700;
  font-family: var(--sans);
}

/* Metric bars */
.metric-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.metric-bar-track {
  flex: 1;
  height: 22px;
  background: var(--bar-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.metric-bar-label {
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--muted);
  min-width: 50px;
  text-align: right;
}

.metric-bar-value {
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 600;
  min-width: 55px;
  text-align: left;
}

/* Finding cards */
.finding-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.finding-card.good { border-left: 4px solid var(--pass); }
.finding-card.bad { border-left: 4px solid var(--fail); }
.finding-card.neutral { border-left: 4px solid var(--warn); }

.finding-card h3 {
  margin: 0 0 8px;
}

.finding-card p {
  font-size: 0.9em;
  margin: 0;
}

/* Architecture diagram */
.arch-diagram {
  background: #1a2744;
  color: #c8d4e8;
  border-radius: 8px;
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.78em;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
}

.arch-diagram .label { color: #6fa3d8; font-weight: bold; }
.arch-diagram .arrow { color: #d4a84a; }
.arch-diagram .ok { color: #5ada6a; }

/* Acceptance criteria */
.criteria-list {
  list-style: none;
  padding: 0;
}

.criteria-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
}

.criteria-list .crit-name { font-weight: 600; }
.criteria-list .crit-val {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
}

/* Phase status */
.phase-grid {
  display: grid;
  gap: 8px;
}

.phase-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.88em;
}

.phase-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78em;
  font-weight: 700;
  font-family: var(--mono);
  white-space: nowrap;
}

.phase-frozen { background: #d4e8f8; color: #1a5a9e; }
.phase-active { background: #fce8d4; color: #c0681a; }
.phase-pending { background: #e8e8e8; color: #888; }

.phase-row .phase-name { font-weight: 600; flex: 1; }
.phase-row .phase-desc { color: var(--muted); font-size: 0.88em; }

/* Next steps */
.next-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.next-steps li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px 12px 44px;
  margin-bottom: 8px;
  position: relative;
  font-size: 0.9em;
  counter-increment: step;
}

.next-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82em;
  font-weight: 700;
  font-family: var(--mono);
}

/* Provenance */
.provenance-box {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.82em;
  line-height: 1.8;
}

.provenance-box .pin {
  color: var(--pass);
  font-weight: 600;
}

/* Footer */
footer {
  background: #1a2744;
  color: #a8b8d8;
  text-align: center;
  padding: 24px 0;
  font-size: 0.82em;
}

footer a {
  color: #6fa3d8;
  text-decoration: none;
}

/* ObsID chips */
.obsid-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.obsid-chip {
  font-family: var(--mono);
  font-size: 0.76em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--accent);
}

/* Mobile */
@media (max-width: 600px) {
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 1.25em; }
  .hero .subtitle { font-size: 0.82em; }
  .stat-pill { min-width: 80px; padding: 8px 12px; }
  .stat-pill .num { font-size: 1.3em; }
  .stat-pill .label { font-size: 0.65em; }
  .container { padding: 0 14px; }
  section { padding: 24px 0; }
  h2 { font-size: 1.1em; }
  .tournament-table { font-size: 0.72em; }
  .tournament-table th { padding: 6px 4px; }
  .tournament-table td { padding: 5px 4px; }
  .arch-diagram { font-size: 0.68em; padding: 14px; }
  .next-steps li { padding-left: 38px; font-size: 0.84em; }
  .phase-row { flex-wrap: wrap; }
  .phase-row .phase-name { font-size: 0.84em; }
}
