:root {
  color-scheme: light;
  --bg: #eef1f5;
  --pane: #ffffff;
  --soft: #f7f9fc;
  --line: #d6dde8;
  --text: #141820;
  --muted: #667085;
  --accent: #1c5fb8;
  --accent-soft: #eaf2ff;
  --strong: #0b6b3a;
  --warn: #8a4b00;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  z-index: 3000;
  top: 8px;
  left: 8px;
  padding: 9px 12px;
  border: 2px solid #175cd3;
  border-radius: 6px;
  color: #101828;
  background: #fff;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button.is-busy {
  pointer-events: none;
}

button.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-spin 0.7s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(28, 95, 184, 0.24);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  word-break: break-all;
}

.reader-shell {
  --list-pane-width: clamp(380px, 35vw, 560px);
  display: grid;
  grid-template-columns: var(--list-pane-width) 8px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
}

.list-pane {
  display: flex;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  background: var(--soft);
}

.pane-resizer {
  position: relative;
  z-index: 3;
  width: 8px;
  min-width: 8px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #e7ecf3;
  cursor: col-resize;
  touch-action: none;
}

.pane-resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 64px;
  border-radius: 999px;
  background: #b8c2d0;
  transform: translate(-50%, -50%);
}

.pane-resizer:hover,
.pane-resizer:focus-visible,
.reader-shell.is-resizing .pane-resizer {
  background: #dbe7f6;
}

.pane-resizer:hover::before,
.pane-resizer:focus-visible::before,
.reader-shell.is-resizing .pane-resizer::before {
  background: var(--accent);
}

.reader-shell.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.site-header {
  position: relative;
  padding: 8px 10px 5px;
}

.site-title-row {
  display: grid;
  gap: 6px;
}

.site-header h1 {
  margin: 0;
  color: #101828;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.08;
}

.site-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 8px;
  align-items: center;
}

.site-brand h1 {
  grid-column: 1 / -1;
}

.library-switch {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.library-switch-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 6px;
  color: #667085;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.library-switch-link:hover {
  color: #101828;
  background: var(--accent-soft);
}

.library-switch-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.library-switch-link.is-active {
  color: #101828;
  font-weight: 800;
}

.library-switch-separator {
  color: #98a2b3;
  font-weight: 500;
}

.site-brand .contribution-rank-button {
  grid-column: 2;
  grid-row: 2;
}

.contribution-rank-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid #d6ddeb;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.contribution-rank-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.site-brand > span {
  display: inline-block;
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  color: #8a96a8;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.site-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  padding-top: 5px;
  border-top: 1px solid rgba(214, 221, 232, 0.8);
}

.login-state-badge {
  display: grid;
  min-width: 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.site-title-row .login-state-badge span {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-state-name {
  font-weight: 700;
}

.login-state-meta {
  opacity: 0.86;
}

.site-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
}

.header-action-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: #243248;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}

.header-action-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.header-action-button.subtle {
  border-color: transparent;
  background: #f4f7fb;
  color: #667085;
}

.header-action-button.is-logged-in {
  border-color: #b42318;
  background: #fff4f2;
  color: #b42318;
}

.header-action-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #243248;
}

.legal-mini-notice {
  display: -webkit-box;
  flex: 1 1 200px;
  min-width: 170px;
  overflow: hidden;
  margin: 0 0 0 1px;
  border-left: 2px solid #d0d9e6;
  padding: 2px 0 2px 7px;
  background: transparent;
  color: #667085;
  font-size: 10.2px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-header .legal-mini-notice {
  margin: 0 0 0 1px;
  color: #667085;
  font-size: 10.5px;
}

.quality-snapshot {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quality-snapshot p {
  margin: 0;
}

.quality-summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quality-summary span {
  border: 1px solid #d8dfeb;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8fafc;
}

.quality-snapshot-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-panel {
  padding: 3px 10px 6px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 720px);
  margin: 0 auto;
}

.search-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  padding: 0 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: 0 8px 22px rgba(25, 38, 56, 0.06);
}

.search-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 95, 184, 0.14), 0 8px 22px rgba(25, 38, 56, 0.06);
}

.search-row button {
  min-height: 38px;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  background: #fff;
  color: #344054;
}

.browse-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 9px;
  background: #ffffff;
}

.filter-toggle-button {
  display: none;
}

.level-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.level-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 5px 5px;
  background: #fff;
  color: #263242;
  text-align: center;
}

.level-tab:hover,
.level-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #123f7a;
}

.level-tab b {
  font-size: 13px;
  line-height: 1.25;
}

