.staff-workspace {
  --staff-plum: #34214f;
  --staff-warm: #805013;
  --staff-warm-bg: #fbf0dd;
  padding-block-end: 1rem;
}
.staff-title, .staff-roster-heading, .staff-roster-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.staff-title { flex-wrap: wrap; align-items: flex-end; gap: .7rem 1rem; margin-bottom: 1.3rem; }
.staff-title h1 { font-size: 2.1rem; line-height: 1.12; letter-spacing: -.035em; }
.staff-title-actions, .staff-list-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.staff-title-actions button { gap: .4rem; padding-inline: .85rem; font-size: .875rem; }
.staff-title-actions .staff-icon, .staff-back .staff-icon { width: 1rem; height: 1rem; }
.staff-back { gap: .45rem; padding-inline: 0; margin: -.55rem 0 .45rem; font-size: .86rem; }
.staff-list-title { gap: .55rem; }
.staff-list-title .staff-refresh { width: 36px; height: 36px; min-height: 36px; }
.staff-list-title .staff-refresh .staff-icon { width: 1rem; height: 1rem; }
.staff-icon { display: block; flex: none; width: 1.15rem; height: 1.15rem; }
.staff-refresh, .staff-clear {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px;
  padding: 0; color: var(--deep); border: 0; border-radius: 50%; background: transparent;
}
.staff-refresh { border: 1px solid var(--line); }
.staff-refresh:hover:enabled, .staff-clear:hover:enabled { background: var(--lilac); }
.staff-queues {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px;
  padding: 5px; margin: 0 0 1.7rem; border-radius: 12px; background: #f1edf5;
}
.staff-queue {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  min-width: 0; padding: .65rem .8rem; min-height: 48px;
  border: 1px solid transparent; border-radius: 8px; color: #46374f;
  background: transparent; text-align: start; line-height: 1.25;
}
.queue-heading, .legend-item, .staff-part, .staff-mark, .staff-sync, .staff-open {
  display: inline-flex; align-items: center;
}
.queue-heading { gap: .45rem; font-size: .91rem; font-weight: 620; }
.queue-heading .staff-icon { width: 1.05rem; height: 1.05rem; }
.queue-count {
  font-size: 1.05rem; line-height: 1.3; font-weight: 650;
  font-variant-numeric: tabular-nums; color: inherit;
}
.staff-queue:hover:enabled { background: white; }
.staff-queue[aria-pressed="true"], .staff-queue[aria-pressed="true"]:hover:enabled {
  background: var(--staff-plum); border-color: var(--staff-plum); color: white;
}
.staff-queue[aria-pressed="true"] .queue-count { color: white; }
.staff-queue[data-queue="submitted"][aria-pressed="true"] .staff-icon path { stroke: var(--staff-plum); }
.staff-roster-heading h2 { font-size: 1.28rem; }
.staff-search {
  position: relative; display: flex; align-items: center; flex: 0 1 19rem; min-width: 0;
}
.staff-search > .staff-icon { position: absolute; left: .8rem; width: 1rem; height: 1rem; color: var(--muted); pointer-events: none; }
.staff-search input[type="search"]:not([type="radio"]):not([type="checkbox"]) {
  width: 100%; min-width: 0; padding-inline: 2.3rem 2.8rem; border: 1px solid #b9b1bf;
  border-radius: 10px; appearance: none;
}
.staff-search input[type="search"]::-webkit-search-cancel-button { appearance: none; }
.staff-search input::placeholder { color: var(--muted); opacity: 1; }
.staff-clear { position: absolute; right: 1px; width: 42px; height: 42px; border-radius: 9px; }
.staff-roster-tools { flex-wrap: wrap; margin-block: 1rem .65rem; }
.staff-result-count, .staff-legend, .staff-mobile-label { font-size: .84rem; color: var(--muted); }
.staff-result-count { font-weight: 600; }
.staff-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.legend-item { gap: .35rem; }
.staff-mark { flex: none; justify-content: center; color: #746d7a; }
.staff-part.in_progress .staff-mark, .staff-mark.in_progress, .legend-item.in_progress .staff-mark { color: var(--purple); }
.staff-part.submitted .staff-mark, .staff-mark.submitted, .legend-item.submitted .staff-mark { color: var(--green); }
.staff-mark .staff-icon { width: 1.32rem; height: 1.32rem; }
.staff-legend .staff-icon { width: 1rem; height: 1rem; }
.staff-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.staff-roster { width: 100%; border-spacing: 0; table-layout: fixed; text-align: start; font-size: .95rem; line-height: 1.4; }
.staff-roster th, .staff-roster td { padding: .85rem 1rem; text-align: start; vertical-align: middle; overflow-wrap: anywhere; }
.staff-roster thead th { padding-block: .65rem; background: #f5f3f6; color: var(--muted); font-size: .84rem; font-weight: 630; }
.staff-roster thead th:first-child { width: 28%; border-radius: 8px 0 0 8px; }
.staff-roster thead th:nth-child(4) { width: 14rem; }
.staff-roster thead th:last-child { width: 18%; border-radius: 0 8px 8px 0; }
.staff-count-tools, .staff-sort-header { display: inline-flex; align-items: center; gap: .45rem; }
.staff-count-tools { flex-wrap: wrap; }
.staff-priority { min-height: 30px; font-size: .8rem; }
.staff-roster thead th { padding: .1rem .6rem; }
.staff-sort-header {
  justify-content: inherit; min-height: 44px; max-width: 100%; padding: .25rem .4rem;
  border: 0; border-radius: .35rem; color: inherit; background: transparent; font: inherit; text-align: inherit;
}
.staff-sort-header:hover, .staff-roster th[aria-sort] .staff-sort-header { color: var(--deep); background: #eae3f3; }
.staff-sort-header .staff-icon { width: .85rem; height: .85rem; }
.staff-roster th[aria-sort="descending"] .staff-icon, .staff-direction[data-direction="descending"] .staff-icon { transform: rotate(180deg); }
.staff-mobile-sort, .staff-mobile-col { display: none; }
.staff-last-reminder { font-size: .9rem; font-variant-numeric: tabular-nums; }
.staff-roster thead th:nth-child(2), .staff-roster thead th:nth-child(3), .staff-roster td.staff-part-cell { text-align: center; }
.staff-roster tbody th, .staff-roster tbody td { border-bottom: 1px solid var(--line); }
.staff-roster tbody th { font-weight: 640; }
.staff-mobile-label { display: none; }
.staff-part { vertical-align: middle; }
.staff-sync, .staff-open { gap: .43rem; }
.staff-sync { color: var(--muted); font-size: .89rem; }
.staff-sync[data-delivery="delivered"], .staff-sync.delivered { color: var(--green); font-weight: 600; }
.staff-sync[data-delivery="held"], .staff-sync[data-delivery="retry"] { color: var(--staff-warm); }
.staff-account, .staff-candidate small { display: block; margin-top: .12rem; font-size: .8rem; color: var(--muted); }
.staff-roster .staff-open {
  justify-content: flex-start; gap: .25rem; width: max-content; white-space: nowrap;
  min-height: 44px; padding: .4rem .55rem; border: 1px solid #d9bd8e;
  border-radius: 1.5rem; background: var(--staff-warm-bg); color: #71470f; font-size: .89rem;
  font-weight: 400; line-height: 1.25;
}
.staff-open:hover:enabled, .staff-open[aria-expanded="true"] { border-color: var(--staff-warm); text-decoration: underline; text-underline-offset: 3px; }
.staff-roster .staff-detail td { padding: 0; }
.staff-match { padding: 1.2rem clamp(1rem, 3vw, 2rem) 1.35rem; background: var(--lilac); }
.staff-match legend { font-size: 1.08rem; }
.staff-candidate { display: flex; gap: .7rem; align-items: center; width: fit-content; min-height: 44px; margin-block: .5rem; cursor: pointer; }
.staff-candidate input { flex: none; }
.staff-match-actions { display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center; }
.staff-feedback { color: var(--green); margin-top: .8rem; }
.staff-feedback:empty { margin: 0; }
.staff-empty { padding: 2.25rem 1rem; text-align: center; color: var(--muted); background: #faf9fb; border-radius: 12px; }
.staff-empty > .staff-icon { width: 1.6rem; height: 1.6rem; margin: 0 auto .55rem; color: var(--deep); }
.staff-empty p { margin-bottom: .55rem; }
@media (max-width: 810px) {
  .staff-queues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-queue { min-height: 44px; }
}
@media (max-width: 760px) {
  .staff-mobile-sort { display: flex; align-items: center; gap: .45rem; margin-block: .5rem .75rem; font-size: .85rem; }
  .staff-mobile-sort label { flex: none; font-weight: 600; }
  .staff-mobile-sort select { width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; }
  .staff-direction { padding: .5rem; width: 44px; flex: none; }
  .staff-sort-header, .staff-priority { display: none; }
  .staff-mobile-col { display: inline; }
  .staff-title { align-items: start; }
  .staff-title h1 { font-size: 1.75rem; }
  .staff-roster-heading { flex-wrap: wrap; gap: .7rem; }
  .staff-roster-heading h2 { font-size: 1.45rem; }
  .staff-queues { margin-block: 0 1.25rem; }
  .staff-roster-tools { gap: .4rem .8rem; }
  .staff-roster, .staff-roster tbody, .staff-roster tbody tr, .staff-roster tbody th { display: block; }
  .staff-roster thead { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); }
  .staff-roster tbody tr { padding-block: .85rem; border-top: 1px solid var(--line); }
  .staff-roster tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .staff-roster tbody th, .staff-roster tbody td { border: 0; }
  .staff-roster tbody th { padding: 0 0 .45rem; font-size: 1.05rem; }
  .staff-roster tbody td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; padding: .2rem 0; align-items: center; text-align: start; }
  .staff-roster tbody .staff-delivery:has(.staff-open) { grid-template-columns: minmax(0, 1fr) max-content; }
  .staff-mobile-label { display: block; }
  .staff-roster .staff-part, .staff-roster .staff-open { justify-self: start; }
  .staff-roster .staff-detail { padding: 0; border-top: 0; }
  .staff-roster .staff-detail td { display: block; padding: 0; }
}
@media (max-width: 450px) {
  main:has(> .staff-workspace) { padding-block-start: 1.35rem; }
  .staff-title h1 { font-size: 1.75rem; }
  .staff-title { gap: .65rem; margin-bottom: .9rem; }
  .staff-queues { gap: 3px; }
  .staff-queue { padding: .45rem .55rem; }
  .queue-heading { gap: .35rem; font-size: .86rem; }
  .queue-heading > .staff-icon { width: 1rem; height: 1rem; }
  .staff-roster-heading { display: grid; grid-template-columns: minmax(0, 1fr); }
  .staff-roster-tools { margin-block: .65rem .5rem; }
  .staff-legend { gap: .3rem .6rem; font-size: .8rem; }
  .legend-item { gap: .25rem; }
}
@media (forced-colors: active) {
  .staff-queue[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}

.staff-remind { gap: .45rem; }
.staff-reminder-result { color: var(--green); font-weight: 600; }
.staff-reminder-result:not(:empty) { margin-block: .7rem; }
.staff-reminder-panel { margin-block: .85rem 1.15rem; padding: 1.25rem; border: 1px solid #d9cfdf; border-radius: 14px; background: #faf8fc; }
.staff-reminder-panel h3 { color: var(--staff-plum); font-size: 1.3rem; }
.reminder-intro, .reminder-recipient small, .reminder-count { color: var(--muted); font-size: .875rem; }
.reminder-intro { margin-top: .3rem; }
.reminder-columns { display: grid; grid-template-columns: minmax(0, 1fr); margin-block: 1rem; align-items: start; }
.reminder-recipients legend, .reminder-example h4 { margin: 0 0 .35rem; color: var(--ink); font-size: .94rem; font-weight: 650; letter-spacing: 0; }
.reminder-recipient { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .45rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.reminder-recipient:has(:disabled) { cursor: default; }
.reminder-recipient input { flex: none; margin: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--purple); }
.reminder-recipient strong, .reminder-recipient small { display: block; overflow-wrap: anywhere; }
.reminder-recipient strong { font-size: .95rem; font-weight: 600; }
.reminder-example { padding: .9rem 1rem; background: white; border-radius: 10px; }
.reminder-example p { margin: 0; color: var(--muted); font-size: .94rem; }
.reminder-actions { display: flex; align-items: center; gap: .5rem .9rem; flex-wrap: wrap; }
.reminder-error { margin-top: .6rem; color: #803a22; }
.reminder-error:empty { margin: 0; }
@media (max-width: 680px) {
  .staff-reminder-panel { padding: .9rem; }
  .reminder-columns { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

.staff-campaigns { margin-block: .75rem 1.2rem; }
.staff-audiences { margin-block: 1.1rem .65rem; }
.staff-audiences h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.staff-campaigns summary { padding: .75rem 0; cursor: pointer; color: var(--deep); }
.staff-audiences details { border-top: 1px solid var(--line); }
.staff-audiences details[open] { padding-bottom: 1rem; }
.staff-audiences summary { font-size: .94rem; }
.audience-recipients { padding: 0; list-style: none; margin-block: .75rem 1rem; }
.audience-recipients li, .exclusion-row { display: grid; gap: .5rem 1rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); padding-block: .55rem; border-bottom: 1px solid var(--line); }
.audience-recipients strong { font-weight: 600; }
.audience-recipients small, .exclusion-row small { display: block; color: var(--muted); }
.edition-exclusions summary { font-weight: 600; }
.exclusion-row { align-items: center; grid-template-columns: 1fr auto; }
.bounce-action { min-height: 32px; padding: .25rem 0; font-size: .86rem; }

.edition-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.25rem; padding: 1.5rem; border-radius: 14px;
  background: #f5f1f8;
}
.edition-settings-grid > section { min-width: 0; }
.edition-extensions { border-inline-start: 1px solid #d9d1df; padding-inline-start: 2rem; }
.edition-settings-grid h2, .edition-review h2, .operator-content h2 { font-size: 1.25rem; }
.edition-context, .edition-lock, .extension-list small { margin-top: .3rem; color: var(--muted); font-size: .88rem; }
.edition-timeline { display: grid; gap: 0; margin: 1rem 0; }
.edition-timeline > div { position: relative; padding: 0 0 1rem 1.35rem; }
.edition-timeline > div::before { position: absolute; left: 0; top: .35rem; width: .5rem; height: .5rem; border: 2px solid #705588; border-radius: 50%; content: ""; }
.edition-timeline > div:first-child::after { position: absolute; left: .32rem; top: 1.08rem; bottom: -.28rem; width: 1px; background: #b4a5c0; content: ""; }
.edition-timeline > div:last-child { padding-bottom: 0; }
.edition-timeline dt { font-size: .83rem; color: var(--muted); }
.edition-timeline dd { font-weight: 640; }
.edition-settings-grid label { display: block; margin: .75rem 0 .3rem; font-weight: 620; font-size: .9rem; }
.edition-settings-grid input, .edition-settings-grid select { display: block; min-width: 0; max-width: 100%; }
.edition-settings-grid .extension-actions { margin-top: 1rem; }
.edition-review { margin: 2rem 0 0; }
.edition-review h2 { margin-bottom: .7rem; }
.edition-review > .edition-reference { max-width: none; margin: 0; }
.edition-review > .edition-reference:last-child { border-bottom: 1px solid var(--line); }
.edition-review > .edition-reference[open] { padding-bottom: 1rem; }
.edition-review > .edition-reference > summary, .staff-operator > details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: .7rem .25rem; list-style: none; cursor: pointer;
}
.edition-review > .edition-reference > summary::-webkit-details-marker, .staff-operator > details > summary::-webkit-details-marker { display: none; }
.edition-review > .edition-reference > summary::after, .staff-operator > details > summary::after {
  flex: none; content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); margin-inline-end: .35rem;
}
.edition-review > .edition-reference[open] > summary::after, .staff-operator > details[open] > summary::after { transform: rotate(225deg); }
.edition-review > .edition-reference > summary > small { margin-inline-start: auto; text-align: end; font-size: .82rem; font-weight: 500; }
.edition-review summary:hover { color: var(--purple); }
.extension-list { margin: .75rem 0; padding: 0; list-style: none; }
.extension-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem 0; padding-bottom: .35rem; border-bottom: 1px solid #d9d1df; }
.extension-list small { display: block; margin-top: 0; }
.extension-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .7rem; }
.extension-list-heading, .edition-save-feedback:not(:empty) { margin-top: 1.2rem; }
.edition-save-feedback { color: var(--green); }
@media (max-width: 680px) {
  .edition-settings-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1rem; }
  .edition-extensions { border-inline: 0; padding-inline: 0; border-top: 1px solid #d9d1df; padding-top: 1.25rem; }
}
.edition-reference { max-width: 48rem; border-top: 1px solid var(--line); margin-top: .7rem; }
.edition-reference summary { padding: .55rem 0; color: var(--deep); font-weight: 600; cursor: pointer; }
.edition-reference ol, .edition-reference ul { list-style: none; padding: 0; margin: 0; }
.edition-reference li { margin: .4rem 0 .85rem; }
.edition-reference small { display: block; color: var(--muted); }
.edition-change-values { margin-top: .3rem; }
.edition-change-values div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .6rem; }
.edition-change-values dt { color: var(--muted); }
.edition-freeze-counts { margin-block: .5rem .85rem; }
.edition-freeze-counts div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem 1rem; }
.edition-freeze-counts dt { color: var(--muted); }
.freeze-confirmation { padding: 1rem; background: var(--lilac); border-radius: 12px; }
.freeze-confirmation .extension-actions { margin-top: .6rem; }

.operator-layout { display: grid; grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
.operator-tasks { display: grid; gap: .25rem; align-content: start; padding: .35rem; border-radius: 12px; background: #f4f0f6; }
.operator-tasks button { min-height: 44px; padding: .5rem .75rem; border: 1px solid transparent; border-radius: 8px; color: var(--deep); background: transparent; text-align: left; font-size: .92rem; }
.operator-tasks button:hover { background: #e8e1ef; }
.operator-tasks button[aria-pressed=true] { background: var(--staff-plum); color: white; font-weight: 620; }
.operator-content { min-width: 0; padding-block: .35rem; }
.operator-contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding-block: 1rem; margin-block: .65rem; border-block: 1px solid var(--line); }
.operator-contact small { display: block; color: var(--muted); }
.operator-org ul { padding-inline-start: 1.25rem; }
.operator-org h4 { margin: 1.25rem 0 .25rem; }
.operator-feedback { color: var(--green); }
.operator-feedback:not(:empty) { margin-top: .75rem; }
@media (max-width: 680px) {
  .operator-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .operator-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .operator-tasks button { padding: .45rem .3rem; text-align: center; line-height: 1.3; font-size: .83rem; }
}
