/* 报告页：审稿台。页头是舞台和开头数字的浮卡；每一章的大标题放在页面上，下面是这一章自己的白卡，
   卡里左边是作者的稿子（Newsreader，带行号），右边是页边：审稿意见是玫红，方法旁注和能点的东西是蓝。
   变量都在 base.css；这里的类名一律以 rp- 开头，免得和图表模块的 Tailwind 类撞名。 */

.rp {
  /* 底部浮条的高度，改动栏浮在它上面 */
  --tools: 56px;
  --side: 300px;
  --margin: 272px;
}

/* ── 页头 ─────────────────────────────────────────────────────────── */

.rp-cover {
  padding-block: 48px;
}

.rp-cover-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  align-items: center;
  gap: 32px 64px;
  padding-inline: clamp(24px, 4.4vw, 72px);
}

.rp-cover-about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.rp-cover-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 22px;
}

.rp-cover-facts .tag {
  background: rgb(255 255 255 / 0.72);
}

.rp-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rp-head {
  max-width: 46em;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 30px;
}

.rp-cover .row-wrap {
  margin-top: 4px;
}

/* ── 浮在底部正中的一条：还能问、回答不了，稿件和审稿信，两份结果对照，设置，第几稿 ───
   不做贴在网站顶栏下面的第二道顶栏。停在【还能问】【回答不了】上，问题从上方浮出；点开是弹层。 */

.rp-tools {
  position: fixed;
  bottom: 16px;
  left: 50%;
  z-index: 44;
  display: flex;
  align-items: center;
  gap: 4px;
  /* left: 50% 时浏览器只按右半边的宽度排它，所以按内容定宽 */
  width: max-content;
  max-width: calc(100vw - 32px);
  height: var(--tools);
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  translate: -50% 0;
  animation: fade-up 240ms var(--ease);
}

.rp-tools-rule {
  flex: none;
  width: 1px;
  height: 24px;
  margin-inline: 6px;
  background: var(--line);
}

.rp-asks {
  display: flex;
  gap: 4px;
}

.rp-ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 16px;
  border: 0;
  border-radius: var(--q);
  corner-shape: squircle;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 160ms var(--ease);
}

.rp-ask-btn:hover {
  background: var(--paper-2);
}

.rp-ask-n {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.rp-ask-btn.is-no .rp-ask-n {
  background: var(--paper-2);
  color: var(--ink-2);
}

/* 【两份结果对照】：和【还能问】一样的字按钮，没有数；两份结论相反时是玫红 */
.rp-compare-btn {
  padding-right: 16px;
}

.rp-compare-btn.is-flip {
  color: var(--rose);
}

/* 设置：齿轮，点开是一排开关 */
.rp-tools-icon {
  flex: none;
  width: 44px;
  height: 44px;
}

.rp-pop:has(.rp-set) {
  width: 200px;
}

.rp-set {
  justify-content: space-between;
}

.rp-select {
  flex: none;
  min-height: 44px;
  font-size: 15px;
}

/* ── 预审意见：右栏最上面的一张卡，点开是右侧浮着的侧栏 ─────────────────
   侧栏在底部浮条和改动栏下面一层。 */

.rp-rv-card {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}

.rp-rv-top,
.rp-rv-item {
  display: flex;
  width: 100%;
  border: 0;
  border-radius: var(--q);
  corner-shape: squircle;
  background: none;
  text-align: left;
  transition: background-color 140ms var(--ease);
}

.rp-rv-top:hover,
.rp-rv-item:hover {
  background: var(--paper-2);
}

.rp-rv-top {
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.rp-rv-top .icon {
  margin-left: auto;
  color: var(--ink-3);
}

.rp-rv-kind {
  color: var(--rose);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

.rp-rv-n {
  color: var(--ink-3);
  font-size: 14px;
}

/* 意见多时只在卡里滚，下面【这份数据回答了】的卡留得出位置 */
.rp-rv-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 36dvh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rp-rv-item {
  align-items: baseline;
  gap: 10px;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 20px;
}

.rp-rv-level {
  flex: none;
  color: var(--rose);
  font-size: 13px;
  font-weight: 500;
}

.rp-rv-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-rv-panel {
  position: fixed;
  top: calc(var(--header) + 16px);
  right: 16px;
  bottom: 16px;
  z-index: 43;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  animation: rp-from-right 240ms var(--ease);
}

.rp-rv-panel:focus {
  outline: none;
}

@keyframes rp-from-right {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
}

.rp-rv-head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px 28px;
  border-bottom: 1px solid var(--line);
}

.rp-rv-head .icon-btn {
  margin-left: auto;
}

/* 底部浮条和改动栏盖住侧栏的下端，正文末尾留出它们的高度 */
.rp-rv-body {
  flex: 1;
  min-height: 0;
  padding: 20px 28px 120px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

body.rp-has-dock .rp-rv-body {
  padding-bottom: 240px;
}

.rp-rv-text {
  color: var(--ink);
  font: 400 16px/27px var(--serif);
}

.rp-rv-text .rp-item {
  scroll-margin-top: 12px;
}

.rp-rv-notes {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font: 14px/22px var(--font);
}

.rp-rv-notes:not(:has(.rp-note)) {
  display: none;
}

/* ── 两份结果对照的弹层 ───────────────────────────────────────────── */

.modal:has(.rp-compare) {
  width: min(880px, calc(100vw - 32px));
}

/* ── 右栏：预审意见的卡在上，【这份数据回答了】在下，一起贴在顶栏下面 ── */

.rp-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  align-items: start;
  gap: 24px;
  max-width: calc(1680px + 2 * var(--inset));
  margin-inline: auto;
  padding: 24px var(--inset) 0;
}

.rp-rail {
  position: sticky;
  top: calc(var(--header) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100dvh - var(--header) - 40px);
}

/* 问题列表占下面剩的高度，多了在卡里滚 */
.rp-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rp-side-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 24px 16px 12px;
}

.rp-side-head {
  padding-inline: 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.01em;
}

.rp-cards {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rp-card,
.rp-deck-card {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--q);
  corner-shape: squircle;
  background: none;
  text-align: left;
  transition: background-color 140ms var(--ease);
}

.rp-card:hover {
  background: var(--paper-2);
}

.rp-card.is-on {
  background: var(--blue-wash);
}

.rp-card-q {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.rp-card-a {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 20px;
}

.rp-card-sealed,
.rp-card-w {
  color: var(--rose);
}

.rp-card-w {
  font-size: 13px;
  line-height: 18px;
}

/* ── 还能问、回答不了的弹层：每个问题是弹层里的一张小卡 ─────────────── */

.modal:has(.rp-deck) {
  width: min(720px, calc(100vw - 32px));
}

.rp-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 10px;
  margin-top: 8px;
}

.rp-deck-card {
  align-content: start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--q-l);
  background: var(--canvas);
}

