/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V3
 * Hallmark · component: review-pass-bar · genre: modern-minimal · theme: Cobalt
 * states: default · hover · focus · active · disabled · loading · error · success
 * contrast: pass (46–50)
 * Hallmark · genre: modern-minimal · macrostructure: Catalogue
 * theme: Cobalt · paper oklch(97.6% 0.008 250) · accent oklch(48% 0.14 255)
 * display Prompt + body IBM Plex Sans Thai · outlier Fraunces wordmark
 * nav: N3 side-rail · footer: none · enrichment: none
 * audience: clip team · use: queue then review-convert-pass · tone: utilitarian
 */
html, body {
  margin: 0;
  overflow-x: clip;
  min-height: 100%;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}

* { box-sizing: border-box; }

h1, h2, h3, .brand strong, .kpi b, #playerLabel {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}

body { min-height: 100svh; }

#desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100svh;
}

#gate[hidden],
#desk[hidden] {
  display: none !important;
}

.sidebar {
  background: linear-gradient(180deg, var(--color-sidebar-from), var(--color-sidebar-to));
  color: var(--color-sidebar-text);
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  margin: 0 6px 28px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--color-sidebar-shine), var(--color-sidebar-hover)),
    var(--color-sidebar-card);
  box-shadow: inset 0 0 0 1px var(--color-sidebar-input-border);
}

.brand strong {
  display: block;
  font-family: var(--font-outlier);
  font-size: 30px;
  line-height: 1.1;
  text-transform: lowercase;
  font-style: normal;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--color-sidebar-muted);
}

.side-nav { display: grid; gap: 8px; }
.people { display: none !important; }

.sidebar input,
.me-box > button {
  color: var(--color-sidebar-text);
  background: var(--color-sidebar-input);
  border-color: var(--color-sidebar-input-border);
  font-size: 17px;
}

.sidebar input::placeholder { color: var(--color-sidebar-placeholder); }

.me-box > button:hover, .me-box > button.is-hover {
  background: var(--color-sidebar-shine);
}

.side-nav button, .person {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.side-nav button:hover, .person:hover,
.side-nav button.is-hover, .person.is-hover {
  background: var(--color-sidebar-hover);
}

.side-nav button.is-on, .person.is-on {
  background: var(--color-sidebar-active);
}

.person {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.person b {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.rail-label {
  margin: 24px 16px 10px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--color-sidebar-muted);
  font-weight: 600;
}

.rail-in-nav {
  margin: 8px 16px 4px;
}

.rail-in-nav:first-child { margin-top: 0; }

.hero[hidden],
#kpis[hidden],
#pickList[hidden],
#roomTools[hidden] {
  display: none !important;
}

body.mode-library .cards {
  grid-template-columns: minmax(0, 1fr);
}

body.mode-library .card.library .thumb-wrap {
  min-height: 180px;
  cursor: pointer;
}

body.mode-library .card h3 { font-size: 18px; }

.app {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 17px;
}

.top-meta, .actions, .hero-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip, button {
  appearance: none;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  padding: 0 16px;
  cursor: pointer;
}

.chip {
  display: inline-flex;
  align-items: center;
  cursor: default;
  font-weight: 500;
  font-size: 16px;
}

button:hover, button.is-hover { background: var(--color-primary-soft); }
button:focus-visible, button.is-focus, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
button:active, button.is-active { transform: translateY(1px); }
button.primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
button.primary:hover, button.primary.is-hover { background: var(--color-primary-hover); }
button:disabled, button.is-disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
button[data-state="loading"]::after { content: " …"; }
button[data-state="error"] { border-color: var(--color-bad); color: var(--color-bad); }
button[data-state="success"] { border-color: var(--color-ok); }
button.danger { color: var(--color-bad); border-color: var(--color-bad); }

.hero, .kpi, .card, .dupe-card, .room-tools, .pass-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero { padding: 24px; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hero label, .hero .hero-row { margin-top: 14px; }

.pull-settings { margin-top: 4px; }
.pull-settings .hero-row { margin-top: 0; }

.kpi:hover, .kpi.is-hover { border-color: var(--color-primary); }

label {
  display: block;
  font-size: 15px;
  color: var(--color-muted);
  font-weight: 600;
}

input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 52px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  font-size: 18px;
  padding: 10px 14px;
}

.actions { margin-top: 16px; }
.actions .primary { flex: 1 1 160px; }
.actions button { flex: 1 1 140px; }
.hero .actions #extractBtn { flex: 1 1 100%; }
.hero .actions #pullBtn { flex: 1 1 auto; }

.status { margin: 14px 0 0; color: var(--color-muted); min-height: 1.4em; font-size: 17px; }
.status.bad { color: var(--color-bad); }
.status.ok { color: var(--color-ok); }

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.kpi { padding: 20px; cursor: pointer; }
.kpi small { color: var(--color-muted); font-size: 15px; font-weight: 600; }
.kpi b {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.section-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}
.section-title[hidden] { display: none !important; }

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 600;
}

.flow-steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 13px;
}

.facet-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.room-tools {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.room-tools .actions { margin-top: 0; }
.room-tools .actions button,
.room-tools .actions .primary { flex: 0 0 auto; }

.pass-bar {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--color-primary-soft);
  border-color: transparent;
}

.pass-bar[hidden] {
  display: none !important;
}

body.mode-review .pass-bar {
  position: sticky;
  top: 0;
  z-index: 4;
}

.pass-bar-head strong {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 20px;
  line-height: 1.3;
  color: var(--color-ink);
}

.pass-bar-head p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 16px;
}

.pass-bar-label {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--color-muted);
  font-weight: 600;
}

#markExtra[hidden],
#markLogoRow[hidden] {
  display: none !important;
}

#markExtra {
  display: grid;
  gap: 8px;
}

.mark-logo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mark-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--color-surface);
  border: 1px solid transparent;
  border-radius: 10px;
}

.mark-logo .preset-pick {
  flex: 0 0 auto;
}

#facetBar[hidden] {
  display: none !important;
}

body.mode-review .facet-bar {
  grid-template-columns: minmax(0, 280px);
}

.preset-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-pick {
  flex: 1 1 132px;
  min-height: 48px;
  background: var(--color-surface);
}

