:root {
  --paper: #f5f7f6;
  --surface: #ffffff;
  --ink: #18242d;
  --muted: #68757d;
  --line: #d8dfe0;
  --line-dark: #bcc7c9;
  --teal: #087f73;
  --teal-soft: #e4f2ef;
  --coral: #d95d45;
  --coral-soft: #fbece8;
  --green: #247a50;
  --green-soft: #e5f3eb;
  --gold: #b27a25;
  --gold-soft: #f7eedc;
  --sidebar: #172126;
  --sidebar-muted: #aeb9bd;
  --shadow: 0 10px 30px rgba(25, 42, 48, 0.09);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(8, 127, 115, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--teal);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 700;
}

.brand-mark-small {
  width: 38px;
  height: 38px;
  font-size: 21px;
}

.brand-name,
.brand-product {
  margin: 0;
  letter-spacing: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.brand-product {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.auth-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(280px, 0.8fr) minmax(440px, 1.2fr);
  background: var(--surface);
}

.auth-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 44px;
  color: white;
  background:
    linear-gradient(150deg, rgba(8, 127, 115, 0.88), rgba(23, 33, 38, 0.98)),
    #172126;
}

.auth-brand .brand-product {
  color: #d5e3e1;
}

.auth-panel {
  width: min(470px, calc(100% - 64px));
  margin: auto;
}

.auth-panel h1 {
  margin: 0;
  max-width: 430px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.15;
}

.auth-copy {
  max-width: 430px;
  margin: 16px 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.access-brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto 1fr auto;
}

.access-brand-status {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  align-self: end;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.access-brand-status svg {
  width: 22px;
  height: 22px;
  color: #7fd8c8;
}

.access-brand-status div {
  display: grid;
  gap: 3px;
}

.access-brand-status strong {
  font-size: 13px;
}

.access-brand-status span {
  color: #c8d6d5;
  font-size: 11px;
}

.access-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
}

.access-account > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.access-account strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.access-account span {
  color: var(--muted);
  font-size: 11px;
}

.access-code-form {
  display: grid;
  gap: 8px;
}

.access-code-form > label {
  color: #3b494f;
  font-size: 11px;
  font-weight: 750;
}

.access-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.access-code-row input {
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  outline: none;
}

.access-code-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.1);
}

.access-switch-account {
  margin-top: 20px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.access-switch-account:hover {
  color: var(--ink);
}

.form-error {
  margin: 14px 0 0;
  color: var(--coral);
  font-size: 13px;
}

.loading-view {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 16px;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
}

.loading-line {
  width: 220px;
  height: 3px;
  overflow: hidden;
  background: var(--line);
}

.loading-line::after {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--teal);
  animation: loading-slide 1.1s ease-in-out infinite alternate;
  content: "";
}

@keyframes loading-slide {
  from { transform: translateX(0); }
  to { transform: translateX(122%); }
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  color: white;
  background: var(--sidebar);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 78px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-product {
  color: var(--sidebar-muted);
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 20px 12px;
}

.production-browser {
  min-height: 0;
  padding: 2px 12px 14px;
}

.production-browser-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
}

.production-browser-heading .sidebar-label {
  margin: 0;
}

.icon-button-compact {
  width: 26px;
  height: 26px;
}

.production-browser .icon-button {
  color: #9caaae;
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

.question-list {
  display: grid;
  max-height: calc(100vh - 420px);
  gap: 3px;
  overflow: auto;
}

.question-list-empty {
  margin: 6px 8px;
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.5;
}

.question-list-item {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  color: #d4dcde;
  background: transparent;
  text-align: left;
}

.question-list-item:hover,
.question-list-item.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.question-list-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #718087;
}

.question-list-dot.is-running {
  background: #e3b34f;
  box-shadow: 0 0 0 3px rgba(227, 179, 79, 0.16);
}

.question-list-dot.is-completed {
  background: #57c890;
}

.question-list-dot.is-failed {
  background: #ed806b;
}

.question-list-copy {
  min-width: 0;
}

.question-list-copy strong,
.question-list-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-list-copy strong {
  font-size: 11px;
  line-height: 1.35;
}

.question-list-copy span {
  margin-top: 3px;
  color: #8f9da2;
  font-size: 9px;
}

.nav-item {
  display: grid;
  min-height: 44px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: #c6d0d3;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:not(:disabled):hover,
.nav-item.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item:disabled {
  opacity: 0.45;
}

.nav-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-team-button {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #dbe5e5;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-team-button:hover {
  border-color: rgba(127, 216, 200, 0.48);
  color: white;
  background: rgba(8, 127, 115, 0.2);
}

.sidebar-team-button svg {
  width: 15px;
  height: 15px;
}

.sidebar-label {
  margin: 0 0 6px;
  color: #8f9da2;
  font-size: 10px;
  font-weight: 800;
}

.organization-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.environment-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57c890;
}

.app-main {
  position: relative;
  min-width: 0;
}

.route-progress {
  position: fixed;
  z-index: 18;
  top: 76px;
  right: 0;
  left: 224px;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}

.route-progress[hidden] {
  display: none;
}

.route-progress::before {
  position: absolute;
  inset: 0;
  background: rgba(8, 127, 115, 0.12);
  content: "";
}

.route-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 36%;
  background: var(--teal);
  transform-origin: left center;
  animation: route-progress-slide 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.app-shell.is-route-loading {
  cursor: progress;
}

@keyframes route-progress-slide {
  0% { transform: translateX(-105%) scaleX(0.72); }
  52% { transform: translateX(145%) scaleX(1.12); }
  100% { transform: translateX(315%) scaleX(0.78); }
}

@media (prefers-reduced-motion: reduce) {
  .route-progress-bar {
    width: 72%;
    animation: none;
  }
}

@media (max-width: 900px) {
  .route-progress {
    top: 74px;
    left: 0;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  min-height: 78px;
  grid-template-columns: minmax(200px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-action {
  min-width: 112px;
}

.project-identity h2 {
  margin: 0;
  font-size: 17px;
}

.topbar-metrics {
  display: none;
  align-items: center;
}

.app-shell.is-book-editor .topbar-metrics {
  display: none;
}

.app-shell.is-question-review .topbar-metrics {
  display: none;
}

.app-shell.is-book-editor .topbar {
  grid-template-columns: minmax(200px, 1fr) auto;
}

.app-shell.is-question-review .topbar {
  grid-template-columns: minmax(200px, 1fr) auto auto;
}

.topbar-metrics > div {
  display: grid;
  min-width: 82px;
  gap: 2px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.topbar-metrics strong {
  font-size: 15px;
}

.topbar-metrics span {
  color: var(--muted);
  font-size: 10px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.user-copy {
  display: grid;
  gap: 2px;
  min-width: 92px;
}

.user-copy strong {
  overflow: hidden;
  max-width: 145px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  color: var(--muted);
  font-size: 10px;
}

.workspace {
  padding: 22px 28px 36px;
}

.home-workspace {
  max-width: 1440px;
  margin: 0 auto;
}

.production-header {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.production-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
}

.production-header p:last-child {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.production-summary > div {
  display: grid;
  gap: 7px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.production-summary > div:first-child {
  padding-left: 0;
}

.production-summary > div:last-child {
  border-right: 0;
}

.production-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.production-summary strong {
  font-size: 23px;
}

.production-table-section {
  padding-top: 28px;
}

.production-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.production-table-heading h2 {
  margin: 0;
  font-size: 17px;
}

.production-table {
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--surface);
}

.production-row {
  display: grid;
  width: 100%;
  min-height: 66px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(100px, 0.7fr) 130px 140px 24px;
  align-items: center;
  gap: 18px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.production-row:last-child {
  border-bottom: 0;
}

.production-row:hover {
  background: #f4f8f7;
}

.production-row-title,
.production-row-meta {
  min-width: 0;
}

.production-row-title strong,
.production-row-title span,
.production-row-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-row-title strong {
  font-size: 13px;
}

.production-row-title span,
.production-row-meta span,
.production-row-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.production-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  color: #4f5d63;
  font-size: 11px;
  font-weight: 750;
}

.production-status .question-list-dot {
  flex: 0 0 auto;
}

.production-row > svg {
  width: 16px;
  height: 16px;
  color: #829096;
}

.production-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.production-empty div {
  display: grid;
  place-items: center;
  gap: 9px;
}

.production-empty svg {
  width: 30px;
  height: 30px;
  color: var(--teal);
}

.production-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.production-empty p {
  max-width: 420px;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.question-strip {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
}

.question-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.question-heading h1 {
  overflow: hidden;
  margin: 0;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-number {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: var(--surface);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.question-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 750;
}

.badge svg {
  width: 14px;
  height: 14px;
}

.badge-review {
  color: var(--gold);
  border-color: #ead5ad;
  background: var(--gold-soft);
}

.badge-valid {
  color: var(--green);
  border-color: #b9dcc9;
  background: var(--green-soft);
}

.badge-approved {
  color: var(--green);
  border-color: #b9dcc9;
  background: var(--green-soft);
}

.badge-rejected {
  color: var(--coral);
  border-color: #f0c8be;
  background: var(--coral-soft);
}

.workspace-grid {
  display: grid;
  min-height: calc(100vh - 190px);
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.value-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  align-items: start;
  min-height: 0;
}

.content-stage {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.delivery-preview {
  display: flex;
  flex-direction: column;
  background: white;
}

.delivery-heading { order: 1; }
.delivery-video-frame { order: 2; }
.proof-timeline { order: 3; }
.assurance-checks { order: 4; }

.delivery-heading {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.delivery-heading h2 {
  margin: 0;
  font-size: 17px;
}

.delivery-actions,
.delivery-format {
  display: flex;
  align-items: center;
}

.delivery-actions {
  gap: 9px;
}

.delivery-format {
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.delivery-format svg {
  width: 15px;
  height: 15px;
}

.delivery-video-frame {
  aspect-ratio: 16 / 9;
}

.delivery-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.evidence-item {
  display: grid;
  min-width: 0;
  min-height: 74px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  color: #899398;
}

.evidence-item:last-child {
  border-right: 0;
}

.evidence-item > svg {
  width: 20px;
  height: 20px;
  padding: 2px;
}

.evidence-item span,
.evidence-item strong,
.evidence-item small {
  display: block;
  min-width: 0;
}

.evidence-item strong {
  color: #68757d;
  font-size: 11px;
}

.evidence-item small {
  margin-top: 3px;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.evidence-item.is-ready {
  color: var(--teal);
}

.evidence-item.is-ready strong {
  color: var(--ink);
}

.evidence-item.is-active > svg {
  animation: generation-pulse 1.4s ease-in-out infinite;
}

.tabs {
  display: flex;
  min-height: 50px;
  align-items: stretch;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  position: relative;
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  background: transparent;
  content: "";
}

.tab:hover,
.tab.is-active {
  color: var(--ink);
}

.tab.is-active::after {
  background: var(--teal);
}

.tab-panel {
  min-height: 610px;
}

.value-workspace-grid .tab-panel {
  min-height: 0;
}

.visual-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
}

.visual-column + .visual-column {
  border-left: 1px solid var(--line);
}

.panel-heading,
.video-heading,
.review-heading {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3,
.video-heading h3,
.review-heading h3 {
  margin: 0;
  font-size: 14px;
}

.panel-heading-wide {
  padding: 16px 20px;
}

.image-stage {
  display: grid;
  height: 546px;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background-color: #f7f9f8;
  background-image:
    linear-gradient(rgba(32, 54, 61, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 54, 61, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

.value-workspace-grid .image-stage {
  height: 390px;
  background: #f4f6f5;
  background-image: none;
}

.value-workspace-grid .image-stage img {
  border: 1px solid #dde3e2;
  background: white;
  box-shadow: 0 8px 20px rgba(42, 48, 48, 0.08);
}

.image-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-stage-source img {
  border: 1px solid #e0e4e3;
  box-shadow: 0 12px 30px rgba(42, 48, 48, 0.11);
}

.data-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.facts-list {
  display: grid;
}

.fact-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(180px, 0.62fr);
  gap: 16px;
  align-items: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.fact-id {
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.fact-main strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  text-transform: uppercase;
}

.fact-main p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.fact-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fact-ref {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #f7f8f8;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.solution-intro {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.solution-intro > p:last-child {
  max-width: 950px;
  margin: 0;
  color: #445159;
  font-size: 13px;
  line-height: 1.7;
}

.solution-step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.step-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.step-beat + .step-beat {
  margin-top: 12px;
}

.step-beat p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.step-board {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  border-left: 3px solid var(--gold);
  background: #fcfaf5;
}

.board-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.4;
}

.derive-claim {
  margin-top: 12px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.receipt-panel {
  padding: 20px;
}

.receipt-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.receipt-summary > div {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.receipt-summary > div:last-child {
  border-right: 0;
}

.receipt-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.receipt-summary strong {
  font-size: 12px;
}

.text-success {
  color: var(--green);
}

.stage-receipts {
  margin: 18px 0;
  border-top: 1px solid var(--line);
}

.stage-row {
  display: grid;
  grid-template-columns: 130px 110px minmax(0, 1fr) 90px;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.stage-row span {
  color: var(--muted);
}

.review-rail {
  min-width: 0;
  background: #fbfcfc;
}

.value-workspace-grid .review-rail {
  align-self: stretch;
}

.decision-overview {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.decision-overview h3 {
  margin: 0;
  font-size: 17px;
}

.decision-overview > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.video-heading {
  background: white;
}

.video-resolution {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #101719;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #cdd7da;
  background: #101719;
  font-size: 12px;
}

.generation-panel {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f2f7f6;
}

.generation-panel-secondary {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: #f6f8f7;
}

.generation-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.generation-copy div {
  display: grid;
  gap: 2px;
}

.generation-copy strong {
  font-size: 12px;
}

.generation-copy span:not(.generation-dot) {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
}

.generation-panel.is-running .generation-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(212, 157, 43, 0.13);
  animation: generation-pulse 1.4s ease-in-out infinite;
}

.generation-panel.is-failed .generation-dot {
  background: var(--coral);
}

.generation-panel .button {
  min-height: 36px;
  flex: 0 0 auto;
}

@keyframes generation-pulse {
  50% { opacity: 0.45; }
}

.answer-band {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: white;
  font-size: 12px;
}

.value-workspace-grid .answer-band {
  min-height: 78px;
  padding: 0 18px;
  background: var(--teal-soft);
}

.value-workspace-grid .answer-band strong {
  color: var(--teal);
  font-size: 31px;
}

.answer-band strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 25px;
}

.review-form {
  padding-bottom: 18px;
}

.value-workspace-grid .review-form {
  padding-bottom: 10px;
  background: white;
}

.review-form .review-heading {
  border-top: 1px solid var(--line);
}

.review-form > label {
  display: block;
  margin: 14px 16px 6px;
  color: #3b494f;
  font-size: 11px;
  font-weight: 750;
}

.review-form > label small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.review-form select,
.review-form textarea {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}

.review-details {
  margin: 12px 16px 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.review-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.review-details label {
  display: block;
  margin: 11px 0 6px;
  color: #3b494f;
  font-size: 10px;
  font-weight: 700;
}

.review-details select {
  width: 100%;
  margin: 0;
}

.review-form select {
  height: 38px;
  padding: 0 10px;
}

.review-form textarea {
  resize: vertical;
  min-height: 76px;
  padding: 10px;
  line-height: 1.45;
}

.review-form select:focus,
.review-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.12);
}

.saved-time {
  color: var(--muted);
  font-size: 10px;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px;
}

.assurance-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 92px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-top: 3px solid var(--gold);
  background: white;
}

.assurance-bar.is-ready {
  border-top-color: var(--green);
}

.assurance-bar.needs-attention {
  border-top-color: var(--coral);
}

.assurance-bar.is-processing .assurance-seal svg {
  animation: generation-pulse 1.4s ease-in-out infinite;
}

.assurance-lead {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
}

.assurance-seal {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c8d2d0;
  border-radius: 6px;
  color: var(--gold);
  background: #fbfaf5;
}

.assurance-bar.is-ready .assurance-seal {
  color: var(--green);
  border-color: #b8d7c5;
  background: var(--green-soft);
}

.assurance-seal svg {
  width: 23px;
  height: 23px;
}

.assurance-lead h2 {
  margin: 1px 0 0;
  font-size: 17px;
}

.assurance-lead > div > p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.assurance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  border-left: 1px solid var(--line);
}

.assurance-metrics > div {
  display: grid;
  min-width: 86px;
  align-content: center;
  gap: 4px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.assurance-metrics > div:last-child {
  border-right: 0;
}

.assurance-metrics strong {
  font-size: 19px;
}

.assurance-metrics span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.proof-mode {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f5f7f6;
}

.proof-mode-button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.proof-mode-button svg {
  width: 14px;
  height: 14px;
}

.proof-mode-button:hover,
.proof-mode-button.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgba(25, 42, 48, 0.12);
}

.delivery-video-frame .proof-media-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 22px;
  object-fit: contain;
  background: #f2f5f4;
}

.delivery-video-frame .proof-media-image[hidden] {
  display: none;
}

.proof-timeline {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: white;
}

.proof-step {
  display: grid;
  min-width: 190px;
  flex: 1 0 190px;
  min-width: 0;
  min-height: 74px;
  grid-template-columns: 28px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-top: 3px solid transparent;
  color: var(--ink);
  background: white;
  text-align: left;
}

.proof-step:last-child {
  border-right: 0;
}

.proof-step:hover {
  background: #f7faf9;
}

.proof-step.is-active {
  border-top-color: var(--teal);
  background: var(--teal-soft);
}

.proof-step-index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--muted);
  background: white;
  font-size: 10px;
  font-weight: 800;
}

.proof-step.is-active .proof-step-index {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.proof-step-copy,
.proof-step-copy strong,
.proof-step-copy small {
  display: block;
  min-width: 0;
}

.proof-step-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.proof-step-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.proof-step > svg {
  width: 14px;
  color: #9aa5a9;
}

.proof-timeline-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
}

.assurance-checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assurance-checks .evidence-item {
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}

.assurance-checks .evidence-item:nth-child(3n) {
  border-right: 0;
}

.assurance-checks .evidence-item:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.evidence-item.needs-attention {
  color: var(--coral);
  background: #fffafa;
}

.evidence-item.is-advisory {
  color: #72817d;
  background: #f8faf9;
}

.evidence-item.is-advisory strong {
  color: #53615d;
}

.step-inspector {
  border-bottom: 1px solid var(--line);
  background: white;
}

.step-inspector-heading {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.step-inspector-heading h3 {
  margin: 0;
  font-size: 15px;
}

.step-inspector-claim {
  margin: 0;
  padding: 14px 16px;
  color: #33454b;
  background: #f6f9f8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.step-inspector-section {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.step-inspector-section > span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.step-fact-links {
  display: grid;
  max-height: 194px;
  gap: 1px;
  overflow-y: auto;
  background: var(--line);
}

.step-fact-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 8px;
  padding: 9px 10px;
  border: 0;
  color: var(--ink);
  background: white;
  text-align: left;
}

.step-fact-link:hover {
  background: var(--teal-soft);
}

.step-fact-link > span {
  grid-row: 1 / 3;
  color: var(--teal);
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.step-fact-link strong {
  font-size: 10px;
}

.step-fact-link small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.step-board-trace {
  display: grid;
  gap: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--gold);
}

.step-board-trace span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  line-height: 1.35;
}

.step-board-trace small {
  color: var(--muted);
  font-size: 10px;
}

.review-context {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 8px 9px;
  border: 1px solid #c7ded8;
  border-radius: 4px;
  color: var(--teal);
  background: var(--teal-soft);
}

.review-context[hidden] {
  display: none;
}

.review-context > svg {
  width: 16px;
}

.review-context span,
.review-context strong,
.review-context small {
  display: block;
}

.review-context strong {
  color: var(--ink);
  font-size: 10px;
}

.review-context small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.review-context .icon-button {
  width: 28px;
  height: 28px;
}

.fact-row.is-referenced,
.solution-step.is-referenced {
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
}

.button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.button-wide {
  width: 100%;
}

.button-primary {
  color: white;
  background: var(--teal);
}

.button-primary:hover {
  background: #066d63;
}

.button-secondary {
  color: var(--ink);
  border-color: var(--line-dark);
  background: white;
}

.button-danger {
  color: var(--coral);
  border-color: #eab9ae;
  background: white;
}

.button-success {
  color: white;
  background: var(--green);
}

.button:disabled {
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: white;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-dark);
}

.upload-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(16, 29, 34, 0.24);
}

.upload-dialog::backdrop {
  background: rgba(17, 28, 33, 0.58);
  backdrop-filter: blur(3px);
}

.upload-form {
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
}

.upload-dropzone {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #9aabad;
  border-radius: 6px;
  background: #f7f9f8;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
  border-color: var(--teal);
  background: #f1f8f6;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-dropzone img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: white;
}

.upload-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.upload-placeholder svg {
  width: 34px;
  height: 34px;
  color: var(--teal);
}

.upload-placeholder strong {
  color: var(--ink);
  font-size: 14px;
}

.upload-placeholder small {
  font-size: 11px;
}

.upload-fields {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 12px;
  margin-top: 16px;
}

.upload-fields label {
  display: grid;
  gap: 6px;
  color: #3b494f;
  font-size: 11px;
  font-weight: 750;
}

.upload-field-wide {
  grid-column: 1 / -1;
}

.upload-fields input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}

.team-access-dialog {
  width: min(620px, calc(100vw - 32px));
}

.team-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.team-access-grid label {
  display: grid;
  gap: 6px;
  color: #3b494f;
  font-size: 11px;
  font-weight: 750;
}

.team-access-grid input,
.team-access-grid select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}

.team-access-grid input:focus,
.team-access-grid select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.1);
}

.invite-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #abd8cb;
  border-radius: 6px;
  background: var(--teal-soft);
}

.invite-result > div {
  display: grid;
  gap: 4px;
}

.invite-result span,
.invite-result small {
  color: #4c6662;
  font-size: 10px;
}

.invite-result strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 16px;
}

.invite-history {
  display: grid;
  gap: 1px;
  max-height: 150px;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--line);
}