.rp-deck-card:hover {
  background: var(--paper-2);
}

.rp-deck-h3 {
  margin: 24px 0 4px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}

.rp-deck-back {
  margin: -6px 0 12px -14px;
}

.rp-deck-dl dt {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 14px;
}

.rp-deck-dl dd {
  margin: 2px 0 0;
}

.rp-deck > .btn {
  margin-top: 28px;
}

/* 停在顶栏按钮上浮出的问题列表（深色说明卡里） */
.rp-peek li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
  color: #fff;
}

.rp-peek small {
  color: rgb(255 255 255 / 0.62);
  font-size: 13px;
  white-space: nowrap;
}

/* ── 稿件：一章一个大标题、一张白卡 ───────────────────────────────── */

.rp-main {
  min-width: 0;
  padding-bottom: 120px;
}

body.rp-has-dock .rp-main {
  padding-bottom: 240px;
}

.rp-pages {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.rp-row {
  display: flex;
  flex-direction: column;
  gap: 28px;
  scroll-margin-top: calc(var(--header) + 16px);
}

.rp-pages > .rp-row:first-child {
  padding-top: 24px;
}

.rp-row-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.rp-h2 {
  display: flex;
  align-items: baseline;
  gap: 0.36em;
  min-width: 0;
}

.rp-h2-n {
  color: var(--ink-3);
  font-weight: 400;
}

.rp-h2-tool {
  margin-bottom: 8px;
  font-size: 15px;
}

/* 卡里左边是稿纸，右边是页边；行号印在卡的左边距里 */
.rp-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin);
  min-width: 0;
  padding: 44px 40px 40px 64px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--paper);
  box-shadow: var(--shadow-1);
}

.rp-text {
  min-width: 0;
  padding-right: 36px;
  color: var(--ink);
  font: 400 17px/28px var(--serif);
}

.rp-sheet :is(h1, h2, h3, p) {
  position: relative;
}

/* 行号：默认不显示，浮条上的【行号】打开（.rp-lines）；不显示时意见旁边的【第几行】也不写 */
.rp:not(.rp-lines) .rp-ln,
.rp:not(.rp-lines) .rp-lineref {
  display: none;
}

.rp-ln {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 30px;
  color: rgb(27 27 25 / 0.36);
  font: 400 11px var(--font);
  font-variant-numeric: tabular-nums;
  text-align: right;
  pointer-events: none;
  user-select: none;
}

