/* Shared paper-↔-CAPI crosswalk styles (F1/F3/F4/F2). Pairs with docs.css. */
.legend {
  display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 4px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); font-size: 14px; color: var(--muted);
}
.legend b { color: var(--ink); }

.xsection {
  margin: 34px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--primary);
  font-size: 19px; font-weight: 700; color: var(--primary-dark); letter-spacing: -0.01em;
}

/* per-question row (paper | CAPI | note) */
.xrow {
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm); margin: 16px 0; overflow: hidden;
}
.xrow-head {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px;
  background: var(--paper); border-bottom: 1px solid var(--hairline);
}
.qbadge {
  flex: none; font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--primary); border-radius: 999px; padding: 2px 10px;
}
.qtitle { font-size: 15px; font-weight: 600; color: var(--ink); }
.xcols { display: grid; grid-template-columns: 1fr 1fr; }
.xcol { padding: 16px; }
.xcol.paper { border-right: 1px solid var(--hairline); }
.xcol h4 {
  margin: 0 0 10px; font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.qtext { font-size: 15px; margin: 0 0 10px; }
.opts { list-style: none; margin: 0; padding: 0; }
.opts li { position: relative; padding-left: 26px; margin: 0 0 6px; font-size: 14.5px; }
.opts li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px;
  border: 1.5px solid var(--hairline-strong); border-radius: 3px; background: #fff;
}
.opts.radio li::before { border-radius: 50%; }

/* CAPI screenshot slot */
.capi-shot {
  border: 2px dashed var(--hairline-strong); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg,#fbfcf9,#fbfcf9 10px,#f4f7f0 10px,#f4f7f0 20px);
  min-height: 150px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 6px; padding: 18px; color: var(--muted);
}
.capi-shot svg { opacity: 0.5; }
.capi-shot .ph { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.capi-shot-link { display: block; line-height: 0; }
.capi-img { width: 100%; height: auto; border: 1px solid var(--hairline-strong); border-radius: 6px; background: #fff; }
.capi-cap { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

.xnote {
  display: flex; gap: 9px; padding: 11px 16px; background: rgba(229,178,59,0.09);
  border-top: 1px solid var(--hairline); font-size: 13.5px; color: var(--ink);
}
.xnote b { color: var(--primary-dark); }
.xnote .tag {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a6500;
}

/* end-of-section: printed page(s) ↔ CAPI screen-page */
.xpage {
  border: 1px solid var(--primary); border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: var(--shadow-md); margin: 16px 0 8px; overflow: hidden;
}
.xpage-head { padding: 12px 16px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.xpage-cols { display: grid; grid-template-columns: 1fr 1fr; }
.xpage-col { padding: 16px; }
.xpage-col.paper { border-right: 1px solid var(--hairline); }
.xpage-col h4 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.page-img-link { display: block; line-height: 0; margin-bottom: 10px; }
.page-img-link:last-child { margin-bottom: 0; }
.page-img { display: block; width: 100%; height: auto; border: 1px solid var(--hairline-strong); border-radius: 6px; background: #fff; }
.flow-ph {
  border: 2px dashed var(--hairline-strong); border-radius: 6px;
  background: repeating-linear-gradient(135deg,#fbfcf9,#fbfcf9 10px,#f4f7f0 10px,#f4f7f0 20px);
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 28px 18px; color: var(--muted);
}
.flow-ph svg { opacity: 0.5; }
.flow-ph .ph { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.pcap { font-size: 13px; color: var(--muted); margin: 9px 0 0; }

@media (max-width: 680px) {
  .xcols, .xpage-cols { grid-template-columns: 1fr; }
  .xcol.paper, .xpage-col.paper { border-right: none; border-bottom: 1px solid var(--hairline); }
}
