:root {
  color-scheme: light;
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-raised: #fbfcfe;
  --surface-muted: #f3f6fa;
  --text: #202833;
  --muted: #657286;
  --line: #d4dce7;
  --line-strong: #b8c4d3;
  --accent: #0f6b78;
  --accent-strong: #0a4f59;
  --accent-soft: #e6f4f6;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --danger-line: #f0b8b2;
  --warn: #9a5b00;
  --warn-bg: #fff7e6;
  --warn-line: #e8c37f;
  --ok: #25734d;
  --ok-bg: #edf8f1;
  --ok-line: #a8d7bd;
  --info: #315f99;
  --info-bg: #eef5ff;
  --info-line: #b8ccea;
  --shadow: 0 12px 28px rgba(21, 31, 45, 0.08);
  --font-sans: "Segoe UI", Arial, sans-serif;
  --shell-bg: #111c27;
  --shell-border: #071016;
  --shell-text: #ffffff;
  --shell-muted: #b9c6d3;
  --shell-nav-text: #d8e2ea;
  --shell-nav-border: #40566a;
  --shell-nav-hover-border: #6f879d;
  --shell-nav-critical-text: #ffe4e7;
  --shell-nav-critical-border: #b45d66;
  --focus-ring: #0f6b78;
  --content-max: 1680px;
  --header-height: 60px;
  --gutter-desktop: 22px;
  --gutter-header: 24px;
  --gutter-mobile: 12px;
  --gutter-mobile-header: 14px;
  --radius-control: 6px;
  --radius-surface: 8px;
  --control-default: 38px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    linear-gradient(180deg, #f7f9fc 0, var(--bg) 260px),
    var(--bg);
  line-height: 1.45;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  translate: 0 -160%;
  border: 2px solid var(--accent-strong);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 750;
}

.skip-link:focus {
  translate: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 var(--gutter-header);
  background: var(--shell-bg);
  color: var(--shell-text);
  border-bottom: 1px solid var(--shell-border);
  box-shadow: 0 2px 12px rgba(10, 18, 28, 0.22);
}

.app-header-anonymous {
  padding-right: 22px;
  padding-left: 22px;
  border-bottom: 0;
  box-shadow: none;
}

.app-header-anonymous .brand-lockup {
  gap: 10px;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand {
  color: var(--shell-text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand.is-current {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.scope {
  flex: 0 0 auto;
  color: var(--shell-muted);
  font-size: 13px;
  white-space: nowrap;
}

.top-nav,
.top-nav-panel,
.top-nav form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.top-nav {
  flex: 0 0 auto;
}

.top-nav-menu {
  display: none;
}

.nav-menu-button {
  display: none;
}

.nav-link {
  border: 1px solid var(--shell-nav-border);
  border-radius: var(--radius-control);
  padding: 5px 8px;
  color: var(--shell-nav-text);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--shell-text);
  border-color: var(--shell-nav-hover-border);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--shell-text);
  border-color: var(--shell-nav-hover-border);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link-critical.is-current {
  color: var(--shell-nav-critical-text);
  border-color: var(--shell-nav-critical-border);
  background: rgba(180, 93, 102, 0.18);
}

.nav-link-critical {
  border-color: var(--shell-nav-critical-border);
  color: var(--shell-nav-critical-text);
}

.nav-link-critical strong {
  margin-left: 3px;
}

.user-pill {
  max-width: clamp(104px, 7.5vw, 140px);
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--shell-nav-border);
  border-radius: var(--radius-control);
  padding: 5px 8px;
  color: var(--shell-nav-text);
  font-size: 12px;
  white-space: nowrap;
}

.app-main {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: var(--gutter-desktop);
}

.messages {
  display: grid;
  gap: 8px;
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 12px var(--gutter-desktop) 0;
}

.message {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.message-title {
  font-size: 13px;
  line-height: 1.25;
}

.message-body {
  color: var(--text);
  font-size: 12px;
}

.message.success {
  border-color: var(--ok-line);
  color: var(--ok);
  background: var(--ok-bg);
}

.message.error {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-bg);
}

.message.warning {
  border-color: var(--warn-line);
  color: var(--warn);
  background: var(--warn-bg);
}

.message.info {
  border-color: var(--info-line);
  color: var(--info);
  background: var(--info-bg);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.app-header :where(a, button, summary):focus-visible {
  outline-color: var(--accent-soft);
}

.page-head,
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-title-block {
  min-width: 0;
}

h1,
h2 {
  letter-spacing: 0;
}

h1 {
  max-width: 1120px;
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.muted,
.row-sub {
  color: var(--muted);
}

.row-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  padding: 7px 12px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 650;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent-strong);
}

.primary-button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.primary-button.danger-button {
  background: #a61b1b;
  border-color: #7f1111;
}

.primary-button.danger-button:hover {
  background: #7f1111;
}

.danger-publication-form {
  border: 1px solid #d69b9b;
  border-radius: 8px;
  padding: 12px;
  background: #fff7f7;
}

.secondary-button {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: #b8d5da;
}

.ghost-button {
  color: var(--shell-text);
  background: transparent;
  border-color: var(--shell-nav-border);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 220px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.filters input,
.filters select,
.login-form input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
}

.filters input:focus,
.filters select:focus,
.login-form input:focus,
.xml-editor:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.table-shell,
.panel-section,
.audit-panel,
.login-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.table-shell {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-muted);
  text-transform: uppercase;
}

.data-table th:first-child,
.data-table td:first-child {
  width: 42%;
}

.data-table.compact {
  table-layout: auto;
}

.data-table.compact th,
.data-table.compact td {
  padding: 8px;
  font-size: 13px;
}

.row-title {
  display: inline-block;
  max-width: 100%;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.status-pill,
.problem-count,
.ok-count,
.severity-chip,
.audit-total {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: #fff;
  white-space: nowrap;
}

.problem-count,
.severity-chip-error {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.severity-chip-warning {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.ok-count,
.severity-chip-info {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.source-failed_audit {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.source-ok {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.source-status-history {
  color: var(--muted);
  border-color: var(--line);
  background: #fff;
}

.source-status-history.source-failed_audit {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.detail-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 38px;
  margin-bottom: 14px;
  border: 1px solid #b8d5da;
  border-radius: 7px;
  padding: 7px 12px;
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 6px 14px rgba(21, 31, 45, 0.06);
}

.detail-back-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-line span {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
  overflow-wrap: anywhere;
}

.action-stack {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.left-rail {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 92px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-bottom: 8px;
}

.audit-panel,
.quick-sources-panel {
  padding: 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.compact-title-row {
  margin-bottom: 10px;
}

.panel-title-row h2,
.panel-subtitle {
  margin: 0;
}

.panel-subtitle {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  margin-bottom: 10px;
}

.audit-total {
  color: var(--info);
  border-color: var(--info-line);
  background: var(--info-bg);
}

.finding {
  min-width: 0;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
  overflow: visible;
}

.severity-error {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, var(--danger-bg), #fff 42%);
}

.severity-warning {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, var(--warn-bg), #fff 42%);
}

.severity-info {
  border-left-color: var(--info);
  background: linear-gradient(90deg, var(--info-bg), #fff 42%);
}

.finding-identity {
  display: grid;
  gap: 7px;
}

.finding-field-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.finding-field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-transform: uppercase;
}

.finding-code {
  min-width: 0;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.finding-name {
  margin-top: 10px;
}

.finding-message {
  margin: 4px 0 0;
  max-height: none;
  overflow: visible;
  color: #2d3746;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.finding-status-accepted_as_is {
  border-left-color: var(--ok);
  background: linear-gradient(90deg, var(--ok-bg), #fff 44%);
}

.finding-resolution,
.finding-note {
  margin: 7px 0 0;
  border: 1px solid var(--ok-line);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--ok-bg);
  color: #20533d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.finding-note {
  border-color: #d6e2ea;
  background: #f8fbfd;
  color: var(--muted);
}

.finding-accept-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.finding-accept-form input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
}

.finding-anchor {
  font-size: 13px;
}

.finding-anchor a {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: #fff;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.file-links {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

.file-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: var(--surface-raised);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.version-list {
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.version-list li {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.work-surface {
  min-width: 0;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-row a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.05);
}

.panel-section {
  padding: 14px;
  margin-bottom: 16px;
  min-width: 0;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.editor-head h2 {
  margin: 0;
}

.xml-editor {
  display: block;
  width: 100%;
  min-height: 520px;
  max-height: 820px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 12px;
  background: #fbfdff;
  color: #17202b;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
}

.xml-editor-shell {
  position: relative;
  min-width: 0;
}

.xml-editor-highlight {
  position: absolute;
  inset: 1px;
  z-index: 0;
  display: none;
  margin: 0;
  padding: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #fbfdff;
  color: #17202b;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre;
  pointer-events: none;
}

.xml-editor-highlight code {
  display: block;
  min-width: max-content;
  font: inherit;
}

.xml-editor-shell.is-highlighted .xml-editor-highlight {
  display: block;
}

.xml-editor-shell.is-highlighted .xml-editor {
  position: relative;
  z-index: 1;
  background: transparent;
  color: transparent;
  caret-color: #17202b;
  tab-size: 2;
}

.xml-editor-shell.is-highlighted .xml-editor::selection {
  background: rgba(31, 111, 235, 0.22);
  color: transparent;
}

.xml-token-tag { color: #075985; }
.xml-token-comment { color: #52705b; }
.xml-token-declaration { color: #6d28d9; }
.xml-token-cdata { color: #9a3412; }
.xml-token-entity { color: #a21caf; }

.preview-frame {
  display: block;
  width: 100%;
  height: 780px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.correction-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.correction-editor,
.correction-preview {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-raised);
}

.correction-editor {
  margin: 0;
}

.split-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
}

.split-pane-head h3 {
  margin: 0;
  font-size: 14px;
}

.correction-split .xml-editor {
  min-height: 420px;
  height: 48vh;
  max-height: none;
}

.split-preview-frame {
  min-height: 720px;
  height: 78vh;
  max-height: none;
}

.login-shell {
  min-height: calc(100vh - var(--header-height) - (2 * var(--gutter-desktop)));
  display: grid;
  place-items: center;
}

.login-page {
  background: var(--bg);
}

.login-form {
  width: min(420px, 100%);
  padding: 22px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  box-shadow: none;
}

.login-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
}

.login-form input::placeholder {
  color: var(--text);
  opacity: 1;
}

.login-form input {
  height: 38px;
}

.login-message .message-title {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.login-message .message-body {
  font-size: 13px;
}

.login-form .primary-button {
  justify-self: start;
  font-size: 13px;
  font-weight: 650;
}

@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }

}

@media (max-width: 980px) {
  .filters,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .page-head,
  .detail-head {
    display: block;
  }

  .action-stack {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 1439px) {
  .top-nav {
    margin-left: auto;
  }

  .desktop-nav-panel {
    display: none;
  }

  .top-nav-menu {
    display: block;
    position: relative;
  }

  .nav-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-default);
    border: 1px solid var(--shell-nav-border);
    border-radius: 7px;
    padding: 7px 10px;
    color: var(--shell-text);
    background: #172635;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }

  .nav-menu-button::-webkit-details-marker {
    display: none;
  }

  .nav-menu-label-open {
    display: none;
  }

  .top-nav-menu[open] .nav-menu-label-closed {
    display: none;
  }

  .top-nav-menu[open] .nav-menu-label-open {
    display: inline;
  }

  .top-nav-menu .top-nav-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: none;
    width: min(88vw, 320px);
    max-height: calc(100vh - var(--header-height) - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    border: 1px solid #30485f;
    border-radius: var(--radius-surface);
    padding: 10px;
    background: var(--shell-bg);
    box-shadow: 0 18px 38px rgba(3, 10, 18, 0.32);
  }

  .top-nav-menu[open] .top-nav-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-nav-menu .top-nav-panel .nav-link,
  .top-nav-menu .top-nav-panel .ghost-button,
  .top-nav-menu .top-nav-panel .user-pill {
    width: 100%;
    justify-content: flex-start;
    min-height: var(--control-default);
    padding: 8px 10px;
    text-align: left;
  }

  .top-nav-menu .top-nav-panel .nav-link {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.03);
  }

  .top-nav-menu .top-nav-panel .user-pill {
    max-width: none;
    display: block;
    min-width: 0;
    border-color: transparent;
    color: var(--shell-muted);
  }

  .top-nav-menu .top-nav-panel form {
    justify-self: end;
    width: auto;
  }

  .top-nav-menu .top-nav-panel form .ghost-button {
    width: auto;
  }
}

@media (max-width: 640px) {
  .scope {
    display: none;
  }

  .app-header {
    position: relative;
    height: auto;
    min-height: var(--header-height);
    padding: 10px var(--gutter-mobile-header);
    align-items: center;
  }

  .app-main,
  .messages {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }

  .app-header-anonymous {
    padding-right: 16px;
    padding-left: 16px;
  }

  .login-form {
    width: min(358px, 100%);
    padding: 16px;
  }

  .top-nav-menu .top-nav-panel {
    right: calc(-1 * var(--gutter-mobile-header));
    width: 100vw;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .top-nav-menu .top-nav-panel .nav-link {
    justify-self: start;
    width: max-content;
    max-width: 100%;
  }

  .data-table {
    min-width: 760px;
  }

  .editor-head {
    display: block;
  }

  .editor-head .primary-button,
  .editor-head .secondary-button {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Detail cockpit redesign */
.detail-head-redesign {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(15, 107, 120, 0.12), rgba(255, 255, 255, 0.94) 38%),
    var(--surface);
}

.detail-head-redesign::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), #c27a20);
}

.act-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.act-kicker span {
  border: 1px solid rgba(15, 107, 120, 0.2);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  flex: 0 0 360px;
  display: grid;
  gap: 9px;
  justify-items: end;
}

.hero-actions form {
  margin: 0;
}

.review-status-form {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.review-status-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-status-form select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.status-lock-note {
  grid-column: 1 / -1;
  margin: -1px 0 0;
  padding: 7px 8px;
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  color: var(--warn);
  background: var(--warn-bg);
  font-size: 12px;
  font-weight: 650;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.summary-card {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.summary-card .summary-evidence-hash {
  font-size: 12px;
  line-height: 1.35;
}

.summary-card.tone-critical {
  border-color: var(--danger-line);
  background: linear-gradient(135deg, var(--danger-bg), #fff 58%);
}

a.summary-card {
  color: inherit;
  text-decoration: none;
}

a.summary-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(21, 31, 45, 0.11);
}

.summary-card.tone-warning {
  border-color: var(--warn-line);
  background: linear-gradient(135deg, var(--warn-bg), #fff 58%);
}

.summary-card.tone-info {
  border-color: var(--info-line);
  background: linear-gradient(135deg, var(--info-bg), #fff 58%);
}

.summary-card.tone-ok {
  border-color: var(--ok-line);
  background: linear-gradient(135deg, var(--ok-bg), #fff 58%);
}

.metric-ok {
  color: var(--ok);
}

.metric-warning {
  color: var(--warn);
}

.metric-danger {
  color: var(--danger);
}

.evidence-sync-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.evidence-sync-form {
  margin-bottom: 0;
}

.evidence-refresh-form {
  justify-content: flex-end;
}

.evidence-table th:first-child,
.evidence-table td:first-child {
  min-width: 180px;
}

.evidence-table td {
  vertical-align: middle;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-step {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workflow-step span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}

.workflow-done {
  color: var(--ok);
}

.workflow-done .workflow-dot {
  border-color: var(--ok);
  background: var(--ok);
}

.workflow-current {
  color: var(--accent-strong);
}

.workflow-current .workflow-dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 107, 120, 0.12);
}

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

.cockpit-panel {
  padding: 0;
  overflow: hidden;
}

.cockpit-panel > .panel-title-row,
.cockpit-panel > .panel-subtitle,
.cockpit-panel > .compact-files {
  margin-left: 14px;
  margin-right: 14px;
}

.cockpit-panel > .panel-title-row {
  padding-top: 14px;
}

.panel-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.audit-groups {
  display: grid;
  gap: 8px;
  padding: 0 14px;
}

.audit-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.audit-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.audit-group summary::-webkit-details-marker {
  display: none;
}

.audit-group summary strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff;
  font-size: 12px;
}

.audit-group-error summary {
  background: var(--danger-bg);
  color: var(--danger);
}

.audit-group-warning summary {
  background: var(--warn-bg);
  color: var(--warn);
}

.audit-group-info summary {
  background: var(--info-bg);
  color: var(--info);
}

.audit-group-body {
  padding: 10px;
  border-top: 1px solid var(--line);
}

.finding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.anchor-button {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.anchor-button:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.finding-location-unavailable {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-files {
  padding-bottom: 14px;
}

.real-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 242, 246, 0.92);
  backdrop-filter: blur(8px);
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.tab-button:hover {
  border-color: var(--accent);
}

.tab-button.is-active {
  color: #fff;
  border-color: var(--accent-strong);
  background: var(--accent);
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(240px, 0.85fr);
  gap: 14px;
}

.next-action-panel {
  grid-row: span 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(15, 107, 120, 0.11), rgba(255, 255, 255, 0) 52%),
    #fff;
}

.next-action-panel h2 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.next-action-panel p {
  margin: 0 0 14px;
  color: #354254;
  max-width: 62ch;
}

.next-action-error {
  border-color: var(--danger-line);
  background:
    linear-gradient(135deg, var(--danger-bg), rgba(255, 255, 255, 0) 54%),
    #fff;
}

.next-action-warning {
  border-color: var(--warn-line);
  background:
    linear-gradient(135deg, var(--warn-bg), rgba(255, 255, 255, 0) 54%),
    #fff;
}

.next-action-ok {
  border-color: var(--ok-line);
  background:
    linear-gradient(135deg, var(--ok-bg), rgba(255, 255, 255, 0) 54%),
    #fff;
}

.eyebrow {
  display: inline-flex;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.next-action-buttons,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.status-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.status-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.status-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.status-list dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.job-message {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.source-card {
  min-height: 138px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.source-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.source-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.source-card span {
  display: block;
  color: #3a4655;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.source-card-missing {
  background: var(--surface-muted);
  color: var(--muted);
}

.source-missing {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.publication-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.publication-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.publication-card-ready {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.publication-card-blocked {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.publication-card h2,
.publication-history h2 {
  margin: 4px 0 12px;
}

.publication-reason,
.issue-list {
  margin: 12px 0 0;
  color: #334155;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.issue-list {
  padding-left: 18px;
}

.issue-list li + li {
  margin-top: 5px;
}

.publication-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.publication-file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.publication-file-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.publication-message-row td {
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
}

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

.richer-list {
  padding-left: 0;
  list-style: none;
}

.richer-list li {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) minmax(80px, auto);
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.richer-list em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
}

.data-table.compact th:first-child,
.data-table.compact td:first-child {
  width: auto;
}

@media (max-width: 1180px) {
  .hero-actions {
    flex-basis: 100%;
    justify-items: start;
  }

  .detail-head-redesign {
    display: grid;
  }

  .review-status-form {
    max-width: 620px;
  }

  .summary-strip,
  .workflow-strip,
  .overview-layout,
  .publication-layout,
  .history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .redesigned-grid {
    grid-template-columns: 1fr;
  }

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

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

  .workflow-strip {
    gap: 10px;
  }

  .status-list div,
  .richer-list li {
    grid-template-columns: 1fr;
  }

  .source-card {
    display: grid;
  }
}

/* List workspace redesign */
.act-list-page {
  background: var(--bg);
}

.act-list-page .app-main {
  display: grid;
  gap: 16px;
}

.act-list-page .list-head {
  min-height: 118px;
  margin: 0;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
}

.act-list-page .list-head .detail-title-block {
  display: grid;
  gap: 7px;
}

.act-list-page .list-head .eyebrow,
.act-list-page .list-head h1,
.act-list-page .list-head p {
  margin: 0;
}

.act-list-page .list-head h1 {
  max-width: 920px;
}

.act-list-page .list-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin: 0;
}

.act-list-page .list-summary .summary-card {
  min-height: 82px;
  background: var(--surface-raised);
  box-shadow: none;
}

.act-list-page .list-summary .summary-card.tone-critical,
.act-list-page .list-summary .summary-card.tone-warning,
.act-list-page .list-summary .summary-card.tone-info,
.act-list-page .list-summary .summary-card.tone-ok {
  background: var(--surface-raised);
}

.act-list-page .list-summary .tone-critical strong {
  color: var(--danger);
}

.act-list-page .list-summary .tone-warning strong {
  color: var(--warn);
}

.act-list-page .list-summary .tone-info strong {
  color: var(--info);
}

.act-list-page .list-summary .tone-ok strong {
  color: var(--ok);
}

.act-list-page .type-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.act-list-page .type-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  box-shadow: none;
}

.act-list-page .type-chip strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.act-list-page .type-chip span,
.act-list-page .type-chip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.act-list-page .type-chip em {
  color: var(--danger);
}

.list-filters {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
  overflow: visible;
}

.filter-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-heading strong {
  font-size: 14px;
}

.filter-note {
  color: var(--muted);
  font-size: 12px;
}

.filter-note-mobile {
  display: none;
}

.filter-controls {
  display: grid;
  gap: 12px;
}

.filter-row {
  display: grid;
  align-items: end;
  gap: 12px;
}

.filter-row-primary {
  grid-template-columns:
    minmax(240px, 316px)
    minmax(180px, 244px)
    minmax(220px, 300px)
    minmax(120px, 180px)
    minmax(110px, 1fr);
}

.filter-row-secondary {
  grid-template-columns:
    minmax(180px, 244px)
    minmax(220px, 300px)
    minmax(180px, 244px)
    minmax(180px, 244px)
    minmax(110px, 1fr);
}

.list-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.list-filters label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.filter-apply,
.filter-reset {
  justify-self: start;
  align-self: end;
}

.filter-reset.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.filter-reset.is-disabled:hover {
  color: var(--muted);
  border-color: var(--line);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  align-self: end;
  min-width: max-content;
}

.ghost-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.ghost-filter:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  text-decoration: none;
}

.list-workspace {
  margin: 0;
}

.registry-filters {
  grid-template-columns: minmax(220px, 340px) auto;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 16px rgba(21, 31, 45, 0.04);
}

.registry-layout,
.batch-import-layout {
  display: grid;
  gap: 14px;
}

.registry-table td:last-child {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.batch-import-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

.batch-import-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.batch-import-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-import-form input[type="text"],
.batch-import-form input[type="number"],
.batch-import-form input[type="file"],
.batch-import-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
}


.wide-field {
  grid-column: span 2;
}

.upload-import-form .wide-field:first-of-type,
.file-upload-field,
.server-import-form .wide-field:first-of-type,
.server-import-form .server-path-field {
  grid-column: span 3;
}

.file-upload-field input[type="file"] {
  min-height: 42px;
  padding-top: 8px;
}

.file-upload-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.upload-size-warning {
  grid-column: span 3;
  border: 1px solid var(--warn-line);
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--warn-bg);
  color: #7a4a00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.upload-size-warning[hidden] {
  display: none;
}

.chunk-upload-progress {
  grid-column: span 3;
  display: grid;
  gap: 8px;
  border: 1px solid #b8d5da;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 11px 12px;
  background:
    linear-gradient(135deg, rgba(15, 107, 120, 0.09), rgba(255, 255, 255, 0.94) 58%),
    #fff;
  color: #193542;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.06);
}

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

.chunk-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chunk-upload-progress-head strong {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.chunk-upload-progress-head span {
  flex: 0 0 auto;
  border: 1px solid #b8d5da;
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.chunk-upload-progress-bar {
  height: 10px;
  border: 1px solid #d3e2ea;
  border-radius: 999px;
  background: #edf4f7;
  overflow: hidden;
}

.chunk-upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #2b9874);
  box-shadow: 0 0 16px rgba(15, 107, 120, 0.22);
  transition: width 0.18s ease;
}

.chunk-upload-progress p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.chunk-upload-progress.is-error {
  border-color: var(--danger-line);
  border-left-color: var(--danger);
  background:
    linear-gradient(135deg, var(--danger-bg), rgba(255, 255, 255, 0.96) 58%),
    #fff;
}

.chunk-upload-progress.is-error .chunk-upload-progress-bar span {
  background: linear-gradient(90deg, var(--danger), #d66d62);
}

.chunk-upload-progress.is-complete {
  border-color: var(--ok-line);
  border-left-color: var(--ok);
  background:
    linear-gradient(135deg, var(--ok-bg), rgba(255, 255, 255, 0.96) 58%),
    #fff;
}

.preflight-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--info);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 253, 0.95)),
    #fff;
}

.preflight-ok {
  border-left-color: var(--ok);
}

.preflight-warning {
  border-left-color: var(--warn);
}

.preflight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preflight-head h3 {
  margin: 4px 0 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.preflight-head > strong {
  flex: 0 0 auto;
  border: 1px solid #c9d8e8;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
}

.preflight-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preflight-metrics span {
  border: 1px solid #c9d8e8;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preflight-metrics strong {
  color: var(--text);
}

.preflight-warnings {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #38465a;
  font-size: 13px;
  line-height: 1.4;
}

.import-panel {
  position: relative;
  overflow: hidden;
}

.import-panel-primary {
  border-color: #b8d5da;
  background:
    linear-gradient(135deg, rgba(15, 107, 120, 0.08), rgba(255, 255, 255, 0) 48%),
    #fff;
}

.import-jobs-table td:nth-child(1),
.import-jobs-table td:nth-child(2) {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.batch-card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.batch-status-filter {
  grid-template-columns: minmax(240px, 360px) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-color: #c5d5df;
  background:
    linear-gradient(135deg, rgba(15, 107, 120, 0.1), rgba(238, 245, 255, 0.56) 52%, rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: 0 12px 26px rgba(21, 31, 45, 0.07);
}

.batch-status-filter .filter-actions {
  justify-self: end;
}

.batch-filter-field {
  display: grid;
  gap: 6px;
  max-width: 360px;
}

.batch-filter-field span {
  color: #526178;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, 500px);
  align-items: stretch;
  justify-content: start;
  gap: 14px;
}

.batch-dashboard-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 253, 0.96)),
    #fff;
  box-shadow: 0 12px 26px rgba(21, 31, 45, 0.07);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.batch-dashboard-card:hover {
  border-color: #bfd1de;
  box-shadow: 0 16px 34px rgba(21, 31, 45, 0.1);
  transform: translateY(-1px);
}

.batch-priority-high,
.batch-priority-urgent {
  border-left-color: var(--warn);
}

.batch-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.batch-dashboard-head h2 {
  margin: 4px 0 4px;
  font-size: 19px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.batch-dashboard-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.batch-dashboard-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 38px;
  border: 1px solid #c7d7e8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f1f6fb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 10px rgba(49, 95, 153, 0.08);
  font-size: 17px;
}

.batch-dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.batch-dashboard-stats span {
  border: 1px solid #c9d8e8;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.batch-dashboard-stats strong {
  color: var(--text);
}

.batch-dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 250, 252, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.batch-dashboard-footer .queue-action-info {
  min-width: 142px;
  color: var(--accent-strong);
  border-color: #b7d4db;
  background: linear-gradient(180deg, #f8feff, var(--accent-soft));
}

.batch-dashboard-footer .queue-action-info:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 14px rgba(15, 107, 120, 0.12);
}

.batch-management-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #d5e2ea;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 251, 0.92)),
    #f7fafc;
}

.batch-management-title {
  grid-column: 1 / -1;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.batch-management-form label,
.batch-control-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.batch-management-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-management-form select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #c3d2df;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.batch-management-form select:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.batch-apply-line {
  grid-column: 1 / 3;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cfe0e8;
  border-radius: 7px;
  background: #fff;
}

.batch-save-button {
  align-self: center;
  justify-self: stretch;
  min-height: 38px;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent-strong);
  box-shadow: 0 7px 16px rgba(15, 107, 120, 0.18);
}

.batch-save-button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.batch-resolution-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d5e2ea;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f8fbff, rgba(255, 255, 255, 0.94) 56%),
    #fff;
}

.batch-resolution-panel > form {
  flex: 0 0 auto;
}

.batch-danger-zone {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  background: #fff;
}

.batch-danger-zone summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
  list-style: none;
}

.batch-danger-zone summary::-webkit-details-marker {
  display: none;
}

.batch-danger-zone summary::after {
  content: "+";
  display: inline-flex;
  justify-content: center;
  width: 18px;
  margin-left: 6px;
  border: 1px solid var(--danger-line);
  border-radius: 999px;
  background: var(--danger-bg);
}

.batch-danger-zone[open] summary::after {
  content: "-";
}

.batch-danger-zone form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 0 10px 10px;
}

.batch-danger-zone label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.batch-danger-zone label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-danger-zone input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d8c5c2;
  border-radius: 7px;
  padding: 7px 9px;
  color: var(--text);
  background: #fff;
}

.batch-danger-zone input:focus {
  outline: 3px solid var(--danger);
  outline-offset: 2px;
  border-color: var(--danger);
}

.batch-cleanup-form {
  align-items: center;
  border: 1px solid #f1c8c3;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  padding: 9px 10px;
  background: #fff8f7;
}

.inline-action-form {
  display: inline;
  margin: 0;
}

.compact-action {
  min-width: 0;
  padding: 7px 12px;
  font-size: 12px;
}

.mini-note {
  display: inline-flex;
  max-width: 160px;
  color: #7a433d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.checkbox-line {
  grid-column: 1 / -1;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.list-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
}

.list-view-bar > div:first-child {
  display: grid;
  gap: 2px;
}

.list-view-bar strong {
  font-size: 15px;
}

.list-view-tabs {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.queue-layout {
  display: grid;
  gap: 12px;
}

.act-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  min-height: 158px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-raised);
  box-shadow: none;
}

.act-card-error {
  border-left-color: var(--danger);
}

.act-card-warning {
  border-left-color: var(--warn);
}

.act-card-info {
  border-left-color: var(--info);
}

.act-card-ok {
  border-left-color: var(--ok);
}

.act-card-kicker,
.act-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.act-card-kicker span,
.act-card-meta span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.type-badge {
  color: var(--accent-strong);
  font-weight: 900;
}

.act-card-title {
  display: block;
  margin: 8px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.act-card-title:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.act-card-status {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
}

.severity-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
}

.severity-count-error {
  color: var(--danger);
}

.severity-count-warning {
  color: var(--warn);
}

.severity-count-info {
  color: var(--info);
}

.queue-action {
  display: inline-flex;
  justify-content: center;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}

.act-list-page .queue-action {
  min-width: 132px;
}

.queue-action:hover {
  text-decoration: none;
}

.queue-action-error {
  color: #fff;
  border-color: #8f1b14;
  background: var(--danger);
}

.queue-action-error:hover {
  color: #fff;
  background: #8f1b14;
}

.queue-action-warning {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.queue-action-info {
  color: var(--info);
  border-color: var(--info-line);
  background: var(--info-bg);
}

.queue-action-ok {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 500px);
  align-items: stretch;
  justify-content: start;
  gap: 12px;
}

.year-stack {
  display: grid;
  gap: 16px;
}

.year-section {
  display: grid;
  gap: 10px;
}

.year-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-raised);
}

.year-heading h2 {
  margin: 0;
  font-size: 18px;
}

.year-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.monitor-card,
.batch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.batch-card {
  max-width: 500px;
}

.monitor-card-head,
.batch-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.monitor-card h2,
.batch-card h2 {
  margin: 4px 0 3px;
  font-size: 20px;
}

.monitor-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.monitor-card-head > strong,
.batch-card-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  font-size: 18px;
}

.monitor-progress {
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.monitor-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--ok));
}

.monitor-facts,
.batch-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.monitor-facts span,
.batch-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.batch-stats strong {
  color: var(--text);
}

.monitor-acts,
.batch-preview-list {
  display: grid;
  gap: 6px;
}

.monitor-acts a,
.batch-preview-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.batch-preview-list a {
  display: block;
  overflow-wrap: anywhere;
}

.batch-preview-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.monitor-acts a:hover,
.batch-preview-list a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.monitor-acts span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.monitor-acts strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.monitor-acts em {
  justify-self: end;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 980px) {
  .registry-filters,
  .batch-status-filter,
  .batch-management-form,
  .batch-import-form {
    grid-template-columns: 1fr;
  }

  .act-list-page .list-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-field,
  .upload-size-warning,
  .chunk-upload-progress,
  .upload-import-form .wide-field:first-of-type,
  .file-upload-field,
  .server-import-form .wide-field:first-of-type,
  .server-import-form label:nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .list-filters {
    grid-template-columns: 1fr;
  }

  .filter-row-primary,
  .filter-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    justify-content: flex-end;
  }

  .form-actions {
    justify-content: flex-start;
  }

  .batch-apply-line,
  .batch-save-button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .batch-cleanup-form {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-resolution-panel {
    flex-direction: column;
  }

  .batch-resolution-panel > form,
  .batch-resolution-panel > form button,
  .batch-danger-zone {
    width: 100%;
  }

  .batch-danger-zone summary {
    text-align: left;
  }

  .batch-danger-zone form {
    grid-template-columns: 1fr;
  }

  .list-view-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .act-card {
    grid-template-columns: 1fr;
  }

  .act-card-status {
    justify-items: start;
  }

  .monitor-grid,
  .batch-dashboard {
    grid-template-columns: 1fr;
  }

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

  .batch-dashboard-card,
  .batch-card {
    max-width: none;
  }

  .batch-dashboard-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .act-list-page .app-main {
    padding: 16px;
  }

  .act-list-page .list-head {
    min-height: 0;
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .act-list-page .list-head h1 {
    font-size: 24px;
  }

  .act-list-page .list-head p {
    font-size: 15px;
  }

  .act-list-page .list-head form {
    margin: 0;
  }

  .act-list-page .list-summary {
    grid-template-columns: 1fr;
  }

  .filter-heading {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .filter-note-desktop {
    display: none;
  }

  .filter-note-mobile {
    display: block;
    line-height: 1.42;
  }

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

  .filter-row {
    display: contents;
  }

  .filter-query,
  .filter-status,
  .filter-source,
  .filter-year,
  .filter-document-type,
  .filter-batch,
  .filter-assignee,
  .filter-publication {
    grid-column: 1 / -1;
  }

  .filter-query { grid-row: 1; }
  .filter-status { grid-row: 2; }
  .filter-source { grid-row: 3; }
  .filter-year { grid-row: 4; }
  .filter-document-type { grid-row: 5; }
  .filter-batch { grid-row: 6; }
  .filter-assignee { grid-row: 7; }
  .filter-publication { grid-row: 8; }

  .filter-reset {
    justify-self: start;
  }

  .filter-apply {
    justify-self: end;
    color: #fff;
    border-color: var(--accent-strong);
    background: var(--accent);
  }

  .filter-actions {
    grid-column: 1 / -1;
    grid-row: 9;
    justify-content: space-between;
  }

  .list-view-bar {
    display: grid;
    align-items: start;
    padding: 12px;
  }

  .list-view-tabs {
    display: grid;
    justify-items: start;
    width: max-content;
    max-width: 100%;
  }

  .act-card {
    min-height: 268px;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 12px;
  }

  .act-card-status {
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: end;
    align-items: center;
    justify-items: stretch;
    gap: 8px;
  }

  .act-card-status .source-status-history {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
  }

  .act-card-status .review-status {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
  }

  .act-card-status .severity-line {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }

  .act-card-status .queue-action {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
}


/* SQL file registry */
.file-registry-filters {
  grid-template-columns: minmax(180px, 220px) minmax(190px, 240px) minmax(240px, 1fr) auto;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 16px rgba(21, 31, 45, 0.04);
  overflow-x: auto;
}

.file-registry-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.file-registry-filters label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.file-registry-layout,
.document-files-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.document-files-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-raised);
}

.compact-editor-head {
  margin-bottom: 0;
}

.compact-editor-head h3 {
  margin: 0;
  font-size: 15px;
}

.document-files-table-shell,
.file-registry-table {
  min-width: 0;
}

.file-registry-table th:first-child,
.file-registry-table td:first-child,
.document-files-table th:first-child,
.document-files-table td:first-child {
  min-width: 260px;
}

.file-registry-table td,
.document-files-table td {
  vertical-align: middle;
}

.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.file-status-linked {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.file-status-available {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.file-status-unassigned {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.file-status-missing {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.file-status-ignored {
  color: var(--muted);
  background: var(--surface-muted);
}

.file-status-unknown {
  color: var(--muted);
  background: var(--surface-muted);
}

.file-status-not_imported {
  color: var(--warn);
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.file-status-imported {
  color: var(--info);
  border-color: var(--info-line);
  background: var(--info-bg);
}

.file-status-has_problems {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.file-status-clean {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.file-row-unassigned td:first-child {
  border-left: 4px solid var(--warn);
}

.file-row-missing td:first-child {
  border-left: 4px solid var(--danger);
}

.hash-inline {
  display: inline-block;
  max-width: 120px;
  color: #304050;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.compact-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.registry-context-note {
  margin: 12px 0;
  border: 1px solid var(--info-line);
  border-radius: 8px;
  padding: 12px 14px;
  color: #21435f;
  background: linear-gradient(135deg, rgba(232, 242, 255, 0.92), rgba(255, 255, 255, 0.9));
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.04);
}

.registry-context-note a {
  color: var(--accent-strong);
  font-weight: 850;
}

.pdf-library-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) auto;
  align-items: end;
  margin-bottom: 12px;
}

.pdf-year-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 132px));
  justify-content: start;
  gap: 10px;
  margin: 12px 0 14px;
}

.pdf-year-card {
  display: grid;
  gap: 3px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.pdf-year-card:hover,
.pdf-year-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(232, 251, 255, 0.96), #fff);
}

.pdf-year-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.pdf-year-card strong {
  font-size: 24px;
  line-height: 1;
}

.pdf-library-table th:first-child,
.pdf-library-table td:first-child {
  width: 150px;
  min-width: 150px;
}

.pdf-library-table th:nth-child(4),
.pdf-library-table td:nth-child(4) {
  min-width: 360px;
}

@media (max-width: 980px) {
  .file-registry-filters {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }

  .pdf-library-filters {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 180px) auto;
  }
}

@media (max-width: 760px) {
  .pdf-library-filters {
    grid-template-columns: 1fr;
  }

  .pdf-year-strip {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}


/* User administration */
.user-admin-layout {
  display: grid;
  gap: 14px;
}

.user-form {
  display: grid;
  gap: 12px;
}

.user-create-form {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  align-items: end;
}

.user-update-form {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  align-items: end;
}

.user-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.user-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.user-form input,
.user-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
}

.user-active-line {
  align-self: center;
}

.user-card-list {
  display: grid;
  gap: 12px;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.user-card-disabled {
  background: var(--surface-muted);
}

.user-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.user-card-head h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.user-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .user-create-form,
  .user-update-form {
    grid-template-columns: 1fr;
  }
}

/* GOC -> Workbench -> AWS delivery operations */
.delivery-page-head {
  align-items: center;
}

.delivery-policy-note {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--info-line);
  border-left: 5px solid var(--info);
  border-radius: 8px;
  padding: 12px 14px;
  color: #21435f;
  background: var(--info-bg);
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.04);
}

.delivery-policy-note span {
  line-height: 1.45;
}

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

.delivery-system-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-top: 5px solid var(--info);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delivery-system-card.delivery-summary-card {
  border-top-color: var(--accent);
}

.delivery-system-card h2 {
  margin: 5px 0 7px;
}

.delivery-system-card p {
  margin: 0;
}

.delivery-system-card > .primary-button,
.delivery-system-card > .secondary-button {
  justify-self: start;
}

.delivery-system-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.delivery-system-steps li,
.delivery-summary-stats span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-system-steps li {
  text-align: center;
}

.delivery-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.delivery-summary-stats strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 20px;
}

.delivery-summary-stats .needs-attention {
  border-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.delivery-import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delivery-import-panel h2 {
  margin: 5px 0 7px;
}

.delivery-import-panel p {
  margin: 5px 0;
}

.delivery-import-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  background: var(--surface-muted);
}

.delivery-import-form label {
  font-weight: 800;
}

.delivery-import-form input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.delivery-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.delivery-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 4px solid var(--info);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.delivery-metric span {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.delivery-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.delivery-metric.metric-ok { border-top-color: var(--ok); }
.delivery-metric.metric-warn { border-top-color: var(--warn); }
.delivery-metric.metric-danger { border-top-color: var(--danger); }

.delivery-filters {
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 170px) minmax(170px, 220px) minmax(210px, auto) auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delivery-filters label,
.delivery-document-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.delivery-filters label > span,
.delivery-document-filters label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-filters .delivery-attention-filter {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}

.delivery-filters .delivery-attention-filter input {
  width: auto;
  min-height: 0;
}

.delivery-run-list {
  display: grid;
  gap: 14px;
}

.delivery-run-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--info);
  border-radius: 9px;
  padding: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delivery-run-card.delivery-outcome-done { border-left-color: var(--ok); }
.delivery-run-card.delivery-outcome-blocked { border-left-color: var(--warn); }
.delivery-run-card.delivery-outcome-error { border-left-color: var(--danger); }

.delivery-run-head,
.delivery-run-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.delivery-run-head h2 {
  margin: 9px 0 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.delivery-outcome-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--info-line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--info);
  background: var(--info-bg);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.state-done,
.state-approved_for_delivery {
  color: var(--ok);
  border-color: var(--ok-line);
  background-color: var(--ok-bg);
}

.state-blocked,
.state-review_required,
.state-waiting,
.state-retry {
  color: var(--warn);
  border-color: var(--warn-line);
  background-color: var(--warn-bg);
}

.state-error,
.state-failed,
.state-dead,
.state-quarantined,
.state-rejected {
  color: var(--danger);
  border-color: var(--danger-line);
  background-color: var(--danger-bg);
}

.state-pending,
.state-external,
.state-ingested,
.state-validating,
.state-auto_validated {
  color: var(--info);
  border-color: var(--info-line);
  background-color: var(--info-bg);
}

.delivery-run-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 13px 0;
}

.delivery-run-counts span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
}

.delivery-run-counts strong {
  color: var(--text);
}

.delivery-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.delivery-step {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  border: 1px solid currentColor;
  border-radius: 7px;
  padding: 9px;
}

.delivery-step-marker {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
}

.delivery-step strong,
.delivery-step span {
  display: block;
}

.delivery-step strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.delivery-step div > span {
  color: #405063;
  font-size: 11px;
  line-height: 1.35;
}

.delivery-run-footer {
  align-items: center;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.delivery-proof-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-proof-line code,
.delivery-evidence-list code {
  color: #2b4055;
  overflow-wrap: anywhere;
}

.delivery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
}

.delivery-pagination a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  font-weight: 750;
}