.rp-ln i {
  display: block;
  font-style: normal;
}

.rp-h3 {
  margin: 28px 0 8px;
  font: 600 18px/28px var(--serif);
}

.rp-p {
  margin-bottom: 14px;
}

.rp-purpose,
.rp-ask {
  color: var(--ink-2);
}

.rp-con {
  margin-bottom: 18px;
}

/* 句子里能换的变量：蓝字，下面一道线，点开换列 */
.rp-slot {
  display: inline;
  padding: 0 2px;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  background: none;
  color: var(--blue);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms var(--ease);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rp-slot:hover {
  background: var(--blue-wash);
}

.rp-slot .icon {
  display: inline-block;
  margin-left: 2px;
  vertical-align: -1px;
}

.rp-slot.is-staged {
  border-bottom-style: dashed;
  background: var(--blue-wash);
}

/* 待指定的一项（工具变量这类）：没选列时这一章算不出来 */
.rp-slot.is-wait {
  background: var(--blue-wash);
  font-weight: 600;
}

/* 审稿条：第几稿、预审结论、意见数、核对了多少种做法（审稿信的头上） */
.rp-review-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 16px;
  color: var(--ink-2);
  font: 15px/24px var(--font);
}

.rp-grade,
.rp-flip {
  color: var(--rose);
}

.rp-grade {
  font-weight: 600;
}

.rp-flip-row td {
  color: var(--rose);
}

/* 结果表述、方法表述 */
.rp-line {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 26px;
}

.rp-line-k {
  margin-right: 10px;
  color: var(--ink);
  font: 600 14px/26px var(--font);
}

.rp-line .btn {
  display: inline-flex;
  min-height: 26px;
  margin-left: 10px;
  padding: 0 10px;
  box-shadow: none;
  font-size: 13px;
  vertical-align: 1px;
}

.rp-term {
  text-decoration: underline dotted var(--ink-3) 1px;
  text-underline-offset: 4px;
  cursor: help;
  transition: color 140ms var(--ease);
}

.rp-term:hover,
.rp-term[aria-describedby] {
  color: var(--blue);
}

/* 文中引用（Cronbach, 1951）：作者和年份是一个按钮，点了跳到文献表 */
.rp-cite {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  text-align: left;
}

.rp-cite:hover {
  text-decoration: underline;
}

/* ── 三线表：顶线、表头线、底线，数字等宽、按小数点对齐 ───────────── */

.rp-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 24px 0 28px;
}

/* 表题照 APA：Table 1 粗体单占一行，下一行是斜体的题目；图题是 Figure 1. 接着题目 */
.rp-cap {
  font: 400 15px/24px var(--serif);
}

.rp-cap-n {
  display: block;
  font-weight: 700;
}

.rp-cap-t {
  font-style: italic;
}

.rp-table-scroll {
  overflow-x: auto;
}

.rp-3l {
  width: 100%;
  border-collapse: collapse;
  border-block: 2px solid var(--ink);
  font: 400 15px/23px var(--serif);
  font-variant-numeric: tabular-nums;
}

.rp-3l th {
  padding: 9px 7px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  vertical-align: bottom;
}

.rp-3l td {
  padding: 6px 7px;
  text-align: center;
  vertical-align: top;
}

/* 数字不折行；文字的格可以折，术语和式子由 .nb 保持完整，表不会被撑出栏外 */
.rp-3l td:is(.rp-num, .rp-short) {
  white-space: nowrap;
}

.rp-3l :is(th, td):first-child {
  min-width: 108px;
  padding-left: 0;
  text-align: left;
  white-space: normal;
}

.rp-3l :is(th, td):last-child {
  padding-right: 0;
}

.rp-3l .rp-num-l {
  text-align: left;
}

.rp-3l td.rp-wide {
  min-width: 140px;
  text-align: left;
  white-space: normal;
}

.rp-foot tr:first-child td {
  border-top: 1px solid var(--ink);
}

.rp-marked td {
  background: var(--rose-wash);
}

.rp-mark {
  margin-left: 2px;
  color: var(--rose);
  font: 600 11px/1 var(--font);
}

/* 评价线的指标体系表：作者在表里改方向（小分段切换）和系统（下拉），改了的行蓝浅底、指标名后写【已改】 */
.rp-ix td {
  vertical-align: middle;
}

.rp-ix tr.is-changed td {
  background: var(--blue-wash);
}

.rp-ix-dir {
  gap: 2px;
  padding: 3px;
  border-radius: calc(12px * var(--sq));
}

