/* Shared content geometry; wallet state, chart geometry and visibility stay page-owned. */
body.xrbc-polished { --xrbc-content-gap: clamp(12px, 1.5vw, 22px); }
body.xrbc-polished main { min-width: 0; }
body.xrbc-polished main :is(section, article, aside, form, fieldset, details, .card) { min-width: 0; box-sizing: border-box; }
body.xrbc-polished main :is(h1,h2,h3,p,li,dd,label,a,code) { overflow-wrap: anywhere; }
body.xrbc-polished main :is(input,select,textarea) { max-width: 100%; box-sizing: border-box; }
body.xrbc-polished main :is(.table-wrap,.table-wrapper,.table-scroll) { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
body.xrbc-polished main :is(.control-grid,.summary-grid,.principle-grid,.source-grid,.risk-grid,.tool-grid) { align-items: start; }
body.xrbc-polished main :is(img,video) { max-width: 100%; }
body.xrbc-polished :is(main [id], footer [id]) { scroll-margin-top: 18px; }
body.xrbc-polished :target { outline-offset: 4px; }
body.xrbc-polished .xrbc-protocol-summary { grid-column: 1 / -1; margin-block: 16px; padding: 16px; border: 1px solid var(--line,#526477); border-radius: 12px; }
body.xrbc-polished .xrbc-protocol-summary summary { cursor: pointer; font-weight: 700; }
body.xrbc-polished .xrbc-protocol-summary table { width: 100%; border-collapse: collapse; }
body.xrbc-polished .xrbc-protocol-summary :is(th,td) { padding: 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line,#526477); }
/* A bounded reading indicator; it does not imply ledger progress or settlement. */
body.xrbc-polished .xrbc-protocol-summary[aria-busy="true"] button::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: xrbc-protocol-reading 1s steps(24) infinite; }
@keyframes xrbc-protocol-reading { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  body.xrbc-polished :is(main [id], footer [id]) { scroll-margin-top: 78px; }
  body.xrbc-polished main :is(.control-grid,.summary-grid,.principle-grid,.source-grid,.risk-grid,.tool-grid) { grid-template-columns: minmax(0,1fr); }
  body.xrbc-polished main :is(.wp-shell,.policy-shell) { width: 100%; }
  body.xrbc-polished main :is(button,.btn) { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  body.xrbc-polished { scroll-behavior: auto; }
  body.xrbc-polished .xrbc-protocol-summary[aria-busy="true"] button::before { animation: none; }
}