.delivery-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.delivery-evidence-panel {
  margin-bottom: 14px;
}

.delivery-evidence-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.delivery-evidence-list > div {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.delivery-evidence-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-evidence-list dd {
  min-width: 0;
  margin: 0;
}

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

.delivery-safety-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.delivery-state-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.delivery-state-card {
  display: flex;
  min-width: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 5px 14px rgba(21, 31, 45, 0.04);
}

.delivery-state-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.delivery-state-card span {
  color: var(--muted);
  font-size: 12px;
}

.delivery-state-card strong {
  font-size: 20px;
}

.delivery-document-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 300px) auto;
  align-items: end;
}

.delivery-document-table th:first-child,
.delivery-document-table td:first-child {
  width: 29%;
}

.delivery-document-table th:nth-child(5),
.delivery-document-table td:nth-child(5) {
  width: 24%;
}

.delivery-document-table .status-pill,
.delivery-document-table .severity-chip,
.delivery-document-table .problem-count,
.delivery-document-table .ok-count {
  margin: 0 4px 4px 0;
}

@media (max-width: 1280px) {
  .delivery-metrics {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .delivery-flow {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .delivery-filters {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 820px) {
  .delivery-import-panel {
    grid-template-columns: 1fr;
  }

  .delivery-policy-note,
  .delivery-run-head,
  .delivery-run-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-metrics,
  .delivery-system-grid,
  .delivery-system-steps,
  .delivery-summary-stats,
  .delivery-filters,
  .delivery-flow,
  .delivery-detail-grid,
  .delivery-document-filters {
    grid-template-columns: 1fr;
  }

  .delivery-metric span {
    min-height: 0;
  }

  .delivery-outcome-badge {
    width: fit-content;
    white-space: normal;
  }

  .delivery-evidence-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .delivery-document-table {
    min-width: 980px;
  }
}

/* SUMAR r202 correction and publication workflow. */
.summary-workflow-strip {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.summary-import-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 1.2fr);
  gap: 20px;
  margin-bottom: 16px;
}

.summary-import-form,
.summary-correction-form,
.summary-approval-form {
  display: grid;
  gap: 12px;
}

.summary-import-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  align-items: end;
}

.summary-import-form label,
.summary-correction-form label,
.summary-approval-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-import-form input,
.summary-correction-form textarea,
.summary-approval-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}