.level-tab span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.issuer-tabs,
.type-tabs {
  display: flex;
  gap: 7px;
  margin-top: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.issuer-tabs {
  border-top: 1px solid #edf1f7;
  padding-top: 7px;
}

.issuer-tabs:empty,
.type-tabs:empty {
  display: none;
}

.issuer-tab,
.type-tab {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d7dde7;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.issuer-tab {
  min-height: 29px;
  border-radius: 8px;
  padding: 0 9px;
}

.issuer-tab:hover,
.issuer-tab.active,
.type-tab:hover,
.type-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #123f7a;
}

.issuer-tab b,
.type-tab b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.filter-row label {
  display: grid;
  gap: 3px;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.filter-row select {
  width: 100%;
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
}

.count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.search-hint {
  flex: 1 1 240px;
  color: #7a4d00;
  font-size: 12px;
  line-height: 1.4;
  margin-right: auto;
}

.result-mode-button {
  flex: 1 1 220px;
  margin-right: auto;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 4px 8px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.result-mode-button:empty {
  display: none;
}

.result-mode-button:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.result-mode-button:disabled {
  cursor: default;
  padding-left: 0;
  border-color: transparent;
  background: transparent;
}

.count-row span:first-of-type {
  color: var(--text);
  font-weight: 700;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 16px 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6deea;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f4f7fc;
  color: #233044;
  font-size: 12px;
}

.filter-chip button {
  border: 0;
  background: transparent;
  color: #334155;
  min-height: auto;
  padding: 0;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  border: 1px solid #cfd9eb;
  padding: 2px 9px;
  background: #f8fafc;
  color: #334054;
}

.level-pill--country {
  border-color: #b8d3ff;
  color: #1d4ed8;
  background: #eff6ff;
}

.level-pill--province {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.level-pill--city {
  border-color: #fdba74;
  color: #9a3412;
  background: #fff7ed;
}

.level-pill--enterprise {
  border-color: #ddd6fe;
  color: #6d28d9;
  background: #f5f3ff;
}

.count-action {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.count-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.results {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
}

.mini-loading {
  padding: 14px 12px;
  color: var(--muted);
  text-align: center;
}

.issuer-directory {
  display: grid;
  gap: 7px;
}

.issuer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.issuer-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.issuer-card-name {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.issuer-card-count {
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  white-space: nowrap;
}

.type-group {
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  margin: 0 0 10px;
  background: #fff;
}

.type-group[open] {
  border-color: #c2cede;
}

.type-group summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #233044;
  font-weight: 700;
  cursor: pointer;
}

.type-group summary::-webkit-details-marker {
  display: none;
}

.type-group summary::before {
  content: ">";
  color: var(--accent);
  font-size: 14px;
  transition: transform 0.15s ease;
}

.type-group[open] summary::before {
  transform: rotate(90deg);
}

.type-count {
  margin-left: auto;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 400;
}

.type-items {
  display: grid;
  gap: 2px;
  padding: 0 8px 8px;
}

.result-item {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.result-item:hover {
  border-color: #d4dae3;
  background: #f9fbfe;
}

.result-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.results-load-more {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.results-load-more:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result-title-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(55%) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-title {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-doc-no {
  display: block;
  max-width: 100%;
  align-self: center;
  margin-left: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-lock {
  display: inline-block;
  border: 1px solid #d0bfff;
  border-radius: 999px;
  padding: 1px 6px;
  background: #f5f0ff;
  color: #6b3fb8;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.restricted-detail {
  margin-top: 16px;
}

.result-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.result-meta span,
.result-meta b {
  display: block;
  max-width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.result-meta b {
  border-color: #b7dfc9;
  color: var(--strong);
  font-weight: 700;
}

.result-snippet {
  display: block;
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

mark {
  border-radius: 3px;
  padding: 0 2px;
  background: #fff2a8;
  color: inherit;
}

.text-body mark.detail-search-hit {
  border-radius: 4px;
  padding: 1px 3px;
  background: #ffe36d;
  box-shadow: inset 0 -1px 0 rgba(126, 76, 0, 0.32);
  color: #1f2933;
  font-weight: 700;
}

.detail-pane {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  background: var(--pane);
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  padding: 20px 36px 16px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.detail-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 440px;
}

.tool-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #243248;
  font-size: 12px;
  text-decoration: none;
}

.tool-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tool-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.detail-action-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.detail-tags span {
  border: 1px solid #d7dde6;
  border-radius: 999px;
  padding: 3px 9px;
  color: #344054;
  background: #f8fafc;
  font-size: 12px;
}

.notice {
  margin: 20px 36px 0;
  border-left: 4px solid var(--warn);
  padding: 10px 12px;
  background: #fff8e6;
  color: #4c2f00;
}

.reader-legal-note {
  max-width: 940px;
  margin: 20px 42px 0;
  border-top: 1px solid #e3e8ef;
  padding-top: 10px;
  color: #667085;
  font-size: 12px;
  line-height: 1.7;
}

.text-body {
  max-width: 940px;
  padding: 30px 42px 48px;
}

.text-body h3 {
  margin: 30px 0 14px;
  font-size: 20px;
  line-height: 1.45;
}

.text-body p {
  margin: 0 0 var(--reader-paragraph-gap, 0.72em);
  font-size: var(--reader-font-size, 18px);
  line-height: var(--reader-line-height, 1.85);
  text-indent: var(--reader-text-indent, 2em);
  white-space: normal;
  overflow-wrap: anywhere;
}

.text-body.align-center,
.text-body-original.align-center {
  text-align: center;
}

.text-body.align-right,
.text-body-original.align-right {
  text-align: right;
}

.text-body-original p {
  white-space: pre-wrap;
}

.detail-pane.is-font-overridden .text-body p {
  font-size: var(--reader-font-size-override, 18px) !important;
}

.text-body .policy-original-blank {
  min-height: var(--reader-paragraph-gap, 10px);
  margin: 0;
  text-indent: 0;
}

.text-body .align-center {
  text-align: center;
}

.text-body .align-left {
  text-align: left;
}

.source-details {
  max-width: 940px;
  margin: 0 42px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.source-details summary {
  padding: 16px 0;
  color: #344054;
  font-weight: 700;
  cursor: pointer;
}

.source-details dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
  padding: 0 0 12px;
}

.source-details dt {
  color: #344054;
  font-weight: 700;
}

.source-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 100%;
  place-content: center;
  padding: 32px;
  text-align: center;
}

.empty-state h2,
.loading-state h2 {
  margin: 0;
  font-size: 22px;
}

.empty-state p,
.loading-state p {
  margin: 10px 0 0;
  color: var(--muted);
}

.submission-open,
.login-open {
  overflow: hidden;
}

.submission-dialog[hidden],
.login-dialog[hidden] {
  display: none;
}

.submission-dialog,
.login-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

.legal-panel {
  width: min(560px, 100%);
}

.feedback-panel {
  width: min(640px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.feedback-form select {
  min-height: 40px;
  padding: 8px 34px 8px 11px;
}

.feedback-form textarea {
  min-height: 140px;
  padding: 10px 11px;
  line-height: 1.6;
  resize: vertical;
}

.feedback-form label > small {
  justify-self: end;
  color: var(--muted);
  font-weight: 400;
}

.feedback-identity-status,
.feedback-privacy-note {
  border-left: 3px solid #5f718c;
  padding: 9px 11px;
  background: #f4f7fb;
  color: #475467;
  font-size: 12px;
  line-height: 1.6;
}

.feedback-identity-options {
  display: flex;
  gap: 18px;
  margin: 0;
  border: 0;
  padding: 0;
}

.feedback-identity-options[hidden] {
  display: none;
}

.feedback-identity-options legend {
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.feedback-form .feedback-identity-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.feedback-form .feedback-identity-options input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.feedback-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
}

.feedback-actions button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

.feedback-actions button[type="submit"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.feedback-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.feedback-status.success {
  color: #067647;
}

.login-panel h2 {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px 10px;
  color: #101828;
  font-size: 19px;
  line-height: 1.25;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid #d6ddeb;
  border-radius: 50%;
  background: #fff;
  color: #475467;
  font-size: 18px;
  line-height: 1;
}

.login-note {
  margin: 10px 18px 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.login-status {
  margin: 10px 18px 0;
  color: #667085;
  font-size: 12px;
}

.login-status.error {
  color: #b42318;
}

.login-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0 18px 12px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 4px;
  background: #f6f8fb;
}

.login-mode-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  font-weight: 700;
}

.login-mode-tabs button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(20, 24, 32, 0.08);
}

.login-form.is-login .login-name-field,
.login-action-buttons button[hidden],
.login-form[hidden],
.password-recovery-code[hidden] {
  display: none;
}

.contribution-panel {
  width: min(520px, 100%);
}

.contribution-list {
  display: grid;
  gap: 6px;
  max-height: min(520px, calc(100vh - 220px));
  overflow: auto;
  padding: 12px 18px 18px;
}

.contribution-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) max-content max-content;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid #edf1f7;
  color: #344054;
  font-size: 13px;
}

.contribution-row:last-child {
  border-bottom: 0;
}

.contribution-rank {
  color: #667085;
  font-weight: 800;
}

.contribution-name {
  overflow: hidden;
  color: #101828;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contribution-total,
.contribution-week {
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.contribution-total {
  color: #1d4ed8;
  font-weight: 800;
}

.contribution-empty {
  border: 1px dashed #d6ddeb;
  border-radius: 8px;
  padding: 16px;
  color: #667085;
  text-align: center;
}

.legal-content {
  display: grid;
  gap: 8px;
  padding: 14px 18px 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.75;
}

.legal-content p {
  margin: 0;
}

.legal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px 18px;
}

.legal-actions button {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.login-form {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
}

.login-form label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  padding: 9px 11px;
}

.login-link-button {
  justify-self: start;
  margin: -4px 0 0;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}

.registration-privacy-consent {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: -2px;
  color: #475467;
  font-size: 12px;
}

.registration-privacy-consent[hidden] {
  display: none;
}

.login-form .registration-consent-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.login-form .registration-consent-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.password-recovery-panel {
  width: min(460px, 100%);
}

.password-recovery-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  border: 1px solid #b9cbe3;
  border-radius: 7px;
  padding: 10px;
  background: #f7faff;
}

.password-recovery-code span {
  grid-column: 1 / -1;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.password-recovery-code strong {
  align-self: center;
  overflow-wrap: anywhere;
  color: #123b70;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  letter-spacing: 0;
}

.password-recovery-code button {
  min-height: 32px;
  border: 1px solid #9fb4cf;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  color: var(--accent);
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: 3px;
  min-width: 50px;
  border: 0;
  border-left: 1px solid #e1e7ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.login-action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.login-action-buttons button:last-child {
  border-color: #cbd5e1;
  background: #fff;
  color: #243248;
}

.submission-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.36);
}

.submission-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

.submission-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px 11px;
}

.submission-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.submission-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.submission-close-button {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid #d7dde7;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 20px;
  line-height: 1;
}

.submission-form {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.submission-form label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.submission-policy-picker {
  gap: 6px !important;
}

.submission-policy-results {
  display: grid;
  max-height: 360px;
  overflow: auto;
  gap: 2px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 4px;
  background: #f8fafc;
}

.submission-policy-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, auto);
  gap: 8px;
  width: 100%;
  border: 1px solid #d7dde7;
  border-radius: 4px;
  padding: 3px 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  align-items: center;
}

.submission-policy-result:hover,
.submission-policy-result.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.submission-policy-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.submission-policy-meta {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
}

.submission-policy-meta b,
.submission-policy-meta span {
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.submission-policy-meta b {
  border-color: #b7dfc9;
  color: var(--strong);
  font-weight: 700;
}

.submission-policy-empty {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.submission-policy-more {
  margin: 4px 0 0;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
}

.submission-selected-policy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #b7dfc9;
  border-radius: 8px;
  padding: 8px;
  background: #f3fbf6;
}

.submission-selected-policy[hidden] {
  display: none;
}

.submission-selected-policy div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.submission-selected-policy b {
  overflow-wrap: anywhere;
  color: #164a2d;
  font-size: 13px;
  line-height: 1.35;
}

.submission-selected-policy span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.submission-selected-policy button {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #243248;
  font-size: 12px;
}

.submission-classification-field {
  display: grid;
  gap: 7px;
}

.submission-classification-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.submission-classification-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-align: right;
}

.submission-level-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.submission-level-picker button,
.submission-category-options button {
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 5px 8px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.submission-level-picker button {
  text-align: center;
  font-weight: 700;
}

.submission-level-picker button[aria-pressed="true"],
.submission-category-options button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.submission-category-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 154px;
  overflow: auto;
  gap: 4px;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 4px;
  background: #f8fafc;
}

.submission-category-options button {
  text-align: left;
  line-height: 1.3;
}

.submission-category-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.submission-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.submission-mode legend {
  width: 100%;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.submission-mode label {
  display: inline-flex;
  grid-template-columns: none;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font-weight: 400;
}

.submission-mode input {
  width: 15px !important;
  height: 15px;
  padding: 0;
}

.submission-form input,
.submission-form textarea {
  width: 100%;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font-weight: 400;
  outline: none;
}

.submission-form input:focus,
.submission-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 95, 184, 0.14);
}

.submission-form textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}

.submission-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.submission-draft-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #b8cae2;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f4f8fd;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.submission-draft-notice[hidden] {
  display: none;
}

.submission-draft-notice div {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.submission-draft-notice button {
  min-height: 32px;
  border: 1px solid #b8c6d8;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #243248;
}

.submission-upload-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #344054;
  font-size: 12px;
}

.submission-upload-progress[hidden] {
  display: none;
}

.submission-upload-progress progress {
  width: 100%;
  height: 9px;
  accent-color: var(--accent);
}

.submission-upload-progress.error {
  color: #b42318;
}

.submission-status.duplicate {
  border: 1px solid #b42318;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff1f0;
  color: #b42318;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.submission-attachment-list {
  display: grid;
  gap: 5px;
}

.submission-attachment-list span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid #d7dde7;
  border-radius: 7px;
  padding: 6px 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.submission-attachment-list span button {
  flex: 0 0 auto;
}

.submission-confirm {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  gap: 8px !important;
  align-items: flex-start;
  color: #475467 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.55;
}

.submission-confirm input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  padding: 0;
}

.submission-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 10px;
}

