/*
 * Matsorik Publisher Studio V2
 * Editorial operations UI layered over the stable vanilla application.
 * Behavior, ids and production contracts remain owned by index.html/app.js.
 */

:root {
  --ui-bg: #f4f6f5;
  --ui-panel: #ffffff;
  --ui-panel-subtle: #f8faf9;
  --ui-ink: #172126;
  --ui-ink-soft: #35464d;
  --ui-muted: #68777d;
  --ui-muted-light: #879399;
  --ui-line: #d9e1de;
  --ui-line-strong: #c3cfcb;
  --ui-accent: #087f73;
  --ui-accent-strong: #06685f;
  --ui-accent-soft: #e8f4f1;
  --ui-success: #247a50;
  --ui-success-soft: #ebf6ef;
  --ui-warning: #9b641b;
  --ui-warning-soft: #fff6e8;
  --ui-danger: #b74f3d;
  --ui-danger-soft: #fff1ed;
  --ui-radius: 6px;
  --ui-radius-small: 4px;
  --ui-shadow: 0 14px 38px rgba(24, 37, 42, .07);
  --ui-shadow-strong: 0 26px 70px rgba(17, 30, 35, .2);
  --paper: var(--ui-bg);
  --surface: var(--ui-panel);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --line-dark: var(--ui-line-strong);
  --teal: var(--ui-accent);
  --teal-soft: var(--ui-accent-soft);
  --green: var(--ui-success);
  --coral: var(--ui-danger);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  color: var(--ui-ink);
  background: var(--ui-bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ui-ink);
  background: var(--ui-bg);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #fff;
  background: var(--ui-accent);
}

:focus-visible {
  outline: 3px solid rgba(8, 127, 115, .24) !important;
  outline-offset: 2px !important;
}

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

.button,
.icon-button {
  border-radius: var(--ui-radius);
}

.button {
  min-height: 40px;
  gap: 8px;
  padding: 0 15px;
  border-width: 1px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button svg,
.icon-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.button-primary {
  color: #fff;
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  box-shadow: 0 7px 18px rgba(8, 127, 115, .16);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--ui-accent-strong);
  background: var(--ui-accent-strong);
  box-shadow: 0 9px 22px rgba(8, 104, 95, .2);
}

.button-secondary,
.button-quiet {
  color: var(--ui-ink-soft);
  border-color: var(--ui-line-strong);
  background: #fff;
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  color: var(--ui-accent-strong);
  border-color: #8dbcb5;
  background: #f4faf8;
}

.button-success {
  color: #fff;
  border-color: var(--ui-success);
  background: var(--ui-success);
}

.button-danger {
  color: var(--ui-danger);
  border-color: #e7b9af;
  background: #fff;
}

.button-danger:hover:not(:disabled) {
  border-color: var(--ui-danger);
  background: var(--ui-danger-soft);
}

.button:disabled,
.icon-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  color: #53636a;
  border: 1px solid var(--ui-line);
  background: #fff;
  box-shadow: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.icon-button:hover:not(:disabled) {
  color: var(--ui-accent-strong);
  border-color: #a2c7c1;
  background: var(--ui-accent-soft);
}

input,
select,
textarea {
  width: 100%;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(23, 33, 38, .02);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8b989d;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ui-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 127, 115, .12);
}

/* Authentication */
.auth-view {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(280px, .78fr) minmax(440px, 1.22fr);
  background: var(--ui-panel);
}

.auth-brand {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
  padding: 38px 42px;
  color: var(--ui-ink);
  border-right: 1px solid var(--ui-line);
  background: #edf3f1;
}

.auth-brand::after {
  position: absolute;
  right: 42px;
  bottom: 42px;
  left: 42px;
  height: 1px;
  background: #cfdbd7;
  content: "";
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  border-radius: var(--ui-radius);
  background: var(--ui-accent);
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
}

.brand-mark-small {
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.brand-name {
  margin: 0;
  color: var(--ui-ink);
  font-size: 18px;
  font-weight: 780;
  line-height: 1.2;
}

.brand-product {
  margin: 2px 0 0;
  color: var(--ui-muted);
  font-size: 11px;
}

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

.auth-panel {
  width: min(520px, calc(100% - 64px));
  align-self: center;
  justify-self: center;
  padding: 46px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow);
}