.summary-filters {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(160px, 220px)) auto;
}

.summary-state,
.summary-classification {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.summary-state-review_required,
.summary-state-failed,
.summary-classification-problematic {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-bg);
}

.summary-state-valid_pending_approval,
.summary-classification-unknown {
  border-color: var(--warn-line);
  color: var(--warn);
  background: var(--warn-bg);
}

.summary-state-approved,
.summary-state-queued {
  border-color: var(--info-line);
  color: var(--info);
  background: var(--info-bg);
}

.summary-state-published,
.summary-classification-clean {
  border-color: var(--ok-line);
  color: var(--ok);
  background: var(--ok-bg);
}

.summary-findings-grid,
.summary-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.summary-findings-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.summary-finding-panel {
  min-width: 0;
}

.summary-finding-panel.is-error {
  border-color: var(--danger-line);
}

.summary-finding-panel.is-warning {
  border-color: var(--warn-line);
}

.summary-finding-panel.is-source {
  border-color: var(--info-line);
}

.summary-certification-block {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-bg);
}

.summary-certification-block ul {
  margin: 0;
  padding-left: 20px;
}

.summary-source-findings {
  display: grid;
  gap: 10px;
}

.summary-source-finding {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--surface-muted);
}

.summary-source-finding-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.summary-source-finding-head code,
.summary-resolution-field code {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.summary-source-finding details pre {
  max-height: 240px;
  margin-bottom: 6px;
}

.summary-resolution-readonly,
.summary-resolution-missing {
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.summary-resolution-readonly {
  border: 1px solid var(--ok-line);
  color: var(--ok);
  background: var(--ok-bg);
}

.summary-resolution-missing {
  border: 1px solid var(--warn-line);
  color: var(--warn);
  background: var(--warn-bg);
}

.summary-resolution-fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--info-line);
  border-radius: 8px;
  padding: 14px;
  background: var(--info-bg);
}