.submission-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.submission-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.submission-status.error {
  color: #b42318;
}

.my-submissions-panel {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
}

.my-submissions-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 2px 0 4px;
}

.my-submission-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

.my-submission-row.is-rejected {
  border-color: #e5b9b4;
  background: #fff8f7;
}

.my-submission-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.my-submission-meta,
.my-submission-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.my-submission-note {
  color: #9d291f;
}

.my-submission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.my-submission-actions button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
}

.my-submission-actions button.danger {
  color: #b42318;
  border-color: #e5b9b4;
}

.submission-actions button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
}

.submission-actions button[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.admin-page {
  min-height: 100%;
  background: #eef1f5;
}

.admin-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px;
}

.admin-header,
.admin-login,
.admin-workbench {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.admin-header h1 {
  margin: 0;
  font-size: 24px;
}

.admin-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(170px, 250px) minmax(170px, 240px) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
}

.admin-session-status {
  min-width: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.admin-session-status.error {
  color: #b42318;
}

.admin-login input,
.admin-actions textarea {
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  padding: 10px 12px;
}

.admin-login button,
.admin-actions button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.admin-login-link {
  min-height: 40px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
}

.admin-login-help {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-actions button.danger {
  border-color: #b42318;
  background: #b42318;
}

#adminStatus {
  color: var(--muted);
  font-size: 13px;
}

#adminStatus.error {
  color: #b42318;
}

#adminStatus.success {
  color: #0b6b3a;
  font-weight: 700;
}

.admin-workbench {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  margin-top: 12px;
  min-height: 640px;
  overflow: hidden;
}

.admin-workbench[hidden] {
  display: none;
}

.admin-list {
  border-right: 1px solid var(--line);
  padding: 12px;
  background: #f8fafc;
  overflow: auto;
}

.admin-side-nav {
  display: grid;
  gap: 8px;
}

.admin-nav-button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #243248;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.admin-nav-button span {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef3fb;
  color: #667085;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.admin-nav-button:hover,
.admin-nav-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.admin-nav-button.active span {
  background: #fff;
  color: var(--accent);
}

.admin-page button.is-busy {
  cursor: wait;
  opacity: 0.82;
}

.admin-page button.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: admin-spin 0.75s linear infinite;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-main {
  min-width: 0;
  overflow: auto;
  padding: 16px;
}