.rp-ix-dir .seg {
  height: 30px;
  padding: 0 12px;
  border-radius: calc(9px * var(--sq));
  font-size: 14px;
}

.rp-ix-system {
  min-height: 0;
  height: 36px;
  padding: 0 34px 0 12px;
  font: 14px/34px var(--font);
  background-position: right 10px center;
}

.rp-ix-mark {
  height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  background: var(--paper);
  color: var(--blue);
  font: 500 12px/1 var(--font);
}

/* 按小数点对齐：整数部分靠右、小数部分靠左，各占一列里最宽的那么宽 */
.rp-dec {
  white-space: nowrap;
}

.rp-dec-i {
  display: inline-block;
  min-width: var(--int);
  text-align: right;
}

.rp-dec-f {
  display: inline-block;
  min-width: var(--frac);
  text-align: left;
}

.rp-table-note {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 22px;
}

/* ── 图 ───────────────────────────────────────────────────────────── */

.rp-fig {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 28px 0;
}

/* 组件画不出轴名的图，轴名写在图上方 */
.rp-fig-axis {
  color: var(--ink-3);
  font: 14px/22px var(--font);
}

.rp-chart-place {
  display: block;
}

.rp-dia {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--font);
}

.rp-dia-box {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.2;
}

.rp-dia-text {
  fill: var(--ink);
}

.rp-dia-note {
  fill: var(--ink-2);
}

.rp-dia-line {
  fill: none;
  stroke-width: 2;
}

/* 结构方程路径图里不显著的边 */
.rp-dia-line.is-dashed {
  stroke-dasharray: 6 4;
}

/* 写在边上的系数：垫一圈纸色，压在线上也读得出 */
.rp-dia-label {
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 6px;
  stroke-linejoin: round;
}

.rp-dia-line.is-main {
  stroke: var(--blue);
}

.rp-dia-head.is-main {
  fill: var(--blue);
}

.rp-dia-line.is-side {
  stroke: var(--ink-3);
}

.rp-dia-head.is-side {
  fill: var(--ink-3);
}

/* 样本流程 */
.rp-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 15px/22px var(--font);
}

.rp-flow-box {
  padding: 9px 18px;
  border-radius: var(--q);
  corner-shape: squircle;
  box-shadow: inset 0 0 0 1.2px var(--ink);
  white-space: nowrap;
}

.rp-flow-drop {
  position: relative;
  min-height: 44px;
  margin-left: 50%;
  padding: 10px 0 10px 18px;
  align-self: stretch;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 20px;
}

.rp-flow-drop::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-left: 1.2px solid var(--ink-2);
}