.preset-pick:hover, .preset-pick.is-hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
}

.preset-pick:focus-visible, .preset-pick.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.preset-pick:active, .preset-pick.is-active {
  transform: translateY(1px);
}

.preset-pick:disabled, .preset-pick.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.preset-pick.is-on,
.preset-pick[data-state="success"] {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}

.preset-pick[data-state="loading"]::after { content: " …"; }
.preset-pick[data-state="error"] {
  border-color: var(--color-bad);
  color: var(--color-bad);
}

.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;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  font-weight: 600;
}

label[hidden],
#clipSearchWrap[hidden] {
  display: none !important;
}
#copyListBtn[hidden],
#recallBtn[hidden],
#pickActions[hidden],
.check-inline[hidden] {
  display: none !important;
}

.check-inline input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
}

.file-name {
  color: var(--color-ink);
  font-weight: 600;
}

.more-clip {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  background: var(--color-paper);
}

.more-clip summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.more-clip[open] summary { margin-bottom: 8px; }

.more-clip .card-assign {
  margin: 4px 0 8px;
  background: var(--color-surface);
}

.more-clip .card-actions { margin-top: 4px; }

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
}

.card:hover { box-shadow: var(--shadow-hover); }

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 160px;
  overflow: hidden;
  background: var(--color-primary-soft);
}

.thumb,
.thumb-empty {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-primary-soft);
}

img.thumb.thumb-empty {
  opacity: 0;
}

.thumb-wrap.is-play .thumb-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: color-mix(in oklch, var(--color-ink) 28%, transparent);
  cursor: pointer;
  color: var(--color-on-primary);
}
.thumb-mark {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.thumb-wrap.is-mark .thumb-mark { display: block; }
.thumb-wrap.is-mark .thumb-play { display: none; }
.thumb-mark-box {
  position: absolute;
  border: 2px solid #ffe566;
  background: rgba(255, 229, 102, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.thumb-play span {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: var(--shadow-hover);
  position: relative;
  transition: transform var(--dur-fast) var(--ease-out);
}
.thumb-play span::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 22px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--color-on-primary);
}
@media (hover: hover) {
  .thumb-wrap.is-play:hover .thumb-play,
  .thumb-play.is-hover {
    background: color-mix(in oklch, var(--color-ink) 18%, transparent);
  }
  .thumb-play:hover span,
  .thumb-play.is-hover span {
    transform: scale(1.06);
  }
}
.thumb-play:focus-visible,
.thumb-play.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: -4px;
}
.thumb-play:active span,
.thumb-play.is-active span {
  transform: scale(0.96);
}
.thumb-play:disabled,
.thumb-play.is-loading {
  cursor: wait;
  opacity: 0.7;
}
.thumb-play[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.thumb-play.is-error span { background: var(--color-bad); }
.thumb-play.is-success span { background: var(--color-ok); }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--color-progress-track);
}

.progress > i {
  display: block;
  height: 100%;
  background: var(--color-primary);
  width: 0%;
}

