/* ==========================================================================
   Sentra · AI 安全知识情报系统 样式表
   结构：Tokens -> 基础控件 -> 应用外壳 -> 各功能工作面 -> 阅读器 -> 响应式
   ========================================================================== */

/* 1. Tokens & Reset
   -------------------------------------------------------------------------- */
:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);

  --bg-page: #f4f6f9;
  --surface: #fff;
  --surface-subtle: #f8fafc;
  --surface-muted: #f3f6f9;
  --surface-hover: #f9fbfd;

  --text-primary: #1b2633;
  --text-secondary: #425263;
  --muted: #627282;

  --accent: #27586e;
  --accent-hover: #1d4456;
  --accent-soft: #eaf3f7;
  --accent-border: #bfd6e2;

  --border: #dfe5ec;
  --border-hover: #9ab5c5;

  --status-ok: #316549;
  --status-ok-bg: #eef6f0;
  --status-warn: #8a571c;
  --status-warn-bg: #fff6e8;
  --status-err: #a13030;
  --status-err-bg: #fbefef;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0 0 20px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0 0 15px;
}

h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
}

p {
  line-height: 1.8;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.8;
}

code {
  overflow-wrap: anywhere;
}


/* 2. Base Controls & Shared Primitives
   -------------------------------------------------------------------------- */
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 500;
  transition: background .16s var(--ease-out), border-color .16s var(--ease-out), color .16s var(--ease-out), box-shadow .16s var(--ease-out), transform .14s var(--ease-out);
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: .5;
  cursor: default;
}

button.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--accent);
}

button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-hover);
}

.text-button {
  padding: 7px 0;
  background: transparent;
  color: var(--accent);
  border: 0;
  font-size: 12px;
  font-weight: 500;
}

.text-button:hover {
  background: transparent;
  color: var(--accent-hover);
}

button:focus-visible,
a:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 9px 12px;
  min-width: 0;
  max-width: 100%;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

input {
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #27586e1c;
}

input::placeholder,
textarea::placeholder {
  color: #7c8696;
}

