:root {
  --wine: #650b1c;
  --paper: #faf8f1;
  --card: #fdfcf8;
  --ink: #2a2220;
  --muted: #665e59;
  --line: #e7e0d8;
  --blush: #f7e7eb;
  --sage: #e4e5d8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 Arial,
    Helvetica,
    sans-serif;
}
header,
footer {
  max-width: 1440px;
  margin: auto;
  padding: 26px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
header {
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--wine);
  text-underline-offset: 4px;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--wine);
  line-height: 1.2;
}
.brand span {
  display: block;
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 6px;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 45px 5%;
  min-height: 75vh;
}
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.14;
}
h1 {
  font-size: clamp(38px, 6vw, 76px);
  margin: 15px 0 24px;
  letter-spacing: -2px;
}
h2 {
  font-size: 30px;
  margin: 0 0 20px;
}
h3 {
  font-size: 23px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 20px;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  font-weight: bold;
  color: var(--wine);
}
.hero {
  max-width: 920px;
  margin: 55px auto 70px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 86px);
}
.subtitle {
  font:
    clamp(22px, 3vw, 32px) Georgia,
    serif;
}
.hero form {
  max-width: 750px;
  margin: 32px auto 14px;
  text-align: left;
}
.search {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 28px #2a222008;
}
.search input {
  border: none;
  background: transparent;
  font-size: 17px;
  min-width: 0;
}
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wine);
  color: white;
  border: 1px solid var(--wine);
  border-radius: 10px;
  padding: 13px 21px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.small {
  padding: 9px 14px;
  font-size: 14px;
}
.secondary {
  background: transparent;
  color: var(--wine);
  border-color: var(--line);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 18px;
  margin-bottom: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.card p:last-child {
  margin-bottom: 0;
}
.number {
  display: block;
  color: var(--wine);
  font:
    32px Georgia,
    serif;
  margin-bottom: 20px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.workspace {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 35px;
}
.tabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tabs button {
  justify-content: start;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 10px 14px;
  font-size: 14px;
}
.tabs button.active {
  background: var(--blush);
  color: var(--wine);
}
.project-title {
  font-size: 44px;
  margin-bottom: 12px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  background: var(--sage);
  padding: 5px 9px;
  border-radius: 6px;
  color: #464936;
  margin-bottom: 10px;
}
.badge.user {
  background: var(--blush);
  color: var(--wine);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
}
input,
textarea,
select {
  font: inherit;
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d5cbc2;
  background: white;
  border-radius: 9px;
  color: var(--ink);
}
textarea {
  min-height: 105px;
  resize: vertical;
}
form button {
  margin-top: 16px;
}
.search button {
  margin: 0;
}
input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.source-title {
  font:
    23px Georgia,
    serif;
}
.source-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 15px;
}
.excerpt {
  border-left: 3px solid var(--sage);
  padding-left: 17px;
  white-space: pre-wrap;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed #d6c9bf;
  border-radius: 16px;
  margin-bottom: 20px;
}
.error {
  background: var(--blush);
  border: 1px solid #dfb3bc;
  color: var(--wine);
  padding: 14px;
  border-radius: 9px;
  margin: 14px 0;
}
.notice {
  background: var(--sage);
  padding: 18px 22px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 22px;
}
.stack > * + * {
  margin-top: 15px;
}
.project-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.project-link:hover {
  border-color: var(--wine);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline {
  border-left: 2px solid var(--line);
  padding-left: 25px;
  margin: 20px 0;
}
.timeline article {
  margin-bottom: 30px;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
#toast:not(:empty) {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 15px 24px;
  border-radius: 12px;
  width: max-content;
  max-width: 90vw;
  z-index: 9;
}
blockquote {
  margin: 15px 0;
}
.report h2 {
  margin-top: 35px;
}
.danger {
  color: var(--wine);
}
@media (max-width: 768px) {
  header {
    padding: 20px 5%;
  }
  nav {
    gap: 12px;
    font-size: 13px;
  }
  .grid,
  .split {
    grid-template-columns: 1fr;
  }
  .hero {
    margin: 35px auto 40px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    max-width: 100%;
  }
  .tabs button {
    flex-shrink: 0;
  }
  .card {
    padding: 22px;
  }
  main {
    padding-top: 30px;
  }
  .project-title {
    font-size: 36px;
  }
  .search {
    flex-direction: column;
  }
  .search button {
    width: 100%;
  }
  h1 {
    letter-spacing: -1px;
  }
  footer {
    gap: 12px;
  }
  .brand {
    font-size: 18px;
  }
  .brand span {
    font-size: 9px;
  }
}
@media print {
  header,
  footer,
  .tabs,
  .actions,
  form,
  #toast {
    display: none;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .workspace {
    display: block;
  }
  .card {
    break-inside: avoid;
  }
  body {
    background: white;
  }
  .report a {
    color: inherit;
  }
}
/* Person discovery keeps uncertain records separate and evidence readable. */
#recent-research:not(:empty) { margin: 0 0 55px; }
.discovery-head { max-width: 900px; margin-bottom: 30px; }
.discovery-head .eyebrow { display: block; margin-top: 24px; }
.provider-status { font-size: 13px; color: var(--muted); margin-bottom: 30px; }
.candidate-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.candidate-heading { display:flex; gap:18px; align-items:center; margin-bottom:22px; min-width:0; }
.candidate-heading > div { min-width:0; }
.candidate-heading h2 { font-size:28px; margin-bottom:12px; overflow-wrap:anywhere; }
.avatar { display:flex; align-items:center; justify-content:center; width:64px; height:64px; flex:0 0 64px; border-radius:50%; background:var(--blush); color:var(--wine); font:700 23px Georgia,serif; }
.avatar.large { width:80px; height:80px; flex-basis:80px; font-size:28px; }
.subject-card { margin: 8px 0 32px; }
.subject-card h3 { font-size:21px; }
.public-links { overflow-wrap:anywhere; line-height:2; }
details { margin:18px 0; }
summary { color:var(--wine); cursor:pointer; font-weight:600; }
details[open] summary { margin-bottom:16px; }
.check { display:flex; align-items:center; gap:10px; font-weight:400; }
.check input { width:18px; height:18px; flex:none; }
.comparison { overflow-x:auto; max-width:100%; }
table { border-collapse:collapse; width:100%; min-width:540px; table-layout:fixed; }
caption { text-align:left; color:var(--muted); padding:12px 0; }
th,td { text-align:left; vertical-align:top; border-bottom:1px solid var(--line); padding:14px; overflow-wrap:anywhere; }
.reference-photo { width:160px; height:160px; object-fit:contain; border-radius:12px; background:var(--paper); }
.photo-preview { margin:20px 0; }
.clue { display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--line); padding:14px 0; }
select:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--wine); outline-offset:3px; }
@media(max-width:768px){.candidate-grid{grid-template-columns:1fr}.candidate-heading{align-items:flex-start;gap:12px}.candidate-heading h2{font-size:25px}.avatar.large{width:60px;height:60px;flex-basis:60px}.candidate .actions{flex-direction:column}.clue{align-items:flex-start}.clue>span{min-width:0;overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media print{.subject-card button{display:none}.subject-card details{display:block}}

.comparison-mobile{display:none}
@media(max-width:768px){.comparison{display:none}.comparison-mobile{display:block}.comparison-mobile article+article{border-top:2px solid var(--line);padding-top:24px;margin-top:24px}.comparison-mobile dt{font-size:12px;font-weight:bold;color:var(--wine);margin-top:14px}.comparison-mobile dd{margin:3px 0 16px}.comparison-mobile h3{margin-top:12px}}