.invite-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: white;
  font-size: 11px;
}

.invite-history-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.invite-history-row span {
  color: var(--muted);
}

.upload-fields input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.12);
}

.upload-pipeline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #536167;
  font-size: 10px;
  font-weight: 750;
}

.upload-pipeline svg {
  width: 13px;
  height: 13px;
  color: #92a0a4;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.dialog-actions p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.release-record {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  background: #fbfcfc;
}

.release-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.release-record-heading h3 {
  margin: 0;
  font-size: 16px;
}

.release-record-message {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.provenance-grid > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px;
  background: white;
}

.provenance-grid span,
.baseline-row small {
  color: var(--muted);
  font-size: 9px;
}

.provenance-grid strong {
  overflow: hidden;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
}

.baseline-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.baseline-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: white;
}

.baseline-row svg {
  width: 18px;
  color: var(--green);
}

.baseline-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.baseline-row strong {
  font-size: 10px;
}

.baseline-row small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.baseline-row em {
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.generation-panel:has(.generation-failure:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.generation-failure {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e4b8af;
  color: #71382e;
  background: var(--coral-soft);
}

.generation-failure svg {
  width: 19px;
  height: 19px;
}

.generation-failure div {
  display: grid;
  gap: 4px;
}

.generation-failure strong {
  font-size: 11px;
}

.generation-failure p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.generation-failure span {
  color: #916052;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
}

.candidate-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 14px 12px;
  border: 1px solid var(--line);
  background: var(--line);
}

.candidate-evidence > div {
  display: grid;
  gap: 3px;
  padding: 9px;
  background: white;
}

.candidate-evidence span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.candidate-evidence strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.candidate-evidence p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  color: #526167;
  background: #f8faf9;
  font-size: 9px;
  line-height: 1.45;
}

.candidate-answer-summary {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 8px 9px;
  border: 1px solid #c7d8d4;
  border-radius: 5px;
  background: #f4f9f7;
}

.candidate-answer-summary[hidden] { display: none; }

.candidate-answer-summary > svg {
  width: 16px;
  height: 16px;
  margin: auto;
  color: var(--teal);
}

.candidate-answer-summary span,
.candidate-answer-summary strong,
.candidate-answer-summary small {
  display: block;
  min-width: 0;
}