textarea {
  display: block;
  width: 100%;
  height: 125px;
  resize: none;
  padding: 17px;
  background: var(--surface-subtle);
  line-height: 1.9;
  font-size: 14px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.error,
.error.small {
  color: var(--status-err);
}

.warning,
.warning.small {
  color: var(--status-warn);
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.row input {
  flex: 1;
  min-width: 150px;
  height: 38px;
  padding: 0 12px;
}

.row button {
  flex: none;
  height: 38px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.row select {
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
}

.tag {
  display: inline-block;
  background: #f0f3f7;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 12px;
  margin: 0 5px 5px 0;
}

.tag[data-status="complete"],
.tag[data-status="controlled_verified"] {
  color: var(--status-ok);
  background: var(--status-ok-bg);
  font-weight: 500;
}

.tag[data-status="partial"],
.tag[data-status="insufficient"],
.tag[data-status="inconclusive"],
.tag[data-status="needs_clarification"] {
  color: var(--status-warn);
  background: var(--status-warn-bg);
  font-weight: 500;
}

.tag[data-status="conflicted"],
.tag[data-status="failed"],
.tag[data-status="withdrawn"] {
  color: var(--status-err);
  background: var(--status-err-bg);
  font-weight: 500;
}

.card {
  display: block;
  width: 100%;
  text-align: left;
  color: #343c49;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin: 10px 0;
  line-height: 1.7;
  cursor: pointer;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out), transform .18s var(--ease-out);
}

.card:hover {
  background: #fcfcfd;
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px #1620380a;
}

.card.selected {
  background: #f3f4f6;
  border-color: var(--accent);
  box-shadow: inset 3px 0 var(--accent);
}

.card-top,
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-bottom {
  font-size: 12px;
  color: var(--muted);
}

.product-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.mode-label {
  font-size: 11.5px;
  font-weight: 500;
  background: #edf2f7;
  color: var(--text-secondary);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.document-code {
  font: 12px ui-monospace, Consolas, monospace;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 15px;
}

.content-disclosure {
  padding: 20px 0;
}

.content-disclosure summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
}

.fact {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 2px solid #b5bac2;
  border-radius: 6px;
  padding: 14px;
  margin: 12px 0;
  font-size: 14px;
}

.fact p {
  margin: 0 0 10px;
}

.fact button {
  font-size: 12px;
  padding: 7px 10px;
  margin: 0 5px 4px 0;
}

.fact-preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fact-prose {
  font-size: 14px;
  line-height: 1.85;
  max-width: 82ch;
}

.fact-prose .prose-paragraph {
  margin: 0 0 .8em;
}

.fact-prose.fact-preview {
  display: block;
  max-height: 9em;
  overflow: hidden;
}

.fact-prose pre {
  max-width: 100%;
  overflow-x: auto;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.pagination:empty {
  display: none;
}

.pagination-info {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.page-button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.page-button:hover:not(:disabled) {
  background: #edf0f4;
  border-color: #e0e4e9;
}

.page-button.current,
.page-button.current:disabled {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  opacity: 1;
}

.page-button:disabled:not(.current) {
  opacity: .35;
  cursor: default;
}

.page-gap {
  color: #7b8491;
  padding: 0 3px;
}

.pagination-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.pagination-jump select {
  width: auto;
  min-width: 88px;
  padding: 6px 8px;
  font-size: 12px;
}


/* 3. App Shell & Navigation
   -------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  background: var(--surface);
  border-right: 1px solid #e5ebf1;
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #30343b;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
  padding: 0 10px 46px;
}

.brand > div {
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 5px;
}

.navigation-toggle {
  display: none;
}

.sidebar #mainNavigation {
  margin-top: 36px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  background: transparent;
  color: var(--text-secondary);
  padding: 13px 14px;
  margin: 5px 0;
  border-radius: 8px;
  font-size: 14px;
}

.nav-item:hover {
  background: #f3f4f6;
  color: #30343b;
}

.nav-item.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  overflow: hidden;
  opacity: 1;
}

.nav-item .nav-copy {
  min-width: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  color: inherit;
}

.nav-item.active .nav-copy {
  color: var(--accent);
  font-weight: 600;
}

.workspace {
  margin-left: 224px;
  min-height: 100vh;
}

.topbar {
  height: 64px;
  background: #ffffffe6;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

main {
  max-width: 1510px;
  margin: auto;
  padding: 28px 40px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

section {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 1px 3px #16203807;
  animation: panel-enter .2s ease-out;
}

.workspace-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-page);
  padding: 12px 0;
  margin: -12px 0 0;
  border-bottom: 1px solid var(--border);
}

.workspace-tabs button.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}


/* 4. Overview Panel
   -------------------------------------------------------------------------- */
.overview-heading {
  margin-bottom: 20px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.summary-metric {
  padding: 16px 20px;
  background: var(--surface);
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  transition: background .16s;
}

.summary-metric:last-child {
  border-right: 0;
}

.summary-metric strong {
  display: block;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.summary-metric span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.summary-link {
  text-decoration: none;
}

.summary-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.summary-link:focus-visible {
  outline-offset: -3px;
}

.summary-link span {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.summary-link span::after {
  content: " →";
  display: inline-block;
  opacity: .55;
  transition: transform .16s, opacity .16s;
}

.summary-link:hover span::after {
  transform: translateX(2px);
  opacity: 1;
}

.home-feed {
  width: 100%;
  margin-top: 28px;
}

.home-feed .section-heading {
  margin-bottom: 14px;
}

.home-feed h3 {
  margin: 0;
}

#recentRisks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recent-risk {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px #16203805;
  animation: row-enter .18s var(--ease-out) both;
}

.recent-risk:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: 0 8px 20px #1620380e;
  transform: translateY(-1px);
}

.recent-risk .card-top {
  margin-bottom: 4px;
}

.recent-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-risk:hover .recent-title {
  color: var(--accent);
}

.recent-risk .card-title {
  margin: 0 0 8px;
  line-height: 1.65;
}

.recent-risk .small {
  margin-top: 0;
  line-height: 1.5;
}

.recent-risk .card-title + .small,
.recent-risk .recent-title + .small {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}


/* 5. Monitoring: Sources & Collection Items
   -------------------------------------------------------------------------- */
.source-toolbar h2 {
  margin: 0;
}

.source-run-summary {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 0;
  line-height: 1.9;
}

.source-run-summary p {
  margin: 0;
}

.triage-overview {
  margin: 12px 0 4px;
  padding: 14px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.triage-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.triage-overview-head strong {
  font-size: 13px;
  color: var(--text-primary);
}

.triage-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.triage-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.triage-chip strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.triage-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.triage-suggestions .tag {
  margin: 0;
}

#sourceSync {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

#sourceSync .row {
  margin: 12px 0 0;
}

#job:empty {
  display: none;
}

#sources {
  display: block;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.source-family {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  margin: 0;
  padding: 13px 16px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.source-family:hover {
  background: #eff4f8;
}

.source-group-count {
  padding-left: 12px;
  font-weight: 400;
  color: var(--muted);
}

.source-table-heading {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.5fr) minmax(95px, .8fr) minmax(95px, .8fr) minmax(145px, 1fr);
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-page);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

#sources .source-group > .source-card {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.5fr) minmax(95px, .8fr) minmax(95px, .8fr) minmax(145px, 1fr);
  gap: 6px 12px;
  align-items: start;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.6;
  transition: background .15s;
}

#sources .source-group > .source-card:hover {
  background: #fafcfe;
}

#sources .source-group:last-child > .source-card:last-child {
  border-bottom: 0;
}

.source-identity strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.source-method {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.source-counts {
  margin: 0;
}

.source-counts strong {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.source-items-link {
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-items-empty {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.source-browse {
  font-size: 12px;
  padding: 5px 0;
  margin-top: 4px;
  display: block;
}

.source-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 5px;
}

.source-card > .warning {
  grid-column: 1 / -1;
  margin: 0;
}

.source-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}

.source-state > span {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f0f3f7;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}

.source-state[data-status="succeeded"] > span {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}

.source-state[data-status="incomplete"] > span {
  background: var(--status-warn-bg);
  font-weight: 600;
  color: var(--status-warn);
}

.source-state[data-status="failed"] > span {
  background: var(--status-err-bg);
  font-weight: 600;
  color: var(--status-err);
}

.source-state > small {
  margin-top: 1px;
}

.source-state > .text-button {
  display: inline-block;
  padding: 2px 0 0;
  font-size: 12px;
}

.source-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding: 12px 0 0;
}

.source-details p {
  font-size: 13px;
  line-height: 1.8;
}

.source-run-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) minmax(90px, 1fr) repeat(2, minmax(110px, 1fr));
  gap: 8px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.7;
}