.rp-flow-leaves {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.rp-flow-leaves li {
  display: grid;
  gap: 2px;
  min-width: 96px;
  max-width: 168px;
  padding: 10px 12px;
  border-radius: var(--q);
  corner-shape: squircle;
  background: var(--canvas);
  text-align: center;
}

.rp-flow-leaves li.is-less {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.rp-flow-leaves b {
  font-weight: 600;
}

.rp-flow-leaves small {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 18px;
}

/* ── 正文里的小块 ─────────────────────────────────────────────────── */

/* 判断标准：一行一条，标准、这份报告的数、达标与否 */
.rp-checks {
  width: 100%;
  max-width: 640px;
  margin: 18px 0;
  border-collapse: collapse;
  color: var(--ink-2);
  font: 15px/24px var(--font);
}

.rp-checks th {
  padding: 0 16px 6px 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.rp-checks td {
  padding: 7px 16px 7px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.rp-checks td.num {
  color: var(--ink);
  white-space: nowrap;
}

.rp-checks :is(th, td):last-child {
  width: 76px;
  padding-right: 0;
  white-space: nowrap;
}

.rp-checks td:last-child .icon {
  display: inline-block;
  margin-right: 6px;
  color: var(--ink-3);
  vertical-align: -3px;
}

.rp-checks tr.is-bad td:last-child,
.rp-checks tr.is-bad td:last-child .icon {
  color: var(--rose);
}

/* 格里是句子的表：分条的正文。条目名一行，短的格跟在后面，长的格各占一段 */
.rp-list {
  margin: 24px 0 28px;
}

.rp-list-title {
  margin-bottom: 6px;
  font: 600 16px/26px var(--serif);
}

.rp-list dt {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 26px;
}

.rp-list dt b {
  font-weight: 600;
}

.rp-list-fact {
  color: var(--ink-2);
  font: 14px/26px var(--font);
}

.rp-list-k {
  color: var(--ink-3);
  font: 14px/26px var(--font);
}

.rp-list dd {
  padding: 2px 0 12px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 26px;
}

.rp-list dd p + p {
  margin-top: 4px;
}

.rp-list-more {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}

.rp-list .rp-table-note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.rp-derive {
  margin: 4px 0 22px;
}

.rp-derive summary,
.rp-ev-table summary,
.rp-recipe summary {
  width: max-content;
  color: var(--blue);
  font: 500 15px/26px var(--font);
  cursor: pointer;
}

.rp-derive dl {
  margin-top: 8px;
  font-size: 16px;
  line-height: 28px;
}

.rp-derive dt {
  margin-top: 8px;
  font-weight: 600;
}

.rp-derive dd {
  margin: 0;
  color: var(--ink-2);
}

/* 复现说明：蓝，可以整段复制给自己的大模型 */
.rp-recipe {
  margin-top: 20px;
  padding: 14px 16px 14px 20px;
  border-radius: var(--q);
  corner-shape: squircle;
  background: var(--blue-wash);
  font: 15px/24px var(--font);
}

.rp-recipe-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rp-recipe-k {
  margin-right: auto;
  color: var(--blue);
  font-weight: 600;
}

.rp-recipe-head .btn {
  background: rgb(255 255 255 / 0.72);
  box-shadow: none;
}

.rp-recipe details {
  margin-top: 2px;
}

.rp-recipe-text {
  max-height: 360px;
  margin: 10px 0 2px;
  padding: 14px 16px;
  overflow: auto;
  border-radius: var(--q);
  background: var(--paper);
  color: var(--ink);
  font: 14px/22px var(--font);
  white-space: pre-wrap;
}

/* ── 封存：大修没选方向时 ────────────────────────────────────────── */

.rp-seal-cover {
  display: none;
}

.rp-seal.is-sealed .rp-seal-body {
  display: none;
}

.rp-seal.is-sealed .rp-seal-cover {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 14px 0 22px;
  padding: 18px 22px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--rose-wash);
  font: 15px/24px var(--font);
}

.rp-seal-cover b {
  color: var(--rose);
  font-size: 16px;
  font-weight: 600;
}

.rp-seal-cover p {
  color: var(--ink-2);
}

/* ── 预审意见与方向 ───────────────────────────────────────────────── */

.rp-item {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header) + 16px);
}

.rp-item.is-flash {
  animation: rp-flash 1.6s var(--ease);
}

@keyframes rp-flash {
  0%,
  40% {
    background: var(--rose-wash);
  }
}

.rp-item-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font: 600 19px/30px var(--serif);
}

.rp-item-n {
  color: var(--ink-3);
  font-weight: 400;
  white-space: nowrap;
}

.rp-item-tag {
  flex: none;
  margin-left: auto;
  color: var(--rose);
  font: 500 14px/22px var(--font);
  font-style: normal;
  white-space: nowrap;
}

.rp-lineref {
  color: var(--ink-3);
  font-weight: 400;
}

.rp-answered {
  margin: 8px 0;
  color: var(--ink-2);
  font: 15px/24px var(--font);
}

/* 可选方向：在侧栏里一行一个方向，名字和依据一行，几个数排在下面，按钮在最后 */
.rp-table-scroll:has(> .rp-dirs) {
  /* 选中的一行铺浅蓝底，左右各让出 12px，字仍和上面的段落对齐 */
  margin-inline: -12px;
}

.rp-dirs {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font: 15px/23px var(--font);
}

.rp-dirs thead {
  display: none;
}

.rp-dirs tr {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--q);
  corner-shape: squircle;
  transition: background-color 160ms var(--ease);
}

.rp-dirs tr:last-child,
.rp-dirs tr.is-chosen {
  border-bottom-color: transparent;
}

.rp-dirs tr.is-chosen {
  background: var(--blue-wash);
}

.rp-dirs td {
  padding: 0;
  white-space: nowrap;
}

.rp-dirs td:first-child,
.rp-dirs td.rp-dir-act {
  flex: 1 0 100%;
  white-space: normal;
}

.rp-dirs td:first-child b {
  font-weight: 600;
}

.rp-dirs td[data-label]::before {
  content: attr(data-label) " ";
  color: var(--ink-3);
  font-size: 13px;
}

.rp-dir-why {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 21px;
}

.rp-dir-act {
  margin-top: 8px;
}

.rp-dir-act:empty {
  display: none;
}

.rp-dir-note {
  color: var(--ink-3);
  font-size: 14px;
}

/* 聚类这类方向没有效应可比，写分成几类、轮廓系数 */
.rp-dirs td.rp-dir-note-cell {
  min-width: 180px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 21px;
  white-space: normal;
}

.rp-now {
  margin-left: 8px;
  vertical-align: 1px;
}

