:root {
  --bg: #0f1012;
  --fg: #e6e6e6;
  --muted: #8b8f93;
  --line: #1f2125;
  --card: #161719;
  --card-hover: #1a1c1f;
  --accent: #ff6b9d;
  --accent-dim: #ff6b9d80;
  --good: #7bc47f;
  --warn: #c8b878;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; min-height: 100vh;
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
}

.app-header h1 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.app-header h1 .sub { color: var(--accent); font-weight: 400; }

.controls { display: flex; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.controls button {
  background: transparent; border: 1px solid var(--line);
  color: var(--fg); padding: 0.25rem 0.6rem; border-radius: 3px; cursor: pointer; font-size: 0.9rem;
}
.controls button:hover { border-color: var(--accent-dim); }
.controls .link { border: none; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }

main {
  max-width: 72rem; margin: 0 auto; padding: 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}

@media (min-width: 60rem) {
  main { grid-template-columns: 2fr 1fr; }
}

.panel h2 { margin-top: 0; font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: -0.2rem; }
.loading, .empty { color: var(--muted); padding: 1.5rem; text-align: center; border: 1px dashed var(--line); border-radius: 4px; }

/* Conclusions */
.conclusion {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.9rem 1rem; margin-bottom: 0.75rem; transition: background 0.1s;
}
.conclusion:hover { background: var(--card-hover); }
.conclusion header { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.75rem; }
.gen-badge, .project-badge {
  background: var(--line); color: var(--muted);
  padding: 0.1rem 0.5rem; border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.gen-badge { color: var(--accent); }
.confidence { margin-left: auto; color: var(--muted); font-family: ui-monospace, SFMono-Regular, monospace; }
.conclusion .text { margin: 0.5rem 0; color: var(--fg); }
.conclusion footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
.citation { color: var(--muted); font-style: italic; }

.stars { display: inline-flex; gap: 0.15rem; }
.star {
  background: transparent; border: none; color: var(--line);
  font-size: 1.1rem; cursor: pointer; padding: 0.1rem 0.25rem; transition: color 0.1s;
}
.star:hover, .star:hover ~ .star { color: var(--accent-dim); }
.star:active { color: var(--accent); }

/* Generators */
.generator {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.75rem 0.9rem; margin-bottom: 0.75rem;
}
.generator header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.gen-name { font-weight: 600; font-family: ui-monospace, SFMono-Regular, monospace; }
.status {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem; border-radius: 2px;
}
.status-active          { background: var(--line); color: var(--muted); }
.status-ready-to-graduate { background: var(--good); color: #0f1012; }
.status-graduated       { background: var(--accent); color: #0f1012; }

.generator .citation { font-size: 0.75rem; margin: 0.2rem 0; }
.generator .stats { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--muted); margin: 0.3rem 0; }
.generator .channels { font-size: 0.7rem; color: var(--muted); }

.app-footer {
  max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem;
}