.source-reference {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.source-reference a {
  font-weight: 600;
}

section[data-panel="selection"],
section[data-panel="collection"] {
  scroll-margin-top: 70px;
}

.collection-filters {
  padding: 12px 14px;
  background: var(--surface-subtle);
  border: 1px solid #e5ebf1;
  border-radius: 10px;
}

.collection-filters select,
.risk-filters select {
  min-width: 106px;
}

.list-date-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.list-date-range input {
  flex: 0 1 auto;
  min-width: 0;
  width: 136px;
  height: 38px;
  padding: 0 9px;
}

#collectionFilterHint {
  margin: -8px 0 12px;
}

#collectionError:empty {
  display: none;
}

.collection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(125px, .3fr) auto;
  align-items: start;
  gap: 8px 20px;
  cursor: default;
  animation: row-enter .18s var(--ease-out) both;
}

.collection-card:nth-child(2),
.recent-risk:nth-child(2) {
  animation-delay: 18ms;
}

.collection-card:nth-child(3),
.recent-risk:nth-child(3) {
  animation-delay: 36ms;
}

.collection-card:nth-child(4),
.recent-risk:nth-child(4) {
  animation-delay: 54ms;
}

.collection-card:nth-child(n+5) {
  animation-delay: 72ms;
}

.collection-title {
  padding: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.collection-title:hover {
  text-decoration: underline;
}

.collection-card .document-code {
  margin-top: 5px;
}

.collection-card-source,
.collection-times {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.collection-times .primary-list-date {
  font-weight: 500;
  color: var(--text-primary);
}


/* 6. Enrichment: Risk List & Risk Workspace
   -------------------------------------------------------------------------- */
.risk-list-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.risk-list-summary select {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.risk-filters {
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--surface-subtle);
  border: 1px solid #e5ebf1;
  border-radius: 10px;
}

#riskSourceFilter {
  max-width: 230px;
}

.risk-date-filter,
.risk-date-shortcuts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.risk-date-filter {
  margin: 0 0 14px;
}

.risk-date-shortcuts {
  gap: 4px;
}

.risk-date-shortcuts button {
  padding: 5px 8px;
  min-height: 0;
  font-size: 12px;
}

.risk-date-shortcuts button[aria-pressed="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

#list {
  padding: 0;
}

#list,
#collectionList,
#assetRiskResults,
#assetList {
  transition: opacity .16s var(--ease-out);
}

#list[aria-busy="true"],
#collectionList[aria-busy="true"],
#assetRiskResults[aria-busy="true"],
#assetList[aria-busy="true"] {
  opacity: .55;
  pointer-events: none;
}

.risk-card {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(0, 2fr);
  gap: 4px 16px;
  padding: 14px 16px;
  margin: 8px 0;
  animation: row-enter .18s var(--ease-out) both;
}

.risk-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.risk-card .card-top,
.risk-card .card-bottom {
  grid-column: 1 / -1;
}

.risk-card:hover .risk-code {
  color: var(--accent);
}

.risk-code {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font: 600 15px/1.6 ui-monospace, Consolas, monospace;
  margin: 0;
  align-self: center;
  color: var(--text-primary);
  transition: color .15s;
}

.risk-card .card-title {
  margin: 0;
  align-self: center;
}

.risk-card-dates {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
}

.risk-card-dates span {
  white-space: nowrap;
}

#closeRiskReader {
  display: none;
}

.risk-workspace .reader-header {
  padding: 0 0 20px;
}

.risk-workspace .reader-header h2 {
  font-size: 22px;
  margin: 8px 0 0;
}

.risk-workspace .reader-toolbar {
  padding: 12px 0;
  margin-bottom: 20px;
}

#detail {
  overflow-wrap: anywhere;
}

.risk-workspace #detail > .product-label {
  display: none;
}

.detail-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-top: 0;
}

#detail h4 {
  margin: 18px 0 10px;
}

.risk-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.risk-summary > h3 {
  grid-column: 1 / -1;
  margin: 0;
}

.risk-summary-item {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px #16203805;
  min-width: 0;
}

.risk-summary-item h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.risk-summary-item p {
  margin: 6px 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.risk-summary-item .evidence-links {
  margin-top: 10px;
}

.risk-summary-item .text-button {
  margin-top: 6px;
}

.cvss-reading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.cvss-score {
  font-size: 27px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--accent);
}

.cvss-vector {
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  background: #f1f5f7;
  padding: 8px;
  border-radius: 4px;
}

.risk-basic {
  padding: 6px 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 10px 0;
}

.claim-group {
  padding: 6px 8px;
  margin: 10px 0;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.claim-group > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.claim-group .fact {
  overflow-wrap: anywhere;
}

.claim-overflow {
  margin-top: 14px;
}

.claim-overflow > summary,
.raw-expression > summary,
.risk-basic > summary,
.evidence-links > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: #53657b;
}

.raw-expression {
  font-size: 11px;
  margin-top: 10px;
}

.raw-expression pre {
  font-size: 11px;
}

.version-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.8;
}

.version-table th,
.version-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  overflow-wrap: anywhere;
}

.version-table th {
  font-weight: 500;
  color: var(--muted);
}

.version-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.version-values > li {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-muted);
  font: 12px ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}

.version-raw-data pre {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.version-disclosure summary,
.version-raw-data summary {
  cursor: pointer;
}

.enrichment-gaps {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 70px;
}

.enrichment-records {
  scroll-margin-top: 70px;
}

#detail > .enrichment-records {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

#detail > .enrichment-records > h4 {
  margin-bottom: 8px;
}

#riskSourceList > details {
  padding: 6px 8px;
  margin: 10px 0;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

#riskSourceList > details + details {
  margin-top: 10px;
}