.auth-panel h1 {
  max-width: 440px;
  margin: 0;
  font-size: 34px;
  font-weight: 750;
  line-height: 1.13;
}

.auth-copy {
  max-width: 460px;
  margin: 16px 0 26px;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-panel .button-wide {
  width: 100%;
  min-height: 46px;
}

.access-brand-status {
  position: absolute;
  right: 42px;
  bottom: 58px;
  left: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ui-ink-soft);
}

/* Application frame */
.app-shell {
  min-height: 100dvh;
  grid-template-columns: 224px minmax(0, 1fr);
  color: var(--ui-ink);
  background: var(--ui-bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100dvh;
  flex-direction: column;
  color: var(--ui-ink);
  border-right: 1px solid var(--ui-line);
  background: #f9fbfa;
  box-shadow: none;
}

.sidebar-brand {
  min-height: 68px;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--ui-line);
}

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

.sidebar-brand .brand-product {
  font-size: 9px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  padding: 16px 12px;
}

.sidebar .nav-item {
  display: grid;
  min-height: 42px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  color: #45555c;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  background: transparent;
  font-size: 12px;
  font-weight: 680;
  text-align: left;
}

.sidebar .nav-item:hover {
  color: var(--ui-accent-strong);
  background: #f0f6f4;
}

.sidebar .nav-item.is-active {
  color: var(--ui-accent-strong);
  border-color: #c7ded9;
  background: var(--ui-accent-soft);
  box-shadow: none;
}

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

.sidebar .nav-count {
  min-width: 23px;
  height: 22px;
  padding: 0 6px;
  color: #41615c;
  border-radius: 11px;
  background: #d7e9e5;
  font-size: 10px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 16px;
  border-top: 1px solid var(--ui-line);
}

.sidebar-team-button {
  width: 100%;
  min-height: 40px;
  margin-bottom: 16px;
  color: var(--ui-ink-soft);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
}

.sidebar-label {
  color: var(--ui-muted-light);
  font-size: 9px;
  font-weight: 760;
}

.organization-name {
  color: var(--ui-ink-soft);
  font-size: 12px;
}

.environment-row {
  color: var(--ui-muted);
  font-size: 10px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  min-height: 68px;
  padding: 0 24px;
  border-bottom: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 8px rgba(23, 33, 38, .025);
  backdrop-filter: blur(16px);
}

.project-identity .eyebrow {
  margin-bottom: 2px;
}

.project-identity h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 730;
}

.topbar-metrics {
  margin-left: auto;
}

.topbar-metrics > div {
  min-width: 92px;
  padding: 0 17px;
  border-left: 1px solid var(--ui-line);
}

.topbar-metrics strong {
  color: var(--ui-ink);
  font-size: 17px;
}

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

.user-menu {
  gap: 9px;
}

.avatar {
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--ui-accent);
  font-size: 12px;
}

.user-copy strong {
  font-size: 11px;
}

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

.locale-select-topbar select {
  min-height: 36px;
  font-size: 10px;
}

.workspace {
  width: min(1600px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 28px 32px 46px;
}

.books-workspace,
.book-workspace,
.home-workspace,
.deliveries-workspace {
  width: min(1540px, 100%);
}

.books-workspace {
  display: flex;
  flex-direction: column;
}

/* Publication portfolio */
.books-header {
  display: flex;
  min-height: 92px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 22px;
  border-bottom: 0;
  order: 1;
}

.books-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 760;
  line-height: 1.1;
}

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

.books-header .button {
  min-height: 44px;
  padding-inline: 17px;
}

.operations-status {
  display: flex !important;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 14px;
  padding: 15px 17px;
  border: 1px solid var(--ui-line);
  border-left: 4px solid var(--ui-accent);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: none;
  order: 2;
}

.books-workspace .operations-status {
  display: flex !important;
  order: 2;
  margin: 0 0 14px;
}

.operations-status[data-status="critical"] {
  border-left-color: var(--ui-danger);
}

.operations-status[data-status="review"] {
  border-left-color: var(--ui-warning);
}

.operations-status-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.operations-risk-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ui-accent);
  border-radius: var(--ui-radius);
  background: var(--ui-accent-soft);
}