.admin-dashboard {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-dashboard-main {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.admin-dashboard-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-dashboard-totals span {
  border: 1px solid #d7dde7;
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff;
  color: #344054;
  font-size: 11px;
}

.admin-repair-button {
  min-height: 24px;
  border: 1px solid #bfd0e7;
  border-radius: 999px;
  padding: 2px 9px;
  background: #eef5ff;
  color: #1c5fb8;
  font-size: 11px;
  font-weight: 700;
}

.admin-repair-button:hover {
  border-color: var(--accent);
  background: #e3efff;
}

.admin-user-panel,
.admin-rejected-panel {
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}

.admin-user-panel summary,
.admin-rejected-panel summary {
  cursor: pointer;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.admin-user-panel summary span {
  float: right;
  min-width: 22px;
  border-radius: 999px;
  background: #edf3fb;
  text-align: center;
  color: var(--accent);
}

.admin-user-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.admin-user-toolbar input {
  width: min(260px, 100%);
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.admin-user-toolbar select,
.admin-user-pager button {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.admin-user-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 9px;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-user-batch-toolbar button,
.admin-user-batch-toolbar select {
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 8px;
  background: #fff;
  color: #344054;
}

.admin-user-batch-toolbar button:last-of-type {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.admin-user-batch-toolbar button:disabled {
  border-color: #d7dde7;
  background: #f3f5f8;
  color: #98a2b3;
}

.admin-user-pager {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.admin-user-status-panel + .admin-user-status-panel {
  margin-top: 6px;
}

.admin-password-reset-panel {
  margin-bottom: 10px;
  border-color: #b9cbe3;
  background: #f8fbff;
}

.admin-password-reset-note {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-password-reset-list {
  display: grid;
  gap: 5px;
}

.admin-password-reset-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #dfe8f3;
  padding: 7px 0 0;
}

.admin-password-reset-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}

.admin-password-reset-row small {
  width: 100%;
  color: var(--muted);
}

.admin-user-subgroups {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.admin-user-access-panel {
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 5px 7px;
  background: #fbfcfe;
}

.admin-user-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.admin-user-row {
  display: grid;
  gap: 1px;
  border-top: 1px solid #edf1f6;
  padding-top: 5px;
  font-size: 11px;
}

.admin-user-row b {
  font-size: 12px;
}

.admin-user-row span {
  color: var(--muted);
}

.admin-user-row-status {
  align-self: center;
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
}

.admin-user-row-status[data-tone="working"] {
  color: #1c5fb8;
}

.admin-user-row-status[data-tone="success"] {
  color: #067647;
  font-weight: 700;
}

.admin-user-row-status[data-tone="error"] {
  color: #b42318;
  font-weight: 700;
}

.admin-user-edit-row {
  grid-template-columns: 24px minmax(110px, 1fr) minmax(128px, 1fr) minmax(104px, auto) minmax(104px, auto) minmax(110px, 1fr) minmax(110px, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.admin-user-edit-row.is-pending {
  border-left: 3px solid #d97706;
  padding-left: 7px;
}

.admin-user-edit-row.is-deleted {
  opacity: 0.68;
}

.admin-user-edit-row.is-saving {
  background: #f8fbff;
}

.admin-user-edit-row label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.admin-user-edit-row .admin-user-select {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
}

.admin-user-select input {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.admin-user-edit-row input,
.admin-user-edit-row select {
  min-width: 0;
  min-height: 30px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  font-size: 12px;
}

.admin-phone-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.admin-phone-field button,
.admin-uploader-info button {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
}

.admin-user-actions {
  display: flex;
  gap: 5px;
}

.admin-user-actions button {
  min-height: 30px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.admin-user-actions button.danger {
  border-color: #b42318;
  background: #b42318;
}

.admin-user-actions button.secondary {
  border-color: #98a2b3;
  background: #fff;
  color: #344054;
}

.temporary-password-panel {
  width: min(480px, 100%);
}

.temporary-password-content {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.temporary-password-content > span {
  color: #475467;
  font-size: 13px;
}

.temporary-password-content > strong {
  border: 1px solid #9fb4cf;
  border-radius: 7px;
  padding: 12px;
  background: #f7faff;
  color: #123b70;
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.admin-search-input {
  width: 100%;
  min-height: 34px;
  margin: 0;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
}

.admin-list h2 {
  margin: 12px 0 8px;
  font-size: 15px;
}

.admin-list h2:first-child {
  margin-top: 0;
}

.admin-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  gap: 6px;
  align-items: center;
  width: 100%;
  margin-bottom: 2px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 4px 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.admin-list-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-list-bulk-tools {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.admin-list-bulk-tools button {
  min-height: 30px;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.admin-list-bulk-tools button.danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.admin-list-row-selectable {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
}

.admin-list-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.admin-list-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.admin-list-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.admin-export-button {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.admin-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 12px;
  align-items: end;
  padding-bottom: 10px;
}

.admin-list-card {
  padding-top: 8px;
}

.admin-list-view {
  display: grid;
  gap: 2px;
}

.admin-feedback-head {
  align-items: end;
}

.admin-feedback-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
}

.admin-feedback-filter {
  display: grid;
  gap: 3px;
  min-width: 116px;
  color: var(--muted);
  font-size: 12px;
}

.detail-tags b {
  margin-right: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
}

.detail-tags .source-unverified {
  border-color: #f0b46a;
  color: #8a3b12;
  background: #fff7ed;
}

.detail-reader-tools {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.detail-reader-tools label {
  display: grid;
  gap: 4px;
  color: #667085;
  font-size: 12px;
}

.detail-reader-tools input {
  width: min(260px, 70vw);
  min-height: 36px;
  border: 1px solid #b8c2d1;
  border-radius: 6px;
  padding: 7px 10px;
}

.detail-toc {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid #175cd3;
  background: #f8fafc;
}

.detail-toc-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.detail-toc-list a {
  color: #175cd3;
  font-size: 13px;
  line-height: 1.5;
}

.source-verification-notice {
  border-color: #f0b46a;
  color: #7a2e0e;
  background: #fff7ed;
}

.reader-welcome {
  align-items: stretch;
  text-align: left;
}

.recent-policy-list {
  width: min(100%, 640px);
  display: grid;
  gap: 8px;
}

.recent-policy-list button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.recent-policy-list strong,
.recent-policy-list span {
  display: block;
}

.recent-policy-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-feedback-filter:first-child {
  flex: 1 1 190px;
}

.admin-feedback-filter select {
  min-height: 34px;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.admin-export-button.secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #243248;
}

.admin-feedback-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  min-height: 500px;
  border: 1px solid #d7dde7;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.admin-feedback-list {
  max-height: 660px;
  padding: 8px;
  border-right: 1px solid #d7dde7;
  background: #f8fafc;
  overflow: auto;
}

.admin-feedback-result-count {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.admin-feedback-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 76px;
  margin: 0 0 4px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 7px 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.admin-feedback-item:hover,
.admin-feedback-item:focus-visible {
  border-color: var(--accent);
}

.admin-feedback-item.active {
  border-color: var(--accent);
  background: #eef5ff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.admin-feedback-item-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.admin-feedback-item-top b {
  color: #123b70;
}

.admin-feedback-item-top em {
  color: var(--muted);
  font-style: normal;
}

.admin-feedback-item > strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-feedback-item > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-feedback-detail {
  min-width: 0;
  padding: 18px;
}

.admin-feedback-detail-head {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.admin-feedback-detail-head span,
.admin-feedback-detail-head small {
  color: var(--muted);
  font-size: 12px;
}

.admin-feedback-detail-head h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.admin-feedback-message {
  min-height: 120px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.admin-feedback-meta {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}

.admin-feedback-meta > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}

.admin-feedback-meta dt {
  color: var(--muted);
}

.admin-feedback-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-feedback-editor {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-feedback-editor label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.admin-feedback-editor select,
.admin-feedback-editor textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.admin-feedback-editor select {
  min-height: 40px;
}

.admin-feedback-editor textarea {
  min-height: 112px;
  line-height: 1.6;
  resize: vertical;
}

.admin-feedback-editor button {
  justify-self: start;
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.admin-db-card,
.admin-event-card,
.admin-recovery-card {
  padding: 10px;
}

.admin-db-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  border: 1px solid #d7dde7;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12px;
}

.admin-db-status.ok {
  border-color: #b9e4c8;
  background: #f2fbf5;
  color: #176c3a;
}

.admin-db-status.warn {
  border-color: #f1d59d;
  background: #fff8ea;
  color: #7a4400;
}

.admin-db-status b,
.admin-db-status span {
  min-width: 0;
}

.admin-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-section-title-row h3 {
  margin: 0;
}

.admin-health-ok,
.admin-health-warn {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.admin-health-ok {
  background: #e8f7ee;
  color: #176c3a;
}

.admin-health-warn {
  background: #fff4df;
  color: #8a4c00;
}

.admin-db-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.admin-db-metric {
  min-width: 0;
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fbfcfe;
}

.admin-db-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.admin-db-metric b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-db-meta {
  margin-top: 4px;
}

.admin-db-issue-group {
  border-top: 1px solid #edf1f6;
  padding-top: 8px;
}

.admin-db-issue-group + .admin-db-issue-group {
  margin-top: 8px;
}

.admin-db-issue-group h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.admin-db-issue-group h4 span {
  border-radius: 999px;
  padding: 1px 7px;
  background: #fff4df;
  color: #8a4c00;
  font-size: 11px;
}

.admin-db-issue-group p {
  margin: 3px 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.admin-db-issue-list {
  display: grid;
  gap: 2px;
}

.admin-db-issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #f0f3f8;
  padding: 4px 0;
  font-size: 11px;
}

.admin-db-issue-row b,
.admin-db-issue-row span,
.admin-db-issue-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-db-issue-row em {
  color: var(--muted);
  font-style: normal;
}

.admin-event-list {
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow: auto;
}

.admin-event-row {
  display: grid;
  grid-template-columns: minmax(128px, 1.1fr) 62px minmax(128px, 0.9fr) minmax(0, 2fr);
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  padding: 5px 0;
  font-size: 11px;
}

.admin-event-row b,
.admin-event-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-event-row span,
.admin-event-row em {
  color: var(--muted);
  font-style: normal;
}

.admin-recovery-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-recovery-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.admin-recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.9fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  font-size: 12px;
}

.admin-recovery-row b,
.admin-recovery-row span,
.admin-recovery-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-recovery-row span,
.admin-recovery-row em,
.admin-recovery-meta {
  color: var(--muted);
  font-style: normal;
}

.admin-recovery-meta {
  display: grid;
  gap: 2px;
}

.admin-recovery-events {
  margin-top: 8px;
}

.admin-list-item-wide {
  min-height: 26px;
  margin-bottom: 0;
  padding: 4px 7px;
}

.admin-empty-main {
  text-align: left;
}

.admin-list-item[disabled] {
  opacity: 0.72;
  cursor: default;
}

.admin-list-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list-item span,
.admin-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}

.admin-detail {
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.admin-detail-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.admin-detail-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.admin-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-review-card {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.admin-review-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.admin-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-card-title-row h3 {
  margin: 0;
}

.admin-card-title-row button {
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--accent);
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-ocr-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  color: #344054;
  font-size: 13px;
}

.admin-ocr-status strong {
  color: var(--accent);
}

.admin-ocr-status span,
.admin-ocr-error {
  color: var(--muted);
}

.admin-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.admin-format-toolbar button {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #243248;
  font-size: 12px;
}

.admin-format-toolbar button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}

.admin-edit-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.admin-edit-grid input,
.admin-edit-grid select,
.admin-review-text,
.admin-format-editor {
  width: 100%;
  min-width: 0;
  border: 1px solid #bbc7d7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.admin-edit-grid input,
.admin-edit-grid select {
  min-height: 38px;
  padding: 8px 10px;
  font-weight: 400;
}

.admin-review-text {
  min-height: 300px;
  padding: 12px;
  line-height: 1.75;
  resize: vertical;
}

.admin-review-text-source {
  display: none;
}

.admin-format-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-format-editor,
.admin-format-preview {
  max-height: 520px;
  min-height: 420px;
  overflow: auto;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 22px 26px;
  background: #fff;
  --reader-font-size: var(--review-font-size, 18px);
  --reader-line-height: var(--review-line-height, 1.85);
  --reader-paragraph-gap: var(--review-paragraph-gap, 10px);
  --reader-text-indent: var(--review-text-indent, 0em);
  outline: none;
}

.admin-format-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28, 95, 184, 0.14);
}

.admin-format-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.admin-format-editor p {
  cursor: text;
}

.admin-format-preview h3:first-child,
.admin-format-preview p:first-child,
.admin-format-editor h3:first-child,
.admin-format-editor p:first-child {
  margin-top: 0;
}

.admin-score {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  font-weight: 700;
}

.admin-score span {
  color: var(--accent);
}

.admin-review-card ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.admin-review-card li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px;
  border-left: 4px solid #d0d5dd;
  padding: 7px 9px;
  background: #f8fafc;
  font-size: 13px;
}

.admin-review-card li.pass {
  border-left-color: #0b6b3a;
}

.admin-review-card li.warn {
  border-left-color: #d98a00;
}

.admin-review-card li.fail {
  border-left-color: #b42318;
}

.admin-review-card dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.admin-review-card dt {
  color: #344054;
  font-weight: 700;
}

.admin-review-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-review-card pre {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
  white-space: pre-wrap;
  line-height: 1.7;
}

.admin-attachments {
  display: grid;
  gap: 10px;
}

.admin-attachment-group {
  display: grid;
  gap: 6px;
  border: 1px solid #e0e6ef;
  border-radius: 7px;
  padding: 8px;
  background: #fbfcfe;
}

.admin-attachment-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.admin-attachment-group-head h4 {
  margin: 0;
  color: #163b67;
  font-size: 13px;
}

.admin-attachment-group-head span {
  color: var(--muted);
  font-size: 11px;
}

.admin-attachment-rows {
  display: grid;
  gap: 6px;
}

.admin-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(105px, 140px) auto auto auto;
  gap: 6px;
  align-items: end;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}

.admin-attachment-row label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.admin-attachment-row input[type="text"],
.admin-attachment-row input:not([type]),
.admin-attachment-row select {
  min-height: 30px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
}

.admin-attachment-row > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.admin-attachment-remove {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
}

.admin-attachments button {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--accent);
  text-align: left;
}

.admin-attachment-upload {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 66px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fbfcfe;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.admin-attachment-upload strong {
  color: #163b67;
  font-size: 13px;
}

.admin-attachment-upload span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.admin-attachment-upload:hover,
.admin-attachment-upload:focus-visible,
.admin-attachment-upload.is-dragover {
  border-color: #2a63ad;
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(42, 99, 173, 0.12);
  outline: none;
}

.admin-uploader-info {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.admin-uploader-info em {
  color: var(--muted);
  font-style: normal;
}

.admin-actions {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.admin-actions div {
  display: flex;
  gap: 8px;
}

.classification-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(520px, 1.7fr);
  gap: 18px;
  align-items: start;
}

.classification-tree-panel,
.classification-files-panel,
.classification-import-panel {
  min-width: 0;
}

.classification-tree {
  display: grid;
  gap: 2px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.classification-tree-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  padding: 2px 3px 2px calc(5px + var(--classification-depth, 0) * 15px);
  border-bottom: 1px solid #edf1f6;
}

.classification-tree-node.is-selected {
  background: #f1f6ff;
}

.classification-node-select,
.classification-node-actions button,
.classification-add-form button,
.classification-toolbar button,
.classification-batch-tools button,
.classification-file-row button,
.classification-import-tools button {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #344054;
  font-size: 11px;
}

.classification-node-select {
  min-width: 0;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.classification-tree-node.is-selected .classification-node-select {
  color: var(--accent);
}

.classification-tree-node > span,
.classification-batch-tools > span,
.classification-help,
.classification-file-row em,
.classification-file-row span {
  color: var(--muted);
  font-size: 11px;
}

.classification-node-actions {
  display: flex;
  gap: 3px;
}

.classification-node-actions:not(:empty) {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding: 0 2px 2px;
}

.classification-node-actions .danger {
  border-color: #f4c7c3;
  color: #b42318;
}

.classification-add-form,
.classification-toolbar,
.classification-batch-tools,
.classification-sort-tools,
.classification-import-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.classification-add-form select,
.classification-add-form input,
.classification-toolbar input,
.classification-toolbar select,
.classification-batch-tools select,
.classification-batch-tools input,
.classification-import-panel textarea {
  min-height: 30px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.classification-add-form select {
  flex: 1 1 160px;
}

.classification-add-form input {
  flex: 1 1 120px;
}

.classification-toolbar input {
  flex: 1 1 220px;
}

.classification-batch-tools {
  border-top: 1px solid #edf1f6;
  padding-top: 8px;
}

.classification-sort-tools {
  border-top: 1px solid #edf1f6;
  padding-top: 8px;
}

.classification-sort-tools strong {
  font-size: 12px;
}

.classification-sort-tools > span {
  color: var(--muted);
  font-size: 11px;
}

.classification-sort-save {
  margin-left: auto;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.classification-sort-save:disabled {
  border-color: #d7dde7;
  background: #f3f5f8;
  color: #98a2b3;
}

.classification-batch-tools select {
  flex: 1 1 210px;
}

.classification-batch-tools label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #475467;
  font-size: 11px;
}

.classification-batch-tools input {
  width: 65px;
}

.classification-file-list {
  max-height: 520px;
  overflow: auto;
  margin-top: 8px;
  border-top: 1px solid #edf1f6;
}

.classification-file-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 22px minmax(170px, 1.3fr) 52px 88px minmax(150px, 1fr) 108px auto;
  gap: 6px;
  align-items: center;
  min-height: 35px;
  border-bottom: 1px solid #edf1f6;
  padding: 3px 0;
}

.classification-file-row.is-dragging {
  opacity: 0.45;
}

.classification-file-row.is-drop-before,
.classification-file-row.is-drop-after {
  background: #eef5ff;
}

.classification-file-row.is-drop-before::before,
.classification-file-row.is-drop-after::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px #fff;
  pointer-events: none;
}

.classification-file-row.is-drop-before::before {
  top: -2px;
}

.classification-file-row.is-drop-after::after {
  bottom: -2px;
}

.classification-file-row.is-dirty {
  background: #f6f9fd;
}

.classification-row-save-state {
  color: #1c5fb8 !important;
  font-weight: 700;
  text-align: center;
}

.classification-load-more {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 7px 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.classification-drag-handle {
  width: 24px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  background: #fff;
  color: #5a6b82;
  cursor: grab;
  font-size: 16px;
  line-height: 1;
}

.classification-drag-handle:active {
  cursor: grabbing;
}

.classification-file-row > label:first-child {
  display: flex;
  justify-content: center;
}

.classification-file-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
}

.classification-file-row div > span,
.classification-path {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classification-file-name {
  min-width: 0;
  padding: 3px 0;
}

.classification-file-row b {
  display: block;
  min-width: 0;
  overflow: visible;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.classification-file-row em {
  font-style: normal;
  text-align: center;
}

.classification-visibility select {
  width: 100%;
  min-height: 28px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 0 4px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
}

.classification-row-order-actions {
  display: grid;
  grid-template-columns: repeat(4, 24px);
  gap: 3px;
}

.classification-row-order-actions button {
  width: 24px;
  min-height: 28px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #38506e;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.classification-import-panel textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  margin-top: 8px;
  padding: 7px;
  line-height: 1.45;
  resize: vertical;
}

.classification-help {
  margin: 8px 0 0;
  line-height: 1.55;
}

.mobile-reader-tools {
  display: none;
}

@media (max-width: 980px) {
  .classification-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .classification-tree,
  .classification-file-list {
    max-height: none;
  }

  .classification-file-row {
    grid-template-columns: 24px 22px minmax(0, 1fr) 48px 76px 108px auto;
  }

  .classification-path {
    display: none;
  }

  .classification-import-panel .admin-card-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .classification-import-panel .admin-card-title-row > span {
    flex: 1 1 100%;
    color: var(--muted);
    font-size: 11px;
  }

  .pane-resizer {
    display: none;
  }

  .reader-shell {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .reader-shell.has-active-detail + .mobile-reader-tools {
    position: fixed;
    right: 12px;
    bottom: 14px;
    z-index: 20;
    display: flex;
    gap: 6px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 999px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(6px);
  }

  .mobile-reader-tools button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 10px;
    background: #f2f6fb;
    color: #243248;
    font-size: 12px;
    font-weight: 700;
  }

  .list-pane {
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .results {
    overflow: visible;
    padding-bottom: 12px;
  }

  .detail-pane {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .reader-shell.has-active-detail .detail-pane {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .detail-header {
    position: static;
    padding: 18px 18px 14px;
  }

  .detail-title-row {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .detail-actions .tool-button {
    min-height: 44px;
  }

  .result-item {
    min-height: 44px;
    padding: 6px 10px;
  }

  .result-title-line {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    overflow: visible;
    white-space: normal;
  }

  .result-title {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .result-doc-no {
    grid-column: 1 / -1;
  }

  .detail-header h2 {
    font-size: 20px;
  }

  .site-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-brand {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .library-switch-link {
    min-height: 44px;
  }

  .site-actions {
    grid-template-columns: 1fr;
    justify-content: flex-start;
    max-width: none;
  }

  .site-action-buttons {
    justify-content: flex-start;
  }

  .header-action-button {
    width: fit-content;
    min-width: 44px;
    min-height: 44px;
  }

  .notice {
    margin: 16px 18px 0;
  }

  .text-body {
    padding: 20px 18px 32px;
  }

  .text-body p {
    font-size: 16px;
    line-height: 1.85;
  }

  .empty-state,
  .loading-state {
    min-height: 180px;
  }

  .source-details {
    margin: 0 18px 32px;
  }

  .source-details dl {
    grid-template-columns: 1fr;
  }

  .submission-dialog {
    align-items: stretch;
    padding: 10px;
  }

  .submission-panel {
    max-height: calc(100vh - 20px);
  }

  .contribution-row {
    grid-template-columns: 28px minmax(0, 1fr) max-content;
  }

  .contribution-week {
    grid-column: 2 / -1;
    margin-top: -4px;
  }

  .submission-header,
  .submission-form {
    padding-right: 16px;
    padding-left: 16px;
  }

  .submission-grid,
  .submission-actions {
    grid-template-columns: 1fr;
  }

  .submission-actions button {
    width: 100%;
  }

  .submission-form textarea {
    min-height: 220px;
  }

  .submission-selected-policy {
    grid-template-columns: 1fr;
  }

  .submission-policy-results {
    max-height: 300px;
  }

  .admin-shell {
    padding: 10px;
  }

  .admin-header,
  .admin-login,
  .admin-workbench {
    border-radius: 8px;
  }

  .admin-header,
  .admin-login,
  .admin-workbench,
  .admin-list-head,
  .admin-event-row,
  .admin-db-issue-row,
  .admin-recovery-row,
  .admin-edit-grid,
  .admin-user-edit-row,
  .admin-password-reset-row,
  .admin-review-card li,
  .admin-review-card dl {
    grid-template-columns: 1fr;
  }

  .admin-workbench {
    display: block;
  }

  .admin-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }

  .admin-side-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  .admin-side-nav .admin-nav-button {
    flex: 0 0 148px;
    scroll-snap-align: start;
  }

  .admin-db-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-db-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-recovery-tools {
    grid-template-columns: 1fr;
  }

  .admin-actions div {
    display: grid;
  }

  .admin-main {
    padding: 14px;
  }

  .admin-feedback-tools {
    justify-content: stretch;
  }

  .admin-feedback-filter,
  .admin-feedback-filter:first-child {
    flex: 1 1 180px;
  }

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

  .admin-feedback-list {
    max-height: 380px;
    border-right: 0;
    border-bottom: 1px solid #d7dde7;
  }

  .admin-feedback-detail {
    min-height: 420px;
    padding: 14px;
  }

  .admin-user-edit-row .admin-user-select {
    justify-content: flex-start;
  }

  .admin-format-preview,
  .admin-format-editor {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 560px) {
  .site-brand {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 2px 8px;
    align-items: center;
  }

  .site-header h1 {
    font-size: clamp(17px, 5.3vw, 22px);
  }

  .library-switch {
    gap: 5px;
  }

  .contribution-rank-button {
    min-height: 44px;
  }

  .level-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .level-tab {
    min-height: 44px;
    gap: 3px;
    padding: 4px 2px;
  }

  .level-tab b {
    font-size: 12px;
  }

  .level-tab span {
    font-size: 10px;
  }

  .filter-row {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 6px;
  }

  .browse-panel.filters-open .filter-row {
    display: grid;
  }

  .filter-toggle-button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    border: 1px solid #d7dde7;
    border-radius: 7px;
    background: #fff;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
  }

  .submission-close-button {
    width: 44px;
    height: 44px;
  }

  .filter-toggle-button::after {
    content: "v";
    margin-left: 5px;
  }

  .browse-panel.filters-open .filter-toggle-button::after {
    transform: rotate(180deg);
  }

  .filter-toggle-button.has-filters {
    border-color: #9ab5d8;
    background: #f4f8fd;
    color: #164e92;
  }

  .filter-row select {
    min-height: 44px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-hint {
    flex-basis: 100%;
    max-width: 100%;
  }

  .search-row input {
    min-height: 44px;
  }

  .submission-draft-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .submission-draft-notice button {
    min-height: 40px;
  }

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

  .feedback-actions .submission-status {
    grid-column: 1 / -1;
  }

  .feedback-actions button {
    min-height: 44px;
  }

  .admin-side-nav {
    display: flex;
  }

  .admin-db-grid {
    grid-template-columns: 1fr;
  }

}

@media print {
  body {
    background: #fff;
  }

  .reader-shell {
    display: block;
    height: auto;
  }

  .list-pane,
  .detail-actions,
  .detail-action-status,
  .source-details summary {
    display: none !important;
  }

  .detail-pane {
    height: auto;
    overflow: visible;
  }

  .detail-header {
    position: static;
    padding: 0 0 12px;
  }

  .text-body {
    max-width: none;
    padding: 0;
  }

  .source-details {
    max-width: none;
    margin: 24px 0 0;
  }
}

.attachment-panel {
  max-width: 980px;
  margin: 22px 36px 0;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.attachment-panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.attachment-panel h3 {
  margin: 0;
  color: #163b67;
  font-size: 15px;
  line-height: 1.4;
}

.attachment-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.attachment-list {
  display: grid;
  gap: 6px;
}

.original-locator-note {
  margin-bottom: 8px !important;
  border-left: 3px solid #d4a017;
  padding-left: 9px;
  color: #6b4f00 !important;
}

.original-file-list {
  display: grid;
  gap: 12px;
}

.policy-original {
  min-width: 0;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.policy-original.is-search-match {
  border-color: #d4a017;
  box-shadow: 0 0 0 2px rgb(212 160 23 / 12%);
}

.policy-original-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #e4e9f0;
  background: #f8fafc;
}

.policy-original-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.policy-original-head strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.policy-original-head span {
  color: var(--muted);
  font-size: 11px;
}

.policy-original-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.policy-original-actions a {
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.original-image-stage,
.pdf-page-stage {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  background: #eef1f5;
}

.original-image-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.pdf-page-stage {
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 320px;
  padding: 12px;
  overflow: visible;
}

.pdf-continuous-page {
  display: grid;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-block: 18px;
}

.pdf-continuous-page-label {
  padding: 5px 8px;
  border: 1px solid #d7dee8;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  text-align: center;
}

.pdf-continuous-canvas {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 320px;
  margin: 0 auto;
  aspect-ratio: 210 / 297;
  border: 1px solid #d7dee8;
  background: #fff;
  box-shadow: 0 2px 7px rgb(15 23 42 / 8%);
  overflow: hidden;
}

.pdf-continuous-canvas canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  background: #fff;
}

.pdf-continuous-page.is-rendered .pdf-continuous-canvas {
  min-height: 0;
}

.pdf-page-loading {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  color: #667085;
  font-size: 12px;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.pdf-continuous-page.is-error .pdf-continuous-canvas {
  min-height: 140px;
  aspect-ratio: auto;
  background: #f8fafc;
}

.pdf-load-sentinel {
  min-height: 42px;
  padding: 12px;
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.pdf-inline-error {
  margin: auto;
  padding: 36px 16px;
  color: #667085;
  font-size: 13px;
  text-align: center;
}

.pdf-page-stage object,
.pdf-page-stage iframe {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 0;
}

.pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 5px 8px;
  border-bottom: 1px solid #dbe4f0;
  background: #fff;
  color: #475467;
  font-size: 12px;
}

.pdf-toolbar strong {
  color: #344054;
  font-size: 12px;
}

.pdf-toolbar [data-pdf-status] {
  margin-left: auto;
}

.ocr-location-mark {
  position: absolute;
  z-index: 4;
  display: block;
  border: 2px solid #d97706;
  border-radius: 3px;
  background: rgb(250 204 21 / 35%);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 70%);
  pointer-events: none;
}

.pdf-fallback {
  padding: 8px 10px;
}

.attachment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
}

.attachment-card > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.attachment-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.attachment-card-head strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.45;
}

.attachment-card-head span {
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef6ff;
  color: #174a80;
  font-size: 12px;
}

.attachment-meta {
  color: var(--muted);
  font-size: 12px;
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.attachment-missing {
  color: var(--muted);
  font-size: 12px;
}

.attachment-preview {
  margin: 4px 0 0;
  overflow: hidden;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  background: #f7f9fc;
}

.attachment-preview img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.attachment-preview-pdf {
  min-height: 72vh;
}

.attachment-preview-pdf object,
.attachment-preview-pdf iframe {
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: #fff;
}

.text-body .policy-title-line {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  line-height: 1.38;
  text-align: center;
  text-indent: 0;
}

.text-body .policy-chapter {
  margin: 0.12em 0 0.72em;
  border-left: 0;
  padding-left: 0;
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-indent: 2em;
}

.text-body .policy-attachment-heading {
  margin: 1.35em 0 0.65em;
  border-left: 4px solid var(--strong);
  padding-left: 12px;
  color: #0b6b3a;
  font-size: 18px;
  line-height: 1.5;
  text-indent: 0;
}

.text-body .policy-section-title {
  margin: 1.2em 0 0.65em;
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
  text-indent: 2em;
}

.text-body .policy-inline-image {
  margin: 18px auto 20px;
  max-width: 720px;
  text-indent: 0;
}

.text-body .policy-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dbe4f0;
  background: #fff;
}

.text-body .policy-inline-image figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.submission-body-field {
  display: grid;
  gap: 6px;
}

.submission-file-field,
.submission-upload-area {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fbfcfe;
}

.submission-file-field-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.submission-file-field-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.file-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.submission-file-dropzone {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 66px;
  border: 1px dashed #b8c5d6;
  border-radius: 7px;
  padding: 9px 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.submission-file-dropzone strong {
  color: #163b67;
  font-size: 13px;
  line-height: 1.4;
}

.submission-file-dropzone span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.submission-file-dropzone:hover,
.submission-file-dropzone:focus-visible,
.submission-file-dropzone.is-dragover {
  border-color: #2a63ad;
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(42, 99, 173, 0.12);
  outline: none;
}

.submission-file-dropzone.has-files {
  border-style: solid;
  border-color: #78a3d8;
  background: #f4f8fd;
}

.submission-body-field > span {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.submission-body-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.submission-body-tools button,
.admin-card-title-actions button {
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 9px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.submission-editor {
  min-height: 230px;
  max-height: min(52vh, 640px);
  overflow: auto;
  border: 1px solid #d7dde7;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  outline: none;
}

.submission-editor:focus {
  border-color: #5d8fd8;
  box-shadow: 0 0 0 3px rgba(42, 99, 173, 0.12);
}

.submission-editor:empty::before {
  content: attr(data-placeholder);
  color: #98a2b3;
  pointer-events: none;
}

.submission-editor p {
  margin: 0 0 0.72em;
  white-space: pre-wrap;
}

.submission-editor .policy-inline-image,
.admin-format-editor .policy-inline-image {
  margin: 14px auto;
  max-width: 720px;
  text-indent: 0;
}

.submission-editor .policy-inline-image img,
.admin-format-editor .policy-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
}

.submission-editor .policy-inline-image figcaption,
.admin-format-editor .policy-inline-image figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.submission-attachment-list button {
  min-height: 27px;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #475467;
  font-size: 12px;
}

.admin-card-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.text-body .policy-meta-line {
  margin: 0 0 0.5em;
  color: #536174;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  text-indent: 0;
}

.text-body .policy-article {
  margin: 0.12em 0 0.72em;
  padding: 0;
  background: transparent;
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-indent: 2em;
}

.text-body .policy-recipient-line {
  margin: 0 0 0.72em;
  text-indent: 0;
}

.text-body .policy-clause {
  margin: 0.12em 0 0.72em;
  padding-left: 0;
  border-left: 0;
  color: #1f2937;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-indent: 2em;
}

.text-body .policy-signoff {
  max-width: 520px;
  margin: 0.8em 0 0.45em auto;
  text-align: right;
  text-indent: 0;
}

.text-body-original .policy-chapter,
.text-body-original .policy-article,
.text-body-original .policy-clause,
.text-body-original .policy-section-title,
.admin-format-preview .policy-chapter,
.admin-format-preview .policy-article,
.admin-format-preview .policy-clause,
.admin-format-preview .policy-section-title,
.admin-format-editor .policy-chapter,
.admin-format-editor .policy-article,
.admin-format-editor .policy-clause,
.admin-format-editor .policy-section-title {
  text-indent: var(--reader-text-indent, 0em);
}

.text-body-original .policy-signoff,
.admin-format-preview .policy-signoff,
.admin-format-editor .policy-signoff {
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.text-body-original .policy-title-line.align-left,
.text-body-original .policy-signoff.align-left,
.admin-format-preview .policy-title-line.align-left,
.admin-format-preview .policy-signoff.align-left,
.admin-format-editor .policy-title-line.align-left,
.admin-format-editor .policy-signoff.align-left {
  text-align: left;
}

.text-body-original .policy-title-line.align-center,
.text-body-original .policy-signoff.align-center,
.admin-format-preview .policy-title-line.align-center,
.admin-format-preview .policy-signoff.align-center,
.admin-format-editor .policy-title-line.align-center,
.admin-format-editor .policy-signoff.align-center {
  text-align: center;
}

.policy-table-wrap {
  overflow-x: auto;
  margin: 1em 0 1.3em;
  border: 1px solid #d8e1ee;
  border-radius: 10px;
  background: #fff;
}

.policy-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  text-indent: 0;
}

.policy-table th,
.policy-table td {
  border-bottom: 1px solid #edf1f7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  text-indent: 0;
}

.policy-table th {
  background: #f4f7fb;
  color: #1f2937;
  font-weight: 700;
}

.policy-table tr:last-child td {
  border-bottom: 0;
}

.admin-analytics-head {
  align-items: end;
}

.admin-analytics-tools,
.admin-analytics-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-analytics-tools label span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.admin-analytics-tools select {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 30px 0 9px;
  background: #fff;
  color: #344054;
}

.admin-analytics-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #fff;
}

.admin-analytics-metrics > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e7ecf2;
}

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

.admin-analytics-metrics span,
.admin-analytics-metrics strong {
  display: block;
}

.admin-analytics-metrics span {
  color: #667085;
  font-size: 12px;
}

.admin-analytics-metrics strong {
  margin-top: 3px;
  color: #172033;
  font-size: 24px;
  line-height: 1.15;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.admin-analytics-panel {
  min-width: 0;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.admin-analytics-panel > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e7ecf2;
  background: #f7f9fc;
}

.admin-analytics-panel h3 {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
}

.admin-analytics-panel header span {
  color: #667085;
  font-size: 12px;
}

.admin-analytics-trend {
  grid-row: span 2;
}

.admin-analytics-daily,
.admin-analytics-ranking {
  max-height: 430px;
  overflow: auto;
}

.admin-analytics-day {
  display: grid;
  grid-template-columns: 42px minmax(60px, 1fr) 62px 62px;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 5px 10px;
  border-bottom: 1px solid #edf1f5;
  color: #475467;
  font-size: 12px;
}

.admin-analytics-day:last-child,
.admin-analytics-rank-row:last-child {
  border-bottom: 0;
}

.admin-analytics-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8edf4;
}

.admin-analytics-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6fb5;
}

.admin-analytics-rank-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 6px 10px;
  border-bottom: 1px solid #edf1f5;
}

.admin-analytics-rank-row > b {
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.admin-analytics-rank-row > span,
.admin-analytics-rank-row strong,
.admin-analytics-rank-row small {
  display: block;
  min-width: 0;
}

.admin-analytics-rank-row strong {
  overflow: hidden;
  color: #243044;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-analytics-rank-row small {
  margin-top: 2px;
  overflow: hidden;
  color: #7a8597;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-analytics-rank-row > em {
  color: #245f9f;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.admin-analytics-warning,
.admin-analytics-updated {
  margin: 9px 0 0;
  color: #667085;
  font-size: 12px;
}

.admin-analytics-warning {
  color: #9a5b13;
}

@media (max-width: 980px) {
  .admin-analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-analytics-trend {
    grid-row: auto;
  }

  .admin-attachment-row {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 120px);
    align-items: end;
  }

  .admin-attachment-row > span,
  .admin-attachment-row > button,
  .admin-attachment-row > .admin-attachment-remove {
    justify-self: start;
  }

  .attachment-panel {
    margin: 16px 18px 0;
    padding: 14px;
  }

  .policy-original-head {
    align-items: flex-start;
  }

  .pdf-page-stage {
    gap: 8px;
    padding: 6px;
  }

  .pdf-continuous-canvas {
    min-height: 240px;
  }

  .pdf-page-stage object,
  .pdf-page-stage iframe {
    min-height: 64vh;
  }

  .text-body .policy-title-line {
    font-size: 19px;
  }

  .text-body .policy-attachment-heading {
    font-size: 17px;
  }

  .text-body .policy-chapter,
  .text-body .policy-article,
  .text-body .policy-clause,
  .text-body .policy-section-title {
    font-size: inherit;
  }

  .admin-analytics-head,
  .admin-analytics-tools {
    align-items: stretch;
  }

  .admin-analytics-tools {
    width: 100%;
  }

  .admin-analytics-tools label {
    flex: 1;
  }

  .admin-analytics-tools select {
    flex: 1;
  }

  .admin-analytics-day {
    grid-template-columns: 42px minmax(42px, 1fr) 58px 58px;
    gap: 5px;
  }
}

@media (max-width: 560px) {
  .admin-analytics-metrics strong {
    font-size: 20px;
  }

  .admin-analytics-metrics > div {
    padding: 10px 8px;
  }

  .admin-analytics-day {
    grid-template-columns: 42px minmax(40px, 1fr) 56px;
  }

  .admin-analytics-day > span:last-child {
    display: none;
  }
}