.summary-resolution-fieldset legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 900;
}

.summary-resolution-field {
  border-top: 1px solid var(--info-line);
  padding-top: 10px;
}

.summary-finding-panel ul {
  margin: 0;
  padding-left: 20px;
}

.summary-finding-panel pre,
.summary-source-panel pre,
.summary-json-readonly {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #111c27;
  color: #e8f0f5;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.summary-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.5fr);
  gap: 14px;
  margin-bottom: 14px;
}

.summary-side-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.summary-json-editor {
  min-height: 720px;
  resize: vertical;
  background: #111c27 !important;
  color: #e8f0f5 !important;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  tab-size: 2;
}

.summary-block-reason {
  margin: 0;
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  padding: 10px;
  color: var(--warn);
  background: var(--warn-bg);
}

.summary-history-panel,
.summary-ledger-grid {
  margin-top: 14px;
}

.summary-goc-request {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 1rem;
  padding: 1rem;
}

.summary-goc-request h3 {
  margin: 1rem 0 0.65rem;
}

.summary-goc-request .table-shell + h3 {
  margin-top: 1.25rem;
}

.summary-table code,
.summary-history-panel code,
.summary-ledger-grid code {
  overflow-wrap: anywhere;
  font-size: 11px;
}

@media (max-width: 1280px) {
  .summary-workflow-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .summary-import-panel,
  .summary-import-form,
  .summary-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .summary-workflow-strip,
  .summary-import-panel,
  .summary-import-form,
  .summary-filters,
  .summary-findings-grid,
  .summary-detail-grid,
  .summary-ledger-grid {
    grid-template-columns: 1fr;
  }

  .summary-table {
    min-width: 1050px;
  }

  .summary-json-editor {
    min-height: 480px;
  }
}