.operations-status[data-status="critical"] .operations-risk-icon {
  color: var(--ui-danger);
  background: var(--ui-danger-soft);
}

.operations-status[data-status="review"] .operations-risk-icon {
  color: var(--ui-warning);
  background: var(--ui-warning-soft);
}

.operations-risk-icon svg {
  width: 20px;
  height: 20px;
}

.operations-status h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 740;
}

.operations-status-detail,
#operationsStatusDetail {
  max-width: 760px;
  margin: 3px 0 0;
  color: var(--ui-muted);
  font-size: 11px;
}

.operations-status-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.books-workspace .operations-summary {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: none;
  order: 3;
}

.books-workspace .operations-summary > div {
  min-height: 70px;
  align-content: center;
  padding: 13px 17px;
  border-right: 1px solid var(--ui-line);
}

.books-workspace .operations-summary > div:last-child {
  border-right: 0;
}

.books-workspace .operations-summary span {
  color: var(--ui-muted);
  font-size: 10px;
  font-weight: 680;
  text-transform: none;
}

.books-workspace .operations-summary strong {
  margin-top: 4px;
  color: var(--ui-ink);
  font-size: 22px;
  font-weight: 750;
}

.books-workspace .operations-summary > div:first-child strong {
  color: var(--ui-accent-strong);
}

.operations-grid {
  gap: 14px;
  margin-bottom: 24px;
  order: 4;
}

.operations-panel {
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: none;
}

.books-table-section {
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  order: 5;
}

.books-workspace .production-table-heading {
  min-height: 58px;
  padding: 0 0 11px;
  border-bottom: 0;
}

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

.library-heading-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.library-record-count,
.data-count {
  padding: 3px 6px;
  color: var(--ui-muted);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-small);
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}

.book-table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-search {
  min-height: 40px;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: #fff;
}

.book-table-tools .compact-search {
  width: 290px;
}

.compact-search input {
  min-height: 38px;
  border: 0;
  box-shadow: none;
}

.book-table-head {
  display: none;
}

.books-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
}

.publication-book-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 122px;
  grid-template-columns: 52px minmax(300px, 1.3fr) minmax(130px, .42fr) minmax(220px, .72fr);
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
  color: var(--ui-ink);
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: left;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.publication-book-card:last-child {
  border-bottom: 0;
}

.publication-book-card:hover {
  z-index: 1;
  background: #f8fbfa;
  box-shadow: inset 3px 0 var(--ui-accent);
  transform: none;
}

.publication-book-cover {
  display: grid;
  width: 50px;
  height: 66px;
  grid-template-rows: auto 1fr auto;
  padding: 7px;
  color: #2b504c;
  border: 1px solid #bed5d0;
  border-radius: var(--ui-radius-small);
  background: #edf6f4;
  box-shadow: inset 4px 0 rgba(8, 127, 115, .12);
}

.publication-book-cover span,
.publication-book-cover small {
  font-size: 7px;
  font-weight: 760;
}

.publication-book-cover strong {
  align-self: center;
  font-size: 15px;
}

.publication-book-main {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.publication-book-type {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ui-muted);
  font-size: 8px;
  font-weight: 760;
}

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

.publication-book-title strong,
.publication-book-title em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-book-title strong {
  font-size: 15px;
  font-weight: 740;
}

.publication-book-title em {
  margin-top: 3px;
  color: var(--ui-muted);
  font-size: 10px;
  font-style: normal;
}

.publication-book-track {
  display: flex;
  align-items: center;
  gap: 7px;
}

.publication-book-track > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--ui-muted);
}

.publication-book-track > span > svg {
  width: 13px;
  height: 13px;
}