.source-record {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.source-record > strong {
  display: block;
  margin-bottom: 10px;
}

.source-record > a {
  font-size: 13px;
}

.source-record p {
  overflow-wrap: anywhere;
}

.source-record .archive-button {
  margin-left: 12px;
}

.source-document-id {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.archive-button {
  display: block;
  margin: 14px 0 0;
}

.related-material {
  margin: 8px 0;
}

.related-material h5 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.4;
}

.related-material .evidence-excerpt {
  overflow-wrap: anywhere;
}

.poc-source {
  overflow-wrap: anywhere;
}

/* 风险工作区折叠详情统一样式 */
#riskReaderScroll details > summary {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
  transition: background .16s var(--ease-out), color .16s var(--ease-out);
}

#riskReaderScroll details > summary::-webkit-details-marker {
  display: none;
}

#riskReaderScroll details > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  align-self: center;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform .18s var(--ease-out);
}

#riskReaderScroll details[open] > summary::before {
  transform: rotate(45deg);
}

#riskReaderScroll details > summary:hover,
#riskReaderScroll details[open] > summary {
  background: var(--accent-soft);
}

#riskReaderScroll details > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#riskReaderScroll .source-record {
  padding: 12px 0;
}

#riskReaderScroll .source-record p {
  margin: 4px 0 8px;
}

#riskReaderScroll .source-record .source-record {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
}

#riskReaderScroll .source-record .archive-button {
  display: inline-flex;
  margin: 0;
}

#riskReaderScroll .related-material > .row {
  gap: 8px 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}

#riskReaderScroll .related-material h5 {
  font-size: inherit;
  font-weight: 500;
  overflow-wrap: anywhere;
}

#riskReaderScroll .evidence-excerpt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#riskReaderScroll :is(.inline-evidence, .related-material details .source-record) {
  padding: 10px 12px;
}

#riskReaderScroll .source-record code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* 7. Assets & Assessment
   -------------------------------------------------------------------------- */
#selectedRisk,
#assetSelectedRisk:not(:empty) {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.context-label {
  color: var(--muted);
  font-weight: 400;
}

#selectedRisk strong,
#assetSelectedRisk strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

#assetRiskSearchStatus:empty {
  display: none;
}

#assetRiskResults {
  display: grid;
  gap: 8px;
}

.asset-risk-result {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#assetStep {
  padding: 10px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.asset-access {
  justify-content: flex-start;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.asset-access label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  flex: 0 1 430px;
}

.asset-access input {
  max-width: 340px;
}

#assetManagement {
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.import-method {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  font-size: 14px;
}

.import-method select {
  width: auto;
  min-width: 210px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.asset-grid > label {
  min-width: 0;
  font-size: 12px;
  color: #687182;
}

.asset-grid input,
.asset-grid select {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.asset-version-result:not(:empty),
.asset-assessment-result:not(:empty) {
  margin-top: 12px;
}

.asset-assessment-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.asset-assessment-feedback:empty {
  display: none;
}

.asset-observation-record + .asset-observation-record {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.assessment-details {
  margin: 16px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.assessment-details > summary {
  padding: 12px 14px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.assessment-details[open] > summary {
  border-bottom: 1px solid var(--border);
}

.assessment-expanded {
  padding: 14px;
  min-width: 0;
}

.assessment-axes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.assessment-results > .assessment-axes {
  margin: 0;
}

.assessment-axes > div {
  min-width: 0;
  padding: 12px;
  background: var(--surface-muted);
  border-radius: 5px;
}

.assessment-axes dt {
  font-size: 12px;
  color: var(--muted);
}

.assessment-axes dd {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.assessment-details-body {
  display: grid;
  gap: 16px;
  margin: 14px 0;
}

.assessment-details h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.assessment-details p {
  margin: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.assessment-details .assessment-version-conclusion {
  padding: 9px 12px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--text-primary);
}

.assessment-source {
  margin-top: 9px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}

.assessment-source-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 12px;
  overflow-wrap: anywhere;
}

.assessment-source-header > a {
  font-weight: 600;
}

.assessment-source-outcome {
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f4f6;
  color: var(--muted);
  font-size: 12px;
}

.assessment-source-outcome[data-status="no_match"] {
  background: #edf5f1;
  color: #315c4b;
}

.assessment-source-outcome[data-status="match"] {
  background: #faf0e4;
  color: #754a21;
}

.assessment-source > p {
  margin-top: 7px;
}

.assessment-details .assessment-conflict-note {
  margin-top: 9px;
}

.assessment-evidence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 8px;
}

.assessment-evidence > section {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-muted);
  min-width: 0;
}

.assessment-evidence > section > p {
  font-size: 13px;
  color: var(--text-secondary);
}

.assessment-prerequisites {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
}

.assessment-prerequisites > h5 {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.assessment-prerequisites > h6 {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.65;
}


/* 8. QA Assistant
   -------------------------------------------------------------------------- */
section[data-panel="assistant"] {
  background: none;
  border: 0;
  padding: 0;
  margin: 4px 0;
  max-width: none;
}

.assistant-intro {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e1e5ec;
}

.assistant-intro h2 {
  margin: 0;
}

.assistant-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.conversation-archive {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}

.conversation-archive > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #465365;
}

.conversation-archive[open] > summary {
  margin-bottom: 16px;
}

.conversation-turn {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.conversation-archive .conversation-turn:last-child {
  margin-bottom: 0;
}

.conversation-turn > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.conversation-turn > div,
.conversation-turn > p,
.conversation-turn > details {
  margin-top: 16px;
}

.analysis-column {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 24px #20263004;
}

.analysis-column textarea {
  height: 100px;
}

.analysis-column textarea.compact {
  height: 70px;
}

.analysis-column.has-answer {
  display: flex;
  flex-direction: column;
}

.has-answer #selectedRisk {
  order: 0;
}

.has-answer #submittedQuestion {
  order: 1;
  margin-top: 0;
}

.has-answer #answer {
  order: 2;
}

.has-answer #answerProcess {
  order: 3;
}

.has-answer #questionComposer {
  order: 4;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 24px;
}