.card-body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.card-body input[data-inbox] {
  width: 20px;
  height: 20px;
  margin: 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta, .muted {
  color: var(--color-muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.cards > .muted {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.cards > .empty-recall {
  grid-column: 1 / -1;
  display: grid;
  justify-items: start;
  gap: 14px;
  margin: 0;
  padding: 28px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.empty-recall p {
  margin: 0;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 600;
}

#clips > .primary {
  justify-self: center;
  min-width: 180px;
}

.badge {
  flex: 0 0 auto;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge.ok { background: var(--color-ok-soft); color: var(--color-ok); }
.badge.bad, .badge.dup { background: var(--color-bad-soft); color: var(--color-bad); }
.badge.warn { background: var(--color-warn-soft); color: var(--color-warn-ink); }

.pick {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
}
.pick-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}
.pick-check input {
  width: 20px;
  height: 20px;
}
body.mode-work .pick-card .thumb-wrap {
  cursor: pointer;
}

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions button { min-height: 44px; padding: 0 14px; }
.card-assign {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 8px;
  padding: 10px;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.card-assign label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.card-assign label span {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
}

.card-assign select {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 12px;
}

.card-assign select:hover,
.card-assign select.is-hover {
  border-color: var(--color-primary);
}

.card-assign select:focus-visible,
.card-assign select.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.card-assign select:active,
.card-assign select.is-active {
  border-color: var(--color-primary);
}

.card-assign select.is-loading {
  opacity: 0.7;
}

.card-assign select.is-error {
  border-color: var(--color-bad);
}

.card-assign select.is-success {
  border-color: var(--color-ok);
}

.assign-name {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.assign-name span {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
}

.name-pick {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
  font-size: 16px;
  touch-action: manipulation;
}

.name-menu {
  position: fixed;
  z-index: 30;
  overflow: auto;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}

.name-menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 16px;
}

.name-menu button.is-on,
.name-menu button:hover {
  background: var(--color-primary-soft);
}

.name-menu button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
}

.dupes { display: grid; gap: 10px; }
.dupe-card { padding: 16px 18px; }

.player {
  width: min(920px, 94vw);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: 16px;
}
.player::backdrop { background: var(--color-scrim); }
.player-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}
#playerLabel {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.player-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.player-source {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: var(--color-surface);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.player-source:hover { background: var(--color-primary-soft); }
.player-source[hidden] { display: none !important; }
.player-stage { position: relative; }
.player video {
  width: 100%;
  max-height: 70svh;
  border-radius: var(--radius-md);
  background: var(--color-ink);
  display: block;
  object-fit: contain;
}
.mark-pick[hidden] { display: none !important; }
.player-mark-bar { margin-top: 10px; display: grid; gap: 8px; }
.player-mark-bar[hidden] { display: none !important; }
.player-mark-bar .preset-picks { justify-content: flex-start; }
#markApplyLib { width: fit-content; min-height: 44px; }
.mark-pick-hint {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--color-muted, #6b6458);
}
.mark-pick {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.mark-pick-hit {
  display: none;
  position: absolute;
  inset: 0 0 56px 0;
  pointer-events: none;
}
.mark-pick.is-armed .mark-pick-hit {
  display: block;
  pointer-events: auto;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.mark-box {
  position: absolute;
  border: 2px solid #ffe566;
  background: rgba(255, 229, 102, 0.18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  overflow: hidden;
}
.mark-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mark-box[data-mode="blur"],
.mark-box[data-mode="replace"] {
  border-color: #8ec8ff;
  background: rgba(18, 20, 28, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.mark-box[data-mode="remove"] {
  background: rgba(8, 8, 10, 0.42);
}

.done-dialog {
  width: min(420px, 92vw);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: 24px;
  box-shadow: var(--shadow-hover);
}
.done-dialog::backdrop { background: var(--color-scrim); }
.done-dialog strong {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 24px;
  line-height: 1.3;
}
.done-dialog p {
  margin: 8px 0 20px;
  color: var(--color-muted);
  font-size: 17px;
}
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.done-actions .primary { min-width: 148px; }
.done-dialog button:hover, .done-dialog button.is-hover { border-color: var(--color-primary); }
.done-dialog button:focus-visible, .done-dialog button.is-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.done-dialog button:active, .done-dialog button.is-active { transform: translateY(1px); }
.done-dialog button:disabled, .done-dialog button.is-disabled { opacity: 0.55; cursor: not-allowed; }

body.is-gate { display: block; background: var(--color-sidebar-to); }
.gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  width: min(100%, var(--gate-max));
  background: var(--color-surface);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--shadow-hover);
}
.gate-mark {
  margin: 0;
  font-family: var(--font-outlier);
  font-style: normal;
  font-size: 24px;
  color: var(--color-primary);
}
.gate-card h1 {
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.2;
}
.gate-copy { margin: 10px 0 22px; color: var(--color-muted); font-size: 17px; }
.gate-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.gate-tabs[hidden] { display: none !important; }
.gate-tabs button.is-on {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.gate-card form { display: grid; gap: 14px; }
.gate-card form[hidden] { display: none; }
.gate-card button.primary { width: 100%; min-height: 52px; }

.me-box {
  margin-top: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
}
#statusToggle {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 44px;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--color-sidebar-text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  cursor: pointer;
}
.me-box .rail-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--color-sidebar-text);
}
.me-box > button { width: 100%; }

/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4
 * Hallmark · component: nas-door + category board · genre: modern-minimal · theme: Cobalt
 * states: default · hover · focus · active · disabled · loading · error · success
 */
.sys-status {
  display: grid;
  gap: 12px;
  margin: 0 0 4px;
}
.nas-door {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "kicker go" "title go" "hint go";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  min-height: 76px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--color-sidebar-text);
  background: var(--color-sidebar-card);
  border: 1px solid var(--color-sidebar-input-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--color-sidebar-shine);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nas-door::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-sidebar-muted);
}
.nas-door.sys-ok::before { background: var(--color-sidebar-ok); }
.nas-door.sys-warn::before { background: var(--color-sidebar-warn); }
.nas-door.sys-bad::before { background: var(--color-sidebar-bad); }
.nas-door.sys-off::before { background: color-mix(in oklch, var(--color-sidebar-muted) 55%, black); }
.nas-kicker {
  grid-area: kicker;
  padding-left: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-sidebar-muted);
}
.nas-door strong {
  grid-area: title;
  padding-left: 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.nas-hint {
  grid-area: hint;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.35;
  color: color-mix(in oklch, var(--color-sidebar-muted) 82%, white);
}
.nas-go {
  grid-area: go;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: var(--color-sidebar-active);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
@media (hover: hover) {
  .nas-door:hover {
    background: var(--color-sidebar-hover);
    transform: translateY(-1px);
  }
}
.nas-door:focus-visible {
  outline: 2px solid var(--color-sidebar-ok);
  outline-offset: 2px;
}
.nas-door:active { transform: translateY(1px); }
.nas-door.is-disabled,
.nas-door[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.nas-door.sys-ok {
  border-color: color-mix(in oklch, var(--color-sidebar-ok) 42%, transparent);
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--color-sidebar-ok) 16%, transparent), transparent 58%),
    var(--color-sidebar-card);
}
.nas-door.sys-warn {
  border-color: color-mix(in oklch, var(--color-sidebar-warn) 42%, transparent);
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--color-sidebar-warn) 16%, transparent), transparent 58%),
    var(--color-sidebar-card);
}
.nas-door.sys-bad {
  border-color: color-mix(in oklch, var(--color-sidebar-bad) 45%, transparent);
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--color-sidebar-bad) 16%, transparent), transparent 58%),
    var(--color-sidebar-card);
}

.nas-space {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 10px;
  min-height: 44px;
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: var(--color-sidebar-card);
  border: 1px solid var(--color-sidebar-input-border);
}
.nas-space span {
  font-size: 14px;
  color: var(--color-sidebar-text);
}
.nas-space b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  font-style: normal;
}
.nas-space em {
  font-style: normal;
  font-size: 12px;
  color: var(--color-sidebar-muted);
}
.nas-space i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklch, var(--color-sidebar-muted) 22%, transparent);
}
.nas-space u {
  display: block;
  width: var(--free, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--color-sidebar-ok);
}
.nas-space.sys-warn u { background: var(--color-sidebar-warn); }
.nas-space.sys-bad u { background: var(--color-sidebar-bad); }
.nas-space.sys-off span { color: var(--color-sidebar-muted); }

.sys-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.sys-line button {
  appearance: none;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-sidebar-input);
  color: var(--color-sidebar-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sys-line button[data-go="ready"] {
  background: color-mix(in oklch, var(--color-sidebar-warn) 22%, var(--color-sidebar-input));
}
.sys-line button[data-go="approved"] {
  background: color-mix(in oklch, var(--color-sidebar-ok) 18%, var(--color-sidebar-input));
}
.sys-line button.is-on { background: var(--color-sidebar-active); }
@media (hover: hover) {
  .sys-line button:hover { background: var(--color-sidebar-hover); }
}
.sys-line button:focus-visible {
  outline: 2px solid var(--color-sidebar-ok);
  outline-offset: 2px;
}
.sys-line button:active { transform: translateY(1px); }
.sys-jobs {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-sidebar-muted);
}
.sys-line.is-live .sys-jobs {
  color: var(--color-sidebar-warn);
  animation: sysPulse 1.2s ease-in-out infinite;
}