.publication-book-track > span > span {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.publication-book-track small {
  color: var(--ui-muted-light);
  font-size: 7px;
  font-weight: 700;
}

.publication-book-track strong {
  font-size: 9px;
}

.publication-book-track > span.is-complete {
  color: var(--ui-success);
}

.publication-book-track > span.is-current {
  color: var(--ui-accent-strong);
}

.publication-book-track > i {
  display: block;
  width: 28px;
  height: 1px;
  overflow: hidden;
  background: var(--ui-line);
}

.publication-book-track > i b {
  display: block;
  height: 100%;
  background: var(--ui-accent);
}

.publication-book-readiness,
.publication-book-next {
  display: grid;
  align-content: center;
  gap: 4px;
}

.publication-book-readiness small,
.publication-book-next small {
  color: var(--ui-muted-light);
  font-size: 8px;
  font-weight: 760;
}

.publication-book-readiness strong {
  font-size: 23px;
  line-height: 1;
}

.publication-book-readiness > i {
  display: block;
  width: 100%;
  max-width: 112px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e5ebe9;
}

.publication-book-readiness > i b {
  display: block;
  height: 100%;
  background: var(--ui-accent);
}

.publication-book-readiness em,
.publication-book-next em {
  color: var(--ui-muted);
  font-size: 9px;
  font-style: normal;
}

.publication-book-next {
  position: relative;
  min-height: 64px;
  padding: 8px 34px 8px 15px;
  border-left: 1px solid var(--ui-line);
}

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

.publication-book-next.has-work strong {
  color: var(--ui-danger);
}

.publication-book-next > svg {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 16px;
  height: 16px;
  color: var(--ui-muted-light);
  transform: translateY(-50%);
}

.production-empty {
  min-height: 280px;
  border: 0;
  background: #fff;
}

/* Book workspace and source review */
.book-workspace {
  padding-top: 20px;
}

.book-strip {
  min-height: 82px;
  padding: 14px 18px;
  border: 1px solid var(--ui-line);
  border-bottom: 0;
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
  background: #fff;
  box-shadow: none;
}

.book-strip-copy h1 {
  margin: 1px 0 0;
  font-size: 21px;
  font-weight: 750;
}

.book-tabs {
  min-height: 52px;
  gap: 2px;
  padding: 5px 13px 0;
  border: 1px solid var(--ui-line);
  border-top: 0;
  background: #fff;
}

.book-tab {
  position: relative;
  min-width: 0;
  min-height: 45px;
  gap: 7px;
  padding: 0 14px;
  color: var(--ui-muted);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

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

.book-tab:hover {
  color: var(--ui-ink);
  background: #f7f9f8;
}

.book-tab.is-active {
  color: var(--ui-accent-strong);
  background: transparent;
}

.book-tab.is-active::after {
  background: var(--ui-accent);
}

.book-publish-readiness {
  border: 1px solid var(--ui-line);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  background: #fff;
  box-shadow: none;
}

.book-tab-panel {
  padding: 18px 0 26px;
}

#bookContentPanel {
  padding: 0;
}

.candidate-progress-strip {
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-top: 0;
  border-radius: 0;
  background: #fff;
}

.candidate-editor {
  min-height: calc(100dvh - 220px);
  grid-template-columns: 282px minmax(520px, 1fr);
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow);
}

.book-workspace:not(.is-bulk-mode) .candidate-list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--ui-line);
  background: var(--ui-panel-subtle);
}

.candidate-panel-heading {
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ui-line);
  background: #fff;
}

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

.candidate-filters {
  gap: 3px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--ui-line);
  background: #f1f5f3;
}

.candidate-filter,
.candidate-approval-filter {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-small);
  color: var(--ui-muted);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.candidate-filter.is-active,
.candidate-approval-filter.is-active {
  color: var(--ui-ink);
  border-color: var(--ui-line);
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 33, 38, .06);
}

.candidate-list-tools {
  gap: 6px;
  padding: 9px;
  border-bottom: 1px solid var(--ui-line);
  background: #fff;
}

.candidate-list {
  min-height: 0;
  max-height: none;
  flex: 1;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.candidate-row {
  min-height: 68px;
  margin: 0 0 4px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-small);
  background: transparent;
}

.candidate-row:hover {
  border-color: var(--ui-line);
  background: #fff;
}

.candidate-row.is-active {
  border-color: #a8d0c9;
  background: var(--ui-accent-soft);
  box-shadow: inset 3px 0 var(--ui-accent);
}

.candidate-thumb {
  width: 38px;
  height: 48px;
  object-fit: cover;
  border-color: var(--ui-line);
  border-radius: 2px;
}

.candidate-row-copy strong {
  font-size: 11px;
}

.candidate-row-copy span {
  color: var(--ui-muted);
  font-size: 9px;
}

.candidate-canvas-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #eef2f0;
}

.candidate-canvas-panel .candidate-panel-heading {
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}