.has-answer #questionComposer::before {
  content: "继续提问";
  display: block;
  font-weight: 600;
  margin-bottom: 18px;
}

.composer-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.composer-label span:last-child {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

#newConversation {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}

#clearRisk,
#clearAnswerAsset {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

#newConversation:hover,
#clearRisk:hover,
#clearAnswerAsset:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

#conversation {
  width: 100%;
  overflow-wrap: anywhere;
}

#conversation:empty {
  display: none;
}

#modeHelp {
  margin: 8px 0;
  font-size: 12px;
}

.question-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.question-examples button {
  font-size: 12px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.question-examples button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.submitted-question {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  margin: 24px 0 0;
  overflow-wrap: anywhere;
}

#answer:empty {
  display: none;
}

#answer:not(:empty) {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 20px;
}

#answer .section-heading h3 {
  margin: 0;
}

#answer > .section-heading > .tag {
  margin-right: auto;
}

#answer > .section-heading + .muted {
  margin-top: 0;
}

.quick-answer-summary {
  margin: 14px 0 20px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.quick-answer-summary h4 {
  margin: 0 0 4px;
}

.quick-answer-summary p {
  margin: 0;
  line-height: 1.7;
}

.version-summary-row {
  display: flex;
  align-items: baseline;
  gap: 6px 14px;
  flex-wrap: wrap;
}

.version-summary-row + .version-summary-row,
.version-summary-row + p {
  margin-top: 5px;
}

.direct-answer {
  margin: 20px 0;
}

.direct-answer > .answer-fact {
  margin: 10px 0;
}

.answer-fact {
  position: relative;
  padding: 18px 18px 18px 47px;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.answer-fact p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  color: #303a49;
}

.answer-number {
  position: absolute;
  left: 16px;
  top: 20px;
  font: 12px ui-monospace, Consolas, monospace;
  color: var(--muted);
}

.answer-conclusion {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.answer-conclusion > div > p {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
}

.supporting-documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 22px;
}

.supporting-documents.facts-only {
  grid-template-columns: minmax(0, 1fr);
}

.facts-only .answer-fact p {
  max-width: 88ch;
}

.supporting-documents > h4 {
  grid-column: 1 / -1;
  margin: 0;
}

.supporting-document {
  margin: 0;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.supporting-document:only-of-type {
  grid-column: 1 / -1;
}

.supporting-document > summary {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.supporting-document > p {
  overflow-wrap: anywhere;
}

.supporting-document .answer-fact {
  background: var(--surface-subtle);
}

.document-origin {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin: 6px 0 0;
}

.process-event {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.process-event pre {
  font-size: 12px;
}


/* 9. Evidence & Shared Document / PDF Reader
   -------------------------------------------------------------------------- */
.evidence-links {
  margin-top: 12px;
  font-size: 11px;
}

.evidence-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 12px;
  max-height: 220px;
  overflow: auto;
}

.inline-evidence {
  margin-top: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.inline-evidence > button {
  margin: 4px 8px 0 0;
}

.inline-evidence .evidence-excerpt {
  max-height: none;
  overflow: visible;
}

.inline-evidence .excerpt-preview {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inline-evidence > div.excerpt-preview {
  display: block;
  -webkit-line-clamp: unset;
  max-height: 300px;
  overflow: hidden;
}

.evidence-excerpt {
  background: #fafbfd;
  border-left: 3px solid #aebbcf;
  line-height: 1.9;
  max-height: 420px;
  overflow: auto;
}

div.evidence-excerpt {
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  white-space: normal;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-left: 3px solid #a7b8c3;
  border-radius: 6px;
  padding: 20px 24px;
  max-height: none;
  overflow: visible;
}

.evidence-excerpt .reading-prose {
  font-size: 15px;
  max-width: 72ch;
}

.evidence-excerpt .original-text {
  margin: 0;
  padding: 5px 0;
}

.evidence-excerpt .original-text summary {
  font-size: 12px;
}

.excerpt-location {
  font: 12px/1.6 system-ui, sans-serif;
  color: var(--muted);
  margin: 0 0 16px;
}

.reading-article {
  font-size: 15.5px;
  max-width: 860px;
  margin: 0 auto;
  animation: content-fade .18s var(--ease-out) both;
}

.reading-page {
  scroll-margin-top: 10px;
  padding: 12px 0 28px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  background: transparent;
}

.reading-page > h3 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin: 0 0 22px;
  padding: 10px 0;
}

.reading-prose {
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #303b47;
  overflow-wrap: anywhere;
  white-space: normal;
}

.reading-prose .prose-paragraph {
  margin: 0 0 1.15em;
  line-height: inherit;
  white-space: normal;
}

.reading-prose .prose-heading {
  margin: 1.7em 0 .8em;
  font-size: 1.05em;
  line-height: 1.6;
  font-weight: 600;
}

.reading-prose .prose-list-item {
  margin: .55em 0 .55em 1em;
  line-height: inherit;
}

.reading-prose .prose-code,
.original-extraction {
  font: 13px/1.75 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f7f9;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.reading-prose .prose-toc {
  font: 13px/1.9 ui-monospace, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  padding: 16px;
  background: #f6f8fa;
  border-radius: 6px;
}

/* 高保真富文本 / Markdown / 结构化公告 / 元数据线索排版 */
.rich-doc {
  font-size: 15.5px;
  line-height: 1.85;
  color: #24303f;
}

.rich-doc .rich-h2 {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 1.8em 0 .75em;
  padding-bottom: 6px;
  border-bottom: 1px solid #e6ebf1;
}

.rich-doc .rich-h3,
.structured-advisory .rich-h3,
.metadata-lead-card .rich-h3 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 1.5em 0 .65em;
}

.rich-doc .rich-h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 1.3em 0 .5em;
}

.rich-doc .rich-h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1.1em 0 .45em;
}

.rich-doc > :first-child {
  margin-top: 0;
}

.rich-doc a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: #2c637e55;
  text-underline-offset: 3px;
}

.rich-doc a:hover {
  text-decoration-color: var(--accent);
}

.rich-doc strong,
.rich-doc b {
  font-weight: 600;
  color: var(--text-primary);
}

.rich-doc .rich-list {
  margin: .7em 0 1.1em;
  padding-left: 1.5em;
}

.rich-doc .rich-list li {
  margin: .38em 0;
  line-height: 1.8;
}

.rich-doc .rich-quote {
  margin: 1.1em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: #f5f8fa;
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
}

.rich-doc .rich-quote p {
  margin: .35em 0;
}

.rich-doc .rich-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.6em 0;
}

