:root {
  --arw-ink: #172033;
  --arw-muted: #68748a;
  --arw-line: #dce3ee;
  --arw-soft: #f6f8fb;
  --arw-blue: #245eea;
  --arw-blue-soft: #edf2ff;
  --arw-green: #0b855c;
  --arw-green-soft: #edf8f3;
  --arw-warn: #a85f14;
  --arw-warn-soft: #fff4e8;
  --arw-danger: #b83a3a;
}

.arw-shell,
.arw-shell * { box-sizing: border-box; }
.arw-shell { min-height: 100%; color: var(--arw-ink); font-family: inherit; background: #fff; }
.arw-shell button,
.arw-shell input,
.arw-shell textarea,
.arw-shell select { font: inherit; }
.arw-shell button { cursor: pointer; }

.arw-notice {
  padding: 11px 20px;
  color: var(--arw-warn);
  background: var(--arw-warn-soft);
  border-bottom: 1px solid #f0d4b5;
}
.arw-notice.success { color: var(--arw-green); background: var(--arw-green-soft); border-color: #bfe3d4; }
.arw-notice.error { color: var(--arw-danger); background: #fff0f0; border-color: #f1c5c5; }

.arw-layout {
  min-width: 0;
  min-height: 620px;
  overflow: auto;
  background: #fff;
}
.arw-record,
.arw-action { width: min(980px, 100%); min-width: 0; margin: 0 auto; overflow: visible; }
.arw-record { position: relative; padding: 28px 34px 38px; }
.arw-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
}
.arw-eyebrow { color: var(--arw-blue); font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.arw-record-head h2 { max-width: 760px; margin: 5px 0 0; font-size: 22px; line-height: 1.35; }
.arw-record-tools { display: flex; flex: none; align-items: flex-start; gap: 8px; }
.arw-version {
  flex: none;
  min-width: 84px;
  padding: 7px 10px;
  text-align: center;
  background: var(--arw-soft);
  border-radius: 8px;
}
.arw-version strong,
.arw-version span { display: block; }
.arw-version strong { font-size: 17px; }
.arw-version span { margin-top: 2px; color: var(--arw-muted); font-size: 11px; }
.arw-version-menu { position: relative; }
.arw-version-menu > summary {
  min-height: 47px;
  padding: 0 12px;
  color: #46536a;
  font-size: 13px;
  font-weight: 700;
  line-height: 45px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--arw-line);
  border-radius: 8px;
  cursor: pointer;
}
.arw-version-menu > summary::-webkit-details-marker { display: none; }
.arw-version-menu[open] > summary { color: var(--arw-blue); border-color: #9db4ef; }
.arw-version-menu-list {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  padding: 6px;
  background: #fff;
  border: 1px solid var(--arw-line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, .14);
}
.arw-version-menu-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  text-align: left;
  color: var(--arw-ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
}
.arw-version-menu-item:hover,
.arw-version-menu-item.is-active { background: var(--arw-soft); }
.arw-version-menu-item span,
.arw-version-menu-item strong { display: block; }
.arw-version-menu-item span { margin-bottom: 3px; color: var(--arw-blue); font-size: 11px; font-weight: 750; }
.arw-version-menu-item strong { overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }

/* 判断和限制保持可见；重复论证与执行原文按需展开。 */
.arw-review-block { padding: 20px 0 6px; border-top: 1px solid var(--arw-line); }
.arw-review-block + .arw-review-block { margin-top: 18px; }
.arw-review-block > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}
.arw-review-block > header h3 { margin: 0; font-size: 18px; }
.arw-review-block > header span { color: var(--arw-muted); font-size: 12px; }
.arw-judgement { padding: 12px 0 15px; border-bottom: 1px solid var(--arw-line); }
.arw-judgement > span,
.arw-procedure-group > span { display: block; margin-bottom: 6px; color: var(--arw-green); font-size: 12px; font-weight: 750; }
.arw-judgement strong { display: block; font-size: 16px; line-height: 1.5; }
.arw-judgement p { margin: 5px 0 0; color: #4e5b71; font-size: 14px; line-height: 1.6; }
.arw-review-rows { min-width: 0; }
.arw-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #e8edf4;
}
.arw-review-row strong { display: block; font-size: 14px; line-height: 1.5; }
.arw-review-row p,
.arw-empty-inline { margin: 4px 0 0; color: var(--arw-muted); font-size: 13px; line-height: 1.55; }
.arw-procedure-group { padding-top: 18px; }
.arw-fact-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 260px; }
.arw-fact-meta span {
  padding: 3px 7px;
  color: #526079;
  font-size: 11px;
  line-height: 1.35;
  background: var(--arw-soft);
  border-radius: 5px;
}
.arw-empty { padding: 40px 18px; color: var(--arw-muted); text-align: center; }
.arw-trace-toggle { margin-top: 18px; padding: 8px 0; color: var(--arw-blue); font-weight: 700; background: transparent; border: 0; }

.arw-trace-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid var(--arw-line);
  border-radius: 8px;
}
.arw-trace-drawer > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--arw-line); }
.arw-trace-drawer > header span,
.arw-trace-drawer > header strong { display: block; }
.arw-trace-drawer > header span { margin-bottom: 3px; color: var(--arw-muted); font-size: 11px; }
.arw-trace-drawer > header button { width: 32px; height: 32px; color: var(--arw-muted); font-size: 20px; background: #fff; border: 1px solid var(--arw-line); border-radius: 7px; }
.arw-trace-list { padding: 4px 18px 20px; overflow: auto; }
.arw-trace-list > article { padding: 14px 0; border-bottom: 1px solid var(--arw-line); }
.arw-trace-list > article span,
.arw-trace-list > article strong { display: block; }
.arw-trace-list > article span { margin-bottom: 4px; color: var(--arw-muted); font-size: 12px; }
.arw-trace-list > article p { margin: 5px 0 0; color: #4e5b71; font-size: 13px; line-height: 1.55; }
.arw-section { border-bottom: 1px solid var(--arw-line); }
.arw-section > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 13px 0; cursor: pointer; list-style: none; }
.arw-section > summary::-webkit-details-marker { display: none; }
.arw-section > summary span { font-size: 13px; font-weight: 750; }
.arw-section > summary b,
.arw-section > summary small { color: var(--arw-muted); font-size: 11px; }
.arw-section .arw-fact-list { padding-bottom: 10px; }
.arw-fact { padding: 9px 0; }
.arw-fact + .arw-fact { border-top: 1px dashed var(--arw-line); }
.arw-fact strong { font-size: 13px; line-height: 1.45; }
.arw-fact p { margin: 4px 0 0; color: var(--arw-muted); font-size: 12px; line-height: 1.5; }

/* 复核意见顺接在事项和证据之后，保持单一纵向阅读路径。 */
.arw-action { padding: 28px 34px 42px; background: #fbfcfe; border-top: 1px solid var(--arw-line); }
.arw-action-title { padding-bottom: 17px; border-bottom: 1px solid var(--arw-line); }
.arw-action-title span { color: var(--arw-green); font-size: 12px; font-weight: 750; }
.arw-action-title h2 { margin: 5px 0 0; font-size: 20px; line-height: 1.35; }
.arw-action-title p { margin: 6px 0 0; color: var(--arw-muted); font-size: 13px; line-height: 1.5; }
.arw-action form { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 680px; padding-top: 18px; }
.arw-action label { color: #445068; font-size: 13px; font-weight: 700; }
.arw-action input,
.arw-action select,
.arw-action textarea { width: 100%; margin-top: 6px; padding: 10px 11px; color: var(--arw-ink); background: #fff; border: 1px solid #cfd8e6; border-radius: 7px; outline: none; }
.arw-action input:focus,
.arw-action select:focus,
.arw-action textarea:focus { border-color: var(--arw-blue); box-shadow: 0 0 0 3px rgba(36, 94, 234, .1); }
.arw-action textarea { min-height: 94px; resize: vertical; line-height: 1.5; }
.arw-full,
.arw-primary,
.arw-secondary,
.arw-challenge { grid-column: 1 / -1; }
.arw-primary,
.arw-secondary { min-height: 40px; padding: 8px 12px; border-radius: 8px; font-weight: 750; }
.arw-primary { color: #fff; background: var(--arw-blue); border: 1px solid var(--arw-blue); }
.arw-primary:hover { background: #194cc9; }
.arw-secondary { color: var(--arw-blue); background: #fff; border: 1px solid #b8c8ef; }
.arw-decision { margin: 18px 0; padding: 14px 0; border-bottom: 1px solid var(--arw-line); }
.arw-decision strong { color: var(--arw-green); font-size: 18px; }
.arw-decision p { margin: 7px 0 0; color: #425b53; line-height: 1.6; }
.arw-writeback { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--arw-line); }
.arw-writeback > span { display: block; margin-bottom: 10px; color: var(--arw-muted); font-size: 12px; font-weight: 750; }
.arw-action-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.arw-action-buttons > * { flex: 0 1 240px; }
.arw-writeback-complete { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; color: #18794e; font-size: 13px; font-weight: 700; background: #eef8f2; border-radius: 8px; }
.arw-boundary-note { margin: 0; color: var(--arw-muted); font-size: 13px; line-height: 1.5; }
.arw-challenge { padding: 13px 0; border-bottom: 1px solid var(--arw-line); }
.arw-challenge > span { color: var(--arw-warn); font-size: 12px; font-weight: 700; }
.arw-challenge > strong { display: block; margin: 5px 0 12px; line-height: 1.5; }
.arw-challenge label { display: block; margin-top: 10px; }
[data-lead-field][hidden] { display: none !important; }

@media (max-width: 1000px) {
  .arw-record { padding-inline: 22px; }
  .arw-action { padding-inline: 22px; }
}

@media (max-width: 780px) {
  .arw-record-head { align-items: flex-start; flex-direction: column; }
  .arw-record-tools { width: 100%; }
  .arw-version-menu { margin-left: auto; }
  .arw-review-block > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .arw-review-row { grid-template-columns: 1fr; gap: 7px; }
  .arw-fact-meta { justify-content: flex-start; max-width: none; }
}

/* 复核问题和同一问题的版本是两个维度：左侧切问题，标题区只切版本。 */
.arw-review-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
}
.arw-review-frame.is-queue-open { grid-template-columns: 286px minmax(0, 1fr); }
.arw-review-content { min-width: 0; }
.arw-reading-column { min-width: 0; }
.arw-business-context { margin: 0 0 20px; font-size: 13px; line-height: 1.65; }
.arw-business-context > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 12px; margin: 6px 0; }
.arw-business-context dt { color: #59667b; }
.arw-business-context dd { margin: 0; overflow-wrap: anywhere; }
.arw-basis-row { padding: 12px 0; border-bottom: 1px solid #e8edf4; font-size: 14px; line-height: 1.65; }
.arw-basis-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.arw-basis-heading strong { font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.arw-basis-heading > span { flex: none; font-size: 12px; color: #59667b; }
.arw-basis-row p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.arw-basis-source { padding: 4px 0; border: 0; background: transparent; color: #315ec7; font-size: 13px !important; text-align: left; overflow-wrap: anywhere; }
.arw-basis-source:hover { text-decoration: underline; text-underline-offset: 3px; }
.arw-basis-relation { color: #445068; }
.arw-reason-text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.arw-explanations { margin-top: 18px; }
.arw-explanations h4, .arw-limits h4 { margin: 16px 0 5px; font-size: 14px; }
.arw-explanations > p { font-size: 13px; line-height: 1.65; }
@media (max-width: 600px) {
  .arw-basis-heading { flex-wrap: wrap; gap: 4px 12px; }
}
.arw-review-content.is-reference-open { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.arw-status { padding: 6px 9px; color: var(--arw-muted); background: var(--arw-soft); border-radius: 5px; font-size: 12px; white-space: nowrap; }
.arw-disposition { color: var(--arw-ink) !important; font-weight: 650; }
.arw-disposition.is-limited { color: var(--arw-warn) !important; }
.arw-judgement { border-bottom: 0; padding: 4px 0; }
.arw-judgement strong { font-weight: 550; line-height: 1.75; }
.arw-limits > p { font-size: 14px; line-height: 1.7; margin: 8px 0; }
.arw-record details > summary { cursor: pointer; padding-block: 10px; font-size: 13px; color: #4e5b71; }
.arw-original { margin-top: 20px; border-top: 1px solid var(--arw-line); }
.arw-original p { line-height: 1.7; font-size: 14px; }
.arw-original h4, .arw-references h4 { font-size: 13px; margin: 16px 0 6px; }
.arw-source-link { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--arw-line); color: var(--arw-ink); background: transparent; text-align: left; }
.arw-source-link > span:first-child { min-width: 0; }
.arw-source-link strong { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.arw-source-link small { display: block; margin-top: 3px; font-size: 12px; color: var(--arw-muted); }
.arw-source-link > span:last-child { flex: none; color: #315ec7; font-size: 12px; }
.arw-source-link:hover, .arw-source-link[aria-expanded="true"] { background: #f5f8ff; }
.arw-reference-reader { position: sticky; top: 0; min-width: 0; max-height: 75dvh; overflow: auto; padding: 20px; background: #f8fafc; border-left: 1px solid var(--arw-line); }
.arw-reference-reader > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.arw-reference-reader h3 { font-size: 16px; margin: 0; }
.arw-reference-reader h4 { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin: 18px 0 6px; }
.arw-reference-reader > header button { flex: none; width: 32px; height: 32px; border: 1px solid var(--arw-line); border-radius: 6px; color: var(--arw-muted); background: #fff; }
.arw-reference-status { color: #5a6578; font-size: 13px; line-height: 1.65; }
.arw-reference-reader details { margin-top: 20px; font-size: 12px; color: var(--arw-muted); }
.arw-reference-reader summary { cursor: pointer; padding: 8px 0; }
.arw-source-excerpt { border-top: 1px solid var(--arw-line); padding-top: 12px; }
.arw-source-excerpt small { font-size: 12px; color: var(--arw-muted); }
.arw-source-excerpt p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: 14px; }
.arw-source-table { overflow-x: auto; }
.arw-source-table table { border-collapse: collapse; font-size: 13px; width: 100%; }
.arw-source-table th, .arw-source-table td { border-bottom: 1px solid var(--arw-line); padding: 9px; text-align: left; white-space: nowrap; }
.arw-shell button:focus-visible, .arw-shell summary:focus-visible, .arw-source-table:focus-visible { outline: 2px solid var(--arw-blue); outline-offset: 3px; }
.arw-shell button:disabled { opacity: .55; cursor: default; }
@media (max-width: 1100px) {
  .arw-review-content.is-reference-open { grid-template-columns: minmax(0, 1fr); }
  .arw-reference-reader { order: -1; position: static; max-height: 50dvh; border-left: 0; border-bottom: 1px solid var(--arw-line); }
}
.arw-queue {
  min-width: 0;
  background: #f8fafc;
  border-right: 1px solid var(--arw-line);
}
.arw-queue > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px 11px 16px;
  border-bottom: 1px solid var(--arw-line);
}
.arw-queue > header > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.arw-queue > header strong { color: var(--arw-ink); font-size: 15px; }
.arw-queue > header span { color: var(--arw-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.arw-queue > header button {
  width: 30px;
  height: 30px;
  color: #657188;
  font-size: 19px;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 7px;
}
.arw-queue > header button:hover { color: #24324a; background: #e9eef5; }
.arw-queue nav { padding: 8px; }
.arw-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  width: 100%;
  min-height: 76px;
  padding: 11px 10px;
  color: var(--arw-ink);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}
.arw-queue-item + .arw-queue-item { margin-top: 3px; }
.arw-queue-item:hover { background: #eef2f7; }
.arw-queue-item.is-active { background: #fff; border-color: #cad6e7; box-shadow: 0 4px 12px rgba(28, 46, 74, .06); }
.arw-queue-item strong { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; }
.arw-queue-item small { grid-column: 2; grid-row: 1; align-self: center; color: var(--arw-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.arw-queue-state { justify-self: start; color: #8b5b20; font-size: 11px; font-weight: 750; }
.arw-queue-state:is(.is-lead-approved,.is-responsible-approved) { color: var(--arw-green); }
.arw-queue-state:is(.is-returned-for-evidence,.is-returned-to-lead,.is-rejected) { color: var(--arw-danger); }
.arw-record-title { min-width: 0; }
.arw-queue-launcher {
  min-height: 32px;
  margin: 0 0 12px;
  padding: 0 10px;
  color: #315ec7;
  font-size: 12px;
  font-weight: 750;
  background: #f5f8ff;
  border: 1px solid #c8d5f0;
  border-radius: 8px;
}
.arw-review-frame.is-queue-open .arw-queue-launcher { display: none; }

@media (max-width: 920px) {
  .arw-review-frame.is-queue-open { grid-template-columns: minmax(0, 1fr); }
  .arw-queue {
    position: absolute;
    z-index: 50;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    box-shadow: 16px 0 38px rgba(23, 32, 51, .16);
  }
  .arw-review-frame.is-queue-open .arw-queue-launcher { display: inline-flex; }
}