/* Act detail workspace — scoped redesign aligned with the approved Figma frames. */
.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;
}

.act-detail-page {
  background: var(--bg);
}

.act-detail-page .app-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.act-detail-page .app-main > *,
.act-detail-page .redesigned-grid,
.act-detail-page .work-surface,
.act-detail-page .publication-layout > *,
.act-detail-page .publication-history,
.act-detail-page .table-shell {
  min-width: 0;
  max-width: 100%;
}

.act-detail-page .detail-head-redesign,
.act-detail-page .summary-strip,
.act-detail-page .workflow-strip,
.act-detail-page .panel-section {
  margin: 0;
}

.act-detail-page .detail-head-redesign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
  gap: 28px;
  min-height: 250px;
  padding: 16px;
  overflow: visible;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
}

.act-detail-page .detail-head-redesign::before {
  display: none;
}

.act-detail-page .detail-title-block h1 {
  max-width: 1080px;
  margin: 0 0 10px;
  font-size: clamp(24px, 2vw, 28px);
  line-height: 1.22;
}

.act-detail-page .act-kicker span,
.act-detail-page .meta-line span {
  border-radius: 999px;
  background: var(--surface);
  font-weight: 750;
}

.act-detail-page .hero-actions {
  width: 100%;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 10px;
}

.act-detail-page .hero-actions > form:not(.review-status-form),
.act-detail-page .hero-actions > .secondary-button {
  width: fit-content;
}

.act-detail-page .review-status-form {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
}

.act-detail-page .review-status-form.review-status-warning {
  border-color: var(--warn-line);
}

.act-detail-page .review-status-form.review-status-ok {
  border-color: var(--ok-line);
}

.act-detail-page .review-status-form .secondary-button {
  justify-self: start;
}

.act-detail-page .status-context-note,
.act-detail-page .field-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.act-detail-page .status-context-note {
  color: var(--ok);
}

.act-detail-page .summary-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.act-detail-page .summary-card {
  min-height: 82px;
  background: var(--surface-muted);
  box-shadow: none;
}

.act-detail-page .summary-card.tone-critical,
.act-detail-page .summary-card.tone-warning,
.act-detail-page .summary-card.tone-info,
.act-detail-page .summary-card.tone-ok {
  background: var(--surface-muted);
}

.act-detail-page .summary-card.tone-critical strong {
  color: var(--danger);
}

.act-detail-page .summary-card.tone-warning strong {
  color: var(--warn);
}

.act-detail-page .summary-card.tone-info strong {
  color: var(--info);
}

.act-detail-page .summary-card.tone-ok strong {
  color: var(--ok);
}

.act-detail-page .workflow-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
}

.act-detail-page .workflow-title {
  display: none;
}

