/* Opt-in to the two text-processing tools; shared site/navigation stays unchanged. */
.text-processing-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.text-processing-page .inner-intro { max-width: 900px; margin-top: 0; padding: 24px 0 16px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.text-processing-page .inner-intro h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.text-processing-page .inner-intro > p { margin-top: 12px; font-size: 17px; }
.text-processing-page .inner-intro .page-kicker { display: none; }
.processing-toc { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 24px; font-size: 14px; }
.text-processing-page .tool-card-main { padding: 24px; }
.text-processing-page .checker-textarea { min-height: 140px; }
.text-processing-page .tool-topline { align-items: center; }
.space-options, .type-selection { min-width: 0; padding: 0; margin: 24px 0 0; border: 0; }
.space-options legend, .type-selection legend { margin-bottom: 8px; font-size: 15px; font-weight: 650; }
.space-options > p, .field-help { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.space-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.space-choice-grid label { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; cursor: pointer; }
.space-choice-grid label:has(input:checked) { border-color: var(--blue); background: #f1f5ff; }
.space-choice-grid input, .result-radio input, .position-choice input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--blue); }
.space-choice-grid code { display: block; color: var(--muted); font-size: 12px; }
.rule-static { align-self: center; font-size: 14px; color: var(--muted); }
.result-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; min-width: 0; border: 0; padding: 0; margin: 0; }
.result-choice { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.result-choice[data-active="true"] { border-color: var(--blue); background: #f1f5ff; box-shadow: inset 0 3px var(--blue); }
.result-radio { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 650; cursor: pointer; }
.active-result-note { margin-top: 16px; font-size: 14px; font-weight: 600; }
.text-processing-page .report-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 16px 24px; }
.text-processing-page .report-actions output { flex-basis: 100%; font-size: 14px; }
.text-processing-page button:disabled { cursor: default; opacity: .45; }
.whitespace-comparison { border-block: 1px solid var(--line); padding-block: 16px; }
.whitespace-comparison summary { cursor: pointer; font-weight: 600; }
.whitespace-comparison p { margin: 12px 0; font-size: 14px; color: var(--muted); }
.whitespace-comparison .result-comparison > div { min-width: 0; }
.visible-whitespace { white-space: pre-wrap; overflow-wrap: anywhere; }
.ledger-title { margin-top: 28px; margin-bottom: 8px; }
.processing-ledger { margin-top: 16px; }
.ledger-pagination, .selection-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 12px; }
.ledger-pagination { justify-content: space-between; font-size: 13px; }
.processing-table { width: 100%; min-width: 0; table-layout: fixed; }
.processing-table td, .processing-table th { overflow-wrap: anywhere; }
.processing-table th:first-child { width: 20%; }
.processing-table td { font-size: 14px; }
.position-context { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 ui-monospace, monospace; margin-top: 4px; unicode-bidi: isolate; }
.position-choice { display: flex; gap: 10px; min-height: 44px; align-items: center; cursor: pointer; }
.text-processing-page .removal-row { padding-block: 12px; }
.removal-identity small { display: block; font-size: 13px; color: var(--muted); }
.text-processing-page .change-grid { margin-top: 24px; }
@media (max-width: 640px) {
  .text-processing-page .inner-intro { padding: 18px 0 12px; }
  .text-processing-page .inner-intro > p { font-size: 16px; line-height: 24px; }
  .processing-toc { margin-bottom: 16px; gap: 8px 20px; }
  .text-processing-page .tool-card-main, .text-processing-page .tool-card-aside { padding: 16px; }
  .text-processing-page .tool-topline { flex-wrap: wrap; gap: 8px; }
  .space-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .space-choice-grid label { padding: 10px; font-size: 13px; }
  .result-comparison { grid-template-columns: 1fr; gap: 12px; }
  .result-choice { padding: 12px; }
  .text-processing-page .change-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .processing-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .processing-table, .processing-table tbody, .processing-table tr, .processing-table td { display: block; width: 100%; }
  .processing-table tr { padding-block: 12px; border-top: 1px solid var(--line); }
  .processing-table td { padding: 6px 8px; border: 0; }
  .processing-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
  .processing-table .position-choice { min-height: 44px; }
  .ledger-pagination { gap: 8px; }
  .ledger-pagination span { order: -1; flex-basis: 100%; text-align: center; }
}

.text-processing-page .checker-results { scroll-margin-top: 20px; }
