/* briefs.css — shared styles for Decision Brief pages and index */

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

:root {
  --bg: #faf9f6;
  --bg-card: #ffffff;
  --bg-panel: #f3f2ee;
  --border: #e5e4e0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-dim: #737373;
  --accent: #c45d3e;
  --accent-soft: #f5ebe6;
  --green: #2d7a4f;
  --green-bg: #edf7f0;
  --red: #c44d4d;
  --red-bg: #fdf0f0;
  --orange: #d97706;
  --orange-bg: #fef3c7;
  --code-bg: #f0efeb;
  --terminal-bg: #1e1e2e;
  --terminal-text: #cdd6f4;
  --serif: 'Georgia', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 4px; }

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

/* Nav */
nav {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
nav .container {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.88rem;
}
nav .logo {
  font-weight: 600;
  color: var(--text);
}
nav .sep { color: var(--border); }

/* Hero (brief page) */
.brief-hero {
  margin-bottom: 2.5rem;
}
.brief-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.brief-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Verdict */
.verdict {
  padding: 1rem 1.25rem;
  background: var(--green-bg);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  margin-bottom: 2.5rem;
  font-size: 1rem;
  color: var(--green);
  font-weight: 500;
  line-height: 1.6;
}

/* Sections */
.section {
  margin-bottom: 2.5rem;
}
.section h2 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.section li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

/* Blockers */
.blockers li {
  padding: 0.6rem 0.75rem;
  background: var(--orange-bg);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.92rem;
}
.blocker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Constraints chips */
.constraints ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.constraints li {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--accent-soft);
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--accent);
}

/* Candidates comparison */
.candidates > div {
  margin-bottom: 1.5rem;
}
.candidate {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--bg-card);
}
.candidate h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.candidate-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.candidate-field {
  margin-bottom: 0.75rem;
}
.candidate-field h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.candidate-field p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}
.candidate-links {
  margin-top: 0.75rem;
}
.candidate-links h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.candidate-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.candidate-links a {
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* Dates */
.dates {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.dates strong {
  font-weight: 600;
  color: var(--text-muted);
}

/* Related */
.related li {
  font-size: 0.9rem;
}

/* CTA */
.cta-box {
  background: var(--terminal-bg);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  color: var(--terminal-text);
}
.cta-box h2 {
  color: var(--terminal-text);
  border-bottom-color: rgba(255,255,255,0.1);
}
.cta-box pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-top: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}
.cta-box .prompt { color: #a6e3a1; }
.cta-box .comment { color: #6c7086; }

/* Missing */
.missing {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}
.missing a {
  font-weight: 500;
}

/* Footer */
footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Index page specific ── */

/* Index page h1 */
main > h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Browse controls */
.browse-controls {
  margin-bottom: 1.5rem;
}
.brief-search {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  margin-bottom: 0.75rem;
  outline: none;
}
.brief-search:focus {
  border-color: var(--accent);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.chip-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-right: 0.25rem;
  white-space: nowrap;
}
.chip {
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.brief-status {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.brief-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.brief-list li {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.brief-list a {
  font-weight: 500;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.25rem;
}
.index-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* Index footer has more padding */
.brief-list ~ footer {
  padding-top: 3rem;
}

/* Responsive */
@media (max-width: 500px) {
  .brief-hero h1 { font-size: 1.5rem; }
  .dates { flex-direction: column; gap: 0.5rem; }
}