.cat-label {
  margin: 2px 2px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-sidebar-muted);
}
.cat-board {
  display: grid;
  gap: 4px;
}
.cat-row {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-sidebar-text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.cat-row.tone-cn { --tone: var(--cat-cn); }
.cat-row.tone-jp { --tone: var(--cat-jp); }
.cat-row.tone-kr { --tone: var(--cat-kr); }
.cat-row.tone-th { --tone: var(--cat-th); }
.cat-row.tone-west { --tone: var(--cat-west); }
.cat-row.tone-other { --tone: var(--cat-other); }
.cat-row::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: var(--w, 0%);
  max-width: calc(100% - 8px);
  border-radius: 8px;
  background: color-mix(in oklch, var(--tone) 28%, transparent);
  pointer-events: none;
}
.cat-row span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--tone);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--tone) 22%, transparent);
}
.cat-row span,
.cat-row b,
.cat-row i { position: relative; }
.cat-row b { font-variant-numeric: tabular-nums; font-weight: 700; }
.cat-row i {
  font-style: normal;
  font-size: 12px;
  color: var(--color-sidebar-warn);
}
.cat-row.is-empty { color: color-mix(in oklch, var(--color-sidebar-muted) 70%, white); }
.cat-row.is-on {
  background: var(--color-sidebar-active);
  border-color: var(--color-sidebar-input-border);
}
@media (hover: hover) {
  .cat-row:hover { background: var(--color-sidebar-hover); }
}
.cat-row:focus-visible {
  outline: 2px solid var(--color-sidebar-ok);
  outline-offset: 2px;
}
.cat-row:active { transform: translateY(1px); }

body.mode-pages .cards.page-board {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.page-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--color-primary-soft) 70%, white) 0%, var(--color-surface) 42%);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.page-card:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in oklch, var(--color-primary) 32%, var(--color-border)); }
.page-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.page-head > div { min-width: 0; flex: 1; }
.page-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.page-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  word-break: break-word;
}
.page-path {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--color-muted);
  word-break: break-all;
}
.page-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.page-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
}
.page-pill.is-count {
  background: var(--color-ok-soft);
  color: var(--color-ok);
}
.page-card .meta {
  margin: 0;
  font-size: 14px;
  color: var(--color-soft);
}
.page-card.is-blocked {
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--color-warn-soft) 80%, white) 0%, var(--color-surface) 48%);
  border-color: color-mix(in oklch, var(--color-warn) 35%, var(--color-border));
  cursor: default;
}
.page-card.is-tg,
.page-card.is-tw {
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--color-blue-soft) 88%, white) 0%, var(--color-surface) 52%);
  border-color: color-mix(in oklch, var(--color-blue) 32%, var(--color-border));
}
.page-card.is-tg .page-mark,
.page-card.is-tw .page-mark { font-size: 13px; letter-spacing: 0.04em; }
.page-card.is-tg .page-pill.is-wait,
.page-card.is-tw .page-pill.is-wait {
  background: var(--color-blue-soft);
  color: var(--color-blue);
}
.page-pill.is-wait {
  background: var(--color-warn-soft);
  color: var(--color-warn-ink);
}
.page-pill.is-kind {
  background: color-mix(in oklch, var(--color-ink) 8%, white);
  color: var(--color-ink);
}
.page-inbox {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.page-inbox[hidden] { display: none !important; }
.page-inbox form {
  display: grid;
  gap: 10px;
}
.page-inbox-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 15px;
}
.page-kind-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-kind-bar button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
}
.page-kind-bar button.is-on {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

@keyframes sysPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (min-width: 769px) {
  #desk {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: auto;
    padding: 20px 16px;
  }
  #statusToggle { display: none; }
  .me-box .sys-status { display: grid; }
  .me-box #logoutBtn { display: block; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  body.mode-library .cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (min-width: 640px) {
  .hero-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facet-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.mode-library .facet-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.mode-review .facet-bar { grid-template-columns: minmax(220px, 320px); }
  .actions button { flex: 0 0 auto; }
  .preset-pick { flex: 0 0 auto; min-width: 132px; }
}

