:root {
  --ink: #182f32;
  --muted: #647676;
  --line: #e0e8e4;
  --canvas: #f5f7f4;
  --accent: #126857;
  --soft: #e7f1ea;
  --sidebar: 244px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 34px 24px;
  border-right: 1px solid var(--line); background: #edf2ec;
  display: flex; flex-direction: column;
}
.brand {
  font-size: 30px; letter-spacing: -1.5px; font-weight: 650; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 37px; height: 37px;
  background: var(--accent); border-radius: 10px; color: white; font: italic 32px Georgia;
}
.brand-dot { color: var(--accent); margin-left: -9px; }
.sidebar-caption { font-size: 11px; color: var(--muted); margin: 14px 0 38px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a {
  padding: 11px 13px; color: #4c6260; border-radius: 8px; font-weight: 550;
  display: flex; justify-content: space-between;
}
.sidebar nav a:hover { background: #e2eae0; text-decoration: none; }
.sidebar nav a.active { background: white; color: var(--accent); box-shadow: 0 1px 4px #1b3c2810; }
.sidebar-footer {
  margin-top: auto; color: var(--muted); font-size: 12px;
  border-top: 1px solid #d6e0d3; padding-top: 20px;
}
.sidebar-footer p { margin: 8px 0; }
.workspace { margin-left: var(--sidebar); }
.topbar {
  height: 73px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; padding: 0 44px;
  background: #ffffff90; color: var(--muted); font-size: 12px;
}
.account { display: flex; align-items: center; gap: 18px; }
.account form { margin: 0; }
main { max-width: 1450px; margin: 0 auto; padding: 40px 44px 52px; }
.page-footer { padding: 20px 44px; border-top: 1px solid var(--line); color: #788784; font-size: 11px; }
.eyebrow {
  font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  font-weight: 650; color: var(--accent); margin: 0 0 10px;
  display: flex; align-items: center; gap: 15px;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  font-family: Georgia, "Times New Roman", serif; font-size: 36px;
  line-height: 1.15; font-weight: 400; letter-spacing: -.8px; margin: 0 0 14px;
}
h2 { font-size: 19px; letter-spacing: -.25px; margin: 0 0 6px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.5; }
p { margin: 0 0 14px; }
.subtitle { color: var(--muted); max-width: 700px; font-size: 14px; margin: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 30px; }
.page-heading > .button { margin-top: 28px; }
.back-link { display: inline-block; font-size: 12px; margin: 0 0 23px; color: var(--muted); }
.button {
  border: 1px solid var(--accent); background: var(--accent); color: white;
  border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 15px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.5;
}
.button:hover { background: #0f5749; text-decoration: none; }
.button.secondary { background: white; border-color: #d4dfd8; color: #3a5550; }
.button.secondary:hover { background: #edf3ee; }
.text-button { background: none; border: none; color: var(--accent); padding: 0; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.panel { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; min-width: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading p { font-size: 12px; color: var(--muted); margin: 0; max-width: 730px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.event-card {
  display: block; background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 25px; color: var(--ink); transition: box-shadow .15s, transform .15s;
}
.event-card:hover { box-shadow: 0 8px 22px #19382b0d; text-decoration: none; transform: translateY(-2px); }
.event-card h2 { font-family: Georgia, serif; font-weight: 400; font-size: 25px; margin: 24px 0 12px; }
.event-card p { font-size: 13px; color: var(--muted); min-height: 55px; }
.card-top, .card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.event-icon { width: 43px; height: 43px; border-radius: 12px; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-size: 24px; }
.card-bottom { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 22px; font-size: 11px; color: var(--muted); }
.badge {
  font-size: 10px; line-height: 1.5; display: inline-block; background: #eef1ee;
  color: #62726d; border-radius: 5px; padding: 4px 7px; white-space: nowrap;
  letter-spacing: .15px; font-weight: 550;
}
.badge.accepted, .badge.succeeded { background: #e6f2e9; color: #216b48; }
.badge.review, .badge.pending { background: #fcf1d9; color: #8c6420; }
.badge.failed, .badge.rejected { background: #fae8e4; color: #a34436; }
.badge.running { background: #e7effb; color: #4262a4; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 28px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 19px 21px; display: flex; flex-direction: column; gap: 4px; }
.metric > span { font-size: 11px; color: var(--muted); }
.metric strong { font-size: 32px; line-height: 1.4; font-weight: 500; font-family: Georgia, serif; }
.metric small { font-size: 10px; color: #809089; }
.identity-metric { grid-column: span 2; }
.identity-metric div { display: flex; flex-direction: column; margin: 9px 0; font-size: 13px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input { max-width: 340px; }
.filters select { max-width: 230px; }
.filters label { font-size: 12px; color: var(--muted); }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; border: 1px solid #d6dfd8; border-radius: 7px; padding: 10px 11px;
  background: white; color: var(--ink); font-size: 13px;
}
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
select { width: auto; padding-right: 30px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.form-panel { max-width: 700px; }
.form-panel form > div:not(.form-actions), form.form-panel > div:not(.form-actions) { margin-bottom: 20px; }
.form-panel label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.form-panel .helptext, .hint { color: var(--muted); font-size: 11px; margin: 9px 0 15px; display: block; }
.form-panel .helptext ul { padding-left: 19px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.two-column { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.guide p { color: var(--muted); font-size: 13px; margin: 16px 0; }
.guide strong { color: var(--ink); }
pre { overflow: auto; white-space: pre-wrap; font: 11px/1.8 ui-monospace, monospace; background: #f4f6f3; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.notice { background: #eaf2ec; border: 1px solid #d6e4d9; color: #456457; border-radius: 9px; padding: 14px 17px; font-size: 12px; margin-bottom: 22px; }
.messages { margin-bottom: 25px; display: grid; gap: 9px; }
.message { padding: 13px 17px; border-radius: 8px; background: #e8f2ec; color: #296144; font-size: 12px; border: 1px solid #d4e3d8; }
.message.error { background: #fff1ed; border-color: #efd0c6; color: #943f2d; }
.message.warning { background: #fff7e5; color: #87671f; border-color: #eadfba; }
.errorlist { color: #a33b30; font-size: 12px; padding-left: 20px; line-height: 1.8; }
.batch-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; background: #f7f9f6; border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; margin-bottom: 9px; }
.batch-toolbar label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.batch-toolbar select { width: 210px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { color: #778680; font-size: 10px; letter-spacing: .5px; font-weight: 600; text-transform: uppercase; padding: 13px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 18px 11px; border-bottom: 1px solid #edf1eb; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.check-cell { width: 30px; }
.person-name { font-weight: 600; color: var(--ink); font-size: 13px; }
.subline { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.external-link { display: block; font-size: 11px; margin-bottom: 5px; white-space: nowrap; }
.muted { color: var(--muted); }
.table-empty { text-align: center; color: var(--muted); padding: 45px 20px; }
.empty-state { padding: 60px 32px; border: 1px dashed #cbd8ce; border-radius: 14px; text-align: center; grid-column: 1/-1; background: #ffffff70; }
.empty-state h2 { font-family: Georgia, serif; font-size: 27px; font-weight: 400; }
.empty-state p { color: var(--muted); max-width: 550px; margin: 14px auto 24px; font-size: 13px; }
.empty-icon { color: var(--accent); font-size: 37px; margin-bottom: 14px; }
.pagination { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); padding-top: 20px; margin-top: 8px; border-top: 1px solid var(--line); }
.pagination > div { display: flex; gap: 8px; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid #edf1eb; font-size: 12px; color: var(--ink); }
.history-row:last-child { border-bottom: none; }
.history-row:hover { text-decoration: none; }
.history-row strong { font-size: 12px; }
.profile-actions { margin-bottom: 25px; }
.candidate { padding: 20px 0; border-top: 1px solid var(--line); }
.candidate-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.candidate-heading p { font-size: 12px; color: var(--muted); }
.candidate-links { display: flex; gap: 20px; font-size: 12px; margin-bottom: 15px; flex-wrap: wrap; }
details { font-size: 12px; margin-top: 13px; }
summary { cursor: pointer; color: var(--accent); font-size: 12px; }
details > p { margin-top: 15px; }
.evidence { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 10px; font-size: 12px; padding: 16px 0; margin: 0; }
.evidence dt { color: var(--muted); overflow-wrap: anywhere; }
.evidence dd { margin: 0; overflow-wrap: anywhere; }
.manual-identity { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.manual-identity > p { max-width: 650px; color: var(--muted); font-size: 12px; }
.inline-empty { padding: 25px 0; color: var(--muted); font-size: 12px; }
.publication { padding: 23px 0; border-top: 1px solid var(--line); }
.publication.excluded { opacity: .65; }
.publication-heading { display: flex; gap: 17px; }
.paper-year { font-size: 11px; color: var(--muted); min-width: 40px; padding-top: 3px; }
.publication h3 a { color: var(--ink); }
.paper-labels { display: flex; gap: 7px; flex-wrap: wrap; }
.publication details { margin-left: 57px; }
.abstract { color: #596e68; line-height: 1.8; font-size: 13px; }
.publication-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); margin: 15px 0 0 57px; }
.auth-heading { margin: 35px 0 25px; }
.auth-panel { max-width: 530px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (min-width: 1600px) {
  main { padding-top: 55px; }
  .page-heading { margin-bottom: 38px; }
}
@media (max-width: 1150px) {
  :root { --sidebar: 200px; }
  .sidebar { padding: 30px 17px; }
  main { padding: 30px 26px; }
  .topbar { padding: 0 26px; }
  h1 { font-size: 31px; }
  .metrics { gap: 10px; }
  .metric { padding: 15px; }
  .section-heading, .batch-toolbar { flex-wrap: wrap; }
  .two-column { grid-template-columns: 1fr; }
  .form-panel { max-width: none; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 19px 20px; display: block; }
  .brand { font-size: 25px; }
  .brand-mark { width: 31px; height: 31px; font-size: 27px; }
  .sidebar-caption, .sidebar-footer { display: none; }
  .sidebar nav { display: flex; gap: 5px; margin-top: 17px; flex-wrap: wrap; }
  .sidebar nav a { padding: 8px 10px; font-size: 11px; }
  .workspace { margin: 0; }
  .topbar { height: 55px; padding: 0 20px; font-size: 11px; }
  main { padding: 26px 18px; }
  .page-heading { display: block; }
  .page-heading > .button, .page-heading > form { margin-top: 18px; }
  h1 { font-size: 30px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric strong { font-size: 29px; }
  .identity-metric { grid-column: span 2; }
  .panel { padding: 18px; }
  .event-grid { grid-template-columns: 1fr; }
  .section-heading { gap: 15px; }
  .filters { display: grid; grid-template-columns: 1fr; }
  .filters input, .filters select { max-width: none; width: 100%; }
  .filters .button { width: 100%; }
  .batch-toolbar { padding: 12px; }
  .batch-toolbar label, .batch-toolbar select, .batch-toolbar .actions { width: 100%; }
  .batch-toolbar .button { flex: 1; }
  .evidence { grid-template-columns: 1fr; }
  .evidence dd { margin-bottom: 8px; }
  .pagination { align-items: flex-start; gap: 15px; flex-direction: column; }
  .candidate-heading { gap: 10px; }
  .publication-footer { margin-left: 0; align-items: flex-start; }
  .history-row { flex-wrap: wrap; }
  .auth-heading { margin-top: 15px; }
  .page-footer { padding: 20px; }
  .publication details { margin-left: 0; }
}
.event-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.event-tabs a { padding: 12px 2px; color: var(--muted); font-weight: 600; }
.event-tabs a.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.preparation-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.preparation-steps p { font-size: 13px; color: var(--muted); }
.preparation-steps .panel { display: flex; flex-direction: column; }
.preparation-steps button { align-self: flex-start; margin-top: auto; }
.scope-options { display: flex; gap: 25px; margin: 18px 0; flex-wrap: wrap; }
.scope-options label, .checkbox-label { display: flex !important; align-items: center; gap: 9px; }
input[type=radio] { width: auto !important; accent-color: var(--accent); }
.button.danger { background: #993d32; border-color: #993d32; }
.danger-link { color: #993d32; }
.concept-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.concept-tags .badge { white-space: normal; }
.source-record { margin: 14px 0; }
@media (max-width: 760px) { .preparation-steps { grid-template-columns: 1fr; gap: 0; } }
.candidate-topic-preview { background: #f7faf6; border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 20px 0; }
.candidate-topic-preview .hint { margin-bottom: 12px; }
.preview-meta { font-size: 12px; color: var(--muted); }
.candidate-topic-preview .notice { margin: 16px 0 0; }
.candidate-topic-preview .source-record { padding: 14px 0; border-top: 1px solid var(--line); }

.cohort-progress { margin: 0 0 1rem; }
.cohort-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }
.cohort-actions span { margin-right: auto; }
.cohort-row { cursor: pointer; }
.cohort-row:hover { background: #f5f9f7; }

.accepted-identity { margin: 0 0 1rem; }
.candidate-table td { vertical-align: top; }
.candidate-table td:nth-child(2) { min-width: 210px; max-width: 320px; }
.candidate-table td:last-child { min-width: 150px; }
.candidate-affiliations { margin: .5rem 0; padding-left: 1.2rem; }
.candidate-decisions { display: flex; flex-wrap: wrap; gap: .5rem; }
.candidate-decisions .checkbox-label { flex-basis: 100%; }
.candidate-table .evidence { min-width: 240px; }

.candidate-title { display: flex; align-items: center; gap: .5rem; }
.candidate-title h2 { margin: 0; }
.info-popover { position: relative; }
.info-popover > summary { cursor: pointer; list-style: none; color: var(--muted); }
.info-popover > summary::-webkit-details-marker { display: none; }
.info-popover-content { position: absolute; z-index: 5; top: calc(100% + .5rem); left: 0; width: min(320px, 70vw); padding: .8rem; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 16px #0002; font-size: 12px; }

.profile-selection { margin: 0 0 1rem; }
.profile-selection form { padding: .75rem 0; }
.profile-selection-row { margin: .5rem 0; }

.overview-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.overview-summary > div { background: #f5f8f5; border-radius: 9px; padding: 13px 15px; }
.overview-summary strong, .overview-summary span { display: block; }
.overview-summary strong { font-size: 22px; line-height: 1.3; color: var(--accent); }
.overview-summary span, .overview-note { color: var(--muted); font-size: 12px; }
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 14px; }
.overview-chart { border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.overview-chart p { color: var(--muted); font-size: 12px; min-height: 38px; margin-bottom: 12px; }
.distribution { display: grid; gap: 7px; }
.distribution-row { display: grid; grid-template-columns: 43px 1fr 25px; align-items: center; gap: 8px; font-size: 11px; }
.distribution-row strong { text-align: right; }
.distribution-track { height: 10px; border-radius: 5px; background: #edf2ee; overflow: hidden; }
.distribution-track span { display: block; height: 100%; background: #328d75; border-radius: inherit; }
.overview-placeholder { background: #f8faf8; border-style: dashed; }
.overview-placeholder p { color: var(--accent); font-weight: 600; min-height: 0; margin: 18px 0 4px; }
.overview-placeholder span { color: var(--muted); font-size: 12px; }
.overview-chart .overview-empty { margin-top: 20px; min-height: 0; }
.concept-example { border-top: 1px solid var(--line); padding: 18px 0; }
.concept-example h3 { margin: 0 0 5px; font-size: 15px; }
.concept-example-meta { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.concept-example-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.concept-example-columns h4 { font-size: 12px; margin: 0 0 8px; }
.concept-example-columns h4 span { color: var(--muted); font-weight: normal; }
.example-concepts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.example-concepts li { border-radius: 6px; padding: 4px 8px; font-size: 12px; overflow-wrap: anywhere; }
.selected-concepts li { background: #e6f2e9; color: #216b48; }
.omitted-concepts li { background: #f2f3f2; color: #46524b; }
.example-reason { font-size: 10px; color: #6d776f; }
.trajectory-paper > summary, .trajectory-alternative > summary { cursor: pointer; }
.trajectory-alternative { padding: 5px 0; }
.trajectory-alternative:first-of-type { margin-top: 16px; }
.trajectory-choice { display: inline-flex; align-items: baseline; gap: 9px; max-width: 100%; border: 1px solid #d6e3da; background: #f8fbf8; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.55; text-align: left; cursor: pointer; padding: 10px 15px; border-radius: 8px; transition: background .15s, border-color .15s, box-shadow .15s; }
.trajectory-choice strong { color: var(--accent); flex: none; }
.trajectory-choice:hover { background: #edf5ee; border-color: #a8cbb6; }
.trajectory-choice[aria-pressed="true"] { background: #e6f2e9; border-color: #73aa8e; box-shadow: 0 0 0 1px #73aa8e; }
.trajectory-choice:focus-visible { outline: 2px solid #9b6a00; outline-offset: 2px; }
.trajectory-origin { font-size: 12px; padding: 6px 10px; }
.trajectory-concepts .trajectory-input-active { background: #ffe39b; color: #583b00; box-shadow: inset 0 0 0 2px #bd890f; font-weight: 700; }
.collaboration-match { background: #ffe39b; color: #583b00; box-shadow: inset 0 0 0 1px #bd890f; font-weight: 700; }

.outward-collaborations { table-layout: fixed; }
.outward-collaborations .outward-paper-column { width: 28%; }
.outward-collaborations th { white-space: normal; overflow-wrap: anywhere; }
.outward-collaborations th[scope="rowgroup"] { vertical-align: top; text-transform: none; font-size: 12px; letter-spacing: normal; color: var(--ink); }
.outward-collaborations tbody + tbody tr:first-child > * { border-top: 1px solid var(--line); }
.outward-collaborations tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* Keep wrapped collaboration concept tags readable. */
.collaboration-concepts .badge { margin: 2px 3px 2px 0; }