.rp-ns {
  color: var(--ink-3);
}

.btn.is-chosen {
  background: var(--blue);
  box-shadow: none;
  color: #fff;
}

.btn.is-chosen:hover:not(:disabled) {
  background: var(--blue-deep);
}

/* ── 页边 ─────────────────────────────────────────────────────────── */

.rp-margin {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  font: 14px/22px var(--font);
}

/* 没有批注的页边不画分隔线 */
.rp-margin:not(:has(.rp-note, .rp-delta)) {
  border-left-color: transparent;
}

.rp-note header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 14px;
  font-weight: 600;
}

.rp-note p {
  margin-top: 4px;
  color: var(--ink-2);
}

.rp-note ul {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  color: var(--ink-2);
}

.rp-note-act {
  margin-top: 6px;
  font-size: 14px;
}

.rp-note-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

/* 挂在还没加进报告那一章的意见，先放在预审意见旁边 */
.rp-away {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rp-away:empty {
  display: none;
}

.rp-note-away {
  color: var(--ink-3) !important;
  font-size: 13px;
}

/* 方法旁注：蓝，默认露出 */
.rp-note-method header {
  color: var(--blue);
}

/* 审稿意见、Agent 的批注、注意：玫红 */
.rp-note-review header,
.rp-note-alert header,
.rp-note-pen header {
  color: var(--rose);
}

.rp-note-review header span {
  font-weight: 400;
}

.rp-note-pen header b {
  color: var(--ink);
}

.rp-note-review > p {
  color: var(--ink);
}

.rp-note-review .rp-note-act,
.rp-note-pen .rp-note-act {
  color: var(--rose);
}

.rp-note-review .rp-note-act:hover,
.rp-note-pen .rp-note-act:hover {
  color: var(--rose-deep);
}

.rp-pen-n {
  color: var(--rose);
  font-style: normal;
  font-weight: 600;
}

.rp-pen-eff {
  color: var(--rose) !important;
  font-weight: 500;
}

.rp-note-pen.is-off {
  opacity: 0.62;
}

.rp-note-pen.is-off header b {
  font-weight: 400;
  text-decoration: line-through;
}

.rp-note-state {
  color: var(--ink-3) !important;
  font-size: 13px;
}

/* 不带 Agent 时的数：灰，点开看差别来自哪里 */
.rp-delta {
  display: grid;
  gap: 2px;
  color: var(--ink-3);
}

.rp-delta-head {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
}

.rp-delta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}

.rp-delta-row span:first-child {
  text-decoration: underline dotted 1px;
  text-underline-offset: 3px;
}

.rp-delta-row:hover {
  color: var(--ink);
}

.rp-why-nums {
  margin-top: 6px;
  color: var(--ink-2);
}

.rp-why-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rp-why-list li {
  padding: 14px 16px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--canvas);
}

.rp-why-list p {
  margin-top: 2px;
  color: var(--ink-2);
}

/* ── 带 Agent 的几章 ─────────────────────────────────────────────── */

.rp-causes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  font: 14px/20px var(--font);
}

.rp-causes li {
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink-2);
}

.rp-causes li.is-hit {
  background: var(--rose-wash);
  color: var(--rose);
  font-weight: 500;
}

.rp-causes li.is-out {
  color: var(--ink-3);
  text-decoration: line-through;
}

.rp-causes small {
  margin-left: 8px;
  color: var(--ink-3);
  font-size: 12px;
}

.rp-ev {
  margin: 14px 0;
  padding: 16px 20px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--canvas);
  color: var(--ink-2);
  font: 15px/25px var(--font);
}

.rp-ev > p > b {
  margin-right: 4px;
  color: var(--ink);
  font-weight: 600;
}

.rp-ev-how {
  margin-top: 8px;
}

.rp-ev-how .rp-line-k {
  color: var(--blue);
}

.rp-verdict {
  padding-left: 14px;
  border-left: 2px solid var(--rose);
}

.rp-qa {
  display: grid;
  gap: 4px;
  margin: 22px 0;
}

/* 修改说明 */
.rp-reply {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rp-reply:last-child {
  border-bottom: 0;
}

.rp-reply b {
  color: var(--ink-3);
  font: 500 14px/32px var(--font);
}

/* 附录：这份数据能做什么 */
.rp-suit {
  width: 100%;
  border-collapse: collapse;
  font: 15px/23px var(--font);
}

.rp-suit th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.rp-suit td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.rp-suit :is(th, td):first-child {
  padding-left: 0;
}

.rp-suit :is(th, td):last-child {
  padding-right: 0;
}

.rp-suit-cat td {
  padding-top: 22px;
  color: var(--ink-2);
  font-weight: 600;
}

.rp-suit tr.is-no td {
  color: var(--ink-3);
}

.rp-suit-st {
  display: block;
}

.rp-refs {
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 25px;
}

/* 文献表照 APA：按作者排，每条悬挂缩进 */
.rp-refs li {
  padding-left: 2em;
  text-indent: -2em;
  scroll-margin-top: calc(var(--header) + 16px);
}

.rp-refs a {
  overflow-wrap: anywhere;
}

/* 没付款：正文换成一张付款卡 */
.rp-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 24px 60px;
}