.act-detail-page .workflow-step {
  width: fit-content;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.act-detail-page .workflow-step-index {
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  font-weight: 850;
}

.act-detail-page .workflow-done {
  border-color: var(--ok-line);
  color: var(--ok);
  background: var(--ok-bg);
}

.act-detail-page .workflow-done .workflow-dot,
.act-detail-page .workflow-current .workflow-dot {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.act-detail-page .workflow-current {
  border-color: var(--info-line);
  color: var(--info);
  background: var(--info-bg);
}

.act-detail-page .redesigned-grid {
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  gap: 16px;
}

.act-detail-page .left-rail {
  position: static;
  max-height: none;
  overflow: visible;
  gap: 16px;
  padding: 0;
}

.act-detail-page .cockpit-panel,
.act-detail-page .panel-section,
.act-detail-page .real-tabs {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.act-detail-page .audit-group {
  overflow: visible;
}

.act-detail-page .audit-group summary {
  display: list-item;
  padding: 9px 10px;
  list-style-position: inside;
}

.act-detail-page .audit-group-heading {
  width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  vertical-align: middle;
}

.act-detail-page .finding {
  background: var(--surface);
  min-width: 0;
  overflow: visible;
}

.act-detail-page .finding-message {
  max-height: none;
  overflow: visible;
}

.act-detail-page .real-tabs {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  backdrop-filter: none;
}

.act-detail-page .workspace-tabs-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.act-detail-page .tab-panel:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.act-detail-page .next-action-panel {
  background: var(--surface);
}

.act-detail-page .next-action-error {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.act-detail-page .next-action-warning {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.act-detail-page .next-action-ok {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.act-detail-page .publication-layout {
  align-items: start;
}

.act-detail-page .publication-card,
.act-detail-page .publication-history {
  box-shadow: none;
}

.act-detail-page .publication-card-production {
  background: var(--surface-muted);
}

.act-detail-page .publication-card-exception {
  border-color: var(--danger-line);
  background: var(--surface);
}

.act-detail-page .exception-eyebrow,
.act-detail-page .publication-card-exception label,
.act-detail-page .publication-card-exception .field-help {
  color: var(--danger);
}

.act-detail-page .publication-card form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.act-detail-page .publication-card form label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.act-detail-page .publication-card textarea,
.act-detail-page .publication-card input[type="text"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
}

.act-detail-page .publication-card textarea {
  min-height: 112px;
  resize: vertical;
}

.act-detail-page .publication-card-exception textarea,
.act-detail-page .publication-card-exception input[type="text"] {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.act-detail-page .warning-box {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--warn);
  background: var(--warn-bg);
  font-size: 12px;
}

.act-detail-page .publication-gate-note {
  margin-top: 14px;
}

.act-detail-page .danger-publication-form.exception-publication-form {
  border: 0;
  padding: 0;
  background: transparent;
}

.act-detail-page .history-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.act-detail-page .history-heading-row h2,
.act-detail-page .history-heading-row h3 {
  margin: 0;
}

.act-detail-page .history-heading-row > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.act-detail-page .publication-history + .publication-history {
  margin-top: 14px;
}

.act-detail-page .publication-history .table-shell {
  box-shadow: none;
}

.act-detail-page .correction-split {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.act-detail-page .correction-split[data-preview-layout="stacked"] {
  grid-template-columns: minmax(0, 1fr);
}

.act-detail-page .editor-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.preview-layout-control {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 3px;
  background: var(--surface-muted);
}

.preview-layout-label {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.preview-layout-button {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 9px;
  color: var(--accent-strong);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.preview-layout-button:hover {
  border-color: #b8d5da;
  background: var(--accent-soft);
}

.preview-layout-button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent-strong);
  background: var(--accent);
}

.act-detail-page .correction-split .xml-editor,
.act-detail-page .split-preview-frame {
  min-height: 460px;
  height: 56vh;
  max-height: 720px;
}

.act-detail-page .xml-editor[readonly] {
  background: var(--surface-muted);
}

.act-detail-page .xml-editor-shell.is-highlighted .xml-editor[readonly] {
  color: transparent;
  background: transparent;
}

.act-detail-page .xml-editor-shell.is-highlighted.is-readonly .xml-editor-highlight {
  background: var(--surface-muted);
}

.act-detail-page .xml-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.act-detail-page .hero-action-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.act-detail-page .xml-dirty-status,
.act-detail-page .xml-validation-message {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.act-detail-page .xml-dirty-status.is-dirty,
.act-detail-page .xml-validation-message.is-error {
  color: var(--danger);
  font-weight: 750;
}

.act-detail-page .xml-validation-message.is-ok {
  color: var(--ok);
  font-weight: 750;
}

.act-detail-page .xml-change-note-field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.act-detail-page .xml-change-note-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 500;
}

.act-detail-page .audit-group-unanchored {
  border-color: var(--warn-line);
}

@media (max-width: 1180px) {
  .act-detail-page .detail-head-redesign {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .act-detail-page .hero-actions {
    justify-items: start;
  }

  .act-detail-page .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .act-detail-page .overview-layout,
  .act-detail-page .history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .act-detail-page .publication-layout,
  .act-detail-page .correction-split {
    grid-template-columns: 1fr;
  }

  .act-detail-page .preview-layout-control {
    display: none;
  }

  .act-detail-page .correction-split .xml-editor,
  .act-detail-page .split-preview-frame {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .act-detail-page .app-main {
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 20px;
  }

  .act-detail-page .detail-head-redesign {
    gap: 14px;
    padding: 16px;
  }

  .act-detail-page .detail-title-block h1 {
    font-size: 25px;
  }

  .act-detail-page .hero-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .act-detail-page .hero-actions > form:not(.review-status-form) {
    justify-self: start;
  }

  .act-detail-page .hero-actions > .secondary-button {
    justify-self: end;
  }

  .act-detail-page .review-status-form {
    grid-column: 1 / -1;
  }

  .act-detail-page .summary-strip {
    grid-template-columns: 1fr;
  }

  .act-detail-page .summary-card {
    min-height: 82px;
  }

  .act-detail-page .workflow-strip {
    justify-content: flex-start;
    padding: 10px;
  }

  .act-detail-page .workflow-title {
    width: 100%;
    display: block;
    margin: 0 0 2px;
    font-size: 17px;
  }

  .act-detail-page .redesigned-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .act-detail-page .left-rail {
    display: contents;
  }

  .act-detail-page .audit-panel {
    order: 1;
  }

  .act-detail-page .work-surface {
    order: 3;
    width: 100%;
  }

  .act-detail-page .quick-sources-panel {
    order: 2;
  }

  .act-detail-page .real-tabs {
    display: grid;
    justify-items: start;
    padding: 10px;
  }

  .act-detail-page .workspace-tabs-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 2px;
    overflow: visible;
    clip: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    white-space: normal;
  }

  .act-detail-page .panel-section,
  .act-detail-page .publication-card,
  .act-detail-page .publication-history,
  .act-detail-page .overview-block,
  .act-detail-page .next-action-panel {
    padding: 14px;
  }

  .act-detail-page .finding-accept-form {
    grid-template-columns: 1fr;
  }

  .act-detail-page .finding-accept-form .ghost-filter {
    justify-self: start;
  }

  .act-detail-page .anchor-button {
    width: 100%;
    min-height: 44px;
  }

  .act-detail-page .history-heading-row {
    display: grid;
    gap: 3px;
  }

  .act-detail-page .data-table {
    min-width: 720px;
  }

  .act-detail-page .correction-split .xml-editor,
  .act-detail-page .split-preview-frame {
    min-height: 460px;
  }
}

@media (max-width: 420px) {
  .act-detail-page .hero-actions {
    grid-template-columns: 1fr;
  }

  .act-detail-page .hero-actions > .secondary-button,
  .act-detail-page .review-status-form {
    grid-column: 1;
    justify-self: stretch;
  }

  .act-detail-page .hero-actions > .secondary-button {
    width: 100%;
  }
}

/* Beginner-facing platform guide. It reuses the existing surfaces and tokens. */
.guide-page .app-main {
  max-width: 1440px;
}

.guide-hero {
  align-items: center;
}

.guide-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: 10px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(21, 31, 45, 0.05);
}

.guide-index a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #b8d5da;
  border-radius: var(--radius-control);
  padding: 5px 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 750;
}

.guide-index a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.guide-section {
  margin-bottom: 18px;
  padding: 20px;
  scroll-margin-top: 16px;
}

.guide-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: start;
  gap: 24px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.guide-section-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.guide-section-head p {
  margin: 0;
  color: var(--muted);
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: guide-step;
  list-style: none;
}

.guide-steps li {
  position: relative;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: 14px 14px 14px 54px;
  background: var(--surface-raised);
  counter-increment: guide-step;
}

.guide-steps li::before {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  content: counter(guide-step);
  font-size: 13px;
  font-weight: 850;
}

.guide-steps strong,
.guide-steps span {
  display: block;
}

.guide-steps span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guide-card,
.guide-explainer {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: 15px;
  background: var(--surface-raised);
}

.guide-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

.guide-card h3,
.guide-explainer h3 {
  margin: 0;
  font-size: 15px;
}

.guide-card p,
.guide-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.guide-card a {
  width: fit-content;
  font-size: 13px;
  font-weight: 750;
}

.guide-feature-list {
  display: grid;
  gap: 9px;
}

.guide-feature-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--surface-raised);
}

.guide-feature-list summary {
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font-weight: 780;
}

.guide-feature-list details[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.guide-feature-list p {
  margin: 0;
  padding: 12px 14px;
  color: var(--muted);
}

.guide-feature-list p + p {
  padding-top: 0;
}

.guide-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-explainer ol {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
}

.guide-explainer p + p {
  margin-top: 10px;
}

.guide-safety-note {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-surface);
  padding: 12px 14px;
  color: var(--info);
  background: var(--info-bg);
}

.guide-system-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.guide-flow-title {
  margin: 14px 0 9px;
  font-size: 15px;
}

.guide-system-flow li {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-surface);
  padding: 11px 12px;
  background: var(--surface-raised);
}

.guide-system-flow strong,
.guide-system-flow span {
  display: block;
}

.guide-system-flow span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.guide-role-table-shell {
  margin: 0;
}

.guide-role-table th:not(:first-child),
.guide-role-table td:not(:first-child) {
  width: 104px;
  text-align: center;
}

.guide-role-table tbody th {
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  text-transform: none;
}

.guide-role-note {
  margin: 12px 0 0;
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  color: var(--muted);
  background: var(--surface-muted);
}

.guide-glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
}

.guide-glossary div {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.guide-glossary dt {
  font-weight: 800;
}

.guide-glossary dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .guide-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .guide-hero,
  .guide-section-head {
    grid-template-columns: 1fr;
  }

  .guide-hero {
    display: grid;
  }

  .guide-section {
    padding: 15px;
  }

  .guide-section-head {
    gap: 8px;
  }

  .guide-steps,
  .guide-card-grid,
  .guide-two-column,
  .guide-system-flow,
  .guide-glossary {
    grid-template-columns: 1fr;
  }

  .guide-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-index a {
    justify-content: center;
    text-align: center;
  }

  .guide-glossary div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 420px) {
  .guide-index {
    grid-template-columns: 1fr;
  }

  .guide-safety-note {
    display: grid;
  }
}

/* Batch import, work batches and controlled cleanup — scoped Figma handoff. */
.batch-import-page,
.work-batches-page,
.cleanup-confirmation-page {
  background: var(--bg);
}

.batch-import-page .app-main,
.work-batches-page .app-main,
.cleanup-confirmation-page .app-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.batch-import-page .app-main > *,
.work-batches-page .app-main > *,
.cleanup-confirmation-page .app-main > * {
  min-width: 0;
  max-width: 100%;
}

.batch-family-head,
.cleanup-confirmation-head {
  min-height: 116px;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
}

.batch-family-head .muted,
.cleanup-confirmation-head .muted {
  max-width: 1060px;
  margin: 0;
}

.batch-family-actions {
  align-self: flex-start;
}

.batch-import-layout {
  gap: 12px;
}

.batch-import-page .panel-section,
.work-batches-page .panel-section,
.cleanup-confirmation-page .panel-section {
  margin: 0;
  padding: 16px;
  background: var(--surface);
  box-shadow: none;
}

.batch-import-page .import-panel-primary {
  border-color: var(--line);
  background: var(--surface);
}

.batch-import-page .editor-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.batch-import-page .editor-head h2,
.cleanup-confirmation-page h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.batch-import-page .panel-note,
.cleanup-confirmation-page .panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.batch-import-page .batch-import-form {
  gap: 12px;
}

.batch-import-page .batch-import-form input[type="text"],
.batch-import-page .batch-import-form input[type="number"],
.batch-import-page .batch-import-form input[type="file"],
.batch-import-page .batch-import-form select {
  border-color: var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: none;
}

.batch-import-page .batch-import-form input[type="text"]:focus,
.batch-import-page .batch-import-form input[type="number"]:focus,
.batch-import-page .batch-import-form input[type="file"]:focus,
.batch-import-page .batch-import-form select:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.batch-import-page .file-upload-field input[type="file"] {
  min-height: 54px;
  border-style: dashed;
  padding: 8px;
  color: var(--muted);
}

.batch-import-page .file-upload-field input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  border: 1px solid #b8d5da;
  border-radius: var(--radius-control);
  padding: 6px 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  cursor: pointer;
  font-weight: 700;
}

.batch-import-page .file-upload-field small {
  font-size: 13px;
}

.batch-import-page .checkbox-line,
.work-batches-page .checkbox-line {
  align-items: center;
  min-height: 36px;
  margin: 0;
}

.batch-import-page .checkbox-line input,
.work-batches-page .checkbox-line input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.batch-import-page .form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.batch-import-page .upload-size-warning,
.batch-import-page .chunk-upload-progress,
.batch-import-page .preflight-card {
  box-shadow: none;
}

.batch-import-page .import-jobs-panel .editor-head {
  margin-bottom: 10px;
}

.batch-import-page .import-jobs-table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.batch-import-page .import-jobs-table th {
  padding: 10px;
  font-size: 11px;
}

.batch-import-page .import-jobs-table td {
  padding: 10px;
  vertical-align: middle;
}

.batch-import-page .import-job-source {
  display: block;
  max-width: 360px;
  overflow-wrap: anywhere;
}

.batch-import-page .import-job-status {
  min-height: 24px;
  padding: 2px 7px;
}

.work-batches-page .batch-status-filter {
  grid-template-columns: minmax(220px, 300px) auto;
  align-items: end;
  gap: 16px;
  margin: 0;
  padding: 12px 16px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.work-batches-page .batch-status-filter .filter-actions {
  align-self: end;
}

.work-batches-page .batch-dashboard {
  grid-template-columns: repeat(auto-fill, minmax(500px, 560px));
  gap: 12px;
}

.work-batches-page .batch-dashboard-card {
  max-width: 560px;
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.work-batches-page .batch-dashboard-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(21, 31, 45, 0.06);
  transform: none;
}

.work-batches-page .batch-priority-high,
.work-batches-page .batch-priority-urgent {
  border-color: var(--warn-line);
}

.work-batches-page .batch-dashboard-head h2 {
  margin: 5px 0 5px;
  font-size: 18px;
}

.work-batches-page .batch-dashboard-head > strong {
  min-width: 38px;
  min-height: 26px;
  border-color: var(--warn-line);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--warn);
  background: var(--warn-bg);
  box-shadow: none;
  font-size: 12px;
}

.work-batches-page .monitor-progress {
  height: 7px;
  margin: 12px 0;
}

.work-batches-page .batch-dashboard-stats span {
  padding: 3px 8px;
  background: var(--surface);
}

.work-batches-page .batch-dashboard-stats .batch-stat-info {
  border-color: var(--info-line);
  color: var(--info);
  background: var(--info-bg);
}

.work-batches-page .batch-dashboard-stats .batch-stat-warning {
  border-color: var(--warn-line);
  color: var(--warn);
  background: var(--warn-bg);
}

.work-batches-page .batch-dashboard-stats .batch-stat-ok {
  border-color: var(--ok-line);
  color: var(--ok);
  background: var(--ok-bg);
}

.work-batches-page .batch-dashboard-stats .batch-stat-danger {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-bg);
}