.md-inline-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .88em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef2f6;
  color: #1f3347;
  border: 1px solid #e1e7ee;
}

.md-code-block {
  margin: 1.1em 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7f9;
}

.md-code-lang {
  padding: 5px 14px;
  font: 11px/1.5 ui-monospace, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #edf1f5;
  border-bottom: 1px solid var(--border);
}

.md-code-block .prose-code {
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow-x: auto;
  white-space: pre;
}

.rich-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.1em 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.rich-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.65;
  background: var(--surface);
}

.rich-table th,
.rich-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #eef1f5;
}

.rich-table th:last-child,
.rich-table td:last-child {
  border-right: 0;
}

.rich-table tbody tr:last-child td {
  border-bottom: 0;
}

.rich-table thead th {
  background: #f4f6f9;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.rich-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.rich-img-note {
  margin: .8em 0;
  padding: 8px 12px;
  background: #f7f9fb;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.rich-html dl {
  margin: .9em 0;
}

.rich-html dt {
  font-weight: 600;
  margin-top: .6em;
}

.rich-html dd {
  margin: .2em 0 .6em 1.2em;
  color: var(--text-secondary);
}

.advisory-header {
  padding: 18px 22px;
  background: #f7f9fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 18px;
}

.advisory-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.advisory-badges .tag {
  margin: 0;
}

.advisory-id-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font: 600 13px/1.5 ui-monospace, Consolas, monospace;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.advisory-severity {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef2f6;
  color: var(--text-secondary);
  white-space: nowrap;
}

.advisory-severity[data-tone="critical"],
.advisory-severity[data-tone="high"] {
  background: var(--status-err-bg);
  color: var(--status-err);
}

.advisory-severity[data-tone="medium"] {
  background: var(--status-warn-bg);
  color: var(--status-warn);
}

.advisory-severity[data-tone="low"] {
  background: var(--status-ok-bg);
  color: var(--status-ok);
}

.advisory-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e6ebf1;
}

.advisory-meta-item.span-full {
  grid-column: 1 / -1;
}

.advisory-meta-item dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}

.advisory-meta-item dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.advisory-summary {
  padding: 15px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 18px;
}

.advisory-summary .rich-h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.advisory-summary .prose-paragraph {
  margin: 0;
  font-size: 15px;
}

.advisory-callout {
  padding: 16px 20px;
  background: #f3f8fb;
  border: 1px solid #d1e3ee;
  border-radius: 10px;
  margin-bottom: 18px;
}

.advisory-callout .rich-h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.advisory-callout .prose-paragraph {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: #243647;
}