.rp-locked-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
}

/* ── 审稿信：一张白卡，按大修、小修、建议分节 ─────────────────────── */

.rp-letter {
  max-width: 880px;
  margin: 24px auto 0;
  padding: 52px 56px 56px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--paper);
  box-shadow: var(--shadow-1);
  font: 16px/27px var(--font);
}

.rp-letter-top {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}

.rp-letter-kind {
  color: var(--rose);
  font-size: 15px;
  font-weight: 600;
}

.rp-letter-title {
  margin: 8px 0 4px;
  font: 600 clamp(24px, 2.4vw, 32px) / 1.3 var(--serif);
  letter-spacing: -0.01em;
}

.rp-letter-group {
  margin-top: 44px;
}

.rp-letter-h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--rose);
  font-size: 22px;
  line-height: 30px;
}

.rp-letter-item {
  margin-top: 28px;
  scroll-margin-top: calc(var(--header) + 16px);
}

.rp-letter-h3 {
  display: flex;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 27px;
}

.rp-letter-at {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 22px;
}

.rp-letter-item > .rp-p {
  margin-top: 8px;
  font-size: 17px;
  line-height: 28px;
}

.rp-letter-opts {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rp-letter-opts li {
  padding: 16px 18px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--canvas);
  font-size: 15px;
  line-height: 24px;
}

.rp-letter-opts li.is-current {
  background: var(--paper-2);
}

.rp-letter-opts li.is-current .tag {
  background: var(--paper);
}

.rp-letter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rp-letter-act {
  margin-left: auto;
}

.rp-letter-k {
  display: inline-block;
  min-width: 3.5em;
  margin-right: 8px;
  color: var(--ink-3);
  font-size: 14px;
}

.rp-letter .rp-h3 {
  font-family: var(--font);
}

/* ── 底部：这一稿攒的改动，一张浮在底部的白卡 ─────────────────────── */

.rp-dock {
  position: fixed;
  /* 浮在底部那一条的上面 */
  bottom: calc(16px + var(--tools) + 12px);
  left: 50%;
  z-index: 45;
  width: min(900px, calc(100vw - 32px));
  translate: -50% 0;
  animation: fade-up 240ms var(--ease);
}

.rp-dock-in {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 14px 14px 24px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--paper);
  box-shadow: var(--halo), var(--shadow-3);
}

.rp-dock-main {
  flex: 1;
  min-width: 0;
}

.rp-dock-head {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 20px;
}

.rp-dock-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  margin-top: 8px;
  overflow: auto;
}

.rp-dock-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding-left: 12px;
  border-radius: 16px;
  background: var(--blue-wash);
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
}

.rp-dock-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-dock-item .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.rp-dock-act {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rp-dock-left {
  color: var(--rose);
  font-size: 14px;
  white-space: nowrap;
}

/* ── 换变量的小弹层 ──────────────────────────────────────────────── */

.rp-pop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 300px;
  max-height: 400px;
  padding: 8px;
  overflow: auto;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--paper);
  box-shadow: var(--shadow-3);
  font: 15px/22px var(--font);
  animation: fade-up 160ms var(--ease);
}

.rp-pop-head {
  padding: 6px 12px 8px;
  color: var(--ink-3);
  font-size: 13px;
}

.rp-pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: calc(10px * var(--sq));
  corner-shape: squircle;
  cursor: pointer;
  transition: background-color 140ms var(--ease);
}

.rp-pop-item:hover {
  background: var(--paper-2);
}

.rp-pop-item input {
  margin: 0;
  accent-color: var(--blue);
}

.rp-pop .btn {
  position: sticky;
  bottom: 0;
  margin-top: 8px;
}

/* ── 进度：舞台上一张浮卡 ───────────────────────────────────────── */

.rp-progress {
  display: grid;
  place-items: center;
  min-height: min(720px, calc(100dvh - var(--header) - 2 * var(--inset)));
  margin-bottom: 104px;
  padding: 64px var(--gutter);
}

.rp-progress-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: min(580px, 100%);
  padding: 36px 40px;
}