.canvas-mode {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #f2f5f4;
}

.canvas-mode-button {
  min-height: 32px;
  padding: 0 9px;
  color: var(--ui-muted);
  border: 0;
  border-radius: var(--ui-radius-small);
  background: transparent;
  font-size: 9px;
}

.canvas-mode-button.is-active {
  color: var(--ui-ink);
  border: 0;
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 33, 38, .07);
}

.candidate-page-stage,
.candidate-crop-stage {
  height: auto;
  min-height: 560px;
  padding: 30px;
  background-color: #f3f6f5;
  background-image: linear-gradient(#e5ebe8 1px, transparent 1px), linear-gradient(90deg, #e5ebe8 1px, transparent 1px);
  background-size: 24px 24px;
}

.candidate-crop-stage img {
  max-width: min(94%, 980px);
  max-height: calc(100dvh - 320px);
  padding: 18px;
  border: 1px solid #d9e1de;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(25, 42, 48, .12);
}

.candidate-flow-bar {
  min-height: 68px;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--ui-line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 24px rgba(23, 33, 38, .045);
}

.candidate-flow-navigation small {
  color: var(--ui-muted);
  font-size: 8px;
}

.candidate-review-actions {
  gap: 7px;
  padding: 0;
}

.candidate-review-actions .button {
  min-height: 42px;
}

.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
  grid-template-columns: 282px minmax(520px, 1fr);
}

.book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-inspector {
  position: fixed;
  z-index: 80;
  top: 84px;
  right: 18px;
  bottom: 18px;
  display: block;
  width: min(350px, calc(100vw - 36px));
  overflow-y: auto;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow-strong);
}

.candidate-inspector .candidate-form {
  gap: 12px;
  padding: 14px;
}

.candidate-inspector .candidate-advanced-tools,
.candidate-inspector .candidate-more-actions {
  margin: 0 14px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
}

/* Question review */
#questionWorkspace {
  width: min(1600px, 100%);
  padding-top: 20px;
}

.question-strip {
  min-height: 76px;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
  background: #fff;
  box-shadow: none;
}

.question-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: var(--ui-panel-subtle);
  font-size: 18px;
  font-weight: 760;
}

.question-heading h1 {
  margin: 1px 0 0;
  font-size: 20px;
  font-weight: 740;
}

.badge {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 14px;
  font-size: 9px;
  font-weight: 720;
}

.assurance-bar {
  display: grid;
  min-height: 78px;
  grid-template-columns: minmax(300px, 1fr) minmax(420px, .82fr);
  align-items: center;
  gap: 18px;
  padding: 11px 15px;
  border: 1px solid var(--ui-line);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  background: #fff;
  box-shadow: none;
}

.assurance-lead {
  gap: 11px;
}

.assurance-seal {
  width: 36px;
  height: 36px;
  border-radius: var(--ui-radius);
}

.assurance-lead h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 730;
}

.assurance-lead p:last-child {
  margin: 2px 0 0;
  color: var(--ui-muted);
  font-size: 9px;
}

.assurance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-line);
  gap: 1px;
}

.assurance-metrics > div {
  min-height: 48px;
  align-content: center;
  padding: 7px 10px;
  border: 0;
  background: #fff;
}

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

.assurance-metrics span {
  color: var(--ui-muted);
  font-size: 8px;
}

.value-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.content-stage,
.review-rail {
  min-width: 0;
}

.delivery-preview {
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow);
}

.delivery-heading {
  min-height: 66px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ui-line);
}

.delivery-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 740;
}

.proof-mode {
  padding: 3px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #f2f5f4;
}

.proof-mode-button {
  min-height: 32px;
  border: 0;
  border-radius: var(--ui-radius-small);
  color: var(--ui-muted);
  background: transparent;
}

.proof-mode-button.is-active {
  color: var(--ui-ink);
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 33, 38, .07);
}

.delivery-format {
  color: var(--ui-muted);
  font-size: 9px;
}

.delivery-video-frame {
  width: 100%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  background: #11191d;
}

.delivery-video-frame video,
.delivery-video-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.proof-timeline {
  min-height: 44px;
  border-top: 1px solid #26343a;
  background: #11191d;
}

.delivery-gates-heading {
  padding: 12px 14px 7px;
}

.assurance-checks {
  padding: 0 14px 14px;
}

