:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f5f6f8;
  color: #1b1b1f;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 2rem 1rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.muted { color: #6b7280; }
.error { color: #b00020; margin: 0 0 .5rem; }
.card {
  max-width: 360px; margin: 4rem auto; padding: 2rem;
  background: #fff; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: flex; flex-direction: column; gap: 1rem;
}
.card label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
input {
  padding: .6rem .7rem; border: 1px solid #cbd0d8; border-radius: 8px; font-size: 1rem;
}
button {
  padding: .6rem 1rem; border: 0; border-radius: 8px;
  background: #2b59ff; color: #fff; font-size: 1rem; cursor: pointer;
}
button:hover { background: #1f47d6; }
@media (prefers-color-scheme: dark) {
  body { background: #15161a; color: #e7e8ea; }
  .card { background: #1f2127; box-shadow: none; }
  input { background: #15161a; color: #e7e8ea; border-color: #3a3d45; }
  .muted { color: #9aa0ac; }
}
.wrap { max-width: 1100px; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.filters select, .filters button { padding: .4rem .5rem; border-radius: 8px; border: 1px solid #cbd0d8; }
.filters .check { font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.filters .clear { font-size: .85rem; color: #6b7280; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
table.grid th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
td.enzo { font-size: 1.1rem; color: #d97706; width: 2.5rem; text-align: center; }
.sub { font-size: .8rem; color: #6b7280; }
.mom { font-size: .75rem; color: #be185d; }
.take { font-style: italic; color: #374151; max-width: 16rem; }
.fit { font-size: .75rem; padding: .1rem .4rem; border-radius: 999px; background: #eef; }
.fit-Reach { background: #fde2e2; color: #9b1c1c; }
.fit-Target { background: #e7f0ff; color: #1e40af; }
.fit-Likely { background: #e3f5e3; color: #166534; }
.detail-head h1 { margin-bottom: .2rem; }
.visit { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.visit .inline { display: inline; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; margin: 1rem 0; }
.facts div { display: flex; justify-content: space-between; border-bottom: 1px dotted #e5e7eb; padding: .3rem 0; }
.facts .wide { grid-column: 1 / -1; }
.facts span { color: #6b7280; }
.notes { margin-top: 1.5rem; }
.note { margin: .75rem 0; padding: .75rem 1rem; border-radius: 10px; background: #fff; }
.enzo-note { border-left: 4px solid #d97706; }
.mom-note { border-left: 4px solid #be185d; }
.note textarea { width: 100%; box-sizing: border-box; }