@media (max-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .brand { margin-bottom: 16px; }
  .people { flex: none; max-height: 220px; overflow: auto; }
  .me-box { margin-top: 12px; }
  #statusToggle { display: block; }
  .me-box:not(.is-open) .sys-status,
  .me-box:not(.is-open) #logoutBtn { display: none; }
  .app { padding: 16px; gap: 18px; }
  .topbar h1 { font-size: 26px; }
  .actions button { width: 100%; }
  .gate {
    width: 100%;
    min-height: 100svh;
    place-items: center;
    justify-items: center;
    padding: 16px;
  }
  .gate-card {
    margin-inline: auto;
    width: min(100%, 420px);
  }
  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .side-nav .rail-in-nav { display: none; }
  .side-nav button { flex: 0 0 auto; }
  .room-tools { padding: 12px; gap: 10px; }
  .facet-bar,
  body.mode-library .facet-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #subline, .top-meta { display: none; }
  .room-tools .actions { flex-direction: row; flex-wrap: wrap; }
  .room-tools .actions button,
  .room-tools .actions label { width: auto; flex: 1 1 auto; }
  .nas-door { min-height: 56px; padding: 10px 12px; }
  .sys-status { gap: 8px; }
  .cat-board {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
  .cat-row { flex: 0 0 auto; min-width: 108px; }
  .player-bar { grid-template-columns: minmax(0, 1fr); }
  .card-assign { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; transform: none !important; }
}

/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4
 * scoped additions: team signup and submitter report · existing Cobalt tokens
 */
.gate-switch { margin: var(--space-lg) 0 0; font-size: var(--text-sm); }
.gate-switch a, .report-signup-link, .report-link-row a, .report-copy-url {
  color: var(--color-primary);
  text-underline-offset: 3px;
}
.gate-switch a, .report-signup-link { white-space: nowrap; }
.gate-switch a:focus-visible, .report-panel a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}
.field-hint { display: block; margin-top: var(--space-2xs); color: var(--color-muted); font-size: var(--text-xs); font-weight: 400; }
.signup-page .gate { padding-block: var(--space-2xl); }
.signup-page .gate-card { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.signup-page button { white-space: nowrap; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; }
#reportPanel[hidden], #clips[hidden], #reportUserWrap[hidden], .report-signup-link[hidden] { display: none !important; }
.report-panel { display: grid; gap: var(--space-md); min-width: 0; }
.report-heading { display: flex; gap: var(--space-md); align-items: start; justify-content: space-between; flex-wrap: wrap; }
.report-heading h2 { margin: 0; font-size: var(--text-lg); }
.report-hint { margin: 0; color: var(--color-muted); font-size: var(--text-xs); }
.report-heading .report-hint { margin-top: var(--space-2xs); }
.report-signup-link { font-size: var(--text-xs); }
.report-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); }
.report-count { padding: var(--space-sm) var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); min-width: 0; }
.report-count strong { display: block; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.report-count span { display: block; color: var(--color-muted); font-size: var(--text-xs); }
.report-count.is-failed strong { color: var(--color-bad); }
.report-filters { display: flex; align-items: end; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.report-filters label { flex: 1 1 210px; min-width: 0; font-size: var(--text-xs); }
.report-filters input, .report-filters select { min-height: 48px; font-size: var(--text-sm); }
.report-filters button, .report-copy-tools button, .report-row button, .report-pagination button { white-space: nowrap; }
.report-copy-tools { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.report-copy-tools .check-inline { min-height: 44px; font-size: var(--text-xs); }
.report-copy-tools button { min-height: 44px; }
.report-panel > .status { margin: 0; }
.report-panel > .status:empty { display: none; }
.report-rows { display: grid; gap: var(--space-sm); min-width: 0; }
.report-rows[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.report-row { min-width: 0; padding: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.report-row-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: var(--space-xs); }
.report-row-head h3 { margin: 0; font-size: var(--text-md); }
.report-select { display: flex; align-items: center; min-height: 28px; }
.report-select input { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; padding: 0; accent-color: var(--color-primary); cursor: pointer; }
.report-select input:disabled { cursor: not-allowed; }
.report-row-head .badge { white-space: nowrap; font-size: var(--text-xs); }
.report-meta { margin: var(--space-2xs) 0 var(--space-sm) 36px; color: var(--color-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.report-sources { display: grid; gap: var(--space-2xs); }
.report-link-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--space-xs); align-items: baseline; font-size: var(--text-xs); min-width: 0; }
.report-link-label { color: var(--color-muted); }
.report-link-row a, .report-link-row > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.report-row-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px solid var(--color-border); }
.report-copy-url { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-size: var(--text-xs); }
.report-row-actions button { min-height: 44px; flex: 0 0 auto; }
.report-error { margin: var(--space-xs) 0 0; color: var(--color-bad); background: var(--color-bad-soft); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); overflow-wrap: anywhere; font-size: var(--text-xs); }
.report-empty { margin: 0; padding: var(--space-xl); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-muted); }
.report-pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); }
.report-pagination p { text-align: center; }
@media (max-width: 768px) {
  .report-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-count { padding: var(--space-xs) var(--space-sm); }
  .report-filters { padding: var(--space-sm); gap: var(--space-xs); }
  .report-filters label { flex-basis: 100%; }
  .report-filters button { flex: 1 1 auto; }
  .report-copy-tools { gap: var(--space-xs); }
  .report-copy-tools .check-inline { flex-basis: 100%; }
  .report-row { padding: var(--space-sm); }
  .report-row-head { grid-template-columns: 24px minmax(0, 1fr); }
  .report-row-head .badge { grid-column: 2; justify-self: start; }
  .report-meta { margin-left: 32px; }
  .report-link-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .report-row-actions button { width: 100%; }
  .report-row-actions .report-copy-url { flex-basis: 100%; }
  .report-pagination { gap: var(--space-xs); flex-wrap: wrap; }
  .report-pagination button { padding-inline: var(--space-sm); }
}
.report-row button.primary[data-state="error"],
.report-copy-tools button.primary[data-state="error"],
.signup-page button.primary[data-state="error"] {
  color: var(--color-bad);
  background: var(--color-bad-soft);
  border-color: var(--color-bad);
}
@media (max-width: 768px) {
  .side-nav button { width: auto; white-space: nowrap; }
}

