:root {
  --bg: #f7f0e4;
  --paper: #fffdf8;
  --ink: #2d241b;
  --muted: #776b5f;
  --line: #e4d6c4;
  --accent: #a85f2a;
  --accent-soft: #f5dfc7;
  --dark: #101418;
  --dark-2: #161d23;
  --green: #83d18b;
  --red: #ff8f8f;
  --blue: #99c7ff;
  --gold: #d79826;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff7e9 0, var(--bg) 38rem);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.page { max-width: 1180px; margin: 0 auto; padding: 42px 22px 72px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.3rem, 6vw, 5.2rem); line-height: .95; margin: 0 0 18px; }
h2 { font-size: 2rem; margin: 0 0 18px; }
p { margin: 0 0 12px; }
code, pre, .diff-table { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.hero {
  background: rgba(255, 253, 248, .82);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(76, 48, 20, .10);
}
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.metric { background: #fff8ed; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.metric b { display:block; font-size: 1.45rem; }
.metric span { color: var(--muted); font-size: .88rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; margin-top: 22px; }
.summary-list { margin: 0; padding-left: 1.2rem; }
.summary-list li { margin: 8px 0; }
.risk-map { display: flex; flex-wrap: wrap; gap: 10px; }
.risk-chip {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: #fffaf2;
  border-radius: 999px; padding: 8px 12px;
}
.risk-chip span { font-size: .72rem; text-transform: uppercase; font-weight: 800; letter-spacing: .06em; }
.risk-chip.needs-attention span { color: #a72727; }
.risk-chip.worth-a-look span { color: #9a6200; }
.risk-chip.safe span { color: #347447; }
.risk-chip code { font-size: .82rem; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge.needs-attention, .badge.blocking, .badge.important { color: #8e1f1f; background: #ffe1dc; }
.badge.worth-a-look, .badge.question, .badge.nit { color: #875900; background: #ffe8b8; }
.badge.safe, .badge.good { color: #236437; background: #dff3df; }
.files { margin-top: 34px; }
.file-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; margin: 18px 0; overflow: hidden; box-shadow: 0 18px 44px rgba(55, 35, 16, .07); }
section.file-card { padding: 20px; }
details.file-card summary { list-style: none; cursor: pointer; padding: 18px 20px; }
details.file-card summary::-webkit-details-marker { display:none; }
details.file-card[open] summary { border-bottom: 1px solid var(--line); }
details.file-card .diff-wrap, details.file-card .comments { margin: 18px 20px 20px; }
.file-title { display:flex; align-items:center; justify-content:space-between; gap: 12px; margin-bottom: 8px; }
.file-title code { font-size: .95rem; color: #3b2b1f; word-break: break-all; }
.file-summary { color: var(--muted); }
.diff-wrap { background: var(--dark); border-radius: 16px; overflow: auto; border: 1px solid #27313a; margin-top: 16px; }
.diff-table { width: 100%; border-collapse: collapse; color: #d5dde5; font-size: 12.5px; line-height: 1.45; }
.diff-table tr { background: var(--dark); }
.diff-table tr.meta { color: #9ca8b4; background: #0c1014; }
.diff-table tr.hunk { color: var(--blue); background: #162230; }
.diff-table tr.add { color: #d9ffe1; background: rgba(44, 115, 59, .24); }
.diff-table tr.del { color: #ffdada; background: rgba(130, 43, 43, .26); }
.diff-table td { padding: 0 10px; vertical-align: top; white-space: pre; }
.diff-table .ln { user-select: none; width: 52px; text-align: right; color: #6f7d89; border-right: 1px solid #26313a; }
.diff-table .code { min-width: 720px; }
.comments { margin-top: 16px; display: grid; gap: 10px; }
.comment { border: 1px solid var(--line); border-left: 5px solid var(--gold); background: #fffaf0; border-radius: 16px; padding: 14px 16px; }
.comment.good { border-left-color: #3b8a4e; background: #f1fff2; }
.comment.blocking, .comment.important { border-left-color: #b7352a; background: #fff1ef; }
.comment.question { border-left-color: #c8871b; }
.comment.nit { border-left-color: #b68b25; }
.comment-head { display:flex; align-items:center; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .9rem; }
.safe-grid { margin-top: 26px; }
.note { color: var(--muted); font-size: .95rem; }
.status-pre { background: #241b14; color: #ffe9cc; padding: 14px; border-radius: 14px; overflow: auto; font-size: 12px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { margin: 10px 0; padding-left: 30px; position: relative; }
.checklist li::before { content: "☐"; position: absolute; left: 0; color: var(--accent); }
.path-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-button { border: 1px solid var(--line); background: #fff8ed; color: var(--ink); border-radius: 999px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .82rem; }
.copy-button:hover { background: var(--accent-soft); }
.omitted { border-left: 4px solid var(--accent); padding-left: 12px; }
@media (max-width: 820px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 24px; }
  .file-title { align-items: flex-start; flex-direction: column; }
}