.candidate-answer-summary strong { font-size: 10px; }
.candidate-answer-summary small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.candidate-answer-summary.has-conflict { border-color: #e2c791; background: #fff9eb; }
.candidate-answer-summary.has-conflict > svg { color: #9a6500; }

.candidate-answer-evidence {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  margin: 0 12px 10px;
  padding: 10px;
  border: 1px solid #bcd7d1;
  border-radius: 5px;
  background: #f1f8f6;
}

.candidate-answer-evidence[hidden] { display: none; }

.candidate-answer-letter {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #78b9ad;
  border-radius: 4px;
  color: #086c5d;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
}

.candidate-answer-evidence span,
.candidate-answer-evidence strong,
.candidate-answer-evidence small,
.candidate-answer-evidence > div { display: block; min-width: 0; }
.candidate-answer-evidence strong { font-size: 10px; }
.candidate-answer-evidence span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.candidate-answer-evidence small { margin-top: 4px; overflow: hidden; color: #516263; font-size: 8px; line-height: 1.4; text-overflow: ellipsis; }
.candidate-answer-evidence.is-conflict { border-color: #e0c082; background: #fff8e8; }
.candidate-answer-evidence.is-conflict .candidate-answer-letter { border-color: #d6a950; color: #8a5900; }

.candidate-structure-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 14px 14px;
}

.candidate-structure-actions .button {
  min-width: 0;
  padding: 0 9px;
  font-size: 10px;
}

.candidate-row.is-superseded {
  opacity: 0.55;
}

.candidate-split-dialog {
  width: min(640px, calc(100vw - 32px));
}

.dialog-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.split-preview {
  position: relative;
  display: grid;
  max-height: 430px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  background: #f5f7f6;
}

.split-preview img {
  display: block;
  max-width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.candidate-split-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(217, 93, 69, 0.12);
}

.split-range-label {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 6px;
  color: #3b494f;
  font-size: 10px;
  font-weight: 750;
}

#candidateSplitRange {
  width: 100%;
  accent-color: var(--teal);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 16px;
  border-radius: 5px;
  color: white;
  background: var(--sidebar);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #8d392b;
}

.mobile-only {
  display: none;
}

.sidebar-close,
.nav-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .assurance-bar {
    grid-template-columns: 1fr;
  }

  .assurance-metrics {
    min-height: 66px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .proof-mode-button span,
  .delivery-format {
    display: none;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .visual-panel {
    grid-template-columns: 1fr;
  }

  .visual-column + .visual-column {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .image-stage {
    height: 430px;
  }

  .fact-row,
  .solution-step {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .fact-refs,
  .step-board {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    width: 224px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-brand {
    position: relative;
    padding-right: 56px;
  }

  .sidebar-close.mobile-only {
    position: absolute;
    top: 22px;
    right: 14px;
    display: inline-grid;
    color: #e8eff1;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    padding: 0;
    background: rgba(23, 33, 38, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .app-shell.nav-open .nav-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-only {
    display: inline-grid;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 10px 16px;
  }

  .topbar-metrics {
    display: none;
  }

  .workspace {
    padding: 16px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .assurance-bar {
    margin-bottom: 0;
  }

  .step-inspector {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  }

  .step-inspector-heading,
  .step-inspector-claim {
    grid-column: 1;
  }

  .step-inspector-section {
    grid-column: 2;
  }

  .content-stage {
    border-right: 0;
  }

  .review-rail {
    border-top: 1px solid var(--line);
  }

  .production-row {
    grid-template-columns: minmax(0, 1fr) 110px 24px;
  }

  .production-row-meta,
  .production-row-time {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar,
  .app-shell.is-book-editor .topbar,
  .app-shell.is-question-review .topbar {
    min-height: 64px;
    grid-template-columns: 34px minmax(0, 1fr) 40px auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .project-identity {
    min-width: 0;
  }

  .project-identity .eyebrow {
    display: none;
  }

  .project-identity h2 {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-menu {
    gap: 6px;
  }

  .user-menu .avatar {
    display: none;
  }

  .provenance-grid,
  .baseline-catalog {
    grid-template-columns: 1fr;
  }

  .candidate-structure-actions {
    grid-template-columns: 1fr;
  }

  .auth-view {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 180px;
    padding: 28px;
  }

  .auth-panel {
    width: calc(100% - 40px);
    padding: 42px 0;
  }

  .auth-panel h1 {
    font-size: 30px;
  }

  .access-brand-status {
    display: none;
  }

  .access-code-row,
  .team-access-grid {
    grid-template-columns: 1fr;
  }

  .team-access-grid .upload-field-wide {
    grid-column: 1;
  }

  .user-copy {
    display: none;
  }

  .topbar-action {
    min-width: 40px;
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  .question-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .assurance-lead {
    align-items: flex-start;
    padding: 14px;
  }

  .assurance-lead > div > p:last-child {
    line-height: 1.45;
  }

  .assurance-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .assurance-metrics > div {
    min-height: 58px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
  }

  .assurance-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .assurance-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .delivery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-actions {
    width: 100%;
    justify-content: space-between;
  }

  .proof-step {
    flex-basis: 175px;
  }

  .assurance-checks {
    grid-template-columns: 1fr;
  }

  .assurance-checks .evidence-item,
  .assurance-checks .evidence-item:nth-child(3n),
  .assurance-checks .evidence-item:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .assurance-checks .evidence-item:last-child {
    border-bottom: 0;
  }

  .step-inspector {
    display: block;
  }

  .production-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .production-summary {
    grid-template-columns: 1fr 1fr;
  }

  .production-summary > div {
    border-bottom: 1px solid var(--line);
  }

  .production-summary > div:nth-child(2) {
    border-right: 0;
  }

  .production-summary > div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .production-summary > div:first-child {
    padding-left: 22px;
  }

  .question-heading h1 {
    white-space: normal;
  }

  .question-status {
    justify-content: flex-start;
  }

  .workspace {
    padding: 12px;
  }

  .tabs {
    padding: 0 8px;
  }

  .delivery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-actions {
    width: 100%;
    justify-content: space-between;
  }

  .delivery-evidence {
    grid-template-columns: 1fr;
  }

  .evidence-item {
    min-height: 60px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .evidence-item:last-child {
    border-bottom: 0;
  }

  .tab {
    padding: 0 9px;
  }

  .image-stage {
    height: 360px;
    padding: 10px;
  }

  .fact-row,
  .solution-step {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .receipt-summary {
    grid-template-columns: 1fr 1fr;
  }

  .receipt-summary > div:nth-child(2) {
    border-right: 0;
  }

  .receipt-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .stage-row {
    grid-template-columns: 1fr 1fr;
    padding: 10px 0;
  }

  .review-actions {
    grid-template-columns: 1fr;
  }

  .upload-form {
    padding: 18px;
  }

  .upload-fields {
    grid-template-columns: 1fr;
  }

  .upload-field-wide {
    grid-column: auto;
  }

  .upload-pipeline {
    flex-wrap: wrap;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Publication portfolio v2: books are operational records, not table rows. */
.books-workspace .book-table-head {
  display: none;
}

.books-workspace .books-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 36px;
}

.publication-book-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 246px;
  grid-template-columns: 72px minmax(0, 1fr) 128px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px 20px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #d7e0dd;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(27, 43, 48, .045);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.publication-book-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #087f73;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
  content: '';
}

.publication-book-card:hover,
.publication-book-card:focus-visible {
  border-color: #8dbfb7;
  box-shadow: 0 18px 38px rgba(27, 43, 48, .085);
  outline: 0;
  transform: translateY(-2px);
}

.publication-book-card:hover::before,
.publication-book-card:focus-visible::before {
  transform: scaleX(1);
}

.publication-book-cover {
  position: relative;
  display: flex;
  width: 72px;
  min-height: 102px;
  grid-row: 1 / 3;
  flex-direction: column;
  align-self: start;
  justify-content: space-between;
  padding: 12px 9px 10px 13px;
  overflow: hidden;
  border: 1px solid #b9d7d1;
  border-radius: 6px;
  color: #153b38;
  background: #e9f5f2;
}

.publication-book-cover::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 1px;
  background: rgba(8, 127, 115, .26);
  content: '';
}

.publication-book-cover span,
.publication-book-cover strong,
.publication-book-cover small {
  position: relative;
  display: block;
}

.publication-book-cover span {
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.publication-book-cover strong {
  max-width: 56px;
  font-size: 13px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.publication-book-cover small {
  color: #48726d;
  font-size: 9px;
  font-weight: 760;
}

.publication-book-main {
  display: block;
  min-width: 0;
}

.publication-book-type {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #087f73;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.publication-book-type svg {
  width: 13px;
  height: 13px;
}

.publication-book-title {
  display: block;
  margin-top: 9px;
}

.publication-book-title strong,
.publication-book-title em {
  display: block;
}

.publication-book-title strong {
  font-size: 17px;
  line-height: 1.25;
}

.publication-book-title em {
  margin-top: 5px;
  color: #6a797f;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.publication-book-track {
  display: grid;
  grid-template-columns: auto minmax(18px, 1fr) auto minmax(18px, 1fr) auto;
  align-items: center;
  margin-top: 22px;
}

.publication-book-track > span {
  display: grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 7px;
  color: #708087;
}

.publication-book-track > span > svg {
  width: 26px;
  height: 26px;
  padding: 6px;
  border: 1px solid #d6dfdc;
  border-radius: 50%;
  background: #f7f9f8;
}

.publication-book-track > span > span,
.publication-book-track small,
.publication-book-track strong {
  display: block;
}

.publication-book-track small {
  font-size: 7px;
  font-weight: 820;
}

.publication-book-track strong {
  margin-top: 2px;
  color: #34434a;
  font-size: 10px;
}

.publication-book-track > i {
  height: 2px;
  margin-inline: 8px;
  overflow: hidden;
  background: #e3e9e7;
}

.publication-book-track > i b {
  display: block;
  height: 100%;
  background: #64aea5;
}

.publication-book-track > span.is-complete > svg {
  color: #fff;
  border-color: #087f73;
  background: #087f73;
}

.publication-book-track > span.is-complete small,
.publication-book-track > span.is-current small {
  color: #087f73;
}

.publication-book-track > span.is-current > svg {
  color: #087f73;
  border-color: #70b6ad;
  background: #edf7f5;
}

.publication-book-readiness {
  display: grid;
  align-self: start;
  gap: 6px;
  padding-left: 18px;
  border-left: 1px solid #e0e7e4;
}

.publication-book-readiness small,
.publication-book-next small {
  color: #75838a;
  font-size: 8px;
  font-weight: 840;
  text-transform: uppercase;
}

.publication-book-readiness strong {
  color: #087f73;
  font-size: 29px;
  line-height: 1;
}

.publication-book-readiness > i {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e4eae8;
}

.publication-book-readiness > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #087f73;
}

.publication-book-readiness em {
  color: #66757b;
  font-size: 8px;
  font-style: normal;
  line-height: 1.35;
}

.publication-book-next {
  position: relative;
  display: grid;
  min-width: 0;
  grid-column: 2 / 4;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 13px 42px 0 0;
  border-top: 1px solid #e0e7e4;
}

.publication-book-next small,
.publication-book-next strong,
.publication-book-next em {
  grid-column: 1;
}

.publication-book-next strong {
  font-size: 12px;
}

.publication-book-next em {
  color: #6f7e84;
  font-size: 9px;
  font-style: normal;
}

.publication-book-next > svg {
  position: absolute;
  top: 17px;
  right: 2px;
  width: 18px;
  height: 18px;
  color: #087f73;
}

.publication-book-next.has-work strong {
  color: #b74f3d;
}

.publication-book-card.is-standalone-folder .publication-book-cover {
  color: #294c70;
  border-color: #c7d5e4;
  background: #eef4fa;
}

.publication-book-card.is-standalone-folder .publication-book-cover::before {
  background: rgba(54, 95, 148, .23);
}

@media (max-width: 1180px) {
  .books-workspace .books-table {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .publication-book-card {
    min-height: 0;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .publication-book-cover {
    width: 58px;
    min-height: 86px;
  }

  .publication-book-readiness {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 12px 0 0;
    border-top: 1px solid #e0e7e4;
    border-left: 0;
  }

  .publication-book-readiness strong {
    justify-self: end;
    font-size: 23px;
  }

  .publication-book-readiness > i,
  .publication-book-readiness em {
    grid-column: 1 / -1;
  }

  .publication-book-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 16px;
  }

  .publication-book-track > i {
    display: none;
  }

  .publication-book-track > span {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .publication-book-track > span > svg {
    display: none;
  }

  .publication-book-track small,
  .publication-book-track strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .publication-book-next {
    grid-column: 1 / -1;
    padding-top: 12px;
  }
}

/* Editor-facing publication package: value first, technical archive second. */
.video-package-panel {
  display: grid;
  max-width: 1120px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 0 28px;
  margin: 0 auto;
}

.video-package-panel > section {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.publication-release-band {
  display: grid;
  min-height: 132px;
  grid-column: 1 / -1;
  grid-template-columns: 54px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid #e3e8e6 !important;
  border-left: 4px solid #d58a55 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(21, 42, 48, .06);
}

.publication-release-band.is-ready {
  border-left-color: var(--teal) !important;
}

.publication-release-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 7px;
  color: #9c5b2e;
  background: #fff4ec;
}

.publication-release-band.is-ready .publication-release-icon {
  color: var(--teal);
  background: #eaf7f3;
}

.publication-release-icon svg {
  width: 27px;
  height: 27px;
}

.publication-release-copy span,
.publication-deliverables header span,
.publication-trace header span {
  color: #67767b;
  font-size: 9px;
  font-weight: 820;
}

.publication-release-copy h3 {
  margin: 5px 0 6px;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0;
}

.publication-release-copy p {
  max-width: 680px;
  margin: 0;
  color: #526269;
  font-size: 11px;
  line-height: 1.55;
}

.publication-readiness-meter {
  display: grid;
  align-content: center;
  gap: 3px;
  padding-left: 22px;
  border-left: 1px solid #e5eae8;
}

.publication-readiness-meter strong {
  font-size: 25px;
  font-weight: 740;
}

.publication-readiness-meter span {
  color: var(--muted);
  font-size: 9px;
}

.publication-readiness-meter i {
  display: block;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: #e8eeec;
}

.publication-readiness-meter b {
  display: block;
  height: 100%;
  background: var(--teal);
}

.publication-proof-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0 4px;
  border: 1px solid #e4e9e7 !important;
  border-radius: 8px !important;
  background: #f8faf9 !important;
}

.publication-proof-strip > span {
  display: grid;
  min-height: 76px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: center;
  column-gap: 8px;
  padding: 12px 16px;
  border-right: 1px solid #e4e9e7;
}

.publication-proof-strip > span:last-child {
  border-right: 0;
}

.publication-proof-strip svg {
  width: 18px;
  grid-row: 1 / 3;
  color: #617279;
}

.publication-proof-strip .is-valid svg {
  color: var(--teal);
}

.publication-proof-strip b {
  font-size: 14px;
}

.publication-proof-strip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.publication-deliverables,
.publication-trace {
  margin-top: 22px;
}

.publication-deliverables > header,
.publication-trace > header {
  display: flex;
  min-height: 52px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0 11px;
  border-bottom: 1px solid #dfe6e3;
}

.publication-deliverables header div,
.publication-trace header div {
  display: grid;
  gap: 4px;
}

.publication-deliverables header strong,
.publication-trace header strong {
  color: var(--ink) !important;
  font-size: 13px !important;
}

.publication-deliverables header small,
.publication-trace header small {
  color: var(--muted);
  font-size: 9px;
}

.publication-primary-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.publication-primary-files button {
  display: grid;
  min-height: 82px;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dfe6e3;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.publication-primary-files button:hover {
  border-color: #8fbeb5;
  background: #f4faf8;
  transform: translateY(-1px);
}

.publication-primary-files button > svg:first-child {
  width: 22px;
  color: var(--teal);
}

.publication-primary-files button > svg:last-child {
  width: 14px;
  color: #899692;
}

.publication-primary-files strong,
.publication-primary-files small {
  display: block;
}

.publication-primary-files strong {
  font-size: 11px;
}

.publication-primary-files small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.publication-trace ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 20px 4px 4px;
  list-style: none;
}

.publication-trace li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.publication-trace li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 16px;
  right: -50%;
  left: 50%;
  height: 2px;
  background: #dfe6e3;
  content: '';
}

.publication-trace li.is-complete:not(:last-child)::after {
  background: #9fcfc4;
}

.publication-trace li > span {
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d5dfdc;
  border-radius: 50%;
  color: #75847f;
  background: #fff;
}

.publication-trace li.is-complete > span {
  border-color: #9fcfc4;
  color: var(--teal);
  background: #edf8f5;
}

.publication-trace svg {
  width: 15px;
}

.publication-trace b {
  font-size: 10px;
}

.publication-trace small {
  color: var(--muted);
  font-size: 8px;
}

.publication-technical-files {
  grid-column: 1 / -1;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #fff;
}

.publication-technical-files summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}

.publication-technical-files summary::-webkit-details-marker {
  display: none;
}

.publication-technical-files summary > span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
}

.publication-technical-files summary > span > svg {
  width: 19px;
  grid-row: 1 / 3;
  color: var(--teal);
}

.publication-technical-files summary > svg {
  width: 16px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.publication-technical-files[open] summary > svg {
  transform: rotate(180deg);
}

.publication-technical-files summary b {
  font-size: 11px;
}

.publication-technical-files summary small {
  color: var(--muted);
  font-size: 9px;
}

.publication-technical-files .video-package-files {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e4e9e7;
}

.publication-claim-note {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  color: #68777c;
  font-size: 9px;
  line-height: 1.45;
}

.publication-claim-note svg {
  width: 14px;
  min-width: 14px;
  color: #788985;
}

@media (max-width: 1080px) {
  .video-package-panel {
    grid-template-columns: 1fr;
  }

  .publication-release-band,
  .publication-proof-strip,
  .publication-technical-files,
  .publication-claim-note {
    grid-column: 1;
  }

  .publication-technical-files .video-package-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .publication-release-band {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 17px;
  }

  .publication-release-icon {
    width: 44px;
    height: 44px;
  }

  .publication-readiness-meter {
    grid-column: 1 / -1;
    padding: 12px 0 0;
    border-top: 1px solid #e5eae8;
    border-left: 0;
  }

  .publication-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publication-proof-strip > span {
    border-bottom: 1px solid #e4e9e7;
  }

  .publication-primary-files,
  .publication-technical-files .video-package-files {
    grid-template-columns: 1fr;
  }
}

/* Locale controls remain part of the shared shell; language never forks layout. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.locale-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #596a70;
}

.locale-select i,
.locale-select svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.locale-select select {
  min-width: 72px;
  height: 36px;
  padding: 0 25px 0 8px;
  border: 1px solid #d6dfdc;
  border-radius: 6px;
  background-color: #fff;
  color: #243238;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.locale-select-auth {
  margin-left: auto;
}

.locale-select-topbar {
  margin-left: 4px;
}

.locale-select-topbar select {
  min-width: 58px;
}

.content-locale-field small {
  display: block;
  margin-top: 6px;
  color: #6b7a80;
  font-size: 11px;
  line-height: 1.4;
}

.upload-fields .content-locale-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ccd7d4;
  border-radius: 6px;
  background: #fff;
  color: #1e2c32;
  font: inherit;
}

html[lang="en"] .eyebrow,
html[lang="en"] .sidebar-label,
html[lang="en"] .publication-next-cell small,
html[lang="en"] .publication-readiness-cell > small {
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .locale-select-topbar i,
  .locale-select-topbar svg {
    display: none;
  }

  .locale-select-topbar select {
    min-width: 52px;
    padding-left: 6px;
  }
}

/* Organization access workspace */
.team-access-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
}

.team-access-shell {
  max-height: calc(100vh - 34px);
  padding: 24px;
  overflow: auto;
}

.team-access-shell .dialog-heading {
  margin: 0 0 18px;
}

.team-access-shell .dialog-heading p:last-child,
.team-member-dialog .dialog-heading p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.team-access-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-access-summary span {
  display: grid;
  gap: 3px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.team-access-summary span:last-child {
  border-right: 0;
}

.team-access-summary strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
}

.team-access-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.team-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.team-members-panel > header,
.team-pending-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin-bottom: 8px;
}

.team-members-panel header span,
.team-pending-panel header span,
.team-invite-panel form > div > span {
  color: var(--teal);
  font-size: 8px;
  font-weight: 850;
}

.team-members-panel h3,
.team-pending-panel h3,
.team-invite-panel h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.team-member-list,
.invite-history {
  display: grid;
  gap: 0;
  max-height: 320px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.team-member-row {
  display: grid;
  grid-template-columns: 36px minmax(160px, 1fr) auto auto 34px;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}

.team-member-row:last-child,
.invite-history-row:last-child {
  border-bottom: 0;
}

.team-member-row.is-revoked {
  background: #fafbfb;
}

.team-member-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #184f4a;
  font-size: 12px;
  font-weight: 850;
}

.team-member-row.is-revoked .team-member-avatar {
  color: #657278;
  background: #e7ebeb;
}

.team-member-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.team-member-copy strong,
.invite-history-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-copy small,
.invite-history-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-role-badge,
.team-member-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: #45545a;
  background: #f7f9f9;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.team-role-badge.is-owner,
.team-role-badge.is-org_admin {
  color: #075e55;
  border-color: #a8d8cf;
  background: #edf9f6;
}

.team-member-status.is-active,
.team-member-status.is-redeemed {
  color: #117257;
  border-color: #b5dfd2;
  background: #f0faf6;
}

.team-member-status.is-revoked,
.team-member-status.is-cancelled,
.team-member-status.is-expired {
  color: #8b5a54;
  border-color: #ead1cc;
  background: #fff7f5;
}

.team-member-lock {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #9aa5a8;
}

.team-member-lock svg {
  width: 14px;
}

.team-invite-panel {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.team-invite-panel form {
  display: grid;
  gap: 12px;
}

.team-invite-panel form > label,
.team-member-fields label {
  display: grid;
  gap: 6px;
  color: #3b494f;
  font-size: 10px;
  font-weight: 750;
}

.team-invite-panel input,
.team-invite-panel select,
.team-member-fields select,
.team-member-fields textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}

.team-member-fields textarea {
  min-height: 88px;
  padding-block: 10px;
  resize: vertical;
}

.team-invite-panel input:focus,
.team-invite-panel select:focus,
.team-member-fields select:focus,
.team-member-fields textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 115, 0.1);
}

.team-invite-panel .invite-result {
  margin-top: 14px;
}

.team-pending-panel {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invite-history {
  max-height: 230px;
}

.invite-history-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 64px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: 10px;
}

.invite-history-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.invite-history-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
}

.invite-history-icon svg {
  width: 13px;
}

.invite-cancel-button {
  min-height: 30px;
  padding-inline: 7px;
  font-size: 8px;
}

.team-access-empty {
  margin: 0;
  padding: 20px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.team-audit-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.team-audit-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px;
  cursor: pointer;
  list-style: none;
}

.team-audit-panel summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.team-audit-panel summary svg {
  width: 15px;
  color: var(--teal);
}

.team-audit-panel summary small {
  color: var(--muted);
  font-size: 9px;
}

.team-access-events {
  display: grid;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.team-access-event {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.team-access-event:last-child {
  border-bottom: 0;
}

.team-access-event > span {
  color: var(--teal);
}

.team-access-event svg {
  width: 15px;
}

.team-access-event div {
  display: grid;
  gap: 3px;
}

.team-access-event strong {
  font-size: 10px;
}

.team-access-event small,
.team-access-event p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.team-access-event code {
  color: #78868a;
  font-size: 8px;
}

.team-member-dialog {
  width: min(520px, calc(100vw - 32px));
}

.team-member-fields {
  display: grid;
  gap: 14px;
}

.team-member-actions {
  justify-content: space-between;
}

@media (max-width: 820px) {
  .team-access-shell {
    padding: 18px;
  }

  .team-access-layout {
    grid-template-columns: 1fr;
  }

  .team-invite-panel {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .team-member-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .team-role-badge,
  .team-member-row > .team-member-status {
    display: none;
  }
}

@media (max-width: 520px) {
  .team-access-dialog {
    width: calc(100vw - 16px);
  }

  .team-access-summary span {
    padding-inline: 10px;
  }

  .team-access-summary strong {
    font-size: 18px;
  }

  .invite-history-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .invite-history-row > .team-member-status {
    display: none;
  }

  .invite-cancel-button {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .team-member-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.books-workspace,
.book-workspace {
  max-width: 1660px;
  margin: 0 auto;
}

.books-header,
.book-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.books-header h1,
.book-strip h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 600;
}

.books-header p:not(.eyebrow) {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.book-summary,
.candidate-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.book-summary > div,
.candidate-metrics > div {
  display: grid;
  gap: 4px;
  padding: 16px 22px;
  border-right: 1px solid var(--line);
}

.book-summary > div:last-child,
.candidate-metrics > div:last-child {
  border-right: 0;
}

.book-summary span,
.candidate-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.book-summary strong,
.candidate-metrics strong {
  font-size: 21px;
}

.books-table-section {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.books-table {
  min-height: 280px;
}

.book-row {
  display: grid;
  width: 100%;
  min-height: 72px;
  grid-template-columns: minmax(260px, 1.6fr) minmax(130px, .7fr) minmax(150px, .75fr) 120px 24px;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: white;
  text-align: left;
}

.book-row:hover {
  background: #f8fbfa;
}

.book-row:first-child {
  border-top: 0;
}

.book-row-title strong,
.book-row-title span {
  display: block;
}

.book-row-title strong {
  font-size: 13px;
}

.book-row-title span,
.book-row-meta,
.book-row-time {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.book-row-summary {
  display: flex;
  gap: 10px;
  font-size: 11px;
}

.book-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.book-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #718087;
}

.book-status-dot.is-running { background: var(--gold); }
.book-status-dot.is-review { background: var(--coral); }
.book-status-dot.is-ready { background: var(--green); }
.book-status-dot.is-failed { background: #a22d2d; }

.book-strip {
  justify-content: flex-start;
}

.book-strip-copy {
  min-width: 0;
  flex: 1;
}

.book-strip-copy h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ingestion-progress {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.ingestion-progress strong,
.ingestion-progress span {
  display: block;
}

.ingestion-progress span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.candidate-editor {
  display: grid;
  min-height: calc(100vh - 235px);
  grid-template-columns: 270px minmax(520px, 1fr) 270px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.candidate-list-panel,
.candidate-inspector {
  min-width: 0;
  background: #fbfcfc;
}

.candidate-list-panel { border-right: 1px solid var(--line); }
.candidate-inspector { border-left: 1px solid var(--line); }

.candidate-panel-heading {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.candidate-panel-heading h2 {
  margin: 0;
  font-size: 14px;
}

.candidate-filters,
.canvas-mode {
  display: flex;
  gap: 3px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.candidate-filter {
  min-height: 30px;
  flex: 1;
  padding: 0 8px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.candidate-filter.is-active {
  border-color: var(--line-dark);
  color: var(--ink);
  background: white;
}

.candidate-list {
  max-height: calc(100vh - 340px);
  overflow: auto;
}

.candidate-row {
  display: grid;
  width: 100%;
  grid-template-columns: 22px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e6ebeb;
  color: var(--ink);
  background: white;
  text-align: left;
}

.candidate-row:hover,
.candidate-row.is-active { background: var(--teal-soft); }

.candidate-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.candidate-thumb {
  width: 36px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
}

.candidate-row-copy strong,
.candidate-row-copy span { display: block; }
.candidate-row-copy strong { font-size: 11px; }
.candidate-row-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.candidate-answer-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 5px;
  border: 1px solid #b8d7d1;
  border-radius: 3px;
  color: #086c5d;
  background: #f1f8f6;
  font-size: 8px;
  font-weight: 800;
}

.candidate-answer-chip.is-conflict { border-color: #dec17f; color: #8b5d00; background: #fff8e8; }

.candidate-state-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.candidate-state-mark.is-approved { background: var(--green); }
.candidate-state-mark.is-auto { background: var(--teal); }
.candidate-state-mark.is-sample {
  background: white;
  box-shadow: 0 0 0 2px var(--gold);
}
.candidate-state-mark.is-rejected { background: var(--coral); }

.candidate-filter {
  white-space: nowrap;
}

.candidate-filters {
  overflow-x: auto;
}

.candidate-canvas-panel {
  min-width: 0;
  overflow: hidden;
  background: #eef1f0;
}

.canvas-mode {
  padding: 0;
  border: 0;
}

.canvas-mode-button {
  display: inline-flex;
  width: auto;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: white;
  font-size: 10px;
  font-weight: 700;
}

.canvas-mode-button svg { width: 15px; height: 15px; }
.canvas-mode-button.is-active { color: white; border-color: var(--teal); background: var(--teal); }

.candidate-page-stage,
.candidate-crop-stage {
  position: relative;
  height: calc(100vh - 305px);
  min-height: 520px;
  overflow: auto;
  padding: 22px;
}

.candidate-page-stage {
  padding-top: 12px;
  scroll-behavior: smooth;
}

.candidate-page-stage img {
  display: block;
  width: min(100%, 920px);
  height: auto;
  margin: 12px auto 28px;
  background: white;
  box-shadow: 0 8px 24px rgba(25, 42, 48, 0.12);
}

.candidate-crop-stage {
  display: grid;
  place-items: center;
}

.candidate-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: white;
  box-shadow: 0 8px 24px rgba(25, 42, 48, 0.12);
}

.candidate-bbox-overlay {
  position: absolute;
  border: 2px solid var(--coral);
  background: rgba(217, 93, 69, 0.05);
  box-shadow: 0 0 0 9999px rgba(20, 31, 36, 0.22);
  cursor: move;
  touch-action: none;
  z-index: 3;
}

.bbox-caption {
  position: absolute;
  top: -26px;
  left: -2px;
  padding: 4px 7px;
  color: white;
  background: var(--coral);
  font-size: 9px;
  font-weight: 800;
}

.bbox-handle {
  position: absolute;
  z-index: 4;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid var(--coral);
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(24, 36, 45, 0.24);
  touch-action: none;
}

.bbox-handle-top { top: -10px; left: calc(50% - 9px); cursor: ns-resize; }
.bbox-handle-right { top: calc(50% - 9px); right: -10px; cursor: ew-resize; }
.bbox-handle-bottom { bottom: -10px; left: calc(50% - 9px); cursor: ns-resize; }
.bbox-handle-left { top: calc(50% - 9px); left: -10px; cursor: ew-resize; }

.boundary-toolbar {
  position: sticky;
  top: 8px;
  z-index: 7;
  display: flex;
  width: max-content;
  max-width: calc(100% - 20px);
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(24, 36, 45, 0.12);
  font-size: 10px;
}

.boundary-toolbar span,
.boundary-toolbar button { display: inline-flex; align-items: center; gap: 6px; }
.boundary-toolbar svg { width: 14px; height: 14px; }
.boundary-toolbar button { min-height: 28px; padding: 0 8px; border: 1px solid var(--line); color: var(--ink); background: white; }

.candidate-form {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.candidate-form label,
.candidate-form label span { display: grid; gap: 6px; }
.candidate-form label span { color: var(--muted); font-size: 10px; font-weight: 700; }

.candidate-form input,
.candidate-form textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--ink);
  background: white;
}

.candidate-form input { height: 36px; padding: 0 9px; }
.candidate-form textarea { resize: vertical; padding: 9px; }

.editor-note-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.editor-note-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.editor-note-details label {
  margin-top: 12px;
}

.candidate-review-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 16px;
}

.candidate-safety-note {
  display: flex;
  gap: 8px;
  margin: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.candidate-safety-note svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--teal); }

.pdf-dropzone {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed var(--line-dark);
  background: #f8faf9;
  text-align: center;
}

.pdf-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pdf-dropzone span { display: grid; justify-items: center; gap: 7px; }
.pdf-dropzone svg { width: 28px; height: 28px; color: var(--teal); }
.pdf-dropzone small { color: var(--muted); }

.upload-progress-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-size: 9px;
}

.upload-progress-copy strong {
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
}

.upload-progress-track {
  height: 4px;
  overflow: hidden;
  background: var(--line);
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width .2s ease;
}

@media (max-width: 1450px) {
  .candidate-editor { grid-template-columns: 250px minmax(420px, 1fr); }
  .candidate-inspector { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .candidate-form { grid-template-columns: 150px minmax(260px, 1fr) auto; align-items: end; }
  .candidate-review-actions { grid-template-columns: 150px 150px; justify-content: end; }
}

@media (max-width: 900px) {
  .candidate-editor { grid-template-columns: 1fr; }
  .candidate-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .candidate-list { max-height: 280px; }
  .candidate-form { grid-template-columns: 1fr; }
  .book-row { grid-template-columns: minmax(0, 1fr) 130px 24px; }
  .book-row-meta, .book-row-time { display: none; }
}

@media (max-width: 640px) {
  .books-header, .book-strip { align-items: flex-start; flex-wrap: wrap; }
  .book-summary, .candidate-metrics { grid-template-columns: 1fr 1fr; }
  .book-summary > div:nth-child(2), .candidate-metrics > div:nth-child(2) { border-right: 0; }
  .candidate-page-stage, .candidate-crop-stage { min-height: 430px; height: 60vh; padding: 10px; }
  .boundary-toolbar > span { display: none; }
  .book-row { grid-template-columns: minmax(0, 1fr) 24px; }
  .book-row-summary, .book-status { display: none; }
}

/* STEM content operations surfaces */
.books-workspace,
.home-workspace,
.deliveries-workspace {
  max-width: 1660px;
  margin: 0 auto;
}

.operations-status {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: #fffdf8;
}

.operations-status[data-status="critical"] { border-left-color: var(--coral); background: #fffaf8; }
.operations-status[data-status="ready"] { border-left-color: var(--green); background: #f8fcfa; }
.operations-status-copy { display: flex; min-width: 0; align-items: center; gap: 14px; }
.operations-status-copy h2 { margin: 0; font-size: 17px; }
.operations-status-copy p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.operations-risk-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-dark); border-radius: 6px; color: var(--gold); background: white; }
.operations-status[data-status="critical"] .operations-risk-icon { color: var(--coral); border-color: #efc5bc; }
.operations-status[data-status="ready"] .operations-risk-icon { color: var(--green); border-color: #bad9c7; }
.operations-risk-icon svg { width: 21px; height: 21px; }

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 16px;
  padding-top: 16px;
}

.operations-panel { border: 1px solid var(--line); background: white; }
.operations-panel-heading { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.operations-panel-heading h2 { margin: 0; font-size: 15px; }
.exception-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.exception-breakdown-row { display: grid; min-height: 62px; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.exception-breakdown-row:nth-child(2n) { border-right: 0; }
.exception-breakdown-row:nth-last-child(-n + 2) { border-bottom: 0; }
.exception-breakdown-row svg { width: 17px; height: 17px; color: var(--muted); }
.exception-breakdown-row span { color: var(--muted); font-size: 11px; }
.exception-breakdown-row strong { font-size: 18px; }

.operations-economics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.operations-economics > div { display: grid; min-height: 82px; align-content: center; gap: 4px; padding: 12px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.operations-economics > div:nth-child(2n) { border-right: 0; }
.operations-economics > div:nth-last-child(-n + 2) { border-bottom: 0; }
.operations-economics span, .operations-economics small { color: var(--muted); font-size: 9px; }
.operations-economics strong { font-size: 16px; }

.exception-toolbar, .exception-filters { display: flex; align-items: center; gap: 7px; }
.exception-filter, .review-quick-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: white; font-size: 10px; font-weight: 750; }
.exception-filter.is-active { color: white; border-color: var(--ink); background: var(--ink); }
.exception-row { grid-template-columns: 34px minmax(210px, 1.1fr) minmax(250px, 1.4fr) 86px 118px 18px; }
.exception-severity-mark, .delivery-package-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: #f7f9f8; }
.exception-severity-mark svg, .delivery-package-icon svg { width: 16px; height: 16px; }
.exception-row.is-critical .exception-severity-mark { color: var(--coral); border-color: #efc5bc; background: var(--coral-soft); }
.exception-row.is-review .exception-severity-mark { color: var(--gold); border-color: #e3d1a9; background: var(--gold-soft); }
.exception-row.is-processing .exception-severity-mark { color: var(--teal); border-color: #b8d8d3; background: var(--teal-soft); }
.exception-row.is-processing .exception-severity-mark svg { animation: generation-pulse 1.4s ease-in-out infinite; }
.exception-reason { min-width: 0; }
.exception-reason strong, .exception-reason small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exception-reason strong { font-size: 11px; }
.exception-reason small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.exception-severity-label { width: fit-content; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #f8faf9; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.exception-row.is-critical .exception-severity-label { color: var(--coral); border-color: #efc5bc; background: var(--coral-soft); }

.delivery-readiness { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: white; }
.delivery-capability { display: grid; min-height: 82px; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 16px; border-right: 1px solid var(--line); }
.delivery-capability:last-child { border-right: 0; }
.delivery-capability > svg { width: 21px; height: 21px; color: var(--muted); }
.delivery-capability.is-live > svg { color: var(--green); }
.delivery-capability span strong, .delivery-capability span small { display: block; }
.delivery-capability span strong { font-size: 12px; }
.delivery-capability span small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.delivery-capability em { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.delivery-capability.is-live em { color: var(--green); border-color: #bad9c7; background: var(--green-soft); }
.delivery-capability.is-review > svg { color: #9b5d16; }
.delivery-capability.is-review em { color: #7a4a12; border-color: #e9c998; background: #fff8ec; }
.delivery-row { grid-template-columns: 34px minmax(210px, 1fr) minmax(250px, 1.2fr) 104px 92px 18px; }
.delivery-package-icon { color: var(--teal); border-color: #b8d8d3; background: var(--teal-soft); }
.delivery-package-contents strong, .delivery-package-contents small { display: block; }
.delivery-package-contents strong { font-size: 11px; }
.delivery-package-contents small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.delivery-approval { width: fit-content; padding: 5px 7px; border: 1px solid #e3d1a9; border-radius: 4px; color: var(--gold); background: var(--gold-soft); font-size: 9px; font-weight: 800; }
.delivery-approval.is-approved { color: var(--green); border-color: #bad9c7; background: var(--green-soft); }
.delivery-honesty-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 10px; }
.delivery-honesty-note svg { width: 16px; height: 16px; color: var(--gold); }

.package-manifest-section { margin: 18px 0; border: 1px solid var(--line); background: white; }
.package-manifest-section > div:first-child { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.package-manifest-section h3 { margin: 0; font-size: 13px; }
.package-manifest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.package-manifest-row { display: grid; min-height: 52px; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.package-manifest-row:nth-child(2n) { border-right: 0; }
.package-manifest-row:nth-last-child(-n + 2) { border-bottom: 0; }
.package-manifest-row svg { width: 15px; height: 15px; color: var(--muted); }
.package-manifest-row.is-available svg { color: var(--green); }
.package-manifest-row span strong, .package-manifest-row span small { display: block; }
.package-manifest-row span strong { font-size: 10px; }
.package-manifest-row span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.package-manifest-row em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.package-manifest-row.is-available em { color: var(--green); }

.publication-contract-section { margin: 18px 0; border: 1px solid #b7d6d0; background: #fbfefd; }
.publication-contract-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 10px; }
.publication-contract-heading h3 { margin: 0; font-size: 15px; }
.publication-contract-message { margin: 0; padding: 0 16px 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.publication-contract-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.publication-contract-item { min-height: 84px; padding: 12px 13px; border-right: 1px solid var(--line); }
.publication-contract-item:nth-child(3n) { border-right: 0; }
.publication-contract-item:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
.publication-contract-item span, .publication-contract-item strong, .publication-contract-item small { display: block; }
.publication-contract-item span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.publication-contract-item strong { margin-top: 7px; color: var(--ink); font-size: 13px; }
.publication-contract-item small { margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.publication-contract-item.is-ready strong { color: var(--green); }
.publication-contract-item.is-review strong { color: #8a5214; }
.publication-contract-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 16px; }
.publication-contract-actions .button { min-height: 36px; }
.publication-contract-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.publication-contract-note svg { flex: 0 0 auto; width: 14px; height: 14px; }

.visual-compare-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.visual-compare-grid .image-stage { height: 400px; padding: 12px; }
.comparison-video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #101719; }
.delivery-gates-heading { order: 4; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 8px; border-top: 1px solid var(--line); }
.delivery-gates-heading span { font-size: 11px; font-weight: 800; text-transform: uppercase; }
.delivery-gates-heading small { color: var(--muted); font-size: 9px; }
.delivery-preview .assurance-checks { order: 5; }

.step-validation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-validation-summary > div { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 10px 8px; border-right: 1px solid var(--line); }
.step-validation-summary > div:last-child { border-right: 0; }
.step-validation-summary svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--teal); }
.step-validation-summary .needs-attention svg { color: var(--coral); }
.step-validation-summary span, .step-validation-summary strong, .step-validation-summary small { display: block; min-width: 0; }
.step-validation-summary strong { font-size: 11px; }
.step-validation-summary small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-chain { display: grid; gap: 5px; padding: 12px 16px; }
.evidence-chain > div { display: grid; min-width: 0; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 0 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.evidence-chain > div > span { grid-row: 1 / 3; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 9px; font-weight: 800; }
.evidence-chain strong { font-size: 10px; }
.evidence-chain small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-chain > svg { width: 13px; height: 13px; margin: -2px auto; color: var(--line-dark); transform: rotate(90deg); }
.full-evidence-details { border-top: 1px solid var(--line); }
.full-evidence-details summary { padding: 10px 16px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 750; }
.review-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 12px 16px 0; }
.review-quick-actions button { display: inline-flex; min-width: 0; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; }
.review-quick-actions button svg { width: 13px; height: 13px; }

.editor-action-dock { position: sticky; z-index: 12; bottom: 12px; display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 18px; margin: 12px 0 0; padding: 9px 12px; border: 1px solid var(--line-dark); border-radius: 6px; background: rgba(255, 255, 255, .98); box-shadow: 0 8px 28px rgba(24, 36, 45, .14); }
.editor-action-status { display: flex; min-width: 0; align-items: center; gap: 9px; }
.editor-action-status > span:last-child, .editor-action-status strong, .editor-action-status small { display: block; }
.editor-action-status strong { font-size: 11px; }
.editor-action-status small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dock-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.dock-status-dot.is-ready { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.dock-status-dot.is-critical { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.editor-action-buttons { display: flex; align-items: center; gap: 7px; }
.button-quiet { color: var(--muted); border-color: transparent; background: transparent; }

@media (max-width: 1320px) {
  .visual-compare-grid { grid-template-columns: 1fr; }
  .visual-compare-grid .visual-column + .visual-column { border-top: 1px solid var(--line); border-left: 0; }
  .visual-compare-grid .image-stage { height: 360px; }
  .exception-row, .delivery-row { grid-template-columns: 34px minmax(180px, 1fr) minmax(210px, 1.1fr) 94px 18px; }
  .exception-row .production-row-time, .delivery-row .production-row-time { display: none; }
}

@media (max-width: 900px) {
  .operations-grid, .delivery-readiness { grid-template-columns: 1fr; }
  .delivery-capability { border-right: 0; border-bottom: 1px solid var(--line); }
  .delivery-capability:last-child { border-bottom: 0; }
  .exception-row, .delivery-row { grid-template-columns: 34px minmax(0, 1fr) 96px 18px; }
  .exception-reason, .delivery-package-contents { display: none; }
  .editor-action-dock { align-items: stretch; flex-direction: column; }
  .editor-action-buttons { display: grid; grid-template-columns: repeat(2, 1fr); }
  .step-inspector { grid-template-columns: 1fr; }
  .step-inspector-heading, .step-inspector-claim, .step-validation-summary, .evidence-chain, .full-evidence-details { grid-column: 1; }
}

@media (max-width: 640px) {
  .operations-status { align-items: stretch; flex-direction: column; }
  .operations-summary, .exception-summary, .delivery-summary { grid-template-columns: 1fr 1fr; }
  .operations-grid { padding-top: 10px; }
  .exception-breakdown, .operations-economics { grid-template-columns: 1fr; }
  .exception-breakdown-row, .operations-economics > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .exception-breakdown-row:nth-last-child(-n + 2), .operations-economics > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .exception-breakdown-row:last-child, .operations-economics > div:last-child { border-bottom: 0; }
  .production-table-heading, .exception-toolbar { align-items: stretch; flex-direction: column; }
  .exception-filters { overflow-x: auto; }
  .exception-row, .delivery-row { grid-template-columns: 32px minmax(0, 1fr) 18px; gap: 10px; }
  .exception-severity-label, .delivery-approval { display: none; }
  .visual-compare-grid .image-stage { height: 300px; }
  .step-validation-summary { grid-template-columns: 1fr; }
  .step-validation-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .step-validation-summary > div:last-child { border-bottom: 0; }
  .review-quick-actions { grid-template-columns: repeat(2, 1fr); }
  .editor-action-buttons { grid-template-columns: 1fr 1fr; }
  .editor-action-buttons .button { min-width: 0; padding: 0 8px; font-size: 9px; }
  .package-manifest { grid-template-columns: 1fr; }
  .package-manifest-row, .package-manifest-row:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .package-manifest-row:last-child { border-bottom: 0; }
  .publication-contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-contract-item,
  .publication-contract-item:nth-child(3n),
  .publication-contract-item:nth-child(-n + 3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .publication-contract-item:nth-child(2n) { border-right: 0; }
  .publication-contract-item:nth-last-child(-n + 2) { border-bottom: 0; }
}

/* Split workflow: source editing and solution/video approval */
.operations-status-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.workflow-lane-card {
  box-shadow: inset 3px 0 0 var(--teal);
}

.candidate-auto-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 11px 12px;
  border: 1px solid #b8d7c5;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
}

.candidate-auto-check > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.candidate-auto-check span,
.candidate-auto-check strong,
.candidate-auto-check small {
  display: block;
}

.candidate-auto-check strong {
  color: var(--ink);
  font-size: 10px;
}

.candidate-auto-check small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.candidate-advanced-tools {
  margin: 4px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
}

.candidate-advanced-tools > summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  list-style: none;
}

.candidate-advanced-tools > summary::-webkit-details-marker { display: none; }
.candidate-advanced-tools > summary svg { width: 15px; height: 15px; }
.candidate-advanced-tools[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.candidate-advanced-tools .candidate-evidence { margin: 0; border: 0; border-bottom: 1px solid var(--line); }
.candidate-advanced-tools .candidate-structure-actions { padding: 10px; }

.question-strip > .icon-button {
  flex: 0 0 auto;
}

.review-evidence-details {
  border-top: 1px solid var(--line);
  background: white;
}

.review-evidence-details > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.review-evidence-details > summary::-webkit-details-marker { display: none; }
.review-evidence-details > summary > svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--teal); }
.review-evidence-details > summary span,
.review-evidence-details > summary strong,
.review-evidence-details > summary small { display: block; }
.review-evidence-details > summary strong { color: var(--ink); font-size: 11px; }
.review-evidence-details > summary small { margin-top: 3px; font-size: 9px; }
.review-evidence-details[open] > summary { border-bottom: 1px solid var(--line); background: #f8faf9; }

.value-workspace-grid .review-rail {
  display: flex;
  flex-direction: column;
}

.value-workspace-grid .decision-overview { order: 1; }
.value-workspace-grid .answer-band { order: 2; }
.value-workspace-grid .review-form { order: 3; }
.value-workspace-grid .generation-panel { order: 4; }
.value-workspace-grid .step-evidence-details { order: 5; }
.value-workspace-grid .review-quick-actions { grid-template-columns: repeat(3, 1fr); }
.step-evidence-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
}

.step-evidence-details > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.step-evidence-details > summary::-webkit-details-marker { display: none; }
.step-evidence-details > summary > svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--teal); }
.step-evidence-details > summary span,
.step-evidence-details > summary strong,
.step-evidence-details > summary small { display: block; }
.step-evidence-details > summary strong { color: var(--ink); font-size: 10px; }
.step-evidence-details > summary small { margin-top: 3px; font-size: 9px; }
.step-evidence-details[open] > summary { border-bottom: 1px solid var(--line); background: #f8faf9; }
.step-evidence-details .step-inspector { margin: 0; border: 0; }

.editor-action-dock {
  display: none;
}

@media (max-width: 900px) {
  .operations-status-actions { width: 100%; }
  .operations-status-actions .button { flex: 1; }
  .question-strip { align-items: flex-start; }
  .question-heading { flex: 1; }
  .question-status { width: 100%; }
}

@media (max-width: 640px) {
  .operations-status-actions { display: grid; grid-template-columns: 1fr; }
  .question-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .question-status { grid-column: 1 / -1; justify-content: flex-start; }
  .question-heading h1 { white-space: normal; }
  .value-workspace-grid .review-quick-actions { grid-template-columns: 1fr; }
  .candidate-auto-check { margin: 10px 12px 0; }
  .candidate-advanced-tools { margin-right: 12px; margin-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Book-centered B2B workspace */
.books-header {
  min-height: 88px;
  padding: 16px 22px;
}

.books-header h1,
.book-strip h1 {
  font-family: inherit;
  font-size: 20px;
  font-weight: 780;
}

.books-header p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 5px;
  font-size: 11px;
}

.book-table-tools,
.compact-search {
  display: flex;
  align-items: center;
}

.book-table-tools { gap: 7px; }

.compact-search {
  width: 220px;
  height: 34px;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--muted);
  background: white;
}

.compact-search svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.compact-search input {
  min-width: 0;
  width: 100%;
  height: 30px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 10px;
}

.book-table-head,
.book-row {
  grid-template-columns: minmax(260px, 1.5fr) minmax(120px, .65fr) minmax(170px, .8fr) minmax(110px, .55fr) 130px 22px;
}

.book-table-head {
  display: grid;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f7f9f8;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.book-row { min-height: 78px; border-top: 0; border-bottom: 1px solid var(--line); }
.book-row:last-child { border-bottom: 0; }
.book-row-meta strong,
.book-row-meta small,
.book-row-progress strong,
.book-row-progress small,
.book-row-attention strong,
.book-row-attention small { display: block; }
.book-row-meta strong { color: var(--ink); font-size: 10px; }
.book-row-meta small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.book-row-progress {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(70px, 1fr);
  align-items: center;
  gap: 9px;
}

.book-row-progress strong { font-size: 12px; }
.book-row-progress small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.book-row-progress i { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: #e1e7e5; }
.book-row-progress b { display: block; height: 100%; border-radius: inherit; background: var(--teal); }

.book-row-attention {
  padding-left: 10px;
  border-left: 2px solid var(--line);
}
.book-row-attention strong { font-size: 13px; }
.book-row-attention small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.book-row-attention.has-work { border-left-color: var(--coral); }
.book-row-attention.has-work strong { color: var(--coral); }

.book-strip {
  min-height: 72px;
  padding: 12px 18px;
}

.book-tabs {
  display: flex;
  min-height: 44px;
  align-items: stretch;
  gap: 2px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.book-tab {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.book-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: transparent;
  content: '';
}
.book-tab svg { width: 15px; height: 15px; }
.book-tab.is-active { color: var(--teal); }
.book-tab.is-active::after { background: var(--teal); }

.book-tab-panel { padding: 14px 18px 24px; }
.book-content-panel { padding: 0; }
#bookContentPanel { padding: 0; }

.book-readiness-band {
  display: grid;
  grid-template-columns: minmax(280px, 1.45fr) repeat(4, minmax(130px, .7fr));
  border: 1px solid var(--line);
  background: white;
}

.book-readiness-band > div {
  display: grid;
  min-width: 0;
  min-height: 94px;
  align-content: center;
  gap: 4px;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}
.book-readiness-band > div:last-child { border-right: 0; }
.book-readiness-band small,
.book-readiness-band em { color: var(--muted); font-size: 8px; font-style: normal; }
.book-readiness-band > div > strong { font-size: 20px; }
.book-readiness-primary { grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 12px !important; }
.book-readiness-primary > span:last-child strong,
.book-readiness-primary > span:last-child small,
.book-readiness-primary > span:last-child em { display: block; }
.book-readiness-primary > span:last-child strong { margin-top: 4px; font-size: 13px; }
.book-readiness-primary > span:last-child em { margin-top: 4px; }

.readiness-ring {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--readiness), #e1e8e6 0);
}
.readiness-ring::before { grid-area: 1 / 1; width: 44px; height: 44px; border-radius: 50%; background: white; content: ''; }
.readiness-ring strong { z-index: 1; grid-area: 1 / 1; font-size: 12px; }

.book-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  gap: 12px;
  margin-top: 12px;
}

.book-control-panel { border: 1px solid var(--line); background: white; }
.book-control-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.book-control-heading h2 { margin: 0; font-size: 14px; }

.book-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 14px;
}
.book-workflow-step { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--muted); text-align: center; }
.book-workflow-step::after { position: absolute; top: 16px; left: calc(50% + 20px); width: calc(100% - 40px); height: 1px; background: var(--line-dark); content: ''; }
.book-workflow-step:last-child::after { display: none; }
.book-workflow-step > span { z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; background: white; }
.book-workflow-step svg { width: 15px; height: 15px; }
.book-workflow-step strong,
.book-workflow-step small { display: block; }
.book-workflow-step strong { color: var(--ink); font-size: 9px; }
.book-workflow-step small { margin-top: 3px; font-size: 8px; }
.book-workflow-step.is-complete > span { color: white; border-color: var(--green); background: var(--green); }
.book-workflow-step.is-current > span { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }

.book-next-action { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 15px; }
.book-next-action > svg { width: 38px; height: 38px; padding: 8px; border: 1px solid #b8d8d3; border-radius: 6px; color: var(--teal); background: var(--teal-soft); }
.book-next-action strong { font-size: 12px; }
.book-next-action p { margin: 5px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.book-next-action .button { min-height: 34px; }

.book-source-record { margin-top: 12px; }
.book-source-record-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.book-source-record-grid > div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.book-source-record-grid > div:last-child { border-right: 0; }
.book-source-record-grid small,
.book-source-record-grid strong,
.book-source-record-grid span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-source-record-grid small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.book-source-record-grid strong { margin-top: 6px; font-size: 10px; }
.book-source-record-grid span { margin-top: 4px; color: var(--muted); font-size: 8px; }

.book-report-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) repeat(3, minmax(150px, .7fr));
  border: 1px solid var(--line);
  background: white;
}
.book-report-lead,
.book-report-metric,
.book-report-action { min-height: 132px; padding: 17px; border-right: 1px solid var(--line); }
.book-report-lead h2 { margin: 4px 0 7px; font-size: 16px; }
.book-report-lead p:last-child { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.book-report-metric { display: flex; align-items: center; gap: 11px; }
.book-report-metric > svg { width: 26px; height: 26px; color: var(--muted); }
.book-report-metric small,
.book-report-metric strong,
.book-report-metric em { display: block; }
.book-report-metric small { color: var(--muted); font-size: 8px; }
.book-report-metric strong { margin-top: 5px; font-size: 18px; }
.book-report-metric em { margin-top: 4px; color: var(--muted); font-size: 8px; font-style: normal; }
.book-report-metric.is-ready > svg,
.book-report-metric.is-ready strong { color: var(--green); }
.book-report-metric.is-warning > svg,
.book-report-metric.is-warning strong { color: var(--coral); }
.book-report-action { grid-column: 1 / -1; display: flex; min-height: 64px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); border-right: 0; }

.book-activity-list { border: 1px solid var(--line); background: white; }
.book-activity-row { display: grid; min-height: 54px; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.book-activity-row:last-child { border-bottom: 0; }
.book-activity-row strong,
.book-activity-row small { display: block; }
.book-activity-row strong { font-size: 10px; }
.book-activity-row small,
.book-activity-row time { margin-top: 3px; color: var(--muted); font-size: 8px; }

.candidate-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px 32px;
  gap: 5px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f8;
}
.candidate-list-tools .compact-search { width: 100%; height: 32px; }
.candidate-list-empty { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 6px; padding: 20px; color: var(--muted); text-align: center; }
.candidate-list-empty svg { width: 24px; height: 24px; }
.candidate-list-empty strong { color: var(--ink); font-size: 10px; }
.candidate-list-empty span { font-size: 8px; }

.candidate-form select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--ink);
  background: white;
  font-size: 10px;
}

.candidate-bulk-dock {
  position: sticky;
  z-index: 18;
  bottom: 10px;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 18px;
  padding: 8px 10px 8px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 30px rgba(24, 36, 45, .16);
}
.candidate-bulk-dock > div { display: flex; min-width: 0; align-items: center; gap: 9px; }
.candidate-bulk-dock strong,
.candidate-bulk-dock small { display: block; }
.candidate-bulk-dock strong { font-size: 10px; }
.candidate-bulk-dock small { margin-top: 3px; color: var(--muted); font-size: 8px; }

@media (max-width: 1200px) {
  .book-readiness-band { grid-template-columns: minmax(250px, 1.2fr) repeat(2, minmax(130px, 1fr)); }
  .book-readiness-band > div:nth-child(3) { border-right: 0; }
  .book-readiness-band > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .book-source-record-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-source-record-grid > div:nth-child(3) { border-right: 0; }
  .book-source-record-grid > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .book-report-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-report-lead { grid-column: 1 / -1; min-height: 100px; border-bottom: 1px solid var(--line); border-right: 0; }
}

@media (max-width: 900px) {
  .book-table-head { display: none; }
  .book-row { grid-template-columns: minmax(0, 1fr) minmax(120px, .7fr) 24px; }
  .book-row-meta,
  .book-row-attention,
  .book-status { display: none; }
  .book-tabs { overflow-x: auto; }
  .book-tab { flex: 0 0 auto; }
  .book-control-grid { grid-template-columns: 1fr; }
  .book-source-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-source-record-grid > div,
  .book-source-record-grid > div:nth-child(3) { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .book-source-record-grid > div:nth-child(2n) { border-right: 0; }
  .book-source-record-grid > div:nth-child(-n + 2) { border-top: 0; }
}

@media (max-width: 640px) {
  .books-header { align-items: stretch; }
  .books-header .button { width: 100%; }
  .book-table-tools { width: 100%; }
  .book-table-tools .compact-search { flex: 1; width: auto; }
  .book-row { grid-template-columns: minmax(0, 1fr) 24px; }
  .book-row-progress { display: none; }
  .book-tabs { padding: 0 8px; }
  .book-tab-panel { padding: 10px; }
  #bookContentPanel { padding: 0; }
  .book-readiness-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-readiness-band > div { min-height: 78px; border-top: 1px solid var(--line); }
  .book-readiness-band > div:nth-child(2n + 1) { border-right: 1px solid var(--line); }
  .book-readiness-band > div:nth-child(2n) { border-right: 0; }
  .book-readiness-primary { grid-column: 1 / -1; border-top: 0 !important; }
  .book-workflow { grid-template-columns: 1fr; gap: 7px; }
  .book-workflow-step { grid-template-columns: 32px minmax(0, 1fr); align-items: center; justify-items: start; text-align: left; }
  .book-workflow-step::after { top: 32px; left: 16px; width: 1px; height: 10px; }
  .book-source-record-grid,
  .book-report-grid { grid-template-columns: 1fr; }
  .book-source-record-grid > div,
  .book-source-record-grid > div:nth-child(3),
  .book-source-record-grid > div:nth-child(2n) { border-right: 0; border-top: 1px solid var(--line); }
  .book-source-record-grid > div:first-child { border-top: 0; }
  .book-report-lead,
  .book-report-metric { grid-column: auto; min-height: 96px; border-right: 0; border-bottom: 1px solid var(--line); }
  .candidate-bulk-dock { position: fixed; right: 8px; bottom: 8px; left: 8px; margin: 0; align-items: stretch; flex-direction: column; }
  .candidate-bulk-dock > div:last-child { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .candidate-bulk-dock .button { min-width: 0; }
}

/* Focused publisher workflow: book -> review -> bulk video */
.books-workspace {
  display: flex;
  flex-direction: column;
}

.books-workspace .books-header { order: 1; }
.books-workspace .assurance-flow { order: 2; }
.books-workspace .operations-status { order: 3; margin-top: 12px; }
.books-workspace .books-table-section { order: 4; margin-top: 14px; }
.books-workspace .operations-summary { order: 5; margin-top: 12px; border: 1px solid var(--line); }
.books-workspace .operations-grid { order: 6; margin-top: 10px; }

.assurance-flow {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) repeat(4, minmax(150px, 1fr));
  min-height: 78px;
  border: 1px solid var(--line);
  background: white;
}

.assurance-flow-heading,
.assurance-flow-step {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.assurance-flow-heading {
  display: grid;
  align-content: center;
}

.assurance-flow-heading strong {
  font-size: 12px;
}

.assurance-flow-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.assurance-flow-step:last-child { border-right: 0; }

.assurance-flow-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: #f8faf9;
}

.assurance-flow-step svg { width: 15px; height: 15px; }
.assurance-flow-step small,
.assurance-flow-step strong,
.assurance-flow-step em { display: block; }
.assurance-flow-step small { font-size: 7px; font-weight: 850; text-transform: uppercase; }
.assurance-flow-step strong { margin-top: 3px; color: var(--ink); font-size: 9px; }
.assurance-flow-step em { margin-top: 3px; font-size: 8px; font-style: normal; }
.assurance-flow-step.is-complete > span { color: white; border-color: var(--green); background: var(--green); }
.assurance-flow-step.is-complete em { color: var(--green); }
.assurance-flow-step.is-current > span { color: var(--gold); border-color: #d8b77c; background: var(--gold-soft); }
.assurance-flow-step.is-current em { color: var(--gold); }

.book-workspace:not(.is-bulk-mode) .candidate-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
}

@media (max-width: 1200px) {
  .assurance-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .assurance-flow-heading {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .assurance-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assurance-flow-step:nth-child(3),
  .assurance-flow-step:last-child { border-right: 0; }
  .assurance-flow-step:nth-child(2),
  .assurance-flow-step:nth-child(3) { border-bottom: 1px solid var(--line); }
}

/* Book editor: source review, explicit video selection, and in-book playback. */
.book-tabs {
  gap: 22px;
}

.book-tab {
  gap: 7px;
  min-width: 118px;
  justify-content: center;
}

.tab-count {
  min-width: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.book-tab.is-active .tab-count {
  border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, white);
}

.candidate-progress-strip {
  min-height: 66px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
}

.candidate-progress-strip > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 15px 12px;
}

.candidate-progress-strip > div strong {
  margin: 0;
  font-size: 18px;
}

.candidate-progress-strip > div span {
  font-size: 9px;
  color: var(--muted);
}

.book-workspace:not(.is-bulk-mode) .candidate-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.candidate-auto-check {
  border-color: var(--line);
  background: #fff;
}

.candidate-auto-check > svg {
  color: var(--teal);
}

.candidate-auto-check strong {
  color: var(--ink);
}

.candidate-advanced-tools {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.candidate-review-actions {
  padding-top: 4px;
}

.candidate-review-actions .button {
  min-height: 44px;
}

.book-video-library {
  border: 1px solid var(--line);
  background: #fff;
}

.book-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.book-video-header h2 {
  margin: 4px 0 3px;
  font-size: 18px;
}

.book-video-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.book-video-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.book-video-list {
  display: grid;
}

.book-video-row {
  display: grid;
  grid-template-columns: 150px 170px minmax(300px, 1fr);
  min-height: 190px;
  border-bottom: 1px solid var(--line);
}

.book-video-row:last-child {
  border-bottom: 0;
}

.book-video-source {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f7f9f8;
}

.book-video-source img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  background: #fff;
}

.book-video-source span {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  font-size: 8px;
  font-weight: 700;
}

.book-video-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.book-video-copy strong {
  font-size: 14px;
}

.book-video-copy span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.book-video-copy small {
  color: var(--muted);
  font-size: 8px;
}

.book-video-player {
  min-width: 0;
  min-height: 190px;
  background: #101414;
}

.book-video-player video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #101414;
}

.book-video-state {
  display: flex;
  height: 100%;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: #dce4e1;
}

.book-video-state svg {
  width: 26px;
  height: 26px;
  color: #5fc9b5;
}

.book-video-state span {
  color: #9daba7;
  font-size: 9px;
}

.book-video-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.book-video-empty svg {
  width: 32px;
  height: 32px;
}

.book-video-empty strong {
  color: var(--ink);
}

.generation-confirm-summary {
  display: block;
}

/* Final responsive contract. Keep this after every desktop layout override. */
@media (max-width: 820px) {
  .app-main,
  .workspace,
  .home-workspace,
  .book-workspace,
  .book-tab-panel,
  .candidate-editor,
  .candidate-list-panel,
  .candidate-canvas-panel,
  .candidate-inspector {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .app-main {
    overflow-x: hidden;
  }

  .candidate-editor,
  .book-workspace:not(.is-bulk-mode) .candidate-editor,
  .book-workspace.is-bulk-mode .candidate-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .candidate-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .candidate-inspector {
    position: static;
    grid-column: 1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .candidate-canvas-panel .candidate-panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    width: 100%;
    height: auto;
    min-height: 430px;
    overflow: hidden;
  }

  .production-header,
  .production-header > div {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .production-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .production-header h1 {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

/* Library V4: lazy source assets and a scalable video inventory. */
.candidate-thumb.is-loading,
.candidate-crop-stage img.is-loading,
.candidate-page-stage img.is-loading,
img[data-candidate-asset].is-loading {
  opacity: 0;
}

.candidate-crop-stage:has(img.is-loading)::after,
.candidate-page-stage:has(img.is-loading)::after {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 9px 12px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .92);
  content: "Kaynak görsel yükleniyor";
  font-size: 10px;
  font-weight: 750;
}

.candidate-crop-stage img,
.candidate-page-stage img,
.candidate-thumb {
  transition: opacity .16s ease;
}

.book-video-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.book-video-toolbar .compact-search {
  margin: 0;
}

.book-video-filters {
  display: flex;
  min-width: 0;
  gap: 3px;
  overflow-x: auto;
}

.book-video-filters button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #58686d;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.book-video-filters button:hover {
  color: var(--ink);
  background: #f3f6f5;
}

.book-video-filters button.is-active {
  color: var(--teal);
  border-color: #bddbd5;
  background: var(--teal-soft);
}

.book-video-result-count {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.book-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.book-video-card {
  min-width: 0;
  background: #fff;
  outline: none;
  transition: box-shadow 160ms ease, background 160ms ease;
}

.book-video-card:hover,
.book-video-card:focus-visible {
  position: relative;
  z-index: 1;
  background: #fbfdfc;
  box-shadow: inset 0 0 0 2px #8bc5ba;
}

.book-video-card.is-version-revision,
.book-video-card.is-version-outdated {
  box-shadow: inset 3px 0 0 var(--coral);
}

.book-video-card.is-version-source-hold,
.book-file-row.is-version-source-hold {
  box-shadow: inset 3px 0 0 #c49732;
}

.book-video-card.is-version-release {
  box-shadow: inset 3px 0 0 var(--green);
}

.book-video-poster {
  position: relative;
  display: grid;
  width: 100%;
  height: 150px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #edf1ef;
}

.book-video-poster img {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  background: #f5f7f6;
}

.book-video-poster > span {
  position: absolute;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 50%;
  color: #fff;
  background: rgba(13, 32, 38, .82);
  box-shadow: 0 8px 20px rgba(13, 32, 38, .18);
}

.book-video-poster > span svg {
  width: 16px;
  height: 16px;
}

.book-video-poster:hover > span {
  background: var(--teal);
}

.book-video-card-copy {
  display: grid;
  min-height: 146px;
  align-content: start;
  gap: 5px;
  padding: 13px 14px;
}

.book-video-card-copy > strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.book-video-card-copy > span {
  overflow: hidden;
  color: #44565c;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-video-card-copy > small {
  color: var(--muted);
  font-size: 8px;
}

.book-video-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
}

.book-video-card-actions .button {
  min-height: 34px;
  margin-right: auto;
}

.book-video-card-actions .icon-button {
  width: 34px;
  height: 34px;
}

.book-video-pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.book-video-pagination > span,
.book-video-pagination strong,
.book-video-pagination small {
  display: block;
  text-align: center;
}

.book-video-pagination strong {
  font-size: 10px;
}

.book-video-pagination small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.book-video-preview-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.book-video-preview-shell {
  padding: 20px;
}

.book-video-preview-body {
  display: grid;
  min-height: 420px;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.book-video-preview-body > .book-video-loading {
  grid-column: 1 / -1;
  min-height: 420px;
}

.video-preview-player {
  display: grid;
  min-width: 0;
  min-height: 420px;
  place-items: center;
  background: #111;
}

.video-preview-player video {
  width: 100%;
  max-height: min(68dvh, 680px);
  background: #111;
}

.video-preview-details {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  background: #fff;
}

.video-preview-files {
  display: grid;
  gap: 6px;
}

.video-preview-files .button {
  justify-content: flex-start;
}

.video-lineage-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d9e4e1;
  border-radius: 6px;
  background: #f7faf9;
}

.video-lineage-summary > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--teal);
}

.video-lineage-summary strong,
.video-lineage-summary small {
  display: block;
}

.video-lineage-summary strong {
  color: var(--ink);
  font-size: 10px;
}

.video-lineage-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.video-preview-decision-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.video-preview-decision-actions:empty {
  display: none;
}

.video-preview-decision-actions .button {
  min-width: 0;
}

@media (max-width: 1060px) {
  .book-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-video-toolbar {
    grid-template-columns: minmax(200px, 1fr) auto;
  }

  .book-video-filters {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 700px) {
  .book-video-grid,
  .book-video-preview-body {
    grid-template-columns: 1fr;
  }

  .book-video-toolbar {
    grid-template-columns: 1fr;
  }

  .book-video-result-count {
    display: none;
  }

  .book-video-preview-dialog {
    width: calc(100vw - 20px);
  }

  .video-preview-player,
  .book-video-preview-body {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 12px;
  }

  .book-strip {
    display: grid;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .book-strip > .badge,
  .book-strip > .button {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    justify-content: center;
  }

  #bookSendToVideoLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .book-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .book-tab {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 7px;
  }

  .candidate-approval-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    min-height: 380px;
  }

  .home-workspace .production-header h1 {
    font-size: 25px;
  }

  .home-workspace .production-header .button {
    width: 100%;
  }

  .production-table-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .exception-toolbar {
    width: 100%;
    align-items: stretch;
  }

  .exception-filters {
    display: grid;
    min-width: 0;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .standalone-question-row {
    width: 100%;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 12px;
  }

  .standalone-question-state,
  .standalone-question-assets {
    grid-column: 2;
  }

  .standalone-question-copy strong,
  .standalone-question-state strong {
    white-space: normal;
  }
}

/* Mobile publisher flow: list -> source -> decision, without horizontal spill. */
@media (max-width: 820px) {
  .app-shell,
  .app-main,
  .workspace,
  .book-workspace,
  .book-tab-panel,
  .candidate-editor,
  .candidate-list-panel,
  .candidate-canvas-panel,
  .candidate-inspector,
  .home-workspace,
  .production-header > div,
  .production-table-section {
    min-width: 0;
    max-width: 100%;
  }

  .candidate-editor,
  .book-workspace:not(.is-bulk-mode) .candidate-editor,
  .book-workspace.is-bulk-mode .candidate-editor {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .candidate-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .candidate-inspector {
    grid-column: 1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .candidate-list {
    max-height: 260px;
  }

  .candidate-canvas-panel .candidate-panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    width: 100%;
    height: auto;
    min-height: 430px;
    overflow: hidden;
  }

  .candidate-crop-stage img,
  .candidate-page-stage img {
    max-width: 100%;
  }

  .production-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 18px 0 24px;
  }

  .production-header h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.08;
  }

  .production-table-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .exception-toolbar {
    width: 100%;
    align-items: stretch;
    gap: 8px;
  }

  .exception-filters {
    display: grid;
    min-width: 0;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .exception-filter {
    min-width: 0;
    padding-inline: 6px;
  }

  #homeRefreshButton {
    flex: 0 0 36px;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 12px;
  }

  .book-strip {
    display: grid;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .book-strip-copy h1 {
    max-width: 100%;
  }

  .book-strip > .badge,
  .book-strip > .button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .book-strip > .button {
    min-width: 0;
    justify-content: center;
  }

  #bookSendToVideoLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .book-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .book-tab {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 7px;
  }

  .candidate-approval-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    min-height: 380px;
  }

  .home-workspace .production-header h1 {
    font-size: 25px;
  }

  .home-workspace .production-header .button {
    width: 100%;
  }

  .home-workspace .production-summary {
    width: 100%;
  }

  .standalone-question-row {
    width: 100%;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 12px;
  }

  .standalone-question-state,
  .standalone-question-assets {
    grid-column: 2;
  }

  .standalone-question-copy strong,
  .standalone-question-state strong {
    white-space: normal;
  }
}

/* Publisher library V2: books own their questions, videos, and files. */
.sidebar #deliveriesNavButton,
.sidebar .production-browser {
  display: none !important;
}

.sidebar-nav {
  gap: 5px;
}

.nav-item {
  min-height: 46px;
  border-radius: 6px;
}

.books-workspace {
  width: min(1380px, 100%);
  margin: 0 auto;
}

.books-workspace .assurance-flow,
.books-workspace .operations-status,
.books-workspace .operations-summary,
.books-workspace .operations-grid {
  display: none !important;
}

.books-workspace .books-table-section {
  order: 2;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(25, 42, 48, .06);
}

.books-header {
  min-height: 104px;
  padding: 20px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.books-header h1 {
  font-size: 26px;
}

.books-header p:not(.eyebrow) {
  max-width: 620px;
  font-size: 12px;
  line-height: 1.55;
}

.book-table-head {
  display: none;
}

.books-table {
  display: grid;
  gap: 0;
}

.book-row {
  min-height: 88px;
  grid-template-columns: minmax(260px, 1.6fr) minmax(110px, .55fr) minmax(170px, .75fr) minmax(100px, .45fr) 120px 22px;
  gap: 18px;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.book-row:hover {
  z-index: 1;
  background: #f7faf9;
  box-shadow: inset 3px 0 0 var(--teal);
}

.book-row-title strong {
  font-size: 14px;
}

.book-row-title span,
.book-row-meta small,
.book-row-attention small {
  font-size: 9px;
}

.book-strip {
  min-height: 76px;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.book-strip-copy h1 {
  font-size: 21px;
}

.book-tabs {
  min-height: 54px;
  gap: 4px;
  padding: 7px 18px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.book-tab {
  min-width: 132px;
  min-height: 46px;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
}

.book-tab:hover {
  color: var(--ink);
  background: #f4f7f6;
}

.candidate-progress-strip {
  border-bottom: 1px solid var(--line);
}

.candidate-editor {
  min-height: calc(100vh - 248px);
  grid-template-columns: 248px minmax(520px, 1fr) 286px;
  border: 0;
  background: #fff;
}

.candidate-list-panel,
.candidate-inspector {
  background: #fbfcfc;
}

.candidate-list-panel {
  border-right-color: #e3e8e8;
}

.candidate-inspector {
  position: sticky;
  top: 0;
  align-self: start;
  border-left-color: #e3e8e8;
}

.candidate-panel-heading {
  min-height: 64px;
  padding: 13px 15px;
}

.candidate-filters {
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 0;
  background: #f4f7f6;
}

.candidate-filter,
.candidate-approval-filter {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 750;
}

.candidate-filter.is-active,
.candidate-approval-filter.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 42, 48, .05);
}

.candidate-approval-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
  background: #f4f7f6;
}

.candidate-approval-filter {
  min-height: 30px;
  font-size: 8px;
}

.candidate-list-tools {
  padding: 9px 10px;
}

.candidate-row {
  min-height: 64px;
  margin: 0 7px 5px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
}

.candidate-row:hover {
  border-color: var(--line);
  background: #fff;
}

.candidate-row.is-active {
  border-color: #a8d3cd;
  background: #eef7f5;
  box-shadow: inset 3px 0 0 var(--teal);
}

.candidate-approval-source {
  display: inline-flex !important;
  width: max-content;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  color: #496067;
  background: #edf1f1;
  font-size: 7px !important;
  font-weight: 750;
}

.candidate-approval-source.is-auto {
  color: #116b61;
  background: #e4f2ef;
}

.candidate-canvas-panel {
  background: #eef2f1;
}

.candidate-canvas-panel .candidate-panel-heading {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
}

.candidate-crop-stage,
.candidate-page-stage {
  height: calc(100vh - 312px);
  min-height: 520px;
  padding: 28px;
  background:
    linear-gradient(#e8edeb 1px, transparent 1px),
    linear-gradient(90deg, #e8edeb 1px, transparent 1px),
    #f4f7f6;
  background-size: 24px 24px;
}

.candidate-crop-stage img {
  max-width: min(94%, 920px);
  max-height: 94%;
  padding: 16px;
  border: 1px solid #dfe5e4;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(25, 42, 48, .12);
}

.canvas-mode {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f7f6;
}

.canvas-mode-button {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
}

.canvas-mode-button.is-active {
  color: var(--ink);
  border: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 42, 48, .08);
}

.candidate-auto-check {
  margin: 12px 14px 2px;
  border: 0;
  border-left: 3px solid var(--teal);
  border-radius: 3px;
  background: #f1f7f5;
}

.candidate-form {
  padding-top: 10px;
}

.candidate-form > label:first-child {
  max-width: 128px;
}

.candidate-advanced-tools,
.editor-note-details {
  margin-inline: 14px;
}

.candidate-review-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  padding: 14px;
}

.candidate-review-actions .button {
  min-height: 46px;
}

.candidate-review-actions #approveCandidateButton {
  box-shadow: 0 7px 18px rgba(36, 122, 80, .16);
}

.candidate-review-actions #rejectCandidateButton {
  color: #7a4a43;
}

.candidate-reject-panel {
  display: none !important;
}

.candidate-safety-note {
  color: #617078;
  line-height: 1.5;
}

.home-workspace {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.home-workspace .production-header {
  min-height: 112px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.home-workspace .production-summary {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.home-workspace .production-table-section {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.standalone-question-row {
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: 40px minmax(220px, 1fr) minmax(180px, .7fr) 130px 20px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.standalone-question-row:hover {
  background: #f7faf9;
}

.standalone-question-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
}

.standalone-question-row.is-attention .standalone-question-icon {
  color: var(--coral);
  background: var(--coral-soft);
}

.standalone-question-row.is-processing .standalone-question-icon svg,
.book-file-wait svg {
  animation: spin 1.2s linear infinite;
}

.standalone-question-copy,
.standalone-question-state {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.standalone-question-copy strong,
.standalone-question-state strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standalone-question-copy small,
.standalone-question-state small {
  color: var(--muted);
  font-size: 8px;
}

.standalone-question-assets {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.standalone-question-assets svg {
  width: 15px;
  height: 15px;
}

.book-file-library {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.book-file-list {
  display: grid;
}

.book-file-row {
  display: grid;
  min-height: 132px;
  grid-template-columns: 140px 190px minmax(280px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.book-file-row:last-child {
  border-bottom: 0;
}

.book-file-source {
  display: grid;
  height: 100%;
  min-height: 132px;
  place-items: center;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f6f8f7;
}

.book-file-source img {
  width: 100%;
  max-height: 108px;
  object-fit: contain;
  background: #fff;
}

.book-file-copy {
  display: grid;
  gap: 5px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.book-file-copy > span {
  color: var(--teal);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.book-file-copy strong {
  font-size: 13px;
}

.book-file-copy small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.book-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 18px;
}

.book-file-actions .button {
  min-height: 36px;
  font-size: 9px;
  text-decoration: none;
}

.book-file-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1180px) {
  .candidate-editor {
    grid-template-columns: 230px minmax(420px, 1fr);
  }

  .candidate-inspector {
    position: static;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .candidate-review-actions {
    max-width: 480px;
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  .standalone-question-row {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
  }

  .standalone-question-state,
  .standalone-question-assets {
    grid-column: 2;
  }

  .book-file-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .book-file-copy {
    border-right: 0;
  }

  .book-file-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .book-tabs {
    padding-inline: 8px;
  }

  .book-tab {
    min-width: 104px;
  }

  .candidate-approval-filters {
    grid-template-columns: 1fr;
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    padding: 12px;
  }

  .candidate-review-actions {
    max-width: none;
    grid-template-columns: 1fr;
    margin: 0;
  }

  .book-file-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .book-file-actions .button {
    width: 100%;
  }
}

.generation-confirm-summary > .generation-question-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  padding: 0;
  border-right: 0;
  background: var(--line);
}

.generation-question-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--line);
}

.generation-question-list > span {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  background: #fff;
}

.generation-question-list img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.generation-question-list strong {
  font-size: 9px;
}

.generation-confirm-summary > p {
  padding: 12px;
}

@media (max-width: 980px) {
  .book-video-row {
    grid-template-columns: 130px 150px minmax(250px, 1fr);
  }
}

@media (max-width: 760px) {
  .candidate-progress-strip {
    grid-template-columns: 1fr 1fr;
  }

  .candidate-progress-strip > div {
    justify-content: flex-start;
  }

  .book-video-header {
    align-items: stretch;
    flex-direction: column;
  }

  .book-video-row {
    grid-template-columns: 105px 1fr;
  }

  .book-video-source {
    min-height: 130px;
  }

  .book-video-copy {
    border-right: 0;
  }

  .book-video-player {
    grid-column: 1 / -1;
  }
}

.app-shell.is-book-editor .production-browser {
  display: none;
}

.app-shell.is-book-editor .sidebar-footer {
  margin-top: auto;
}

.book-strip > .button {
  flex: 0 0 auto;
}

.book-tabs {
  scrollbar-width: none;
}

.book-tabs::-webkit-scrollbar {
  display: none;
}

.candidate-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.book-workspace.is-bulk-mode .candidate-row {
  grid-template-columns: 22px 38px minmax(0, 1fr) auto;
}

.bulk-mode-control {
  display: none;
}

.candidate-list-tools {
  grid-template-columns: minmax(0, 1fr);
}

.book-workspace.is-bulk-mode .candidate-list-tools {
  grid-template-columns: minmax(0, 1fr) 32px 32px;
}

.book-workspace.is-bulk-mode .bulk-mode-control {
  display: inline-grid;
}

.book-workspace.is-bulk-mode .candidate-filters {
  display: none;
}

.book-workspace.is-bulk-mode .candidate-metrics,
.book-workspace.is-bulk-mode .canvas-mode {
  display: none;
}

.book-workspace.is-bulk-mode .candidate-editor {
  grid-template-columns: 280px minmax(520px, 1fr);
}

.book-workspace.is-bulk-mode .candidate-inspector {
  display: none;
}

.book-workspace.is-bulk-mode .candidate-row {
  cursor: pointer;
}

.book-workspace.is-bulk-mode .candidate-row:has(.candidate-checkbox:checked) {
  border-color: #78aaa4;
  background: #eef8f6;
  box-shadow: inset 3px 0 0 var(--teal);
}

.book-workspace.is-bulk-mode #bookSendToVideoButton {
  display: none;
}

.candidate-auto-check {
  margin: 12px 14px 0;
  padding: 9px 10px;
}

.candidate-form {
  gap: 10px;
  padding: 13px 14px;
}

.candidate-review-actions {
  gap: 7px;
  padding: 0 14px;
}

.candidate-review-actions #approveCandidateButton { order: 1; }
.candidate-review-actions #rejectCandidateButton { order: 2; }

.candidate-reject-panel {
  margin: 9px 14px 0;
  padding: 11px;
  border: 1px solid #e5b8ae;
  border-radius: 5px;
  background: #fff9f7;
}

.candidate-reject-panel label,
.candidate-reject-panel label > span {
  display: grid;
  gap: 6px;
}

.candidate-reject-panel label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.candidate-reject-panel select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--ink);
  background: white;
  font-size: 10px;
}

.candidate-reject-panel > div {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 7px;
  margin-top: 8px;
}

.candidate-disposition-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.candidate-disposition-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.candidate-disposition-heading small,
.candidate-reject-panel label small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.candidate-reject-panel textarea {
  width: 100%;
  min-height: 58px;
  padding: 8px;
  resize: vertical;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 10px;
}

.candidate-more-actions {
  margin: 10px 14px 0;
  border-top: 1px solid var(--line);
}

.candidate-more-actions summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  list-style: none;
}

.candidate-more-actions summary::-webkit-details-marker { display: none; }
.candidate-more-actions summary svg { width: 14px; height: 14px; }

.candidate-more-actions > button {
  display: grid;
  width: 100%;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e7c5bd;
  border-radius: 4px;
  color: #8e3f32;
  background: #fff9f7;
  text-align: left;
}

.candidate-more-actions > button svg { width: 17px; height: 17px; }
.candidate-more-actions > button strong,
.candidate-more-actions > button small { display: block; }
.candidate-more-actions > button strong { font-size: 10px; }
.candidate-more-actions > button small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.35; }

.compact-dialog {
  width: min(520px, calc(100vw - 28px));
}

.generation-confirm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fbfcfc;
}

.generation-confirm-summary > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.generation-confirm-summary > div:nth-child(3) { border-right: 0; }
.generation-confirm-summary svg { width: 18px; height: 18px; color: var(--teal); }
.generation-confirm-summary small,
.generation-confirm-summary strong { display: block; }
.generation-confirm-summary small { color: var(--muted); font-size: 8px; }
.generation-confirm-summary strong { margin-top: 4px; font-size: 11px; }
.generation-confirm-summary > p { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.45; }

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

.toast > span { min-width: 0; }

.toast > button {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 850;
}

.candidate-safety-note {
  margin: 13px 14px;
  padding-top: 11px;
  font-size: 9px;
}

.candidate-bulk-dock > div:first-child > span:last-child {
  min-width: 0;
}

.candidate-bulk-dock > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.candidate-bulk-dock #exitBulkSelectionButton {
  flex: 0 0 auto;
}

@media (max-width: 1450px) {
  .book-workspace.is-bulk-mode .candidate-editor {
    grid-template-columns: 250px minmax(420px, 1fr);
  }
}

@media (min-width: 1180px) and (max-width: 1450px) {
  .book-workspace:not(.is-bulk-mode) .candidate-editor {
    grid-template-columns: 230px minmax(360px, 1fr) 250px;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-inspector {
    grid-column: auto;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .book-workspace:not(.is-bulk-mode) .candidate-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-review-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .book-workspace.is-bulk-mode .candidate-editor {
    grid-template-columns: 1fr;
  }

  .book-workspace.is-bulk-mode .candidate-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .operations-status-actions #operationsDetailsButton {
    width: 100%;
  }

  .book-strip > .button {
    flex: 1 1 auto;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-metrics {
    display: none;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-list {
    max-height: 220px;
  }

  .candidate-reject-panel > div,
  .candidate-bulk-dock > div:last-child {
    grid-template-columns: 1fr;
  }

  .generation-confirm-summary {
    grid-template-columns: 1fr;
  }

  .generation-confirm-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .generation-confirm-summary > p { grid-column: 1; }
}

@media (max-width: 640px) {
  .candidate-bulk-dock > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .candidate-bulk-dock #generateSelectedButton {
    grid-column: 1 / -1;
  }
}

.book-workspace:not(.is-bulk-mode) .candidate-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.generation-confirm-summary {
  display: block;
}

/* Mobile contract must remain the final cascade entry. */
@media (max-width: 820px) {
  .app-main,
  .workspace,
  .home-workspace,
  .book-workspace,
  .book-tab-panel,
  .candidate-editor,
  .candidate-list-panel,
  .candidate-canvas-panel,
  .candidate-inspector {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .app-main { overflow-x: hidden; }

  .candidate-editor,
  .book-workspace:not(.is-bulk-mode) .candidate-editor,
  .book-workspace.is-bulk-mode .candidate-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .candidate-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .candidate-inspector {
    position: static;
    grid-column: 1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .candidate-canvas-panel .candidate-panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .candidate-crop-stage,
  .candidate-page-stage {
    width: 100%;
    height: auto;
    min-height: 430px;
    overflow: hidden;
  }

  .production-header,
  .production-header > div {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .production-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .production-header h1 {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .workspace { padding: 12px; }

  .book-strip {
    display: grid;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .book-strip > .badge,
  .book-strip > .button {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    justify-content: center;
  }

  #bookSendToVideoLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .book-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .book-tab {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 7px;
  }

  .candidate-approval-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .candidate-crop-stage,
  .candidate-page-stage { min-height: 380px; }

  .home-workspace .production-header h1 { font-size: 25px; }
  .home-workspace .production-header .button { width: 100%; }

  .production-table-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .exception-toolbar {
    width: 100%;
    align-items: stretch;
  }

  .exception-filters {
    display: grid;
    min-width: 0;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .standalone-question-row {
    width: 100%;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 12px;
  }

  .standalone-question-state,
  .standalone-question-assets { grid-column: 2; }

  .standalone-question-copy strong,
  .standalone-question-state strong { white-space: normal; }

  .candidate-list { overflow-x: hidden; }

  #homeRefreshButton { display: none; }
}

/* Version-safe book videos and low-friction revision notes. */
.book-video-row.is-previous-version {
  box-shadow: inset 3px 0 0 #aeb9bd;
}

.book-video-row.is-version-release,
.book-file-row.is-version-release {
  box-shadow: inset 3px 0 0 var(--green);
}

.book-video-row.is-version-revision,
.book-file-row.is-version-revision,
.book-video-row.is-version-outdated,
.book-file-row.is-version-outdated {
  box-shadow: inset 3px 0 0 var(--coral);
}

.book-video-row.is-version-review,
.book-file-row.is-version-review {
  box-shadow: inset 3px 0 0 var(--gold);
}

.book-video-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 3px;
}

.book-video-badges > span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 21px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #f6f8f7;
  font-size: 7px;
  font-weight: 800;
}

.book-version-badge.is-current {
  color: var(--teal);
  border-color: #b8d8d3;
  background: var(--teal-soft);
}

.book-review-badge.is-approved {
  color: var(--green);
  border-color: #bad9c7;
  background: var(--green-soft);
}

.book-review-badge.is-revision {
  color: #8a4a38;
  border-color: #e8bfb5;
  background: var(--coral-soft);
}

.book-review-badge.is-pending {
  color: #765a16;
  border-color: #dec98b;
  background: #fff8df;
}

.book-video-review-note {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: #536168;
  font-size: 8px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-review-history {
  margin-top: 7px;
  border-top: 1px solid var(--line);
}

.video-review-history summary {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
  list-style: none;
}

.video-review-history summary::-webkit-details-marker { display: none; }
.video-review-history summary svg { width: 13px; height: 13px; }
.video-review-history > div { display: grid; gap: 1px; padding-bottom: 5px; }

.video-review-history article {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px 0;
  border-top: 1px solid #edf0ef;
}

.video-review-history article > span {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: #9ca9ad;
}

.video-review-history article > span.is-open { background: var(--coral); }
.video-review-history article > span.is-closed { background: var(--green); }
.video-review-history article strong { font-size: 8px; }
.video-review-history article p { margin: 3px 0; color: #536168; font-size: 7px; line-height: 1.4; }
.video-review-history article small { color: var(--muted); font-size: 7px; }
.video-review-history article em { color: var(--muted); font-size: 7px; font-style: normal; }

.book-video-revision {
  width: max-content;
  min-height: 34px;
  margin-top: 7px;
  padding-inline: 10px;
  font-size: 8px;
}

.video-revision-target {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
}

.video-revision-target img {
  width: 74px;
  height: 70px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: white;
}

.video-revision-target strong,
.video-revision-target small {
  display: block;
}

.video-revision-target strong { font-size: 13px; }
.video-revision-target small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.video-revision-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.video-revision-stages legend,
.video-revision-note > span {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.video-revision-stages legend small,
.video-revision-note small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.video-revision-stages button {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: white;
  font-size: 8px;
  font-weight: 750;
}

.video-revision-stages button.is-active {
  color: var(--teal);
  border-color: #82bdb5;
  background: var(--teal-soft);
}

.video-revision-stages svg { width: 14px; height: 14px; }

.video-revision-note,
.video-revision-note > span {
  display: grid;
}

.video-revision-note textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 10px;
}

.video-revision-safety {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.video-revision-safety svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--teal);
}

@media (max-width: 640px) {
  .video-revision-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-video-revision { width: 100%; }
}

/* Publisher OS V4: publication-first library and book workspaces. */
:root {
  --paper: #f2f5f4;
  --surface: #ffffff;
  --ink: #13232a;
  --muted: #66757b;
  --line: #dce3e1;
  --line-dark: #bdc9c6;
  --teal: #087d70;
  --teal-soft: #e4f3ef;
  --sidebar: #122027;
  --green: #25794f;
  --green-soft: #e8f4ed;
  --coral: #cf6049;
  --coral-soft: #faece8;
}

body {
  color: var(--ink);
  background: var(--paper);
}

#productionsNavButton {
  display: none !important;
}

.app-shell {
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, .07);
  background: var(--sidebar);
}

.sidebar-brand {
  min-height: 86px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark-small {
  border-radius: 6px;
  box-shadow: none;
}

.nav-item {
  min-height: 48px;
  padding-inline: 14px;
  border-radius: 6px;
  color: #d8e0e2;
}

.nav-item.is-active {
  color: white;
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 3px 0 0 #36b7a8;
}

.nav-count {
  color: #dce6e5;
  background: rgba(255, 255, 255, .11);
}

.topbar {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 0 rgba(19, 35, 42, .02);
}

.project-identity h2 {
  font-size: 16px;
}

.topbar-metrics > div {
  min-width: 92px;
}

.topbar-metrics strong {
  font-size: 16px;
}

.button {
  border-radius: 5px;
}

.button-primary {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: none;
}

.icon-button {
  border-radius: 5px;
}

.books-workspace {
  width: min(1440px, 100%);
  padding-top: 18px;
}

.books-header {
  min-height: 114px;
  padding: 18px 20px 22px;
  border: 0;
  background: transparent;
}

.books-header h1 {
  margin-top: 3px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 28px;
  font-weight: 720;
  letter-spacing: 0;
}

.books-header p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.books-workspace .operations-summary {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 20px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: 0 10px 26px rgba(19, 35, 42, .045);
}

.books-workspace .operations-summary > div {
  min-height: 84px;
  align-content: center;
  padding: 15px 18px;
}

.books-workspace .operations-summary span {
  font-size: 8px;
  letter-spacing: .06em;
}

.books-workspace .operations-summary strong {
  font-size: 24px;
}

.books-workspace .books-table-section {
  margin: 0 20px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.books-workspace .production-table-heading {
  min-height: 66px;
  margin: 0;
  padding: 0 2px 12px;
  border: 0;
}

.books-workspace .production-table-heading h2 {
  font-size: 16px;
}

.book-table-tools .compact-search {
  width: 230px;
  border-radius: 5px;
  background: white;
}

.books-table {
  display: grid;
  min-height: 0;
  gap: 10px;
  padding-bottom: 28px;
  background: transparent;
}

.book-row.publication-folder-row {
  min-height: 112px;
  grid-template-columns: 48px minmax(210px, 1.35fr) minmax(150px, .72fr) minmax(270px, 1.05fr) minmax(155px, .72fr) 20px;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: 0 7px 20px rgba(19, 35, 42, .04);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.book-row.publication-folder-row:hover {
  border-color: #9fc9c3;
  background: white;
  box-shadow: 0 12px 28px rgba(19, 35, 42, .075);
  transform: translateY(-1px);
}

.publication-folder-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #b9d6d1;
  border-radius: 7px;
  color: var(--teal);
  background: var(--teal-soft);
}

.publication-folder-icon svg {
  width: 21px;
  height: 21px;
}

.publication-folder-row .book-row-title strong {
  font-size: 14px;
  line-height: 1.3;
}

.publication-folder-row .book-row-title span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.publication-readiness-cell {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.publication-readiness-cell > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.publication-readiness-cell strong {
  font-size: 22px;
}

.publication-readiness-cell small {
  color: var(--muted);
  font-size: 8px;
}

.publication-readiness-cell > i,
.book-publish-score i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e9eeec;
}

.publication-readiness-cell > i b,
.book-publish-score i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.publication-stage-cell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.publication-stage-cell > span {
  display: grid;
  min-height: 54px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #4f6066;
  background: #fafbfb;
  font-size: 8px;
  font-weight: 750;
  text-align: center;
}

.publication-stage-cell svg {
  width: 14px;
  height: 14px;
}

.publication-stage-cell .is-source svg { color: var(--teal); }
.publication-stage-cell .is-video svg { color: #365f94; }
.publication-stage-cell .is-release svg { color: var(--green); }

.publication-next-cell {
  display: grid;
  gap: 4px;
  padding-left: 13px;
  border-left: 2px solid #8cbab4;
}

.publication-next-cell.has-work {
  border-left-color: var(--coral);
}

.publication-next-cell strong {
  font-size: 10px;
  line-height: 1.4;
}

.publication-next-cell small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.is-standalone-folder {
  border-style: dashed !important;
}

.is-standalone-folder .publication-folder-icon {
  color: #365f94;
  border-color: #c3d0df;
  background: #edf2f8;
}

.book-workspace {
  width: min(1500px, 100%);
  padding-top: 18px;
}

.book-strip {
  min-height: 84px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: white;
}

.book-strip-copy h1 {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 720;
}

.book-tabs {
  min-height: 52px;
  padding: 6px 12px 0;
  border: 1px solid var(--line);
  border-top: 0;
  background: white;
}

.book-tab {
  min-width: 130px;
  border-radius: 5px 5px 0 0;
}

.book-publish-readiness {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(480px, 1.35fr);
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: white;
  box-shadow: 0 9px 24px rgba(19, 35, 42, .045);
}

.book-publish-score {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.book-publish-score > span {
  display: grid;
  gap: 2px;
}

.book-publish-score > span strong {
  font-size: 26px;
}

.book-publish-score > span small,
.book-publish-score > div small {
  color: var(--muted);
  font-size: 8px;
}

.book-publish-score > div {
  display: grid;
  gap: 7px;
}

.book-publish-score > div strong {
  font-size: 10px;
}

.book-publish-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-publish-stages > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}

.book-publish-stages > div:last-child {
  border-right: 0;
}

.book-publish-stages span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.book-publish-stages svg {
  width: 14px;
  height: 14px;
}

.book-publish-stages strong {
  font-size: 17px;
}

.book-publish-stages small {
  color: var(--muted);
  font-size: 8px;
}

.book-publish-stages .is-complete span,
.book-publish-stages .is-complete strong {
  color: var(--green);
}

.book-publish-stages .is-risk span,
.book-publish-stages .is-risk strong {
  color: var(--coral);
}

.candidate-editor,
.book-video-library,
.book-file-library {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 9px 24px rgba(19, 35, 42, .04);
}

.candidate-canvas-panel {
  background: #edf1ef;
}

.book-video-header {
  min-height: 84px;
  padding: 17px 19px;
  background: #fbfcfc;
}

.book-video-row {
  min-height: 204px;
  grid-template-columns: 155px 205px minmax(320px, 1fr);
}

.book-video-copy {
  padding: 16px;
}

.book-video-player {
  min-height: 204px;
}

.home-workspace {
  width: min(1300px, 100%);
  padding-top: 18px;
}

.home-workspace .production-header {
  position: relative;
  min-height: 126px;
  padding: 22px 20px 24px 74px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.standalone-back {
  position: absolute;
  top: 28px;
  left: 20px;
}

.home-workspace .production-header h1 {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 27px;
  font-weight: 720;
}

.home-workspace .production-summary,
.home-workspace .production-table-section {
  border-radius: 7px;
  box-shadow: 0 9px 24px rgba(19, 35, 42, .04);
}

.standalone-question-row {
  min-height: 82px;
}

@media (max-width: 1180px) {
  .book-row.publication-folder-row {
    grid-template-columns: 46px minmax(190px, 1fr) minmax(140px, .7fr) minmax(240px, 1fr) 18px;
  }

  .publication-next-cell {
    display: none;
  }

  .book-publish-readiness {
    grid-template-columns: 1fr;
  }

  .book-publish-score {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .books-workspace .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-row.publication-folder-row {
    grid-template-columns: 46px minmax(0, 1fr) minmax(130px, .6fr) 18px;
  }

  .publication-stage-cell {
    display: none;
  }

  .book-video-row {
    grid-template-columns: 120px minmax(160px, 1fr);
  }

  .book-video-player {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .books-workspace,
  .book-workspace,
  .home-workspace {
    padding: 12px;
  }

  .books-header {
    align-items: stretch;
    padding: 14px 0 18px;
  }

  .books-header h1 {
    font-size: 24px;
  }

  .books-workspace .operations-summary,
  .books-workspace .books-table-section {
    margin-right: 0;
    margin-left: 0;
  }

  .books-workspace .operations-summary > div {
    min-height: 76px;
    padding: 12px;
  }

  .book-table-tools {
    width: 100%;
  }

  .book-table-tools .compact-search {
    width: auto;
    flex: 1;
  }

  .book-row.publication-folder-row {
    min-height: 0;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 14px;
  }

  .publication-folder-icon {
    width: 40px;
    height: 40px;
  }

  .publication-readiness-cell {
    grid-column: 2;
  }

  .book-row.publication-folder-row > svg:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .book-strip {
    border-radius: 7px 7px 0 0;
  }

  .book-publish-readiness {
    margin-bottom: 10px;
  }

  .book-publish-score {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 14px;
  }

  .book-publish-stages {
    grid-template-columns: 1fr;
  }

  .book-publish-stages > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .book-publish-stages > div:last-child {
    border-bottom: 0;
  }

  .book-publish-stages small {
    grid-column: 1 / -1;
  }

  .home-workspace .production-header {
    padding: 70px 16px 18px;
  }

  .standalone-back {
    top: 18px;
    left: 16px;
  }
}

/* Frictionless source approval: selection is cumulative and separate from video generation. */
.book-workspace.is-approval-selection .candidate-row {
  grid-template-columns: 22px 38px minmax(0, 1fr) auto;
}

.book-workspace.is-approval-selection .candidate-list-tools {
  grid-template-columns: minmax(0, 1fr) 32px 32px;
}

.book-workspace.is-approval-selection .bulk-mode-control {
  display: inline-grid;
}

.candidate-row.is-selected,
.candidate-row:has(.candidate-checkbox:checked) {
  border-color: #78aaa4;
  background: #eef8f6;
  box-shadow: inset 3px 0 0 var(--teal);
}

.candidate-checkbox {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal);
}

.candidate-checkbox:disabled {
  cursor: not-allowed;
  opacity: .28;
}

.book-workspace:not(.is-bulk-mode) .candidate-bulk-dock {
  border-color: #a9cbc5;
  box-shadow: 0 12px 34px rgba(19, 35, 42, .17);
}

.book-workspace:not(.is-bulk-mode) #approveSelectedCandidatesButton {
  min-width: 170px;
}

/* Source review V2: one decision surface, fast queue navigation, optional details. */
.book-workspace:not(.is-bulk-mode) .candidate-editor {
  height: calc(100dvh - 326px);
  min-height: 380px;
  grid-template-columns: 252px minmax(0, 1fr);
}

.book-workspace.is-content-tab:not(.is-bulk-mode) .candidate-editor {
  height: calc(100dvh - 244px);
}

.book-workspace:not(.is-bulk-mode) .candidate-list-panel,
.book-workspace:not(.is-bulk-mode) .candidate-canvas-panel {
  min-height: 0;
  height: 100%;
}

.book-workspace:not(.is-bulk-mode) .candidate-list-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.book-workspace:not(.is-bulk-mode) .candidate-list {
  min-height: 0;
  max-height: none;
  flex: 1;
}

.book-workspace:not(.is-bulk-mode) .candidate-canvas-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

#bookContentPanel .candidate-progress-strip {
  display: none;
}

.book-workspace:not(.is-bulk-mode) .candidate-inspector {
  display: none;
}

.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
  grid-template-columns: 252px minmax(0, 1fr) 286px;
}

.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
  display: block;
}

.candidate-inspector .candidate-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.candidate-queue-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 8px;
  border: 1px solid #a9cbc5;
  border-radius: 5px;
  background: #eef8f6;
  box-shadow: 0 5px 14px rgba(19, 35, 42, .07);
}

.candidate-queue-selection[hidden] {
  display: none;
}

.candidate-queue-selection span,
.candidate-queue-selection strong,
.candidate-queue-selection small {
  display: block;
  min-width: 0;
}

.candidate-queue-selection strong {
  color: var(--ink);
  font-size: 10px;
}

.candidate-queue-selection small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.candidate-queue-selection .button {
  min-width: 82px;
  min-height: 34px;
  padding-inline: 10px;
}

.book-workspace:not(.is-bulk-mode) .candidate-queue-selection #approveSelectedCandidatesButton,
.book-workspace:not(.is-bulk-mode) .candidate-queue-selection #withdrawSelectedCandidatesButton {
  min-width: 82px;
}

.book-workspace.is-review-selection .bulk-mode-control {
  display: inline-grid;
}

.book-workspace.is-review-selection .candidate-list-tools {
  grid-template-columns: minmax(0, 1fr) 32px 32px;
}

.book-workspace.is-review-selection .candidate-row {
  width: calc(100% - 14px);
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: 22px 38px minmax(0, 1fr) 30px 8px;
}

.book-workspace.is-review-selection .candidate-list {
  overflow-x: hidden;
}

.book-workspace.is-review-selection .candidate-row-copy {
  min-width: 0;
}

.candidate-row-action,
.candidate-row-spinner {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
}

.candidate-row-action {
  cursor: pointer;
  opacity: .25;
  transition: opacity .12s ease, border-color .12s ease, color .12s ease, background .12s ease;
}

.candidate-row:hover .candidate-row-action,
.candidate-row.is-active .candidate-row-action,
.candidate-row-action:focus-visible {
  opacity: 1;
}

.candidate-row-action.is-approve {
  color: #137163;
}

.candidate-row-action.is-approve:hover {
  border-color: #8fc6be;
  background: #e9f7f4;
}

.candidate-row-action.is-reset:hover,
.candidate-row-action.is-restore:hover {
  border-color: #bdcaca;
  color: var(--ink);
  background: #f2f6f5;
}

.candidate-row-action svg,
.candidate-row-spinner svg {
  width: 15px;
  height: 15px;
}

.candidate-row-spinner svg {
  animation: spin .8s linear infinite;
}

.candidate-row.is-pending {
  opacity: .68;
}

.candidate-flow-bar {
  position: relative;
  z-index: 8;
  bottom: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(19, 35, 42, .08);
  backdrop-filter: blur(10px);
}

.candidate-action-status {
  position: absolute;
  z-index: 3;
  top: -39px;
  left: 50%;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  transform: translateX(-50%);
  border: 1px solid #98c7c0;
  border-radius: 5px;
  color: #0f665c;
  background: #edf8f5;
  box-shadow: 0 8px 20px rgba(19, 35, 42, .12);
  font-size: 9px;
  white-space: nowrap;
}

.candidate-action-status[hidden] {
  display: none;
}

.candidate-action-status .spinner {
  width: 14px;
  height: 14px;
}

.book-workspace.is-bulk-mode .candidate-editor.is-action-pending .candidate-review-actions .button,
.book-workspace.is-bulk-mode .candidate-editor.is-action-pending .candidate-flow-navigation .icon-button {
  pointer-events: none;
  opacity: .52;
}

.candidate-flow-navigation {
  display: grid;
  grid-template-columns: 36px minmax(110px, auto) 36px;
  align-items: center;
  gap: 8px;
}

.candidate-flow-navigation span,
.candidate-flow-navigation strong,
.candidate-flow-navigation small {
  display: block;
  min-width: 0;
}

.candidate-flow-navigation strong {
  font-size: 11px;
  white-space: nowrap;
}

.candidate-flow-navigation small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.candidate-flow-bar .candidate-review-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 0;
}

.candidate-flow-bar .candidate-review-actions .button {
  min-height: 42px;
  min-width: 124px;
}

.candidate-flow-bar #approveCandidateButton {
  min-width: 158px;
}

.book-workspace:not(.is-bulk-mode) .candidate-crop-stage,
.book-workspace:not(.is-bulk-mode) .candidate-page-stage {
  width: 100%;
  height: auto;
  min-height: 0;
}

.candidate-revision-ledger {
  margin: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.candidate-revision-ledger > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f8;
}

.candidate-revision-ledger > header span,
.candidate-revision-ledger > header strong,
.candidate-revision-ledger > header small {
  display: block;
}

.candidate-revision-ledger > header strong { font-size: 10px; }
.candidate-revision-ledger > header small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.candidate-revision-ledger > header svg { width: 15px; color: var(--muted); }

.candidate-history-list {
  display: grid;
  max-height: 250px;
  overflow-y: auto;
}

.candidate-history-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #edf0ef;
}

.candidate-history-row:last-child { border-bottom: 0; }
.candidate-history-row > div { min-width: 0; }
.candidate-history-row strong,
.candidate-history-row small,
.candidate-history-row time small { display: block; }
.candidate-history-row strong { font-size: 9px; }
.candidate-history-row small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.candidate-history-row p { margin: 5px 0 0; color: #45565c; font-size: 8px; line-height: 1.45; }
.candidate-history-row em { display: inline-block; margin-top: 5px; color: var(--muted); font-size: 7px; font-style: normal; }
.candidate-history-row time { color: var(--muted); font-size: 7px; text-align: right; white-space: nowrap; }

.candidate-history-state {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #64757a;
  background: #edf1f1;
}

.candidate-history-state svg { width: 12px; height: 12px; }
.candidate-history-state.is-open { color: #9b5b18; background: #fff3dd; }
.candidate-history-state.is-closed { color: #19715f; background: #e6f5f1; }

.candidate-history-empty,
.candidate-history-loading {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.candidate-history-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.candidate-history-loading .spinner { width: 15px; height: 15px; }

.book-workspace:not(.is-bulk-mode) .candidate-bulk-dock {
  display: none !important;
}

@media (min-width: 1180px) and (max-width: 1450px) {
  .book-workspace:not(.is-bulk-mode) .candidate-editor,
  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
    position: fixed;
    z-index: 30;
    top: 72px;
    right: 16px;
    bottom: 16px;
    display: block;
    width: 300px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(19, 35, 42, .2);
  }
}

@media (max-height: 820px) and (min-width: 821px) {
  .book-workspace:not(.is-bulk-mode) .candidate-editor {
    height: calc(100dvh - 326px);
    min-height: 380px;
  }

  .book-workspace.is-content-tab:not(.is-bulk-mode) .candidate-editor {
    height: calc(100dvh - 244px);
  }

  .book-workspace:not(.is-bulk-mode) .candidate-panel-heading {
    min-height: 54px;
    padding-block: 8px;
  }

  .candidate-flow-bar {
    min-height: 62px;
    padding-block: 8px;
  }
}

@media (max-width: 820px) {
  .book-workspace:not(.is-bulk-mode) .candidate-editor,
  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
    grid-template-columns: 1fr;
  }

  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
    position: fixed;
    z-index: 40;
    inset: 12px;
    display: block;
    width: auto;
    max-width: none;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(19, 35, 42, .24);
  }

  .candidate-flow-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-flow-navigation {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .candidate-flow-bar .candidate-review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .candidate-flow-bar .candidate-review-actions .button,
  .candidate-flow-bar #approveCandidateButton {
    min-width: 0;
  }
}

/* Source review V3: editing is an overlay; opening it never reflows the question. */
.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
  grid-template-columns: 252px minmax(0, 1fr);
}

.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
  position: fixed;
  z-index: 50;
  top: 76px;
  right: 18px;
  bottom: 18px;
  display: block;
  width: min(330px, calc(100vw - 36px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #cfd9d7;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(19, 35, 42, .22);
}

.candidate-inspector .candidate-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px 14px 14px;
}

.candidate-inspector .candidate-form .button-wide {
  margin-top: 2px;
}

.candidate-inspector .candidate-advanced-tools,
.candidate-inspector .candidate-more-actions {
  margin: 0 14px 12px;
}

/* Publisher Studio premium workspace refresh. */
:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #172126;
  --muted: #66747a;
  --line: #dfe5e3;
  --line-dark: #c8d1ce;
  --teal: #087f73;
  --teal-soft: #e9f5f2;
  --sidebar: #121b20;
  --shadow: 0 18px 50px rgba(24, 37, 42, .08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  background: #f3f5f4;
}

.auth-brand {
  background: #121b20;
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  background: #121b20;
  box-shadow: inset -1px 0 rgba(255, 255, 255, .035);
}

.sidebar-brand {
  height: 72px;
  padding-inline: 18px;
}

.nav-item,
.sidebar-team-button {
  border-radius: 7px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.topbar {
  min-height: 72px;
  padding-inline: 24px;
  border-color: rgba(202, 211, 208, .8);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 12px rgba(20, 33, 38, .025);
  backdrop-filter: blur(18px) saturate(125%);
}

.workspace {
  padding: 22px 24px 40px;
}

.eyebrow {
  margin-bottom: 6px;
  color: #647279;
  font-size: 10px;
  letter-spacing: 0;
}

.button,
.icon-button,
.compact-search,
.book-row.publication-folder-row,
.books-workspace .operations-summary,
.book-strip,
.book-publish-readiness {
  border-radius: 8px;
}

.button {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 11px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  box-shadow: 0 7px 18px rgba(8, 127, 115, .16);
}

.button-secondary:hover {
  border-color: #9baca7;
  background: #f8faf9;
}

.books-workspace,
.book-workspace {
  width: min(1540px, 100%);
}

.books-header h1 {
  font-size: 30px;
}

.books-header p:not(.eyebrow) {
  max-width: 720px;
  font-size: 13px;
  line-height: 1.55;
}

.book-row.publication-folder-row {
  box-shadow: 0 9px 28px rgba(24, 37, 42, .045);
}

.book-strip {
  min-height: 88px;
  padding: 16px 20px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 10px 32px rgba(24, 37, 42, .04);
}

.book-strip-copy h1 {
  font-size: 22px;
}

.book-tabs {
  min-height: 54px;
  gap: 4px;
  padding: 5px 14px 0;
}

.book-tab {
  min-width: 0;
  padding-inline: 15px;
  border-radius: 7px 7px 0 0;
  font-size: 12px;
  transition: color 150ms ease, background 150ms ease;
}

.book-tab:hover {
  color: var(--ink);
  background: #f7f9f8;
}

.book-tab-panel {
  padding: 18px 0 28px;
}

#bookContentPanel {
  padding: 0;
}

.book-publish-readiness {
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 36px rgba(24, 37, 42, .045);
}

.book-publish-score > span small,
.book-publish-score > div small,
.book-publish-stages small {
  font-size: 10px;
}

.book-video-library,
.book-file-library {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.book-video-header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  min-height: 112px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 12px 36px rgba(24, 37, 42, .045);
}

.book-video-header h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 720;
}

.book-video-header p:last-child,
.book-video-header-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.book-video-summary {
  border-radius: 8px;
}

.book-video-preview-body {
  grid-template-columns: minmax(0, 1fr);
}

.book-video-summary > span {
  min-width: 108px;
  padding: 11px 13px;
}

.book-video-summary strong {
  font-size: 19px;
}

.book-video-summary small {
  font-size: 9px;
}

.book-video-toolbar {
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(255, 255, 255, .9);
}

.book-video-toolbar .compact-search {
  width: 100%;
  height: 36px;
}

.book-video-toolbar .compact-search input,
.book-video-filters button,
.book-video-result-count,
.book-video-toolbar-note {
  font-size: 10px;
}

.book-video-toolbar-note {
  color: var(--muted);
}

.book-video-filters {
  width: fit-content;
  padding: 3px;
  border: 1px solid #e1e6e4;
  border-radius: 7px;
  background: #f4f6f5;
}

.book-video-filters button {
  min-height: 30px;
  border-radius: 5px;
}

.book-video-filters button.is-active {
  border-color: #d7dfdc;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 7px rgba(24, 37, 42, .07);
}

.video-library-layout {
  display: grid;
  min-height: 570px;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 14px;
  padding-top: 14px;
}

.video-library-index,
.video-library-stage {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(24, 37, 42, .055);
}

.video-library-index {
  display: grid;
  min-height: 570px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.video-library-list {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.video-library-item {
  display: grid;
  width: 100%;
  min-height: 92px;
  grid-template-columns: 92px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0ef;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.video-library-item:hover {
  background: #f8faf9;
}

.video-library-item.is-active {
  background: #edf7f4;
  box-shadow: inset 3px 0 var(--teal);
}

.video-library-thumb {
  position: relative;
  display: grid;
  width: 92px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e2e7e5;
  border-radius: 6px;
  background: #f4f6f5;
}

.video-library-thumb img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.video-library-thumb > svg {
  position: absolute;
  width: 24px;
  height: 24px;
  padding: 6px;
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 27, 32, .8);
}

.video-library-item-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.video-library-item-copy small,
.video-library-item-copy strong,
.video-library-item-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-library-item-copy small {
  color: var(--muted);
  font-size: 9px;
}

.video-library-item-copy strong {
  font-size: 11px;
  line-height: 1.35;
}

.video-library-item-copy em {
  color: var(--teal);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.video-library-chevron {
  width: 15px;
  color: #9aa6a3;
}

.video-library-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.video-library-stage-heading {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.video-library-stage-heading > div:first-child {
  min-width: 0;
}

.video-library-stage-heading span {
  color: var(--muted);
  font-size: 10px;
}

.video-library-stage-heading h3 {
  overflow: hidden;
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-library-stage-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.video-library-media {
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  background: #101719;
}

.video-library-media video {
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: contain;
  background: #101719;
}

.video-library-stage-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfc;
  font-size: 9px;
}

.video-library-stage-footer > span:not(:first-child)::before {
  margin-right: 8px;
  color: #b6bfbc;
  content: '·';
}

.video-library-stage-empty {
  display: grid;
  min-height: 570px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-dark);
  border-radius: 8px;
  color: var(--muted);
  background: #f8faf9;
  text-align: center;
}

.video-library-stage-empty svg {
  width: 28px;
  height: 28px;
}

.video-library-stage-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.video-library-stage-empty span {
  font-size: 11px;
}

.book-video-pagination {
  min-height: 52px;
  background: #fbfcfc;
}

.book-video-pagination strong {
  font-size: 10px;
}

.book-video-pagination small {
  font-size: 9px;
}

.book-video-archive {
  overflow: hidden;
  border-radius: 8px;
}

.book-video-preview-dialog {
  width: min(1280px, calc(100vw - 32px));
  height: min(880px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(12, 23, 28, .28);
}

.book-video-preview-dialog::backdrop {
  background: rgba(13, 24, 29, .58);
  backdrop-filter: blur(5px);
}

.book-video-preview-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
}

.book-video-preview-shell > .dialog-heading {
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.book-video-preview-shell > .dialog-heading h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.book-video-preview-body {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.book-video-preview-body > .book-video-loading {
  min-height: 420px;
}

.video-inspector-overview {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.video-inspector-overview p {
  margin: 7px 0 0;
  color: #435158;
  font-size: 11px;
}

.video-inspector-overview small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.video-inspector-tabs {
  display: flex;
  min-height: 50px;
  align-items: stretch;
  gap: 3px;
  padding: 5px 16px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.video-inspector-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 720;
}

.video-inspector-tabs button::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  background: transparent;
  content: '';
}

.video-inspector-tabs button.is-active {
  color: var(--teal);
}

.video-inspector-tabs button.is-active::after {
  background: var(--teal);
}

.video-inspector-tabs svg {
  width: 15px;
  height: 15px;
}

.video-inspector-panels {
  min-height: 0;
  overflow: hidden;
}

.video-inspector-panels > section {
  height: 100%;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.video-inspector-flow {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.video-inspector-source {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
}

.video-inspector-source figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-inspector-diagram {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 14px;
  background-color: #f7f9f8;
  background-image: linear-gradient(#e8ecea 1px, transparent 1px), linear-gradient(90deg, #e8ecea 1px, transparent 1px);
  background-size: 24px 24px;
}

.video-inspector-diagram img {
  width: 100%;
  max-height: 410px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(24, 37, 42, .08));
}

.video-inspector-source figcaption {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 9px;
}

.video-target-callout {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid var(--coral);
  border-radius: 0 7px 7px 0;
  background: #fff6f3;
}

.video-target-callout span {
  color: #a44d3b;
  font-size: 9px;
  font-weight: 800;
}

.video-target-callout strong {
  font-size: 11px;
  line-height: 1.45;
}

.video-facts {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-facts summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  list-style: none;
}

.video-facts summary::-webkit-details-marker {
  display: none;
}

.video-facts summary strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 12px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 9px;
}

.video-facts ol {
  display: grid;
  max-height: 250px;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  list-style: none;
}

.video-facts li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid #edf0ef;
}

.video-facts li:last-child {
  border-bottom: 0;
}

.video-facts li > span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}

.video-facts p {
  margin: 0;
  color: #405057;
  font-size: 10px;
  line-height: 1.5;
}

.video-solution-flow {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-solution-flow > header,
.video-package-panel section > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.video-solution-flow > header strong,
.video-package-panel section > header strong {
  color: var(--teal);
  font-size: 9px;
}

.video-solution-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #edf0ef;
}

.video-solution-step:last-child {
  border-bottom: 0;
}

.video-solution-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #b7d8d2;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
}

.video-solution-step small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
}

.video-solution-step small span {
  padding: 2px 5px;
  border-radius: 3px;
  color: #386c65;
  background: #eef6f4;
}

.video-solution-step h4 {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.video-solution-board {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.video-solution-board code {
  padding: 5px 7px;
  border: 1px solid #e1e6e4;
  border-radius: 5px;
  color: #26383e;
  background: #f7f9f8;
  font-family: "Cambria Math", Cambria, serif;
  font-size: 10px;
}

.video-package-panel {
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(420px, 1.14fr);
  gap: 18px;
}

.video-package-panel > section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-package-flow {
  display: grid;
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.video-package-flow li {
  position: relative;
  display: grid;
  min-height: 54px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
}

.video-package-flow li:not(:last-child)::after {
  position: absolute;
  top: 38px;
  bottom: -10px;
  left: 28px;
  width: 1px;
  background: #dce4e1;
  content: '';
}

.video-package-flow li > span {
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
  font-weight: 800;
}

.video-package-flow li.is-complete > span {
  border-color: #9ccfc2;
  color: #fff;
  background: var(--teal);
}

.video-package-flow svg {
  width: 13px;
  height: 13px;
}

.video-package-flow strong,
.video-package-flow small {
  display: block;
}

.video-package-flow strong {
  font-size: 10px;
}

.video-package-flow small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.video-package-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.video-package-files button {
  display: grid;
  min-height: 72px;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.video-package-files button:hover {
  border-color: #9fc8c1;
  background: #f4faf8;
}

.video-package-files button > svg:first-child {
  width: 20px;
  color: var(--teal);
}

.video-package-files button > svg:last-child {
  width: 14px;
  color: #8c9895;
}

.video-package-files strong,
.video-package-files small {
  display: block;
}

.video-package-files strong {
  font-size: 10px;
}

.video-package-files small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.video-history-panel {
  display: grid;
  max-width: 900px;
  gap: 10px;
  margin: 0 auto;
}

.video-history-panel .video-review-history,
.video-history-panel .video-lineage-summary {
  border-radius: 8px;
}

.video-inspector-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.video-inspector-empty svg {
  width: 24px;
  height: 24px;
}

.book-file-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.book-file-row {
  min-height: 104px;
  grid-template-columns: 112px minmax(260px, 1fr) minmax(170px, .55fr) auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 37, 42, .035);
}

.book-file-source {
  min-height: 104px;
  padding: 9px;
}

.book-file-source img {
  max-height: 84px;
}

.book-file-copy {
  gap: 4px;
  padding: 15px 16px;
}

.book-file-copy > span {
  font-size: 9px;
  letter-spacing: 0;
}

.book-file-copy strong {
  font-size: 12px;
}

.book-file-copy small {
  font-size: 9px;
}

.book-file-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.book-file-state > svg {
  width: 19px;
  color: var(--green);
}

.book-file-state strong,
.book-file-state small {
  display: block;
}

.book-file-state strong {
  font-size: 10px;
}

.book-file-state small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.book-file-actions {
  align-items: center;
  padding: 14px;
}

@media (max-width: 1180px) {
  .book-video-header {
    grid-template-columns: minmax(300px, 1fr) auto;
  }

  .book-video-header > .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .video-library-layout {
    grid-template-columns: 1fr;
  }

  .video-library-stage {
    grid-row: 1;
  }

  .video-library-index {
    grid-row: 2;
    min-height: 360px;
  }

  .video-library-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-library-item:nth-child(odd) {
    border-right: 1px solid #edf0ef;
  }

  .video-inspector-flow,
  .video-package-panel {
    grid-template-columns: 1fr;
  }

  .video-inspector-source {
    position: static;
  }

  .book-file-row {
    grid-template-columns: 100px minmax(220px, 1fr) minmax(150px, .55fr) auto;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 12px 10px 28px;
  }

  .book-video-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 18px;
  }

  .book-video-summary {
    width: 100%;
  }

  .book-video-summary > span {
    min-width: 0;
    flex: 1;
  }

  .book-video-toolbar {
    grid-template-columns: 1fr auto;
  }

  .book-video-filters,
  .book-video-toolbar-note {
    grid-column: 1 / -1;
  }

  .video-library-list {
    grid-template-columns: 1fr;
  }

  .video-library-item:nth-child(odd) {
    border-right: 0;
  }

  .video-library-stage-heading,
  .video-inspector-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .video-library-stage-actions,
  .video-preview-decision-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .video-library-media {
    min-height: 260px;
  }

  .book-video-preview-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
  }

  .video-inspector-tabs {
    overflow-x: auto;
  }

  .video-inspector-tabs button {
    flex: 0 0 auto;
  }

  .video-inspector-panels > section {
    padding: 12px;
  }

  .video-package-files {
    grid-template-columns: 1fr;
  }

  .book-file-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .book-file-state,
  .book-file-actions {
    grid-column: 2;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
}

.book-workspace:not(.is-bulk-mode) .candidate-crop-stage {
  overflow: hidden;
}

.book-workspace:not(.is-bulk-mode) .candidate-page-stage {
  overflow: auto;
  overscroll-behavior: contain;
}

.book-workspace:not(.is-bulk-mode) .candidate-crop-stage img {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  max-width: none;
  max-height: none;
  padding: 12px;
  border: 0;
  background: white;
  box-sizing: border-box;
  box-shadow: none;
  object-fit: contain;
}

.book-video-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.book-video-header-copy {
  min-width: min(420px, 100%);
}

.book-video-summary {
  display: flex;
  align-items: stretch;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.book-video-summary > span {
  display: grid;
  min-width: 96px;
  align-content: center;
  gap: 2px;
  padding: 9px 11px;
  background: #fff;
}

.book-video-summary strong,
.book-video-summary small {
  display: block;
}

.book-video-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.book-video-summary small {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.book-video-summary .is-revision strong { color: #a35f16; }
.book-video-summary .is-ready strong { color: var(--green); }

.book-video-header-copy h2 {
  max-width: 720px;
}

.book-video-header-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #52636a;
  line-height: 1.55;
}

.book-video-card.is-version-review,
.book-video-card.is-version-release {
  border-color: #b9d9cf;
}

.book-video-card.is-version-revision {
  border-color: #e5bd85;
  box-shadow: inset 3px 0 #c77a20;
}

.video-preview-decision-actions:empty {
  display: none;
}

.video-package-history summary,
.video-source-history summary {
  color: #254c48;
}

.video-package-history article,
.video-source-history article {
  grid-template-columns: 8px minmax(0, 1fr) auto;
}

.video-package-history article.is-selected-package,
.video-source-history article.is-selected-package {
  background: #edf7f3;
}

.video-package-history article .button,
.video-source-history article .button {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 8px;
}

.book-video-archive {
  margin-top: 16px;
  border: 1px solid #dce4e2;
  background: #f8faf9;
}

.book-video-archive > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  color: #536168;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.book-video-archive > summary::-webkit-details-marker { display: none; }
.book-video-archive > summary svg { width: 15px; height: 15px; }
.book-video-archive > summary span { margin-left: auto; color: var(--muted); }
.book-video-archive > div { border-top: 1px solid #e5ebe9; }

.book-video-archive-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #edf1f0;
  background: #fff;
  color: #243238;
  text-align: left;
  cursor: pointer;
}

.book-video-archive-row:last-child { border-bottom: 0; }
.book-video-archive-row:hover { background: #f2f8f6; }
.book-video-archive-row > svg { width: 15px; height: 15px; color: #738186; }
.book-video-archive-row span { display: grid; gap: 2px; }
.book-video-archive-row strong { font-size: 10px; }
.book-video-archive-row small,
.book-video-archive-row time { color: var(--muted); font-size: 8px; }

.video-preview-player {
  position: relative;
}

.video-archive-watermark {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 4px;
  background: rgba(18, 30, 34, .78);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.book-video-review-actions .button {
  min-height: 36px;
}

.book-video-revision-withdraw {
  color: #516268;
}

@media (max-width: 820px) {
  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
    grid-template-columns: 1fr;
  }

  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
    inset: 12px;
    width: auto;
  }
}

/* Keep the premium library metrics above legacy compatibility rules. */
.book-video-summary {
  border-radius: 8px;
}

.book-video-summary > span {
  min-width: 108px;
  padding: 11px 13px;
}

.book-video-summary strong {
  font-size: 19px;
}

.book-video-summary small {
  font-size: 9px;
}

@media (max-width: 820px) {
  .book-video-summary > span {
    min-width: 0;
    flex: 1;
  }
}

/* Frictionless ready/revision split. */
.video-library-layout {
  align-items: start;
}

.video-library-index {
  display: block;
  min-height: 0;
  max-height: 622px;
}

.video-library-list {
  max-height: 568px;
  overflow-y: auto;
  overscroll-behavior: auto;
}

.video-library-index .book-video-pagination {
  border-top: 1px solid var(--line);
}

.video-revision-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.video-revision-row {
  display: grid;
  min-height: 106px;
  grid-template-columns: 132px minmax(190px, .7fr) minmax(300px, 1.35fr) auto;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e4d4bd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(24, 37, 42, .04);
}

.video-revision-row-source {
  display: grid;
  height: 100%;
  min-height: 106px;
  place-items: center;
  padding: 9px;
  border-right: 1px solid var(--line);
  background: #f7f9f8;
}

.video-revision-row-source img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

.video-revision-row-title,
.video-revision-row-issue {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.video-revision-row-title small,
.video-revision-row-issue small {
  color: var(--muted);
  font-size: 9px;
}

.video-revision-row-title strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-row-issue {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.video-revision-row-issue > span {
  grid-row: 1 / 3;
  align-self: center;
  padding: 5px 8px;
  border: 1px solid #edc996;
  border-radius: 5px;
  color: #945614;
  background: #fff6e9;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.video-revision-row-issue p {
  overflow: hidden;
  margin: 0;
  color: #2d3b41;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px;
}

.video-revision-row-actions .button {
  white-space: nowrap;
}

.video-revision-row-actions .icon-button {
  border: 1px solid var(--line-dark);
  color: #4f6066;
  background: #fff;
}

.video-revision-row-actions .video-revision-cancel:hover {
  border-color: #e4b0a4;
  color: var(--coral);
  background: #fff7f5;
}

.video-inspector-overview {
  min-height: 70px;
}

.video-inspector-kpis {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.video-inspector-kpis > span {
  display: grid;
  min-width: 92px;
  align-content: center;
  gap: 2px;
  padding: 8px 11px;
  background: #fff;
}

.video-inspector-kpis strong,
.video-inspector-kpis small {
  display: block;
}

.video-inspector-kpis strong {
  color: var(--ink);
  font-size: 15px;
}

.video-inspector-kpis small {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .video-library-index {
    min-height: 0;
    max-height: 430px;
  }

  .video-library-list {
    max-height: 376px;
  }

  .video-revision-row {
    grid-template-columns: 118px minmax(170px, .65fr) minmax(260px, 1.2fr);
  }

  .video-revision-row-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .video-library-index,
  .video-library-list {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .video-revision-row {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .video-revision-row-source {
    grid-row: 1 / 3;
    min-height: 126px;
  }

  .video-revision-row-source img {
    height: 94px;
  }

  .video-revision-row-title,
  .video-revision-row-issue {
    border-right: 0;
  }

  .video-revision-row-title {
    padding-bottom: 8px;
  }

  .video-revision-row-issue {
    grid-column: 2;
    padding-top: 0;
  }

  .video-revision-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .video-revision-row-actions .button {
    flex: 1;
  }

  .video-inspector-overview {
    align-items: stretch;
  }

  .video-inspector-kpis {
    width: 100%;
  }

  .video-inspector-kpis > span {
    min-width: 0;
    flex: 1;
  }
}

/* Compact editor-first revision dialog. */
.video-revision-dialog {
  width: min(660px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border-color: #d7e0de;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(12, 23, 28, .25);
}

.video-revision-dialog::backdrop {
  background: rgba(13, 24, 29, .55);
  backdrop-filter: blur(5px);
}

.video-revision-dialog .upload-form {
  display: grid;
  padding: 0;
}

.video-revision-dialog .dialog-heading {
  min-height: 74px;
  align-items: center;
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.video-revision-dialog .dialog-heading h2 {
  margin-top: 2px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0;
}

.video-revision-context {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 112px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f8;
}

.video-revision-context img {
  width: 92px;
  height: 82px;
  object-fit: contain;
  border: 1px solid #dfe6e4;
  border-radius: 5px;
  background: #fff;
}

.video-revision-context > span {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.video-revision-context em {
  width: max-content;
  padding: 4px 7px;
  border: 1px solid #d7b47f;
  border-radius: 4px;
  color: #8a5317;
  background: #fff8ed;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.video-revision-context strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-context small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.video-revision-editor {
  display: grid;
  gap: 20px;
  padding: 20px 18px 22px;
}

.video-revision-stages {
  gap: 7px;
}

.video-revision-stages legend {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.video-revision-stages legend span,
.video-revision-note > span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.video-revision-stages legend small,
.video-revision-note small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
}

.video-revision-stages button {
  min-height: 43px;
  gap: 7px;
  border-color: #dce3e1;
  border-radius: 6px;
  color: #526168;
  background: #fff;
  font-size: 10px;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.video-revision-stages button:hover {
  border-color: #aabbb7;
  background: #f7faf9;
}

.video-revision-stages button.is-active {
  border-color: #65a99f;
  color: #056f65;
  background: #edf8f5;
  box-shadow: inset 0 0 0 1px rgba(8, 125, 112, .08);
}

.video-revision-note {
  gap: 9px;
}

.video-revision-note > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.video-revision-note textarea {
  min-height: 108px;
  padding: 12px 13px;
  border-color: #cbd7d4;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.video-revision-note textarea::placeholder {
  color: #8b989d;
}

.video-revision-footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.video-revision-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.video-revision-footer .button {
  min-height: 40px;
}

#withdrawVideoRevisionFromDialogButton {
  color: #b74e3b;
  border-color: transparent;
  background: transparent;
}

#withdrawVideoRevisionFromDialogButton:hover {
  border-color: #edc8bf;
  background: #fff5f2;
}

@media (max-width: 640px) {
  .video-revision-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .video-revision-context {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    min-height: 100px;
    padding: 10px 14px;
  }

  .video-revision-context img {
    width: 74px;
    height: 70px;
  }

  .video-revision-editor {
    gap: 18px;
    padding: 18px 14px;
  }

  .video-revision-footer {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 12px 14px;
  }

  .video-revision-footer > div {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    margin: 0;
  }

  #withdrawVideoRevisionFromDialogButton {
    width: 100%;
  }
}

/* Revision workspace: one playable video and one editorial action. */
.video-revision-layout {
  min-height: 570px;
}

.video-revision-index {
  display: grid;
  max-height: 622px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.video-revision-list {
  min-height: 0;
  padding: 0;
  overflow-y: auto;
}

.video-revision-queue-item {
  display: grid;
  padding: 12px;
  border-bottom: 1px solid #e7ecea;
  background: #fff;
  outline: none;
  transition: background .15s ease, box-shadow .15s ease;
}

.video-revision-queue-item:last-child {
  border-bottom: 0;
}

.video-revision-queue-item:hover {
  background: #fafcfb;
}

.video-revision-queue-item.is-active {
  background: #f0f8f6;
  box-shadow: inset 3px 0 #0a8376;
}

.video-revision-queue-item:focus-visible {
  outline: 3px solid rgba(8, 127, 115, .28);
  outline-offset: -3px;
}

.video-revision-question {
  display: grid;
  width: 100%;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.video-revision-question-thumb {
  position: relative;
  display: grid;
  width: 74px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfe6e4;
  border-radius: 5px;
  background: #fff;
}

.video-revision-question-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-revision-question-thumb svg {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 18px;
  height: 18px;
  padding: 4px;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 31, 36, .82);
}

.video-revision-question > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.video-revision-question small,
.video-revision-question strong,
.video-revision-question em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-question small {
  color: var(--muted);
  font-size: 9px;
}

.video-revision-question strong {
  font-size: 11px;
  line-height: 1.4;
}

.video-revision-question em {
  color: #087d70;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
}

.video-revision-queue-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4eae8;
}

.video-revision-queue-note > span {
  grid-row: 1 / 3;
  padding: 4px 6px;
  border: 1px solid #edc996;
  border-radius: 4px;
  color: #945614;
  background: #fff6e9;
  font-size: 8px;
  font-weight: 800;
}

.video-revision-queue-note p {
  overflow: hidden;
  margin: 0;
  color: #344349;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-queue-note small {
  color: var(--muted);
  font-size: 8px;
}

.video-revision-edit {
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  font-size: 9px;
}

.video-revision-player-footer {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.video-revision-player-footer > span {
  padding: 5px 7px;
  border: 1px solid #edc996;
  border-radius: 4px;
  color: #945614;
  background: #fff6e9;
  font-size: 9px;
  font-weight: 800;
}

.video-revision-player-footer p {
  overflow: hidden;
  margin: 0;
  color: #2d3b41;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-revision-player-footer small {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1180px) {
  .video-revision-index {
    min-height: 0;
    max-height: 440px;
  }
}

@media (max-width: 640px) {
  .video-revision-player-footer {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .video-revision-player-footer small {
    display: none;
  }
}

/* Library workspace: quieter navigation and an editor-first publication scan. */
@media (min-width: 901px) {
  .app-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }
}

.sidebar {
  color: var(--ink);
  border-right: 1px solid #dce4e1;
  background: #f8faf9;
  box-shadow: none;
}

.sidebar-brand {
  min-height: 76px;
  padding-inline: 16px;
  border-bottom: 1px solid #e0e7e4;
}

.sidebar .brand-name {
  color: #172126;
  font-size: 17px;
}

.sidebar .brand-product {
  color: #6c7b80;
  font-size: 10px;
}

.sidebar-nav {
  padding: 18px 12px;
}

.sidebar .nav-item {
  min-height: 46px;
  color: #435159;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
}

.sidebar .nav-item:hover {
  color: #126f66;
  background: #eef6f4;
}

.sidebar .nav-item.is-active {
  color: #086f65;
  border-color: #c9e2dd;
  background: #e7f3f0;
  box-shadow: none;
}

.sidebar .nav-item svg {
  color: currentColor;
}

.sidebar .nav-count {
  color: #47605d;
  background: #d7e9e5;
}

.sidebar-footer {
  border-top: 1px solid #e0e7e4;
}

.sidebar-team-button {
  min-height: 42px;
  color: #36454b;
  border-color: #d5dfdc;
  background: #fff;
}

.sidebar-team-button:hover {
  color: #086f65;
  border-color: #a8cec7;
  background: #f3faf8;
}

.sidebar .sidebar-label,
.sidebar .organization-name,
.sidebar .environment-row {
  color: #66757b;
}

.sidebar .organization-name {
  color: #253238;
}

.topbar {
  min-height: 68px;
  padding-inline: 22px;
  border-bottom-color: #dfe6e3;
  background: rgba(255, 255, 255, .96);
}

.project-identity h2 {
  font-size: 15px;
}

.books-workspace {
  width: min(1480px, 100%);
  padding: 28px 32px 48px;
}

.books-header {
  min-height: 0;
  padding: 0 0 22px;
}

.books-header h1 {
  margin-top: 2px;
  font-size: 31px;
  font-weight: 740;
}

.books-header p:not(.eyebrow) {
  max-width: 660px;
  margin-top: 7px;
  color: #66757b;
  font-size: 13px;
  line-height: 1.5;
}

.books-header .button {
  min-height: 42px;
  padding-inline: 17px;
  font-size: 12px;
}

.books-workspace .operations-summary {
  order: 2;
  display: grid !important;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid #dce4e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31, 47, 52, .04);
}

.books-workspace .operations-summary > div {
  min-height: 72px;
  align-content: center;
  padding: 14px 20px;
  border-right: 1px solid #e5eae8;
}

.books-workspace .operations-summary > div:last-child {
  border-right: 0;
}

.books-workspace .operations-summary span {
  color: #718087;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.books-workspace .operations-summary strong {
  margin-top: 4px;
  color: #172126;
  font-size: 23px;
}

.books-workspace .operations-summary > div:first-child strong {
  color: #087f73;
}

.books-workspace .books-table-section {
  order: 3;
  margin: 0;
}

.books-workspace .production-table-heading {
  min-height: 58px;
  padding: 0 0 12px;
}

.books-workspace .production-table-heading h2 {
  font-size: 17px;
}

.library-heading-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.library-record-count {
  padding: 4px 7px;
  border: 1px solid #dce5e2;
  border-radius: 5px;
  color: #66757b;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
}

.book-table-tools .compact-search {
  width: 270px;
  min-height: 40px;
  border-color: #d4ddda;
  background: #fff;
}

.books-table {
  gap: 12px;
  padding-bottom: 30px;
}

.book-row.publication-folder-row {
  min-height: 122px;
  grid-template-columns: 54px minmax(240px, 1.35fr) minmax(170px, .72fr) minmax(190px, .82fr) minmax(190px, .78fr) 22px;
  gap: 20px;
  padding: 18px 20px;
  border-color: #dbe3e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 43, 48, .04);
}

.book-row.publication-folder-row:hover {
  border-color: #97c7bf;
  box-shadow: 0 13px 32px rgba(28, 43, 48, .075);
  transform: translateY(-1px);
}

.publication-folder-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.publication-folder-icon svg {
  width: 23px;
  height: 23px;
}

.publication-folder-row .book-row-title strong {
  font-size: 16px;
  line-height: 1.35;
}

.publication-folder-row .book-row-title span {
  margin-top: 7px;
  color: #6d7b81;
  font-size: 11px;
  line-height: 1.45;
}

.publication-readiness-cell {
  gap: 7px;
}

.publication-readiness-cell > small,
.publication-next-cell > small {
  color: #7a878c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.publication-readiness-cell > span {
  align-items: baseline;
  gap: 8px;
}

.publication-readiness-cell strong {
  font-size: 25px;
}

.publication-readiness-cell em {
  color: #6f7e83;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.publication-readiness-cell > i {
  height: 6px;
  background: #e5ebe9;
}

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

.publication-stage-cell > span {
  display: grid;
  min-height: 0;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto auto;
  place-items: initial;
  align-content: center;
  gap: 1px 8px;
  padding: 0;
  border: 0;
  color: #35444a;
  background: transparent;
  text-align: left;
}

.publication-stage-cell svg {
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  align-self: center;
}

.publication-stage-cell strong {
  font-size: 14px;
  line-height: 1.25;
}

.publication-stage-cell small {
  color: #718087;
  font-size: 10px;
}

.publication-next-cell {
  display: grid;
  gap: 3px;
  padding: 3px 0 3px 16px;
  border-left: 2px solid #82b8b0;
}

.publication-next-cell strong {
  color: #203036;
  font-size: 13px;
  line-height: 1.35;
}

.publication-next-cell em {
  color: #6c7a80;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.publication-next-cell.has-work strong {
  color: #bd513e;
}

@media (max-width: 1180px) and (min-width: 901px) {
  .books-workspace {
    padding-inline: 24px;
  }

  .book-row.publication-folder-row {
    grid-template-columns: 52px minmax(170px, 1.05fr) minmax(120px, .68fr) minmax(135px, .72fr) minmax(130px, .75fr) 20px;
    gap: 12px;
  }

  .publication-next-cell {
    display: grid;
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 224px;
  }

  .sidebar-close.mobile-only {
    color: #314147;
    border-color: #d4ddda;
    background: #fff;
  }

  .books-workspace {
    padding: 20px 16px 36px;
  }

  .books-workspace .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .books-workspace .operations-summary > div:nth-child(2) {
    border-right: 0;
  }

  .books-workspace .operations-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e5eae8;
  }

  .book-row.publication-folder-row {
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    gap: 12px 14px;
    padding: 16px;
  }

  .publication-folder-icon {
    width: 46px;
    height: 46px;
  }

  .publication-readiness-cell,
  .publication-next-cell {
    grid-column: 2 / 4;
  }

  .publication-stage-cell {
    display: none;
  }

  .publication-next-cell {
    display: grid;
    padding: 10px 0 0;
    border-top: 1px solid #e5eae8;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .books-header {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .books-header .button {
    width: 100%;
  }

  .books-workspace .production-table-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .book-table-tools,
  .book-table-tools .compact-search {
    width: 100%;
  }

  .topbar > .user-menu {
    display: grid;
    min-width: 100px;
    grid-column: 4;
    grid-template-columns: 60px 34px;
    gap: 6px;
    justify-self: end;
  }

  .topbar .locale-select-topbar {
    margin: 0;
  }

  .topbar .locale-select-topbar select {
    width: 60px;
    min-width: 60px;
    padding: 0 18px 0 8px;
  }

  .topbar > .user-menu > #signOutButton {
    width: 34px;
    min-width: 34px;
  }
}
