:root {
  color-scheme: light;
  --ink: #201c18;
  --muted: #6f655b;
  --paper: #f7f1e7;
  --card: #fffdf8;
  --line: #d7c8b5;
  --accent: #a44920;
  --accent-dark: #662b18;
  --good: #2f6f4e;
  --warn: #b36b00;
  --bad: #9f2f24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  padding: 3rem clamp(1rem, 4vw, 4rem) 2rem;
  border-bottom: 2px solid var(--line);
  background: #fff8ec;
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; color: var(--accent-dark); font-size: .78rem; font-weight: 800; }
h1 { margin: .2rem 0; font-size: clamp(2.2rem, 6vw, 5.8rem); line-height: .9; }
.dek { max-width: 58ch; font-size: 1.15rem; color: var(--muted); }
.scorecard { min-width: 190px; padding: 1rem; background: var(--ink); color: #fff8ec; border-radius: 2px; box-shadow: 8px 8px 0 #d9b68d; }
.scorecard span, .scorecard small { display: block; color: #ebd8c0; }
.scorecard strong { font-size: 3rem; line-height: 1; }
main { padding: 1.5rem clamp(1rem, 4vw, 4rem) 4rem; }
.panel, .claim-card, .metrics > div { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.panel { padding: 1rem; margin-bottom: 1rem; }
h2 { margin: 0 0 .75rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; }
.controls { display: grid; gap: .85rem; }
label { display: grid; gap: .3rem; font-weight: 700; color: var(--accent-dark); }
input, textarea, select { width: 100%; border: 1px solid var(--line); padding: .65rem; background: #fffefa; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
.button-row { display: flex; gap: .6rem; flex-wrap: wrap; }
button { border: 0; background: var(--accent); color: white; padding: .7rem .9rem; font-weight: 800; cursor: pointer; font: inherit; }
button:hover { background: var(--accent-dark); }
button.ghost, .filter { background: transparent; color: var(--accent-dark); border: 1px solid var(--line); }
.filter.active { background: var(--ink); color: white; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.metrics div { padding: 1rem; }
.metrics strong { display: block; font-size: 2rem; }
.metrics span { color: var(--muted); }
.matrix { display: grid; gap: 1rem; }
.claim-card { padding: 1rem; border-left: 6px solid var(--accent); }
.claim-card.high { border-left-color: var(--bad); }
.claim-card.unsupported { border-left-color: var(--warn); }
.card-top { display: flex; gap: .75rem; align-items: start; }
.wide { flex: 1; }
.remove { width: 2.25rem; height: 2.25rem; padding: 0; background: #3a3029; font-size: 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: .75rem 0; }
.card-footer { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-top: .75rem; color: var(--muted); }
.badge { background: #efe0cb; padding: .25rem .5rem; color: var(--accent-dark); font-weight: 800; }
.riskLabel.high { color: var(--bad); font-weight: 900; }
.riskLabel.medium { color: var(--warn); font-weight: 900; }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
#briefOutput { min-height: 20rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty { padding: 2rem; border: 1px dashed var(--line); color: var(--muted); background: rgba(255,255,255,.4); }
@media (max-width: 780px) { .hero, .card-top { display: block; } .metrics, .grid { grid-template-columns: 1fr; } .scorecard { margin-top: 1rem; } }
@media print {
  button, .filters, .remove { display: none !important; }
  body { background: white; }
  .hero, main { padding: 0; }
  .panel, .claim-card, .metrics > div { box-shadow: none; break-inside: avoid; }
  #briefOutput { border: none; min-height: auto; }
}