/* Backend audit actors are read-only; category/date stay editable. */
.clip-meta { margin: 0; }
.clip-actors {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.clip-actors p { margin: 0; }

/* Hallmark · macrostructure: Workbench report · tone: clear · anchor hue: Cobalt
 * one view, existing Prompt / IBM Plex Sans Thai · desktop requested
 * pre-emit critique: P5 H5 E4 S5 R5 V4 · real API counts, no decorative enrichment
 * contrast: pass (40–41) · honest: pass (46) · chrome: pass (47) · tokens: pass (48)
 * desktop: pass at 1280 / 1440 · mobile scope excluded by user
 */
.report-panel { gap: var(--space-md); }
.report-panel [hidden] { display: none !important; }
.report-panel .report-heading { flex-wrap: nowrap; align-items: center; gap: var(--space-md); }
.report-panel .report-eyebrow { margin: 0 0 var(--space-2xs); font-size: var(--text-report-xs); color: var(--color-primary); font-weight: 600; }
.report-panel .report-heading h2 { font-size: var(--text-lg); line-height: 1.3; }
.report-panel .report-hint { font-size: var(--text-report-sm); line-height: 1.5; }
.report-panel .report-heading-actions { display: flex; align-items: center; gap: var(--space-xs); flex-shrink: 0; }
.report-panel button { min-height: 36px; padding-inline: var(--space-sm); border-radius: var(--radius-sm); font-size: var(--text-report-sm); white-space: nowrap; }
.report-panel .report-range { display: flex; padding: var(--space-2xs); border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-md); gap: var(--space-2xs); }
.report-panel .report-range button { border-color: var(--color-surface); background: none; min-height: 32px; }
.report-panel .report-range button:hover { background: var(--color-primary-soft); }
.report-panel .report-range button[aria-pressed="true"] { background: var(--color-primary); color: var(--color-on-primary); border-color: var(--color-primary); }
.report-panel .report-metric-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-md) var(--space-lg); gap: var(--space-md); }
.report-panel .report-counts { grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr)); gap: 0; }
.report-panel .report-count { border: 0; border-radius: 0; background: none; padding: var(--space-2xs) var(--space-sm); border-left: 1px solid var(--color-border); }
.report-panel .report-count:first-child { padding-left: 0; border-left: 0; }
.report-panel .report-count strong { font-size: var(--text-report-number); line-height: 1.35; font-weight: 600; }
.report-panel .report-count[data-metric="total"] strong { font-size: var(--text-report-total); line-height: 1.05; letter-spacing: -.02em; }
.report-panel .report-count[data-metric="ready"] strong { color: var(--color-report-ready); }
.report-panel .report-count[data-metric="waiting"] strong { color: var(--color-report-waiting); }
.report-panel .report-count[data-metric="failed"] strong { color: var(--color-report-failed); }
.report-panel .report-count span { font-size: var(--text-report-xs); white-space: nowrap; }
.report-panel .report-quick-copy { display: grid; gap: var(--space-xs); justify-items: end; max-width: 220px; }
.report-panel .report-quick-copy button { min-height: 40px; }
.report-panel .report-quick-copy .report-hint { text-align: right; font-size: var(--text-report-xs); }
.report-panel .report-summary-feedback { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); margin-top: calc(-1 * var(--space-xs)); }
.report-panel .report-summary-feedback:has(#reportSummaryStatus:empty):has(#reportSummaryRetry[hidden]) { display: none; }
.report-panel .report-summary-feedback .report-hint { font-size: var(--text-report-xs); }
.report-panel .report-dashboard { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(245px, 1fr); gap: var(--space-md); align-items: stretch; }
.report-panel .report-ranking-panel, .report-panel .report-share-panel { padding: var(--space-lg); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); min-width: 0; }
.report-panel .report-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.report-panel .report-section-heading h3 { margin: 0; font-family: var(--font-display); font-size: var(--text-report-md); font-weight: 600; }
.report-panel .report-section-heading .report-hint { font-size: var(--text-report-xs); }
.report-panel .report-legend { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-xs); font-size: var(--text-report-xs); color: var(--color-muted); }
.report-panel [data-bucket="ready"] { --report-bucket-color: var(--color-report-ready); --report-bucket-soft: var(--color-report-ready-soft); }
.report-panel [data-bucket="waiting"] { --report-bucket-color: var(--color-report-waiting); --report-bucket-soft: var(--color-report-waiting-soft); }
.report-panel [data-bucket="failed"] { --report-bucket-color: var(--color-report-failed); --report-bucket-soft: var(--color-report-failed-soft); }
.report-panel [data-bucket="duplicate"] { --report-bucket-color: var(--color-report-duplicate); --report-bucket-soft: var(--color-report-duplicate-soft); }
.report-panel .report-legend > span::before, .report-panel .report-breakdown > div > span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--report-bucket-color); }
.report-panel .report-ranking { display: grid; gap: var(--space-2xs); }
.report-panel .report-person { display: grid; gap: var(--space-xs); width: 100%; padding: var(--space-xs) var(--space-xs); min-height: 56px; text-align: left; border: 1px solid var(--color-surface); background: none; border-radius: var(--radius-sm); }
.report-panel button.report-person:hover { background: var(--color-paper); border-color: var(--color-border); }
.report-panel .report-person.is-selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.report-panel .report-person-head { display: flex; gap: var(--space-xs); align-items: baseline; min-width: 0; }
.report-panel .report-person-head > strong:first-child { font-size: var(--text-report-sm); font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.report-panel .report-person-username { font-size: var(--text-report-xs); color: var(--color-muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.report-panel .report-person-count { margin-left: auto; font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: var(--text-report-sm); font-weight: 600; white-space: nowrap; }
.report-panel .report-stack { display: flex; height: 10px; width: 100%; background: var(--color-paper); border-radius: 3px; overflow: clip; }
.report-panel .report-stack > span { display: block; height: 100%; background: var(--report-bucket-color); }
.report-panel .report-chart-description { position: absolute; width: 1px; height: 1px; overflow: clip; clip-path: inset(50%); white-space: nowrap; }
.report-panel .report-chart-empty { margin: 0; min-height: 128px; display: grid; align-content: center; color: var(--color-muted); font-size: var(--text-report-sm); text-align: center; background: var(--color-paper); border-radius: var(--radius-sm); padding: var(--space-md); }
.report-panel .report-legacy { margin-top: var(--space-sm); border-top: 1px solid var(--color-border); padding: var(--space-sm) var(--space-xs) 0; color: var(--color-report-legacy); }
.report-panel .report-legacy .report-hint { font-size: var(--text-report-xs); margin-top: var(--space-2xs); }
.report-panel .report-inactive, .report-panel .report-more-people { margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-report-xs); }
.report-panel .report-inactive summary, .report-panel .report-more-people > summary { padding: var(--space-xs); cursor: pointer; }
.report-panel .report-inactive-users { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xs); }
.report-panel .report-person.is-inactive { min-height: 36px; }
.report-panel .report-person.is-inactive .report-person-username { display: none; }
.report-panel #reportRankingHint { margin-top: var(--space-sm); font-size: var(--text-report-xs); }
.report-panel .report-share-panel { display: grid; align-content: start; justify-items: stretch; gap: var(--space-sm); }
.report-panel .report-share-panel .report-section-heading { margin-bottom: 0; }
.report-panel .report-share { display: grid; place-items: center; width: 132px; height: 132px; justify-self: center; margin: var(--space-xs) 0; border-radius: var(--radius-full); background: conic-gradient(var(--color-report-ready) 0 var(--report-ready-stop, 0%), var(--color-report-waiting) var(--report-ready-stop, 0%) var(--report-waiting-stop, 0%), var(--color-report-failed) var(--report-waiting-stop, 0%) var(--report-failed-stop, 0%), var(--color-report-duplicate) var(--report-failed-stop, 0%) 100%); }
.report-panel .report-share.is-empty { background: var(--color-progress-track); }
.report-panel .report-share-center { display: grid; align-content: center; justify-items: center; width: 106px; height: 106px; background: var(--color-surface); border-radius: var(--radius-full); }
.report-panel .report-share-center strong { font-family: var(--font-display); font-size: var(--text-report-number); font-weight: 600; font-variant-numeric: tabular-nums; }
.report-panel .report-share-center span { font-size: var(--text-report-xs); color: var(--color-muted); }
.report-panel .report-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs) var(--space-sm); }
.report-panel .report-breakdown > div { display: flex; justify-content: space-between; gap: var(--space-2xs); font-size: var(--text-report-xs); }
.report-panel .report-breakdown strong { font-variant-numeric: tabular-nums; }
.report-panel .report-share-note { border-top: 1px solid var(--color-border); padding-top: var(--space-sm); font-size: var(--text-report-xs); }
.report-panel .report-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-xs); }
.report-panel .report-detail-heading h2 { margin: 0 0 var(--space-2xs); font-family: var(--font-display); font-size: var(--text-report-md); }
.report-panel .report-signup-link { font-size: var(--text-report-sm); }
.report-panel .report-filters { border: 0; background: none; padding: 0; border-radius: 0; display: grid; grid-template-columns: minmax(155px, .75fr) minmax(140px, .65fr) minmax(180px, 1.45fr) auto; gap: var(--space-xs); }
.report-panel .report-filters:has(#reportUserWrap[hidden]) { grid-template-columns: minmax(150px, .75fr) minmax(240px, 2fr) auto; }
.report-panel .report-filters label { font-size: var(--text-report-xs); }
.report-panel .report-filters input, .report-panel .report-filters select { min-height: 40px; padding: var(--space-xs) var(--space-sm); font-size: var(--text-report-sm); margin-top: var(--space-2xs); border-radius: var(--radius-sm); }
.report-panel .report-filters button { min-height: 40px; }
.report-panel > .status { font-size: var(--text-report-sm); padding: var(--space-xs) var(--space-sm); background: var(--color-surface); border-left: 3px solid var(--color-primary); border-radius: var(--radius-sm); }
.report-panel > .status.ok { border-color: var(--color-ok); background: var(--color-ok-soft); }
.report-panel > .status.bad { border-color: var(--color-bad); background: var(--color-bad-soft); }
.report-panel .report-table-head, .report-panel .report-row { display: grid; grid-template-columns: 22px minmax(170px, 1fr) minmax(78px, .36fr) 112px 100px 88px; gap: var(--space-sm); align-items: start; }
.report-panel .report-table-head { padding: var(--space-xs) var(--space-sm); background: var(--color-paper); border-block: 1px solid var(--color-border); font-size: var(--text-report-xs); color: var(--color-muted); font-weight: 600; margin-bottom: calc(-1 * var(--space-md)); }
.report-panel .report-rows { display: block; border: 1px solid var(--color-border); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); overflow: clip; background: var(--color-surface); }
.report-panel .report-rows[aria-busy="true"] { opacity: 1; pointer-events: none; }
.report-panel .report-row { padding: var(--space-sm); border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: var(--color-surface); }
.report-panel .report-row:first-child { border-top: 0; }
.report-panel .report-row:hover { background: var(--color-paper); }
.report-panel .report-select { min-height: 28px; }
.report-panel .report-select input { width: 16px; height: 16px; min-height: 16px; margin: 3px 0 0; }
.report-panel .report-row-main { min-width: 0; }
.report-panel .report-row-main h3 { margin: 0; font-size: var(--text-report-sm); font-family: var(--font-body); font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.report-panel .report-row-issue { margin: var(--space-2xs) 0 0; color: var(--color-bad); font-size: var(--text-report-xs); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.report-panel .report-row-person { display: grid; gap: 2px; font-size: var(--text-report-xs); min-width: 0; overflow-wrap: anywhere; }
.report-panel .report-row-person strong { font-weight: 600; }
.report-panel .report-row-person > span, .report-panel .report-row-person.is-legacy { color: var(--color-muted); }
.report-panel .report-row-time { font-size: var(--text-report-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; line-height: 1.6; }
.report-panel .report-row-status { justify-self: start; font-size: var(--text-report-xs); font-weight: 600; color: var(--report-bucket-color); background: var(--report-bucket-soft); border-radius: var(--radius-sm); padding: 3px 7px; line-height: 1.6; }
.report-panel .report-row-actions { margin: 0; padding: 0; border: 0; justify-content: end; }
.report-panel .report-row-actions button { min-height: 32px; font-size: var(--text-report-xs); padding-inline: var(--space-xs); }
.report-panel .report-row-actions .report-hint { font-size: var(--text-report-xs); padding-top: var(--space-2xs); }
.report-panel .report-details { margin-top: var(--space-2xs); font-size: var(--text-report-xs); }
.report-panel .report-details summary { cursor: pointer; color: var(--color-primary); width: fit-content; }
.report-panel .report-details summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.report-panel summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }
.report-panel .report-details .report-sources { margin-top: var(--space-xs); padding: var(--space-xs); background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.report-panel .report-link-row { font-size: var(--text-report-xs); grid-template-columns: 56px minmax(0, 1fr); }
.report-panel .report-details .clip-actors { font-size: var(--text-report-xs); border-top: 1px solid var(--color-border); padding-top: var(--space-xs); margin-top: var(--space-2xs); }
.report-panel .report-details .report-hint { font-size: var(--text-report-xs); }
.report-panel .report-empty { border: 0; border-radius: 0; padding: var(--space-xl); font-size: var(--text-report-sm); text-align: center; }
.report-panel .report-empty > strong { color: var(--color-ink); display: block; margin-bottom: var(--space-2xs); font-size: var(--text-report-md); }
.report-panel .report-empty > button { margin-top: var(--space-sm); }
.report-panel .report-copy-tools { position: sticky; bottom: var(--space-sm); z-index: 4; padding: var(--space-sm); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); gap: var(--space-xs); }
.report-panel .report-copy-tools .check-inline { min-height: 36px; font-size: var(--text-report-xs); }
.report-panel .report-copy-tools #reportSelectedCount { margin-right: auto; font-size: var(--text-report-xs); }
.report-panel .report-copy-tools button { min-height: 36px; }
.report-panel .report-pagination { justify-content: end; font-size: var(--text-report-xs); }
.report-panel button.primary[data-state="error"] { background: var(--color-bad); color: var(--color-on-primary); border-color: var(--color-bad); }
.report-panel button.primary[data-state="success"] { background: var(--color-ok); color: var(--color-on-primary); border-color: var(--color-ok); }
@media (max-width: 1150px) and (min-width: 769px) {
  .report-panel .report-heading { align-items: start; flex-wrap: wrap; }
  .report-panel .report-metric-band { grid-template-columns: minmax(0, 1fr); }
  .report-panel .report-quick-copy { display: flex; align-items: center; max-width: none; justify-content: end; }
  .report-panel .report-dashboard { grid-template-columns: minmax(0, 1fr); }
  .report-panel .report-share-panel { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .report-panel .report-share-panel .report-section-heading, .report-panel .report-share-note { grid-column: 1 / -1; }
  .report-panel .report-table-head, .report-panel .report-row { grid-template-columns: 20px minmax(120px, 1fr) 80px 90px 90px 70px; gap: var(--space-xs); }
}
@media (max-width: 768px) {
  .report-panel .report-heading { flex-wrap: wrap; }
  .report-panel .report-heading-actions { flex-wrap: wrap; }
  .report-panel .report-metric-band, .report-panel .report-dashboard { grid-template-columns: minmax(0, 1fr); }
  .report-panel .report-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm) 0; }
  .report-panel .report-count:nth-child(4) { border-left: 0; padding-left: 0; }
  .report-panel .report-quick-copy { justify-items: start; max-width: none; }
  .report-panel .report-table-head { display: none; }
  .report-panel .report-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .report-panel .report-row-person, .report-panel .report-row-time { grid-column: 2; }
  .report-panel .report-row-status { grid-column: 3; grid-row: 1; }
  .report-panel .report-row-actions { grid-column: 3; grid-row: 2 / 4; align-self: end; }
  .report-panel .report-filters, .report-panel .report-filters:has(#reportUserWrap[hidden]) { grid-template-columns: minmax(0, 1fr); }
}

/* Hallmark · scoped report simplification · existing Cobalt workbench
 * P5 H5 E5 S5 R5 V4 · labeled counts first, one-color total bars second
 * desktop only · no donut, no parallel panel stretched by expanded zero users
 */
.report-panel .report-counts { grid-template-columns: 1.2fr repeat(5, minmax(0, 1fr)); }
.report-panel .report-count { padding-inline: var(--space-xs); }
.report-panel .report-count[data-metric="duplicate"] strong { color: var(--color-ink); }
.report-panel .report-dashboard { display: block; }
.report-panel .report-ranking-panel { padding: var(--space-md); }
.report-panel .report-section-heading { margin-bottom: var(--space-2xs); }
.report-panel .report-ranking-explainer { margin: 0 0 var(--space-sm); font-size: var(--text-report-xs); color: var(--color-muted); }
.report-panel .report-ranking { display: grid; gap: 0; }
.report-panel .report-ranking-head,
.report-panel .report-person:not(.is-inactive) { grid-template-columns: minmax(200px, 1.9fr) repeat(5, minmax(68px, .55fr)); column-gap: var(--space-sm); }
.report-panel .report-ranking-head { display: grid; align-items: center; padding: var(--space-xs); background: var(--color-paper); border-bottom: 1px solid var(--color-border); font-size: var(--text-report-xs); color: var(--color-muted); font-weight: 600; }
.report-panel .report-ranking-head > span { text-align: right; }
.report-panel .report-ranking-head > span:first-child { text-align: left; }
.report-panel .report-person { min-height: 38px; padding: var(--space-2xs) var(--space-xs); row-gap: 0; border: 1px solid var(--color-surface); border-bottom-color: var(--color-border); border-radius: 0; align-items: center; }
.report-panel .report-person:not(.is-inactive) > .report-person-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-xs); align-items: baseline; }
.report-panel .report-person-head > strong:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-panel .report-person-username { font-size: var(--text-report-xs); }
.report-panel .report-total-bar { grid-column: 1 / -1; height: 3px; display: block; background: var(--color-paper); overflow: clip; border-radius: 2px; }
.report-panel .report-total-bar > span { display: block; height: 100%; background: var(--color-primary); }
.report-panel .report-person > .report-person-count { margin: 0; text-align: right; font-family: var(--font-body); font-size: var(--text-report-md); font-weight: 600; color: var(--color-ink); }
.report-panel .report-person.is-selected { border: 1px solid var(--color-primary); border-radius: var(--radius-sm); background: var(--color-primary-soft); }
.report-panel button.report-person.is-selected:hover { border-color: var(--color-primary); }
.report-panel .report-person:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.report-panel .report-legacy { padding: var(--space-xs); margin-top: var(--space-xs); background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.report-panel .report-legacy .report-person-head > strong:first-child { color: var(--color-ink); }
.report-panel .report-legacy .report-hint { margin-top: 2px; }
.report-panel .report-inactive { margin-top: var(--space-xs); }
.report-panel .report-inactive > summary { width: fit-content; padding: var(--space-2xs) var(--space-xs); }
.report-panel .report-inactive-users { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); max-height: 160px; overflow: auto; gap: var(--space-2xs); margin-top: var(--space-2xs); padding: var(--space-2xs); }
.report-panel .report-person.is-inactive { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 30px; padding-block: var(--space-2xs); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-paper); }
.report-panel .report-person.is-inactive .report-person-head { min-width: 0; }
.report-panel .report-person.is-inactive .report-person-head > strong { font-size: var(--text-report-xs); font-weight: 400; }
.report-panel .report-person.is-inactive > .report-person-count { font-size: var(--text-report-xs); font-weight: 400; color: var(--color-muted); }
.report-panel #reportRankingHint { margin-top: var(--space-xs); }
.report-panel .report-chart-empty { min-height: 72px; }
@media (max-width: 1150px) and (min-width: 769px) {
  .report-panel .report-ranking-head,
  .report-panel .report-person:not(.is-inactive) { grid-template-columns: minmax(155px, 1.6fr) repeat(5, minmax(52px, .55fr)); column-gap: var(--space-xs); }
}
@media (max-width: 768px) {
  .report-panel .report-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-panel .report-ranking-head,
  .report-panel .report-person:not(.is-inactive) { grid-template-columns: minmax(110px, 1.5fr) repeat(5, minmax(32px, .5fr)); column-gap: var(--space-2xs); }
  .report-panel .report-ranking-head { font-size: var(--text-report-xs); overflow-wrap: anywhere; }
  .report-panel .report-person-username { display: none; }
}