.review-evidence-details {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
}

.review-evidence-details > summary,
.step-evidence-details > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: var(--ui-ink-soft);
  cursor: pointer;
  list-style: none;
}

.review-evidence-details > summary::-webkit-details-marker,
.step-evidence-details > summary::-webkit-details-marker {
  display: none;
}

.review-evidence-details > summary:hover,
.step-evidence-details > summary:hover {
  background: var(--ui-panel-subtle);
}

.tabs {
  min-height: 48px;
  padding: 4px 10px 0;
  border-top: 1px solid var(--ui-line);
  border-bottom: 1px solid var(--ui-line);
  background: #fff;
}

.tab {
  position: relative;
  min-height: 43px;
  padding: 0 12px;
  border: 0;
  color: var(--ui-muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

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

.tab.is-active {
  color: var(--ui-accent-strong);
}

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

.value-workspace-grid .tab-panel {
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.visual-compare-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.visual-column {
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
}

.visual-column .panel-heading {
  min-height: 54px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--ui-line);
}

.visual-column .image-stage {
  min-height: 300px;
  border: 0;
  background: #f6f8f7;
}

.review-rail {
  position: sticky;
  top: 84px;
  display: flex;
  max-height: calc(100dvh - 104px);
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow);
}

.decision-overview {
  padding: 15px 15px 11px;
  border-bottom: 1px solid var(--ui-line);
}

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

.decision-overview > p {
  margin: 5px 0 0;
  color: var(--ui-muted);
  font-size: 10px;
}

.answer-band {
  min-height: 62px;
  margin: 0;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 0;
  background: #f7faf9;
}

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

.review-form {
  gap: 11px;
  margin: 0;
  padding: 15px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.review-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.review-quick-actions button {
  min-height: 40px;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-small);
  color: var(--ui-muted);
  background: #fff;
  font-size: 8px;
}

.review-quick-actions button:hover,
.review-quick-actions button.is-active {
  color: var(--ui-accent-strong);
  border-color: #9dc5be;
  background: var(--ui-accent-soft);
}

.review-actions {
  gap: 7px;
}

.generation-panel {
  margin: 0;
  padding: 12px 15px;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 0;
  background: var(--ui-panel-subtle);
}

.step-evidence-details {
  order: 5;
  border-top: 1px solid var(--ui-line);
}

.editor-action-dock {
  border-color: var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 38px rgba(23, 33, 38, .13);
  backdrop-filter: blur(14px);
}

/* Upload flows */
.upload-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--ui-ink);
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: var(--ui-shadow-strong);
}

.upload-dialog::backdrop {
  background: rgba(17, 30, 35, .56);
  backdrop-filter: blur(5px);
}

.upload-form {
  display: grid;
  padding: 0;
}

.dialog-heading {
  min-height: 78px;
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--ui-line);
  background: #fff;
}

.dialog-heading h2 {
  margin: 1px 0 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.2;
}

.upload-dropzone {
  min-height: 290px;
  margin: 18px 18px 0;
  overflow: hidden;
  border: 1px dashed #9bb8b2;
  border-radius: var(--ui-radius);
  background: #f5faf8;
}

.upload-placeholder {
  gap: 7px;
}

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

.upload-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px;
}

.upload-fields label {
  display: grid;
  align-content: start;
  gap: 6px;
}

.upload-fields label > span {
  color: var(--ui-ink-soft);
  font-size: 10px;
  font-weight: 720;
}

.upload-fields label > small,
.upload-fields label > span small {
  color: var(--ui-muted);
  font-size: 8px;
  font-weight: 500;
}

.upload-pipeline {
  display: grid;
  grid-template-columns: repeat(7, auto);
  justify-content: center;
  gap: 8px;
  margin: 0 18px 18px;
  padding: 12px;
  color: var(--ui-muted);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-panel-subtle);
  font-size: 9px;
  font-weight: 680;
}

.upload-pipeline svg {
  width: 13px;
  height: 13px;
}

.dialog-actions {
  min-height: 76px;
  gap: 18px;
  margin: 0;
  padding: 13px 18px;
  border-top: 1px solid var(--ui-line);
  background: var(--ui-panel-subtle);
}

.dialog-actions p {
  max-width: 520px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 10px;
  line-height: 1.45;
}