.work-batches-page .batch-dashboard-footer {
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.work-batches-page .batch-management-form {
  border-color: var(--line);
  background: var(--surface);
}

.work-batches-page .batch-management-title {
  color: var(--muted);
}

.work-batches-page .batch-apply-line {
  border: 0;
  padding: 8px 0;
}

.work-batches-page .batch-save-button {
  justify-self: start;
  min-width: 92px;
}

.work-batches-page .batch-resolution-panel,
.work-batches-page .batch-cleanup-form {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.work-batches-page .batch-danger-zone {
  border: 0;
  background: transparent;
}

.work-batches-page .batch-danger-zone summary {
  width: fit-content;
  margin-left: auto;
  border: 1px solid #7f1111;
  border-radius: var(--radius-control);
  padding: 7px 10px;
  color: var(--surface);
  background: #a61b1b;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.work-batches-page .batch-danger-zone summary::after {
  display: none;
}

.work-batches-page .batch-danger-zone[open] {
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-control);
  padding: 10px;
  background: var(--surface);
}

.work-batches-page .batch-danger-zone[open] summary {
  margin-bottom: 10px;
}

.work-batches-page .batch-danger-zone > p {
  margin: 6px 0;
}

.work-batches-page .batch-danger-zone .mini-note,
.work-batches-page .batch-danger-zone code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.work-batches-page .batch-danger-zone form {
  padding: 8px 0 0;
}

.cleanup-confirmation-workspace {
  display: grid;
  gap: 12px;
}

.cleanup-confirmation-head {
  min-height: 0;
}

.cleanup-subject strong {
  color: var(--text);
}

.cleanup-risk-banner {
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-surface);
  padding: 14px 16px;
  color: var(--danger);
  background: var(--danger-bg);
}

.cleanup-risk-banner h2 {
  color: var(--danger);
}

.cleanup-risk-banner p {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
}

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

.cleanup-inventory-panel,
.cleanup-evidence-panel,
.cleanup-targets-panel,
.cleanup-final-panel {
  min-width: 0;
}

.cleanup-metric-list {
  margin: 0;
}

.cleanup-metric-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto);
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.cleanup-metric-list dt,
.cleanup-confirmation-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.cleanup-metric-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.cleanup-metric-list code,
.cleanup-target-list code,
.cleanup-retained-list code {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cleanup-retained-list,
.cleanup-target-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.cleanup-retained-list li,
.cleanup-retained-item {
  margin: 0;
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-control);
  padding: 9px 10px;
  color: var(--ok);
  background: var(--ok-bg);
  overflow-wrap: anywhere;
}

.cleanup-target-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 9px 10px;
  background: var(--surface-muted);
  overflow-wrap: anywhere;
}

.cleanup-final-panel {
  display: grid;
  gap: 10px;
}

.cleanup-final-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.cleanup-confirmation-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cleanup-confirmation-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8c5c2;
  border-radius: var(--radius-control);
  padding: 7px 10px;
  color: var(--text);
  background: var(--surface);
}

.cleanup-confirmation-field input:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--danger);
}

