/* University of Michigan colors (brand.umich.edu/design-resources/colors).
   The masthead uses the Block M supplied for this tool. */
:root {
  --maize: #FFCB05;
  --blue: #00274C;
  --blue-2: #1a3d66;
  --ink: #1b1f24;
  --muted: #5d6670;
  --line: #d9dde3;
  --bg: #f5f6f8;
  --card: #ffffff;
  --tappan-red: #9A3324;
  --ok: #2f6b3a;
  --warn-bg: #fff4c2;
  --chat-width: 840px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--blue); }
h1, h2, h3 { color: var(--blue); line-height: 1.2; }
h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Masthead: maize on blue, the pairing U-M recommends for text on blue. */
.masthead { background: var(--blue); border-bottom: 5px solid var(--maize); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; flex-wrap: wrap; }
.wordmark { text-decoration: none; display: flex; flex-direction: row; align-items: center; gap: 12px; }
.wordmark-text { display: flex; flex-direction: column; }
.wordmark-mark { height: 40px; width: auto; display: block; flex: none; }
.wordmark-school { color: var(--maize); font-weight: 800; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.wordmark-team { color: #fff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.masthead nav { display: flex; gap: 4px; }
.masthead nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.masthead nav a:hover { background: var(--blue-2); }
.masthead nav a.active { background: var(--maize); color: var(--blue); }

main { padding-top: 24px; padding-bottom: 32px; }
.footer { color: var(--muted); font-size: 12px; padding-bottom: 24px; }

.intro p { max-width: 760px; }
.count { color: var(--muted); }
.pill { display: inline-block; background: var(--blue); color: var(--maize); font-size: 13px; border-radius: 999px; padding: 1px 10px; vertical-align: middle; }
.pill-done { background: var(--ok); color: #fff; }

/* Review queue */
.group { margin-top: 28px; }
.group h2 { margin-bottom: 2px; }
.group > .muted { margin: 0 0 10px; }
.queue { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.queue li + li { border-top: 1px solid var(--line); }
.queue a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.queue a:hover { background: #eef2f7; }
.q-name { font-weight: 700; color: var(--blue); }
.q-arrow { color: var(--muted); font-size: 13px; }
.q-official { font-weight: 600; }
.q-meta { color: var(--muted); font-size: 13px; margin-left: auto; }
.q-flags { display: flex; gap: 6px; }

/* Flags and statuses */
.flag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 4px; padding: 1px 7px; text-decoration: none; white-space: nowrap; }
.flag-pick, .flag-missing { background: var(--tappan-red); color: #fff; }
.flag-te-only, .flag-country { background: var(--maize); color: var(--blue); }
.flag-spelling, .flag-check { background: #e3e8ef; color: var(--blue); }
.status { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; color: var(--muted); text-transform: capitalize; }
.status-confirmed { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.status-ambiguous, .status-candidate { border-color: #b8860b; color: #8a6400; }
.status-not_found, .status-rejected { border-color: var(--tappan-red); color: var(--tappan-red); }
.conf { font-size: 12px; color: var(--muted); margin-left: 6px; }
.conf-low { color: var(--tappan-red); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #eef1f5; border-radius: 3px; padding: 0 4px; margin-right: 4px; }

/* Player page */
.crumbs { margin: 0 0 12px; font-size: 14px; }
.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: 2px; }
.id-main { flex: 1; min-width: 240px; }
.player-official { margin: 0; font-weight: 600; }
.player-meta { margin: 8px 0 0; color: var(--muted); }
.profile-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.status-recruit, .status-tier { background: #eef2f7; color: var(--blue); }
.id-facts {
  display: grid; grid-template-columns: repeat(4, minmax(120px, max-content));
  width: fit-content; max-width: 100%; gap: 0; margin: 16px 0 0;
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--maize);
  border-radius: 8px; overflow: hidden;
}
.id-facts > div { padding: 9px 20px 11px; min-width: 130px; border-right: 1px solid var(--line); }
.id-facts > div:last-child { border-right: 0; }
.id-facts dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.id-facts dd { font-size: 22px; font-weight: 800; color: var(--blue); line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.id-facts dd.date-value { font-size: 16px; padding-top: 4px; white-space: nowrap; }
.country-emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 0.95em; line-height: 1; margin-right: 4px; }
.id-plays-for { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.quick-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.quick-search-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quick-search a.ext { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--blue); color: var(--blue); background: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 13px; text-decoration: none; }
.quick-search a.ext:hover { background: var(--maize); }
.ext-note { font-size: 12px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.player-head .flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.profile-main, .profile-aside { min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-heading h2, .card-heading h3 { margin-bottom: 0; }
.contact { border-top: 4px solid var(--blue); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 8px; }
.result-w { color: var(--ok); font-weight: 700; }
.result-l { color: var(--tappan-red); font-weight: 700; }
.result-score { margin: 2px 0; }
.status-review { margin-left: 6px; color: #785800; border-color: #d8b438; background: #fff8de; }
.opp-utr { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.notes { border-top: 4px solid var(--blue); }
.note-item { padding: 8px 0; }
.note-item + .note-item { border-top: 1px solid var(--line); }
.note-by { margin: 0; }
.note-form { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.note-form label { font-size: 13px; color: var(--muted); }
.note-form textarea, .note-form input { display: block; width: 100%; margin-top: 4px; }
.note-form button { justify-self: start; }
.note-editor { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.note-editor > summary, .research-create > summary,
.research-evidence > summary, .data-alert > summary, .open-item details > summary {
  cursor: pointer; color: var(--blue); font-weight: 700; font-size: 13px;
}
.data-alert { margin-top: 8px; padding: 8px 10px; background: var(--warn-bg); border-radius: 6px; }
.data-alert p { margin: 6px 0 0; font-size: 13px; }
.public-research { border-top: 4px solid var(--maize); }
.research-result, .research-error {
  padding: 10px 12px; border-radius: 6px; font-weight: 600;
}
.research-result { background: #e9f5ee; border: 1px solid var(--ok); color: var(--ok); }
.research-error { background: var(--warn-bg); border: 1px solid var(--tappan-red); color: var(--tappan-red); }
.research-entry { padding: 15px 0; border-top: 1px solid var(--line); }
.research-entry:first-of-type { border-top: 0; }
.research-entry h3 { margin: 6px 0; color: var(--blue); text-transform: none; letter-spacing: 0; }
.research-entry p { margin: 5px 0 8px; }
.research-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.research-source-link {
  display: inline-block; color: var(--muted); font-size: 12px;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.research-source-link:hover { color: var(--blue); }
.research-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px;
}
.research-evidence { display: contents; }
.research-evidence > summary {
  order: 1; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.research-controls > .research-source-link, .research-controls > .research-remove { order: 1; }
.research-evidence-body {
  order: 2; flex: 0 0 100%; border-left: 3px solid var(--line);
  margin-top: 6px; padding: 2px 0 2px 10px;
}
.research-evidence-body p { font-size: 13px; }
.source-checks { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 8px 0; }
.source-checks dt, .source-checks dd { font-size: 12px; }
.still-confirm { border-top: 4px solid var(--maize); }
.open-item { padding: 12px; background: #f2f5f9; border-radius: 7px; margin-top: 10px; }
.open-item h3 { margin: 0 0 5px; color: var(--blue); text-transform: none; letter-spacing: 0; }
.open-item p { margin: 0 0 7px; font-size: 13px; }
.open-item + .open-item { margin-top: 10px; }
.research-review > summary { align-items: center; }
.research-create { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.research-form { margin-top: 12px; }
.research-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px; margin-bottom: 12px;
}
.research-form-grid label, .review-actions label { color: var(--muted); font-size: 13px; }
.research-form-grid input:not([type=checkbox]), .research-form-grid select,
.research-form-grid textarea { display: block; width: 100%; margin-top: 4px; }
.research-form-grid .research-wide { grid-column: 1 / -1; }
.research-check { display: flex; gap: 7px; align-items: center; align-self: end; min-height: 38px; }
.research-item-actions { margin-top: 8px; }
.research-remove { display: inline; margin: 0; }
button.research-remove-button {
  border: 0; background: transparent; color: var(--muted); padding: 2px 0;
  font-size: 12px; font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
button.research-remove-button:hover {
  background: transparent; color: var(--tappan-red); filter: none;
}
.research-admin-item { border-top: 1px solid var(--line); padding: 14px 0; }
.research-admin-item:first-child { border-top: 0; }
.research-admin-item h3 { margin: 0; color: var(--blue); text-transform: none; letter-spacing: 0; }
.research-admin-item p { margin: 6px 0; }
.research-edit { margin-top: 10px; }
.review-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.review-actions label { flex: 1; min-width: 220px; }
.review-actions input { display: block; width: 100%; margin-top: 4px; }
.review-history { margin: 8px 0; padding-left: 18px; font-size: 12px; color: var(--muted); }
.status-pending { border-color: #b8860b; color: #785800; }
.status-approved { border-color: var(--ok); color: var(--ok); }
.status-dismissed, .status-withdrawn { border-color: var(--tappan-red); color: var(--tappan-red); }
.identity-fold { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 16px; }
.identity-fold > summary { cursor: pointer; font-weight: 600; color: var(--blue); padding: 14px 18px; list-style: none; display: flex; align-items: center; gap: 10px; }
.identity-fold > summary::-webkit-details-marker { display: none; }
.identity-fold > summary::after { content: "▾"; margin-left: auto; color: var(--maize); background: var(--blue); width: 22px; height: 22px; border-radius: 4px; text-align: center; line-height: 22px; font-size: 12px; flex: none; }
.identity-fold[open] > summary { border-bottom: 1px solid var(--line); }
.identity-body { padding: 16px 18px 4px; }
.why { background: var(--warn-bg); border-left: 4px solid var(--maize); padding: 10px 14px; margin: 8px 0 18px; max-width: 900px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.compare { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.sheet { position: sticky; top: 12px; border-top: 4px solid var(--blue); }
.sheet dl, .cand-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; font-weight: 600; }
.note { margin: 0 0 8px; white-space: pre-wrap; }
.clipped { color: var(--tappan-red); font-size: 12px; margin-left: 4px; }
.aliases { margin: 0; padding-left: 18px; }
.source { border-top: 4px solid var(--maize); }
.candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.candidate { display: flex; gap: 10px; border: 2px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; }
.candidate:has(input:checked) { border-color: var(--blue); background: #f2f6fb; box-shadow: inset 4px 0 0 var(--maize); }
.candidate.is-rejected { opacity: .6; }
.candidate.none { align-items: center; }
.candidate input { margin-top: 3px; accent-color: var(--blue); }
.cand-name { font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.cand-facts dd { font-weight: 500; }
.open { display: inline-block; margin-top: 8px; font-weight: 600; }
.add-url { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }
.add-url input { display: block; width: 100%; margin-top: 4px; }
.searches { columns: 2; margin: 0; padding-left: 18px; }

.decide { border: 2px solid var(--blue); }
.outcomes { display: grid; gap: 6px; margin-bottom: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fields label { font-size: 13px; color: var(--muted); }
input[type=text], input[type=url], input[type=search], select, textarea {
  font: inherit; padding: 7px 9px; border: 1px solid #b9c0c9; border-radius: 6px; background: #fff; color: var(--ink);
}
.fields input, .fields select { display: block; width: 100%; margin-top: 4px; }
button {
  font: inherit; font-weight: 700; background: var(--maize); color: var(--blue); border: 0;
  border-radius: 6px; padding: 10px 18px; cursor: pointer;
}
button:hover { filter: brightness(.95); }
.history ul { margin: 0; padding-left: 18px; }

/* All players */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters input[type=search] { min-width: 280px; flex: 1; max-width: 420px; }
.check { font-size: 14px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.board { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th { background: var(--blue); color: #fff; text-align: left; padding: 9px 10px; white-space: nowrap; position: sticky; top: 0; }
.board th[data-sort] { cursor: pointer; }
.board th[data-dir=asc]::after { content: " ▲"; color: var(--maize); }
.board th[data-dir=desc]::after { content: " ▼"; color: var(--maize); }
.board td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.board tbody tr:nth-child(even) { background: #fafbfc; }
.board td a { font-weight: 600; }
.board .sub { color: var(--muted); font-size: 12px; }
.board .num { text-align: right; }
.board .flag { margin-left: 4px; }

@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
  .sheet { position: static; }
  .q-meta { margin-left: 0; width: 100%; }
  .searches { columns: 1; }
  .id-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .id-facts > div { min-width: 0; }
  .id-facts > div:nth-child(2) { border-right: 0; }
  .id-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .research-form-grid { grid-template-columns: 1fr; }
  .research-form-grid .research-wide { grid-column: auto; }
}

/* Sign-in and users */
.login { max-width: 420px; margin: 32px auto; }
.login .google { width: 100%; background: var(--blue); color: #fff; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 10px; }
.pw { display: grid; gap: 10px; }
.pw label { font-size: 13px; color: var(--muted); }
.pw input { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 7px 9px; border: 1px solid #b9c0c9; border-radius: 6px; }
button.link { background: none; color: var(--blue); text-decoration: underline; font-weight: 400; padding: 0; justify-self: start; }
.error { color: var(--tappan-red); font-weight: 600; }
.linkbox input { width: 100%; font: 13px ui-monospace, Menlo, monospace; padding: 6px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
button.small { padding: 4px 10px; font-size: 13px; }
button.danger { background: var(--tappan-red); color: #fff; }
.is-disabled td { color: var(--muted); }
input[type=email], input[type=password] { font: inherit; padding: 7px 9px; border: 1px solid #b9c0c9; border-radius: 6px; }

/* Overflow menu */
.masthead nav { align-items: center; }
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; color: #fff; font-weight: 600; padding: 8px 12px; border-radius: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ▾"; color: var(--maize); }
.more summary:hover, .more[open] summary { background: var(--blue-2); }
.more .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 200px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 39, 76, .18); padding: 6px; }
.more .menu a, .more .menu button { display: block; width: 100%; text-align: left; color: var(--blue); background: none;
  font: inherit; font-weight: 600; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.more .menu a:hover, .more .menu button:hover { background: #eef2f7; filter: none; }
.more .menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu-who { color: var(--muted); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
/* Same overflow as the masthead, on a light page. */
.more.page-more summary { color: var(--blue); background: var(--card); border: 1px solid var(--line); }
.more.page-more summary::after { color: var(--blue); }
.more.page-more summary:hover, .more.page-more[open] summary { background: #eef2f7; color: var(--blue); }

/* Home */
.weekly-briefing {
  position: relative; overflow: hidden; margin-bottom: 16px; padding: 24px 26px;
  border: 1px solid #23486d; border-top: 5px solid var(--maize); border-radius: 10px;
  background: linear-gradient(135deg, var(--blue) 0%, #0d3b67 100%); color: #fff;
  box-shadow: 0 10px 24px rgba(0, 39, 76, .13);
}
.briefing-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
}
.briefing-header h1 { margin: 2px 0 0; color: #fff; font-size: clamp(24px, 4vw, 34px); }
.briefing-kicker {
  margin: 0; color: var(--maize); font-size: 12px; font-weight: 800;
  letter-spacing: .075em; text-transform: uppercase;
}
.briefing-tally {
  flex: none; color: var(--blue); background: var(--maize); border-radius: 8px;
  padding: 4px 11px 6px; font-size: 23px; line-height: 1; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.briefing-records {
  display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 14px 0 18px; padding: 0;
}
.briefing-records li {
  display: inline-flex; gap: 7px; align-items: center; padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .08); font-size: 12px;
}
.briefing-records a, .briefing-result-link {
  color: #fff; font-weight: 750; text-underline-offset: 2px;
}
.briefing-records li > span { color: var(--maize); font-weight: 800; font-variant-numeric: tabular-nums; }
.briefing-highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px;
}
.briefing-highlights > section {
  min-width: 0; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px; background: rgba(255, 255, 255, .08);
}
.briefing-highlights h2 {
  margin: 0 0 8px; color: var(--maize); font-size: 13px;
  letter-spacing: .055em; text-transform: uppercase;
}
.briefing-list { margin: 0; padding-left: 22px; }
.briefing-list li { padding-left: 3px; }
.briefing-list li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .18); }
.briefing-list p { margin: 2px 0 0; font-size: 12px; line-height: 1.4; }
.briefing-list .briefing-source { color: #c7d6e4; }
.briefing-caveat { color: #c7d6e4; font-size: 12px; }
.briefing-caveat { margin: 12px 0 0; }
.briefing-empty {
  display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 15px; padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}
.briefing-empty span { color: #d9e3ec; }
.home-date { margin: 0; }
.home-activity { margin-top: 16px; }
.coverage-note {
  margin: 10px 0 12px; padding: 9px 11px; border-left: 4px solid var(--maize);
  background: #fff8de; color: #5d4b10; font-size: 13px;
}
.recruit-activity-group { padding: 14px 0; border-top: 1px solid var(--line); }
.recruit-activity-group:first-child { border-top: 0; }
.recruit-activity-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 16px; margin-bottom: 8px;
}
.full-results-link { font-size: 13px; font-weight: 700; white-space: nowrap; }
.activity-result {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0;
}
.activity-result.has-discrepancy {
  border-left: 4px solid var(--tappan-red); padding-left: 10px;
}
.activity-result-body { min-width: 0; flex: 1; }
.activity-result-heading, .activity-meta, .cito-source-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px;
}
.activity-meta { color: var(--muted); font-size: 13px; }
.activity-utr { margin: 5px 0 0; font-size: 13px; }
.unavailable { color: var(--muted); font-weight: 600; }
.source-evidence { margin-top: 7px; }
.source-evidence > summary {
  cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700;
}
.source-evidence p { margin: 6px 0 0; font-size: 13px; }
.cito-source-line { margin-top: 7px; }
.activity-history { margin: 10px 0 0 76px; }
.activity-history > summary {
  cursor: pointer; width: fit-content; color: var(--blue);
  font-size: 13px; font-weight: 700;
}
.activity-history-list { list-style: none; margin: 9px 0 0; padding: 0; }
.activity-history-list > li { padding: 10px 0; border-top: 1px solid var(--line); }
.calendar-page { max-width: 900px; margin: 16px auto; }
.calendar-page .card-heading p { margin: 3px 0 12px; }
.recruit-chat { margin-top: 16px; border-top: 4px solid var(--maize); padding: 24px 22px 26px; }
.chat-column { width: min(100%, var(--chat-width)); margin: 0 auto; }
.chat-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.chat-head h2 { margin-bottom: 3px; font-size: 20px; }
.chat-head p { margin: 0; }
.chat-history-controls { display: flex; align-items: center; gap: 8px; }
.chat-history-controls[hidden] { display: none; }
.chat-history-controls select { max-width: 240px; height: 38px; }
.chat-history-controls button { min-height: 38px; padding: 7px 12px; background: #fff; border: 1px solid var(--blue); }
.chat-messages { max-height: 520px; overflow-y: auto; display: grid; gap: 14px; margin: 0 0 18px; padding: 2px 4px; }
.chat-messages[hidden] { display: none; }
.chat-message {
  width: fit-content; max-width: min(78%, 68ch); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0, 39, 76, .08);
}
.chat-message-body { margin-top: 3px; }
.chat-message-body p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.chat-message-body p + p { margin-top: .8em; }
.chat-user {
  justify-self: end; max-width: min(72%, 58ch); background: var(--blue); color: #fff;
  border-top: 3px solid var(--maize); border-bottom-right-radius: 4px;
}
.chat-user .chat-speaker { color: var(--maize); }
.chat-assistant {
  justify-self: start; background: #f7f8fa; border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-speaker {
  display: block; color: var(--blue); font-size: 11px; line-height: 1.2; font-weight: 800;
  letter-spacing: .055em; text-transform: uppercase;
}
.chat-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-source-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px 3px 4px;
  border: 1px solid #c8ced6; border-radius: 999px; background: #fff; color: var(--blue);
  font-size: 12px; font-weight: 700; line-height: 1.25; text-decoration: none;
}
.chat-source-chip:hover { border-color: var(--blue); background: #fff8d6; }
.chat-source-chip:focus-visible { outline: 3px solid rgba(255, 203, 5, .65); outline-offset: 2px; }
.chat-source-number {
  display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none;
  border-radius: 50%; background: var(--blue); color: var(--maize); font-size: 11px;
}
.chat-source-label { overflow-wrap: anywhere; }
.chat-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chat-example-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
button.chat-example {
  background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 600;
  padding: 5px 9px; font-size: 12px;
}
button.chat-example:hover { background: #eef2f7; color: var(--blue); filter: none; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.chat-form textarea {
  width: 100%; min-height: 52px; margin: 0; resize: vertical; border-radius: 10px;
  padding: 12px 13px; line-height: 1.4;
}
.chat-form button { min-height: 52px; min-width: 88px; border-radius: 10px; }
.chat-feedback { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.chat-status:empty { display: none; }
.chat-status:not(:empty) {
  flex: 1; border-left: 3px solid var(--maize); border-radius: 6px;
  background: #f7f8fa; padding: 8px 10px; color: var(--ink);
}
.chat-feedback button { padding: 8px 12px; }
button:disabled, textarea:disabled, select:disabled { opacity: .6; cursor: wait; }
.home-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin-top: 16px; align-items: start; }
.small { font-size: 13px; }
.feed { border-top: 4px solid var(--maize); }
.schedule { border-top: 4px solid var(--blue); }
.feed-list, .sched { list-style: none; margin: 0; padding: 0; }
.moment { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.moment:first-child { border-top: 0; }
.moment-date, .ev-date { flex: 0 0 64px; color: var(--muted); font-size: 13px; font-weight: 600; padding-top: 2px; }
.moment-name { font-weight: 700; }
.moment-title { box-shadow: inset 4px 0 0 var(--maize); padding-left: 10px; }
.moment-deep, .moment-rival { box-shadow: inset 4px 0 0 var(--blue); padding-left: 10px; }
.empty { background: #f2f5f9; border-radius: 8px; padding: 14px 16px; }
.empty p { margin: 0 0 6px; }
.ev { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev.is-past { opacity: .55; }
.ev-date { flex-basis: 92px; }
.ev-ha { color: var(--muted); font-size: 13px; margin-right: 2px; }
.ev-home strong { color: var(--blue); }
.b1g, .tbc { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.b1g { background: var(--blue); color: var(--maize); }
.tbc { background: #eef1f5; color: var(--muted); }
.full-sched { margin-top: 12px; }
.full-sched summary { cursor: pointer; font-weight: 600; color: var(--blue); }
@media (max-width: 860px) { .home-grid, .profile-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .masthead-inner { align-items: flex-start; }
  .masthead nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .masthead nav a, .more summary { white-space: nowrap; }
  .weekly-briefing { padding: 19px 16px; margin-left: -4px; margin-right: -4px; }
  .briefing-header { gap: 12px; }
  .briefing-tally { font-size: 19px; }
  .briefing-highlights { grid-template-columns: minmax(0, 1fr); }
  .briefing-highlights > section { padding: 12px 13px; }
  .briefing-records { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .briefing-records li { flex: none; }
  .recruit-activity-header { align-items: flex-start; flex-direction: column; }
  .activity-result { gap: 8px; }
  .activity-result .moment-date { flex-basis: 52px; }
  .activity-result-heading { align-items: baseline; }
  .activity-history { margin-left: 60px; }
  .recruit-chat { padding: 18px 14px 20px; }
  .chat-head { align-items: flex-start; flex-direction: column; margin-bottom: 14px; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form button { width: 100%; min-height: 46px; }
  .chat-message, .chat-assistant { max-width: 100%; }
  .chat-user { max-width: 88%; }
  .chat-history-controls { width: 100%; }
  .chat-history-controls select { min-width: 0; flex: 1; }
  .chat-example-label { width: 100%; }
  .chat-source-chip { max-width: 100%; }
}