.advisory-section {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.advisory-empty-note {
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 14px 0 0;
}

.advisory-refs {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advisory-refs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.advisory-refs .tag {
  margin: 0;
  font-size: 11px;
}

.advisory-refs a {
  word-break: break-all;
}

.abstract-reading-card {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.reader-scope-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #f5f8fb;
  border: 1px solid #e1e9f0;
  border-radius: 8px;
}

.scope-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

.abstract-authors {
  margin: 0 0 12px;
}

.policy-article-num {
  color: var(--text-primary);
}

.metadata-lead-card {
  padding: 22px 24px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.metadata-lead-card .rich-h3 {
  margin-top: 2px;
}

.metadata-lead-excerpt {
  margin: 14px 0 18px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.metadata-lead-excerpt .prose-paragraph {
  margin: 0;
}

.metadata-lead-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.primary-link-button:hover {
  background: #1f4f66;
  color: #fff;
  text-decoration: none;
}

.reader-appendix {
  max-width: 860px;
  margin: 22px auto 0;
  padding-top: 14px;
  border-top: 1px solid #e8ecf1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: content-fade .2s var(--ease-out) both;
}

.reader-appendix .original-text {
  max-width: none;
  margin: 0;
  padding: 8px 14px;
  background: #fafbfc;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
}

.reader-appendix .original-text summary {
  font-size: 13px;
  color: var(--text-secondary);
}

.reader-appendix .original-extraction {
  margin: 10px 0 4px;
}

.reader-footer-actions {
  margin-top: 4px;
  font-size: 13px;
}

.original-text {
  max-width: 860px;
  margin: 12px auto 0;
}

.original-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.knowledge-subject {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 5px 0;
}

.reader-open {
  overflow: hidden;
}

.reader {
  width: min(1040px, calc(100vw - 48px));
  min-height: min(380px, calc(100dvh - 64px));
  max-height: min(860px, calc(100dvh - 64px));
  height: fit-content;
  max-width: none;
  padding: 0;
  border: 1px solid #dfe4eb;
  border-radius: 18px;
  background: var(--surface);
  color: #253347;
  box-shadow: 0 32px 100px #10182740;
  overflow: hidden;
}

.reader[open] {
  display: flex;
  flex-direction: column;
  animation: reader-in .22s cubic-bezier(.2, .8, .2, 1) both;
}

.reader::backdrop {
  background: #18223266;
  backdrop-filter: blur(4px);
  animation: backdrop-in .22s ease-out both;
}

.reader.closing {
  animation: reader-out .16s ease-in both;
}

.reader.closing::backdrop {
  animation: backdrop-out .16s ease-in both;
}

.reader-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px 22px;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
}

.reader-header h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  margin: 9px 0 0;
  overflow-wrap: anywhere;
}

.reader-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.reader-close {
  font-size: 24px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  border: 0;
  background: #f1f3f6;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 32px;
  border-bottom: 1px solid #e8ecf1;
  flex-shrink: 0;
}

.reader-toolbar > a {
  font-size: 12px;
  white-space: nowrap;
}

.reader-tabs {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.reader-tabs button {
  font-size: 13px;
  padding: 8px 12px;
  background: transparent;
  color: #657083;
  border: 0;
}

.reader-tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.reader-authorization {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 20px;
  color: var(--muted);
  font-size: 13px;
}

.reader-authorization input {
  width: 230px;
}

.reader-notice {
  margin: 0;
  padding: 10px 32px;
  background: #f2f6f8;
  font-size: 14px;
  line-height: 1.7;
}

.reader-notice[data-status="error"] {
  background: #fff5f3;
  color: #9b3830;
}

.reader-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 32px 36px;
  flex: 1;
  min-height: 0;
  scrollbar-gutter: stable;
}

.reader #paperDetail {
  overflow-wrap: anywhere;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#paperDetail > select {
  position: sticky;
  top: 0;
  z-index: 1;
  width: auto;
  max-width: 100%;
  background: var(--surface);
  margin-bottom: 10px;
}

.reader #readerEvidenceLinks {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
}

#readerEvidenceLinks select {
  width: 100%;
  max-width: 100%;
  font-size: 14px;
}

.reader #readerEvidence {
  margin-top: 22px;
  overflow-wrap: anywhere;
  scroll-margin-top: 110px;
}

.reader .evidence-excerpt {
  max-height: none;
  font-size: 14px;
}

.reader .evidence-buttons {
  max-height: 140px;
}

.reader .content-disclosure pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* PDF 全幅阅读模式 */
#readerScroll.pdf-active {
  padding: 0;
  overflow: hidden;
}

#readerPdf {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #e9edf0;
}

.pdf-tools {
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 20px;
  background: var(--surface);
  font-size: 13px;
}

.pdf-coverage {
  margin-right: auto;
  color: var(--text-secondary);
}

.pdf-load-state {
  font-size: 12px;
  color: var(--muted);
}

#readerPdf iframe {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
}

.reader:has(#readerPdf:not([hidden])) {
  width: min(1600px, 92vw);
  height: calc(100dvh - 24px);
  max-height: none;
  border-radius: 10px;
}

.reader:has(#readerPdf:not([hidden])) .reader-header {
  padding: 12px 20px;
  align-items: center;
  gap: 16px;
}

.reader:has(#readerPdf:not([hidden])) .reader-header h2 {
  font-size: 18px;
  margin: 3px 0 0;
  line-height: 1.45;
}

.reader:has(#readerPdf:not([hidden])) .reader-meta {
  font-size: 11px;
}

.reader:has(#readerPdf:not([hidden])) .reader-toolbar {
  padding: 6px 20px;
  gap: 10px;
}

.reader:has(#readerPdf:not([hidden])) .pdf-tools {
  padding: 5px 20px;
}


/* 10. Animations & Responsive Breakpoints
   -------------------------------------------------------------------------- */
[role="tabpanel"]:not([hidden]):not(#readerPdf) {
  animation: tab-enter .16s var(--ease-out) both;
}