.cleanup-final-form .danger-button {
  grid-column: 2;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 980px) {
  .batch-import-page .batch-import-form,
  .work-batches-page .batch-status-filter,
  .work-batches-page .batch-management-form {
    grid-template-columns: 1fr;
  }

  .batch-import-page .wide-field,
  .batch-import-page .upload-size-warning,
  .batch-import-page .chunk-upload-progress,
  .batch-import-page .upload-import-form .wide-field:first-of-type,
  .batch-import-page .file-upload-field,
  .batch-import-page .server-import-form .wide-field:first-of-type,
  .batch-import-page .server-import-form .server-path-field,
  .batch-import-page .form-actions {
    grid-column: 1 / -1;
  }

  .work-batches-page .batch-status-filter .filter-actions {
    justify-self: start;
  }

  .work-batches-page .batch-save-button {
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .batch-import-page .app-main,
  .work-batches-page .app-main,
  .cleanup-confirmation-page .app-main {
    gap: 12px;
    padding: 16px;
  }

  .batch-family-head,
  .cleanup-confirmation-head {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 16px;
  }

  .batch-family-head h1,
  .cleanup-confirmation-head h1 {
    font-size: 24px;
  }

  .batch-family-actions {
    justify-content: flex-start;
  }

  .batch-import-page .panel-section,
  .cleanup-confirmation-page .panel-section {
    padding: 16px;
  }

  .batch-import-page .file-upload-field input[type="file"] {
    min-width: 0;
    max-width: 100%;
  }

  .batch-import-page .form-actions {
    justify-content: flex-start;
  }

  .batch-import-page .import-jobs-table-shell {
    overflow: visible;
  }

  .batch-import-page .import-jobs-table,
  .batch-import-page .import-jobs-table tbody {
    display: grid;
    min-width: 0;
    gap: 8px;
  }

  .batch-import-page .import-jobs-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .batch-import-page .import-jobs-table .import-job-row {
    display: grid;
    border: 1px solid var(--line);
    border-radius: var(--radius-surface);
    padding: 10px 12px;
    background: var(--surface);
  }

  .batch-import-page .import-jobs-table .import-job-row td {
    display: grid;
    grid-template-columns: minmax(82px, 0.35fr) minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    overflow-wrap: anywhere;
  }

  .batch-import-page .import-jobs-table .import-job-row td:last-child {
    border-bottom: 0;
  }

  .batch-import-page .import-jobs-table .import-job-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .batch-import-page .import-job-source {
    max-width: 100%;
  }

  .batch-import-page .import-job-message,
  .batch-import-page .import-job-empty {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-surface);
    background: var(--surface);
  }

  .batch-import-page .import-job-message td,
  .batch-import-page .import-job-empty td {
    display: block;
    width: 100%;
    border: 0;
    padding: 12px;
  }

  .work-batches-page .batch-dashboard {
    grid-template-columns: 1fr;
  }

  .work-batches-page .batch-dashboard-card {
    max-width: none;
    padding: 12px;
  }

  .work-batches-page .batch-management-form {
    padding: 10px;
  }

  .work-batches-page .batch-resolution-panel,
  .work-batches-page .batch-cleanup-form {
    align-items: stretch;
    flex-direction: column;
  }

  .work-batches-page .batch-resolution-panel > form,
  .work-batches-page .batch-resolution-panel > form button,
  .work-batches-page .batch-danger-zone,
  .work-batches-page .batch-danger-zone summary {
    width: 100%;
  }

  .work-batches-page .batch-danger-zone summary {
    margin-left: 0;
    text-align: center;
  }

  .cleanup-inventory-grid {
    grid-template-columns: 1fr;
  }

  .cleanup-final-form {
    grid-template-columns: 1fr;
  }

  .cleanup-final-form .danger-button {
    grid-column: 1;
    justify-self: start;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .batch-import-page .app-main,
  .work-batches-page .app-main,
  .cleanup-confirmation-page .app-main {
    padding: 12px;
  }

  .batch-family-head,
  .cleanup-confirmation-head,
  .batch-import-page .panel-section,
  .cleanup-confirmation-page .panel-section {
    padding: 14px;
  }

  .batch-import-page .import-jobs-table .import-job-row td,
  .cleanup-metric-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .cleanup-metric-list dd {
    text-align: left;
  }
}

/* SUMAR family — scoped implementation of the approved Figma screens. */
.summary-family-page {
  background: var(--bg);
}

.summary-family-page .app-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.summary-family-page .app-main > *,
.summary-family-page .work-surface,
.summary-family-page .table-shell,
.summary-family-page .summary-detail-grid > *,
.summary-family-page .summary-findings-grid > *,
.summary-family-page .summary-ledger-grid > * {
  min-width: 0;
  max-width: 100%;
}

.summary-family-page .summary-family-head {
  min-height: 116px;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(21, 31, 45, 0.03);
}

.summary-family-page .summary-family-head .muted {
  max-width: 1100px;
  margin: 0;
}

.summary-family-page .summary-family-actions {
  align-self: flex-start;
}

.summary-family-page .summary-workflow-strip,
.summary-family-page .summary-strip,
.summary-family-page .summary-findings-grid,
.summary-family-page .summary-detail-grid,
.summary-family-page .summary-ledger-grid,
.summary-family-page .summary-history-panel {
  margin: 0;
}

.summary-family-page .summary-card {
  min-width: 0;
  box-shadow: none;
}

.summary-family-page .summary-card strong {
  overflow-wrap: anywhere;
}

.summary-family-page .summary-state-card-review_required,
.summary-family-page .summary-state-card-failed {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.summary-family-page .summary-state-card-valid_pending_approval {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.summary-family-page .summary-state-card-approved,
.summary-family-page .summary-state-card-queued {
  border-color: var(--info-line);
  background: var(--info-bg);
}

.summary-family-page .summary-state-card-published {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.summary-family-page .work-surface,
.summary-family-page .summary-table-layout {
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: 16px;
  background: var(--surface);
  box-shadow: none;
}

.summary-family-page .summary-import-panel {
  margin: 0;
  align-items: start;
}

.summary-family-page .summary-import-panel h2,
.summary-family-page .summary-editor-panel h2,
.summary-family-page .summary-approval-panel h2,
.summary-family-page .summary-source-panel h2,
.summary-family-page .summary-history-panel h2,
.summary-family-page .summary-ledger-grid h2,
.summary-family-page .summary-finding-panel h2 {
  margin: 5px 0 8px;
  font-size: 18px;
}

.summary-import-warning,
.summary-delivery-alert {
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: var(--warn);
  background: var(--warn-bg);
  font-size: 13px;
}

.summary-import-warning {
  margin: 12px 0 0;
}

.summary-delivery-alert {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-bg);
}

.summary-delivery-alert h2,
.summary-delivery-alert p {
  margin: 0;
}

.summary-delivery-alert p {
  color: var(--text);
  overflow-wrap: anywhere;
}

.summary-family-page .summary-import-form {
  gap: 12px;
}

.summary-family-page .summary-file-field input[type="file"] {
  min-width: 0;
  min-height: 54px;
  max-width: 100%;
  border-color: var(--line);
  border-style: dashed;
  border-radius: var(--radius-control);
  padding: 8px;
  color: var(--muted);
  background: var(--surface);
}

.summary-family-page .summary-file-field input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  border: 1px solid #b8d5da;
  border-radius: var(--radius-control);
  padding: 6px 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  cursor: pointer;
  font-weight: 700;
}

.summary-family-page .summary-file-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.summary-family-page .summary-filters {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  padding: 12px 16px;
  background: var(--surface);
}

.summary-mobile-section-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.summary-family-page .summary-filters label,
.summary-family-page .summary-import-form label,
.summary-family-page .summary-correction-form label,
.summary-family-page .summary-approval-form label {
  min-width: 0;
}

.summary-family-page .summary-filters input,
.summary-family-page .summary-filters select,
.summary-family-page .summary-correction-form textarea,
.summary-family-page .summary-approval-form textarea {
  border-color: var(--line);
  border-radius: var(--radius-control);
  box-shadow: none;
}

.summary-family-page .summary-filters input:focus,
.summary-family-page .summary-filters select:focus,
.summary-family-page .summary-correction-form textarea:focus,
.summary-family-page .summary-approval-form textarea:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.summary-table-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.summary-family-page .summary-table-layout .table-shell,
.summary-family-page .summary-history-panel .table-shell,
.summary-family-page .summary-ledger-grid .table-shell,
.summary-family-page .summary-finding-panel .table-shell,
.summary-family-page .summary-goc-request .table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.summary-family-page .summary-table th,
.summary-family-page .summary-table td,
.summary-family-page .summary-ledger-table th,
.summary-family-page .summary-ledger-table td {
  overflow-wrap: anywhere;
}

.summary-family-page .summary-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-family-page .summary-row-actions .secondary-button {
  white-space: normal;
}

.summary-family-page .summary-certification-block {
  margin: 0;
}

.summary-family-page .summary-findings-grid {
  gap: 14px;
}

.summary-family-page .summary-finding-panel,
.summary-family-page .summary-editor-panel,
.summary-family-page .summary-approval-panel,
.summary-family-page .summary-source-panel,
.summary-family-page .summary-history-panel,
.summary-family-page .summary-ledger-grid > article {
  padding: 16px;
}

.summary-family-page .summary-finding-panel pre,
.summary-family-page .summary-source-panel pre,
.summary-family-page .summary-json-readonly,
.summary-family-page .summary-json-editor {
  max-width: 100%;
  overflow: auto;
  border-color: var(--shell-border);
  border-radius: var(--radius-control);
  background: var(--shell-bg) !important;
  color: #e8f0f5 !important;
}

.summary-family-page .summary-json-editor {
  min-height: 620px;
}

.summary-family-page .summary-resolution-fieldset {
  border-color: var(--line);
  background: var(--surface-raised);
}

.summary-family-page .summary-resolution-field {
  border-color: var(--line);
}

.summary-family-page .summary-block-reason {
  line-height: 1.5;
}

.summary-family-page .summary-approval-form code,
.summary-family-page .delivery-evidence-list code,
.summary-family-page .summary-goc-request code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-family-page .summary-goc-request {
  border-color: var(--line);
  border-radius: var(--radius-surface);
  padding: 14px;
  background: var(--surface-raised);
}

.summary-family-page .summary-history-panel,
.summary-family-page .summary-ledger-grid {
  margin-top: 0;
}

.summary-family-page .delivery-pagination {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .summary-family-page .summary-import-panel,
  .summary-family-page .summary-import-form,
  .summary-family-page .summary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-family-page .summary-import-form .primary-button,
  .summary-family-page .summary-filters .filter-actions {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .summary-family-page .app-main {
    gap: 12px;
    padding: 16px;
  }

  .summary-family-page .summary-family-head {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 16px;
  }

  .summary-family-page .summary-family-head h1 {
    font-size: 24px;
  }

  .summary-family-page .summary-family-actions {
    justify-content: flex-start;
  }

  .summary-family-page .summary-workflow-strip,
  .summary-family-page .summary-strip,
  .summary-family-page .summary-import-panel,
  .summary-family-page .summary-import-form,
  .summary-family-page .summary-filters,
  .summary-family-page .summary-findings-grid,
  .summary-family-page .summary-detail-grid,
  .summary-family-page .summary-ledger-grid,
  .summary-delivery-alert {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-family-page .summary-card {
    min-height: 74px;
  }

  .summary-family-page .summary-import-panel,
  .summary-family-page .summary-table-layout,
  .summary-family-page .summary-finding-panel,
  .summary-family-page .summary-editor-panel,
  .summary-family-page .summary-approval-panel,
  .summary-family-page .summary-source-panel,
  .summary-family-page .summary-history-panel,
  .summary-family-page .summary-ledger-grid > article {
    padding: 14px;
  }

  .summary-mobile-section-title {
    position: static;
    width: auto;
    height: auto;
    grid-column: 1 / -1;
    margin: 0 0 2px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 18px;
  }

  .summary-family-page .summary-filters .filter-actions,
  .summary-family-page .summary-import-form .primary-button {
    justify-self: stretch;
  }

  .summary-family-page .summary-filters .filter-actions {
    justify-content: flex-start;
  }

  .summary-family-page .summary-table-layout .table-shell,
  .summary-family-page .summary-history-panel .table-shell,
  .summary-family-page .summary-ledger-grid .table-shell,
  .summary-family-page .summary-finding-panel .table-shell,
  .summary-family-page .summary-goc-request .table-shell {
    overflow: visible;
  }

  .summary-family-page .summary-table,
  .summary-family-page .summary-table tbody,
  .summary-family-page .summary-ledger-table,
  .summary-family-page .summary-ledger-table tbody {
    display: grid;
    min-width: 0;
    gap: 8px;
  }

  .summary-family-page .summary-table thead,
  .summary-family-page .summary-ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .summary-family-page .summary-document-row,
  .summary-family-page .summary-ledger-row {
    display: grid;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-surface);
    padding: 10px 12px;
    background: var(--surface);
  }

  .summary-family-page .summary-document-row > th,
  .summary-family-page .summary-document-row > td,
  .summary-family-page .summary-ledger-row > th,
  .summary-family-page .summary-ledger-row > td {
    display: grid;
    grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    color: var(--text);
    background: transparent;
    text-transform: none;
    overflow-wrap: anywhere;
  }

  .summary-family-page .summary-document-row > :last-child,
  .summary-family-page .summary-ledger-row > :last-child {
    border-bottom: 0;
  }

  .summary-family-page .summary-document-row > th::before,
  .summary-family-page .summary-document-row > td::before,
  .summary-family-page .summary-ledger-row > th::before,
  .summary-family-page .summary-ledger-row > td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .summary-family-page .summary-row-actions {
    display: grid;
  }

  .summary-family-page .summary-row-actions .secondary-button {
    width: fit-content;
  }

  .summary-family-page .summary-empty-row,
  .summary-family-page .summary-ledger-empty {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-surface);
    background: var(--surface);
  }

  .summary-family-page .summary-empty-row td,
  .summary-family-page .summary-ledger-empty td {
    display: block;
    width: 100%;
    border: 0;
    padding: 12px;
  }

  .summary-family-page .summary-json-editor {
    min-height: 440px;
  }

  .summary-family-page .delivery-evidence-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 360px) {
  .summary-family-page .app-main {
    padding: 12px;
  }

  .summary-family-page .summary-family-head,
  .summary-family-page .summary-import-panel,
  .summary-family-page .summary-table-layout,
  .summary-family-page .summary-finding-panel,
  .summary-family-page .summary-editor-panel,
  .summary-family-page .summary-approval-panel,
  .summary-family-page .summary-source-panel,
  .summary-family-page .summary-history-panel,
  .summary-family-page .summary-ledger-grid > article {
    padding: 12px;
  }

  .summary-family-page .summary-document-row > th,
  .summary-family-page .summary-document-row > td,
  .summary-family-page .summary-ledger-row > th,
  .summary-family-page .summary-ledger-row > td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
