.bay-cv {
  --cv-ink: #173b3c;
  --cv-teal: #16494a;
  --cv-muted: #687d79;
  --cv-paper: #fbfcf7;
  --cv-line: #dce5dc;
  --cv-coral: #c97961;
  width: 100%;
  min-width: 0;
  color: var(--cv-ink);
  font-family: "DM Sans", sans-serif;
}
.bay-cv *, .bay-cv *::before, .bay-cv *::after { box-sizing: border-box; }
.bay-cv button, .bay-cv input { font: inherit; }
.bay-cv button { cursor: pointer; }
.bay-cv button:disabled { cursor: not-allowed; opacity: .48; }
.bay-cv button:focus-visible, .bay-cv input:focus-visible, .bay-cv [tabindex]:focus-visible {
  outline: 3px solid var(--cv-coral);
  outline-offset: 3px;
}
.bay-cv__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}
.bay-cv__eyebrow, .bay-cv__overline {
  margin: 0 0 8px;
  color: #66847c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1.4;
  text-transform: uppercase;
}
.bay-cv h2, .bay-cv h3 { color: var(--cv-ink); font-family: "Manrope", sans-serif; }
.bay-cv h2 { margin: 0; font-size: clamp(27px, 3.4vw, 38px); font-weight: 600; letter-spacing: -.052em; line-height: 1.12; }
.bay-cv__intro { margin: 8px 0 0; color: var(--cv-muted); font-size: 14px; line-height: 1.55; }
.bay-cv__count {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--cv-line);
  background: #f4f7f0;
  color: var(--cv-muted);
  font-size: 12px;
}
.bay-cv__count strong { color: var(--cv-teal); font-family: "Manrope", sans-serif; font-size: 21px; font-weight: 600; }
.bay-cv__toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin: 0 0 17px;
}
.bay-cv__toolbar-actions { display: flex; justify-content: flex-end; }
.bay-cv__search-label { display: flex; flex-direction: column; gap: 7px; color: #526d67; font-size: 11px; font-weight: 700; }
.bay-cv__search {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #cad8ce;
  border-radius: 3px;
  background: var(--cv-paper);
  color: var(--cv-ink);
  font-size: 13px;
}
.bay-cv__search::placeholder { color: #8b9a94; }
.bay-cv__legacy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #afc7bc;
  border-radius: 3px;
  background: transparent;
  color: var(--cv-teal);
  font-size: 12px;
  font-weight: 700;
}
.bay-cv__legacy-toggle[aria-pressed="true"] { border-color: var(--cv-teal); background: #eaf2ec; }
.bay-cv__workspace { min-width: 0; }
.bay-cv__workspace-controls {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 8px;
}
.bay-cv__sidebar-toggle {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: -16px;
  display: grid;
  width: 32px;
  height: 42px;
  align-items: center;
  justify-items: center;
  padding: 0;
  border: 1px solid #c7d7cc;
  border-radius: 0 3px 3px 0;
  background: var(--cv-paper);
  color: var(--cv-teal);
  box-shadow: 2px 3px 9px rgb(23 59 60 / 7%);
}
.bay-cv__sidebar-toggle:hover { background: #eaf2ec; }
.bay-cv__toggle-mark { display: block; font-family: Georgia, serif; font-size: 27px; font-weight: 400; line-height: 1; transform: translateY(-1px); }
.bay-cv__current-group { overflow: hidden; color: #73847a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bay-cv__layout { display: grid; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); align-items: start; gap: clamp(18px, 3vw, 34px); }
.bay-cv__layout--collapsed { grid-template-columns: 28px minmax(0, 1fr); gap: clamp(18px, 3vw, 34px); }
.bay-cv__sidebar {
  position: sticky;
  top: 18px;
  min-width: 0;
  min-height: 100px;
  padding: 15px 0 12px;
  border-right: 1px solid #cbd9cf;
  background: #f5f7f0;
}
.bay-cv__sidebar[hidden] { display: none; }
.bay-cv__sidebar-heading { margin: 0 13px 11px; color: #708279; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.bay-cv__placements { display: grid; max-height: min(65vh, 620px); gap: 2px; overflow-y: auto; padding: 0 7px; scrollbar-width: thin; }
.bay-cv__placements[hidden] { display: none; }
.bay-cv__placement {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: #667b72;
  font-size: 12px;
  text-align: left;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.bay-cv__placement:hover { background: #eaf0e8; color: var(--cv-teal); }
.bay-cv__placement[aria-selected="true"] { border-left-color: var(--cv-coral); background: #e7efe8; color: var(--cv-teal); font-weight: 700; }
.bay-cv__placement-mark { color: #9caea2; font-size: 13px; }
.bay-cv__placement[aria-selected="true"] .bay-cv__placement-mark { color: var(--cv-coral); }
.bay-cv__placement--empty { min-height: 38px; color: #899990; font-size: 11px; font-style: italic; }
/* The divider remains a real, reachable control when the role list is tucked away. */
.bay-cv__layout--collapsed .bay-cv__sidebar {
  min-height: 74px;
  padding: 0;
  border-right-color: #b9cdc2;
  background: transparent;
}
.bay-cv__results { min-width: 0; }
.bay-cv__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  align-items: start;
  gap: 18px;
}
.bay-cv__card {
  min-width: 0;
  padding: 0;
  border: 1px solid #dce5dc;
  background: #f7f8f2;
  color: inherit;
  text-align: left;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.bay-cv__card:hover { transform: translateY(-3px); border-color: #8eafa0; box-shadow: 0 9px 24px rgb(23 59 60 / 9%); }
.bay-cv__thumb {
  position: relative;
  display: flex;
  min-height: 225px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 15px;
  background: #e9eee7;
}
.bay-cv__thumb img { display: block; width: 100%; max-width: 160px; height: 205px; object-fit: cover; object-position: top center; box-shadow: 0 3px 13px rgb(23 59 60 / 12%); }
.bay-cv__thumb-placeholder { display: grid; width: min(100%, 160px); height: 205px; place-content: center; gap: 8px; border: 1px solid #d5dfd5; background: var(--cv-paper); color: #84958c; text-align: center; font-size: 11px; }
.bay-cv__thumb-placeholder::before { width: 28px; height: 2px; margin: auto; background: var(--cv-coral); content: ""; }
.bay-cv__thumb-retrying { position: absolute; bottom: 17px; padding: 5px 8px; background: rgb(23 59 60 / 88%); color: #fbfcf7; font-size: 10px; }
.bay-cv__card-copy { display: flex; min-height: 92px; flex-direction: column; gap: 5px; padding: 12px 13px 14px; }
.bay-cv__card-name { overflow: hidden; color: var(--cv-ink); font-family: "Manrope", sans-serif; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.bay-cv__card-headline { overflow: hidden; color: #567067; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bay-cv__card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; color: #87948d; font-size: 10px; }
.bay-cv__skeleton {
  min-height: 225px;
  border: 1px solid #e4ebe3;
  background: linear-gradient(100deg, #eff3ec 30%, #f7f8f3 48%, #eff3ec 66%);
  background-size: 220% 100%;
  animation: bay-cv-shimmer 1.4s ease-in-out infinite;
}
@keyframes bay-cv-shimmer { to { background-position: -220% 0; } }
.bay-cv__notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #d7e3da;
  background: #f2f7f1;
  color: var(--cv-ink);
}
.bay-cv__notice--error { border-color: #e4c3b9; background: #fcf2ed; }
.bay-cv__notice-mark { display: flex; width: 22px; height: 22px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid #acc5b7; border-radius: 50%; color: #3b7162; font-size: 12px; font-weight: 700; }
.bay-cv__notice--error .bay-cv__notice-mark { border-color: #d6a496; color: #a65b4a; }
.bay-cv__notice-content { min-width: 0; flex: 1; }
.bay-cv__notice strong { display: block; font-size: 13px; }
.bay-cv__notice p { margin: 4px 0 0; color: #667b73; font-size: 12px; line-height: 1.5; }
.bay-cv__button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--cv-teal);
  border-radius: 3px;
  background: var(--cv-teal);
  color: #f7f8f1;
  font-size: 12px;
  font-weight: 700;
}
.bay-cv__button:hover:not(:disabled) { background: #103b3b; }
.bay-cv__button--quiet { background: transparent; color: var(--cv-teal); }
.bay-cv__button--quiet:hover:not(:disabled) { background: #edf4ef; }
.bay-cv__pagination { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 23px 0 0; color: #6c7d76; font-size: 11px; }
.bay-cv__footnote { margin: 19px 0 0; color: #71817b; font-size: 11px; line-height: 1.6; }
.bay-cv__viewer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 31px 0 8px;
  border: 1px solid #d5e0d7;
  background: #edf2eb;
  animation: bay-cv-fade-in .18s ease-out both;
}
@keyframes bay-cv-fade-in { from { opacity: 0; } to { opacity: 1; } }
.bay-cv__viewer-bar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px clamp(14px, 2vw, 24px);
  border-bottom: 1px solid #dce5dc;
  background: #f7f8f2;
}
.bay-cv__viewer-title { min-width: 0; }
.bay-cv__viewer-kicker { display: block; margin-bottom: 3px; color: #7b9185; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.bay-cv__viewer-title strong { display: block; overflow: hidden; color: var(--cv-ink); font-family: "Manrope", sans-serif; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.bay-cv__viewer-title span { display: block; margin-top: 3px; color: #6f8278; font-size: 11px; }
.bay-cv__viewer-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.bay-cv__close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #afc7bc;
  background: transparent;
  color: var(--cv-teal);
  font-size: 20px;
}
.bay-cv__document-scroll { width: 100%; max-width: 100%; min-width: 0; max-height: min(76vh, 1040px); flex: 0 1 auto; overflow: auto; padding: 24px 18px 45px; overscroll-behavior: contain; }
.bay-cv__document { display: grid; width: max-content; min-width: 100%; justify-items: center; gap: 22px; }
.bay-cv__page {
  position: relative;
  box-sizing: border-box !important;
  width: 816px !important;
  min-width: 816px !important;
  max-width: none !important;
  height: 1056px !important;
  min-height: 1056px !important;
  max-height: none !important;
  flex: 0 0 auto;
  overflow: hidden;
  background: #fffefa;
  color: #243247;
  box-shadow: 0 7px 26px rgb(10 32 30 / 16%);
}
.bay-cv__page-content { position: absolute; top: 0; left: 0; width: 100%; overflow: visible; }
.bay-cv__render-error { max-width: 720px; margin: 30px auto; }
.bay-cv__render-error .bay-cv__notice { margin: 0; }
.bay-cv__legacy { margin-top: 18px; }
.bay-cv__legacy > * { max-width: 100%; }
.bay-cv__legacy-empty { padding: 28px; border: 1px solid var(--cv-line); background: #f5f7f1; color: var(--cv-muted); }
.bay-cv__visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
@media (max-width: 640px) {
  .bay-cv__header { align-items: flex-start; }
  .bay-cv__count { gap: 7px; padding: 9px 10px; font-size: 10px; }
  .bay-cv__count strong { font-size: 18px; }
  .bay-cv__toolbar { grid-template-columns: 1fr; }
  .bay-cv__legacy-toggle { justify-content: center; }
  .bay-cv__toolbar-actions { justify-content: stretch; }
  .bay-cv__toolbar-actions .bay-cv__legacy-toggle { width: 100%; }
  .bay-cv__layout { grid-template-columns: 142px minmax(0, 1fr); gap: 18px; }
  .bay-cv__layout--collapsed { grid-template-columns: 28px minmax(0, 1fr); gap: 14px; }
  .bay-cv__sidebar { position: sticky; top: 8px; }
  .bay-cv__sidebar-toggle { top: 10px; }
  .bay-cv__placements { max-height: 220px; }
  .bay-cv__workspace-controls { margin-bottom: 10px; }
  .bay-cv__gallery { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bay-cv__thumb { min-height: 190px; padding: 10px; }
  .bay-cv__thumb img, .bay-cv__thumb-placeholder { height: 170px; }
  .bay-cv__card-copy { min-height: 88px; padding: 10px; }
  .bay-cv__viewer-bar { align-items: flex-start; flex-direction: column; }
  .bay-cv__viewer-actions { width: 100%; justify-content: flex-end; gap: 5px; }
  .bay-cv__viewer-actions .bay-cv__button { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .bay-cv__document-scroll { max-height: 70vh; padding: 16px 12px 30px; }
}
@media (max-width: 380px) {
  .bay-cv__gallery { grid-template-columns: minmax(0, 1fr); }
  .bay-cv__layout:not(.bay-cv__layout--collapsed) { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .bay-cv__skeleton { animation: none; }
  .bay-cv__card, .bay-cv__placement { transition: none; }
  .bay-cv__viewer { animation: none; }
}