details[open] > :not(summary) {
  animation: disclosure-open .16s var(--ease-out) both;
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panel-enter {
  from {
    opacity: .55;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tab-enter {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes content-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes disclosure-open {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reader-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reader-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(.99);
  }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes backdrop-out {
  to { opacity: 0; }
}

@media (min-width: 1600px) {
  main {
    max-width: 1560px;
    width: 100%;
  }

  .risk-summary {
    gap: 18px;
  }

  .fact-prose {
    font-size: 15px;
  }
}

@media (min-width: 1101px) {
  .risk-card {
    padding: 12px 16px;
    gap: 6px 20px;
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .risk-card .risk-code {
    grid-column: 1;
    grid-row: 1;
  }

  .risk-card .card-title {
    grid-column: 2;
    grid-row: 1;
  }

  .risk-card .card-top {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .risk-card .card-bottom {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .topbar {
    height: 56px;
  }

  main {
    padding: 16px 28px;
    gap: 16px;
  }

  section {
    padding: 20px;
  }

  .overview .home-feed {
    margin-top: 20px;
  }

  .recent-risk {
    padding: 16px;
    gap: 8px;
  }
}

@media (max-width: 1200px) {
  #sources .source-table-heading {
    display: none;
  }

  #sources .source-group > .source-card {
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.5fr) minmax(85px, .7fr);
  }

  .source-state {
    grid-column: 2 / -1;
  }
}

@media (max-width: 1150px) {
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .supporting-documents {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1000px) {
  .sidebar {
    width: 196px;
    padding: 28px 12px;
  }

  .brand {
    padding: 0 4px 36px;
    gap: 10px;
    font-size: 23px;
  }

  .brand small {
    font-size: 11px;
  }

  .workspace {
    margin-left: 196px;
  }

  main {
    padding: 28px;
  }

  .topbar {
    padding: 0 28px;
  }

  .assessment-axes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .risk-summary-item {
    padding: 14px;
  }

  .reader-toolbar {
    gap: 8px;
  }

  .source-record .archive-button {
    margin: 8px 0;
  }
}

@media (max-width: 820px) {
  .collection-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-card-source,
  .collection-times {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .list-date-range input {
    width: 118px;
    padding-inline: 6px;
  }

  .source-run-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  #recentRisks,
  .risk-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .recent-risk {
    padding: 16px;
  }

  .summary-metric {
    padding: 12px;
  }

  .import-method {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .sidebar .brand {
    padding: 0;
    gap: 8px;
    font-size: 23px;
  }

  .navigation-toggle {
    display: block;
    width: auto;
    text-align: left;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .sidebar nav {
    display: none;
    flex-basis: 100%;
  }

  .sidebar #mainNavigation {
    margin-top: 10px;
  }

  .sidebar.navigation-open nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
  }

  .sidebar .nav-item {
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    gap: 8px;
  }

  .sidebar .nav-copy {
    font-size: 13px;
  }

  .workspace {
    margin: 0;
  }

  .topbar {
    display: none;
  }

  main {
    padding: 23px 17px;
  }

  section {
    padding: 20px;
  }

  h2,
  .assistant-intro h2,
  .risk-workspace .reader-header h2 {
    font-size: 20px;
  }

  .workspace-tabs {
    position: static;
  }

  section[data-panel="selection"],
  section[data-panel="collection"],
  #riskGaps,
  .enrichment-records {
    scroll-margin-top: 16px;
  }

  .summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .summary-metric:last-child {
    border-bottom: 0;
  }

  .summary-metric strong {
    font-size: 24px;
  }

  #sources .source-group > .source-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 12px;
    gap: 6px 10px;
  }

  .source-identity,
  .source-method,
  .source-state {
    grid-column: 1 / -1;
  }

  .source-identity strong {
    display: inline;
    margin-right: 8px;
  }

  .source-card small {
    margin-top: 2px;
  }

  .list-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .list-filters select,
  .list-filters input {
    width: 100%;
    padding-inline: 8px;
  }

  .list-filters input {
    grid-column: 1 / 3;
  }

  .risk-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .risk-card .card-top,
  .risk-card .card-bottom {
    grid-column: auto;
  }

  .risk-workspace .reader-header {
    gap: 12px;
  }

  .risk-workspace .reader-header h2 {
    font-size: 18px;
  }

  .reader-toolbar,
  .reader-tabs {
    flex-wrap: wrap;
  }

  .asset-grid {
    grid-template-columns: 1fr;
  }

  .asset-access label {
    display: block;
  }

  .asset-access input {
    margin-top: 8px;
  }

  #assetRiskQuery {
    flex-basis: 0;
  }

  .row input {
    min-width: 0;
    flex-basis: 100%;
  }

  .row button {
    padding: 10px 11px;
  }

  .card-top {
    flex-wrap: wrap;
  }

  .assistant-intro {
    padding-bottom: 23px;
    margin-bottom: 24px;
  }

  .analysis-column {
    padding: 18px;
  }

  .composer-label span:last-child {
    display: none;
  }

  .supporting-document {
    padding: 12px;
  }

  .answer-fact {
    padding-left: 38px;
  }

  .answer-number {
    left: 10px;
  }
}

@media (max-width: 600px) {
  .assessment-axes {
    grid-template-columns: 1fr;
  }

  .version-table th,
  .version-table td {
    padding: 8px;
    font-size: 13px;
  }

  .risk-summary-item .fact-prose {
    font-size: 14px;
  }

  .pagination {
    justify-content: center;
  }

  .page-button {
    min-width: 32px;
  }

  .reader {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  .reader-header {
    padding: 20px;
    gap: 12px;
  }

  .reader-header h2 {
    font-size: 18px;
  }

  .reader-toolbar {
    padding: 10px 16px;
    gap: 8px;
  }

  .reader-scroll {
    padding: 22px 20px;
  }

  .reading-prose {
    font-size: 15px;
  }

  .evidence-excerpt {
    padding: 16px;
  }

  .pdf-tools {
    justify-content: flex-start;
    padding: 8px 16px;
    gap: 18px;
  }

  .reader:has(#readerPdf:not([hidden])) {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .reader:has(#readerPdf:not([hidden])) .reader-header {
    padding: 10px 12px;
  }

  .reader:has(#readerPdf:not([hidden])) .reader-header h2 {
    font-size: 15px;
  }

  .reader:has(#readerPdf:not([hidden])) .reader-toolbar {
    padding: 5px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