.book-upload-dialog {
  width: min(940px, calc(100vw - 32px));
}

.book-upload-body {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(380px, 1.18fr);
  min-height: 400px;
}

.book-upload-source,
.book-upload-metadata {
  min-width: 0;
  padding: 20px;
}

.book-upload-source {
  border-right: 1px solid var(--ui-line);
  background: var(--ui-panel-subtle);
}

.form-section-label {
  margin: 0 0 10px;
  color: var(--ui-muted);
  font-size: 9px;
  font-weight: 780;
  text-transform: uppercase;
}

.book-upload-dialog .pdf-dropzone {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 28px 20px;
  border: 1px dashed #93b4ae;
  border-radius: var(--ui-radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.book-upload-dialog .pdf-dropzone:hover,
.book-upload-dialog .pdf-dropzone:focus-within {
  border-color: var(--ui-accent);
  background: #f5fbf9;
  box-shadow: 0 0 0 3px rgba(8, 127, 115, .08);
}

.pdf-dropzone span {
  display: grid;
  max-width: 250px;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.pdf-dropzone svg {
  width: 36px;
  height: 36px;
  margin-bottom: 3px;
  color: var(--ui-accent);
}

.pdf-dropzone strong {
  font-size: 13px;
}

.pdf-dropzone small {
  color: var(--ui-muted);
  font-size: 9px;
  line-height: 1.45;
}

.book-upload-safety {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  margin-top: 13px;
  padding: 12px;
  color: var(--ui-ink-soft);
  border: 1px solid #cfe1dc;
  border-radius: var(--ui-radius);
  background: var(--ui-accent-soft);
}

.book-upload-safety > svg {
  width: 20px;
  height: 20px;
  color: var(--ui-accent);
}

.book-upload-safety p,
.book-upload-safety strong,
.book-upload-safety span {
  display: block;
  margin: 0;
}

.book-upload-safety strong {
  font-size: 10px;
}

.book-upload-safety span {
  margin-top: 3px;
  color: #5f716e;
  font-size: 9px;
  line-height: 1.45;
}

.book-upload-metadata .upload-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.book-upload-dialog .upload-progress-copy {
  padding: 12px 18px 6px;
  border-top: 1px solid var(--ui-line);
}

.book-upload-dialog .upload-progress-track {
  height: 5px;
  margin: 0 18px 13px;
  border-radius: 3px;
  background: #e5ebe9;
}

.book-upload-dialog .upload-progress-track span {
  background: var(--ui-accent);
}

.book-upload-dialog .dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-upload-dialog .dialog-actions .button {
  min-height: 44px;
}

/* Loading, errors and transient feedback */
.toast {
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-strong);
  font-size: 11px;
}

.route-progress-bar,
.upload-progress-track > span {
  background: var(--ui-accent);
}

.loading-view {
  min-height: 100dvh;
  background: var(--ui-bg);
}

.ingestion-progress,
.generation-failure {
  border-radius: var(--ui-radius);
}

/* Medium screens */
@media (max-width: 1260px) {
  .workspace {
    padding-inline: 22px;
  }

  .publication-book-card {
    grid-template-columns: 50px minmax(260px, 1.3fr) minmax(110px, .4fr) minmax(180px, .7fr);
    gap: 14px;
  }

  .publication-book-track > i {
    width: 18px;
  }

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

  .visual-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-column:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .topbar-metrics > div {
    min-width: 76px;
    padding-inline: 11px;
  }

  .publication-book-card {
    grid-template-columns: 48px minmax(220px, 1fr) minmax(170px, .7fr);
  }

  .publication-book-readiness {
    display: none;
  }

  .candidate-editor,
  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
    grid-template-columns: 250px minmax(480px, 1fr);
  }

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

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

  .review-rail {
    position: static;
    display: grid;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .decision-overview,
  .answer-band,
  .generation-panel,
  .step-evidence-details {
    grid-column: 1 / -1;
  }

  .review-form {
    grid-column: 1 / -1;
  }
}

/* Tablet and mobile */
@media (max-width: 900px) {
  .auth-view {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 84px;
    align-items: center;
    padding: 20px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }

  .auth-brand::after,
  .access-brand-status {
    display: none;
  }

  .auth-panel {
    width: min(520px, calc(100% - 32px));
    margin: 42px auto;
    padding: 32px;
  }

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    width: 224px;
    transform: translateX(-100%);
  }

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

  .topbar {
    padding-inline: 14px;
  }

  .topbar-metrics,
  .user-copy {
    display: none;
  }

  .workspace {
    padding: 20px 16px 36px;
  }

  .books-header {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .books-header .button {
    width: 100%;
  }

  .operations-status {
    align-items: stretch;
    flex-direction: column;
  }

  .operations-status-actions {
    width: 100%;
  }

  .operations-status-actions .button {
    flex: 1;
  }

  .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 var(--ui-line);
  }

  .books-workspace .production-table-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .book-table-tools,
  .book-table-tools .compact-search {
    width: 100%;
  }

  .publication-book-card {
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    gap: 11px;
    padding: 14px;
  }

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

  .publication-book-main {
    grid-column: 2;
  }

  .publication-book-next {
    grid-column: 2 / 4;
    min-height: 0;
    padding: 10px 26px 0 0;
    border-top: 1px solid var(--ui-line);
    border-left: 0;
  }

  .publication-book-track {
    flex-wrap: wrap;
  }

  .book-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .book-tabs {
    overflow-x: auto;
  }

  .candidate-editor,
  .book-workspace.is-inspector-open:not(.is-bulk-mode) .candidate-editor {
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .book-workspace:not(.is-bulk-mode) .candidate-list-panel {
    max-height: 390px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }

  .candidate-list {
    min-height: 250px;
  }

  .candidate-page-stage,
  .candidate-crop-stage {
    min-height: 520px;
  }

  .candidate-flow-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-review-actions {
    width: 100%;
  }

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

  .question-status {
    width: 100%;
    padding-left: 54px;
  }

  .delivery-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .delivery-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .visual-column:last-child {
    grid-column: auto;
  }

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

  .book-upload-source {
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }
}

@media (max-width: 640px) {
  .auth-panel {
    margin: 20px auto;
    padding: 24px 20px;
  }

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

  .topbar {
    min-height: 62px;
  }

  .topbar .project-identity h2 {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    padding: 14px 10px 28px;
  }

  .books-header h1 {
    font-size: 25px;
  }

  .operations-status {
    padding: 13px;
  }

  .operations-status-copy {
    align-items: flex-start;
  }

  .operations-status-actions {
    display: grid;
    grid-template-columns: 38px 1fr;
  }

  .operations-status-actions .button-primary {
    grid-column: 1 / -1;
  }

  .books-workspace .operations-summary > div {
    min-height: 66px;
    padding: 11px 12px;
  }

  .books-workspace .operations-summary strong {
    font-size: 19px;
  }

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

  .book-strip {
    padding: 12px;
  }

  .book-strip-copy {
    min-width: calc(100% - 52px);
  }

  .book-strip-copy h1 {
    font-size: 18px;
  }

  .book-strip > .button {
    width: 100%;
  }

  .book-tab {
    flex: 0 0 auto;
    padding-inline: 12px;
  }

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

  .candidate-panel-heading .canvas-mode {
    width: 100%;
    overflow-x: auto;
  }

  .canvas-mode-button {
    flex: 1 0 auto;
  }

  .candidate-page-stage,
  .candidate-crop-stage {
    min-height: 440px;
    padding: 16px;
  }

  .candidate-crop-stage img {
    max-width: 100%;
    padding: 9px;
  }

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

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

  .delivery-video-frame {
    min-height: 220px;
  }

  .proof-mode {
    width: 100%;
  }

  .proof-mode-button {
    flex: 1;
  }

  .review-rail {
    display: flex;
  }

  .editor-action-dock {
    right: 10px;
    bottom: 10px;
    left: 10px;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-dialog,
  .book-upload-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .dialog-heading {
    padding: 13px 14px;
  }

  .upload-dropzone {
    min-height: 220px;
    margin: 14px 14px 0;
  }

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

  .upload-pipeline {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .upload-pipeline svg {
    display: none;
  }

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

  .dialog-actions .button {
    width: 100%;
  }

  .book-upload-source,
  .book-upload-metadata {
    padding: 16px 14px;
  }

  .book-upload-dialog .pdf-dropzone {
    min-height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