.rp-progress-title {
  font-weight: 600;
}

.rp-steps {
  display: grid;
  gap: 2px;
  width: 100%;
  margin-top: 6px;
}

.rp-step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rp-step:last-child {
  border-bottom: 0;
}

.rp-step-mark {
  position: relative;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}

.rp-step[data-state="on"] .rp-step-mark {
  border: 2px solid var(--blue);
  border-right-color: transparent;
  box-shadow: none;
  animation: spin 800ms linear infinite;
}

.rp-step[data-state="done"] .rp-step-mark {
  background: var(--blue);
  box-shadow: none;
}

.rp-step[data-state="failed"] .rp-step-mark {
  background: var(--rose);
  box-shadow: none;
}

.rp-step-label {
  color: var(--ink-3);
  font-size: 16px;
  line-height: 24px;
}

.rp-step[data-state="on"] .rp-step-label {
  color: var(--ink);
  font-weight: 600;
}

.rp-step[data-state="done"] .rp-step-label {
  color: var(--ink);
}

.rp-step-detail {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 21px;
}

.rp-step-detail:empty {
  display: none;
}

.rp-progress-fail {
  display: grid;
  gap: 14px;
  justify-items: start;
  width: 100%;
}

.rp-progress-card > .notice {
  align-self: stretch;
}

/* ── 窄屏 ─────────────────────────────────────────────────────────── */

@media (max-width: 1240px) {
  .rp-sheet {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 40px;
  }

  .rp-text {
    padding-right: 0;
  }

  /* 页边落到正文下面，上面一道分隔线 */
  .rp-margin {
    margin-top: 24px;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .rp-margin:not(:has(.rp-note, .rp-delta)) {
    display: none;
  }
}

@media (max-width: 1000px) {
  .rp-cover-in {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .rp-desk {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 8px;
  }

  /* 右栏排到稿件前面，随页面滚走，不贴在顶栏下面（不做第二道顶栏）：预审意见的卡在上，问题收成一排，横着划 */
  .rp-rail {
    order: -1;
    position: static;
    gap: 8px;
    max-height: none;
  }

  .rp-side {
    margin-inline: calc(-1 * var(--inset));
    padding: 8px var(--inset);
  }

  .rp-side-card {
    padding: 6px;
  }

  .rp-side-head {
    display: none;
  }

  .rp-cards {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rp-card {
    flex: none;
    width: auto;
    max-width: 240px;
    padding: 8px 12px;
  }

  .rp-card .rp-card-a,
  .rp-card .rp-card-w {
    display: none;
  }

  .rp-card .rp-card-q {
    white-space: nowrap;
  }

  .rp-row {
    scroll-margin-top: calc(var(--header) + 76px);
  }

  .rp-rv-items {
    max-height: none;
  }

  .rp-pages {
    gap: 56px;
  }

  .rp-letter {
    padding: 28px 20px 36px;
  }

  .rp-dock-in {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .rp-dock-act {
    justify-content: flex-end;
  }

  .rp-progress {
    padding-block: 32px;
  }

  .rp-progress-card {
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  .rp-cover {
    padding-block: 28px;
  }

  .rp-cover-in {
    padding-inline: 18px;
  }

  .rp-head {
    font-size: 17px;
    line-height: 28px;
  }

  /* 浮条贴着屏幕底边，按钮收紧，一屏放得下 */
  .rp-tools {
    bottom: 8px;
    max-width: calc(100vw - 16px);
  }

  /* 手机上不放设置（里面只有行号开关；照上次在这台设备上选的，默认不显示），浮条才放得下 */
  .rp-tools-icon {
    display: none;
  }

  .rp-rv-panel {
    top: calc(var(--header) + 8px);
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }

  .rp-rv-head {
    padding-left: 20px;
  }

  .rp-rv-body {
    padding-inline: 20px;
  }

  .rp-tools-rule {
    display: none;
  }

  .rp-tools .seg {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }

  .rp-ask-btn {
    height: 40px;
    gap: 6px;
    padding: 0 6px 0 10px;
    font-size: 14px;
  }

  .rp-compare-btn {
    padding-right: 10px;
  }

  .rp-ask-n {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-size: 13px;
  }

  .rp-sheet {
    padding: 22px 16px 22px 36px;
  }

  .rp-text {
    font-size: 16px;
    line-height: 30px;
  }

  .rp-ln {
    width: 24px;
  }

  /* 意见的等级和行号单占一行，题目不挤 */
  .rp-item-head {
    flex-wrap: wrap;
    gap: 0 10px;
  }

  .rp-item-tag {
    order: -1;
    width: 100%;
    margin-left: 0;
  }
}
