/* Scoped, standalone; no global selectors, font downloads or animation dependency. */
.xr-demo{--xr-bg:#101724;--xr-ink:#edf3fb;--xr-muted:#a9bed1;--xr-line:#36485b;--xr-accent:#57d8ac;--xr-soft:#1d3140;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--xr-ink);line-height:1.48}
.xr-demo *, .xr-demo *::before,.xr-demo *::after{box-sizing:border-box}
.xr-page{max-width:1180px;margin:auto;padding:32px clamp(14px,4vw,48px)}
.xr-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.xr-logo{font-size:clamp(27px,4vw,42px);font-weight:850;letter-spacing:-.05em;margin:0}.xr-logo span{color:var(--xr-accent)}
.xr-tag{border:1px solid #4b696e;border-radius:100px;color:var(--xr-accent);padding:6px 13px;font-size:12px;font-weight:750}
.xr-subtitle{color:var(--xr-muted);max-width:660px;margin:10px 0 25px}
.xr-controls{border:1px solid var(--xr-line);border-radius:20px;padding:clamp(15px,3vw,26px);background:#172333;box-shadow:0 16px 50px #0002}
.xr-controls label{display:block;font-weight:730;margin:0 0 8px}.xr-controls select,.xr-controls textarea{display:block;width:100%;background:#0e1827;color:var(--xr-ink);border:1px solid #4b6277;border-radius:12px;padding:12px 13px;font:inherit}
.xr-controls select{margin-bottom:14px}.xr-controls textarea{font:500 13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;resize:vertical;min-height:122px;tab-size:2}
.xr-controls select:focus-visible,.xr-controls textarea:focus-visible,.xr-demo button:focus-visible,.xr-demo summary:focus-visible,.xr-table-wrap:focus-visible{outline:3px solid #8de7c4;outline-offset:3px}
.xr-runrow{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:15px}.xr-run{background:var(--xr-accent);color:#102b29;border:0;border-radius:12px;padding:12px 24px;font-weight:850;font-size:15px;cursor:pointer}.xr-run:disabled{opacity:.55;cursor:wait}.xr-run:not(:disabled):hover{background:#8aeac5}
.xr-hint{color:var(--xr-muted);font-size:12px}.xr-result{margin-top:25px}
.xr-shell{border:1px solid var(--xr-line);background:#142132;border-radius:22px;padding:clamp(14px,3vw,28px)}
.xr-eyebrow{font-size:11px;font-weight:850;letter-spacing:.16em;color:var(--xr-accent)}
.xr-heading{font-size:clamp(23px,3vw,31px);letter-spacing:-.04em;margin:9px 0}.xr-lead{color:var(--xr-muted);margin:4px 0 25px}
.xr-nav{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 2px 12px;margin-bottom:12px;scrollbar-width:thin}
.xr-step{flex:0 0 auto;max-width:230px;border:1px solid #475971;border-radius:11px;padding:11px 15px;background:#1d2d3e;color:#c6d4df;cursor:pointer;text-align:left;font:650 12px/1.45 system-ui}
.xr-step.is-active{border-color:var(--xr-accent);background:#1e4c4b;color:#e2fff1}
.xr-stage{background:#101b2b;border-radius:16px;border:1px solid #364858;padding:clamp(14px,2.5vw,25px);min-height:250px}
.xr-stage-count{font-size:11px;color:var(--xr-accent);font-weight:850;letter-spacing:.12em}
.xr-stage h3{font-size:clamp(18px,2.6vw,24px);margin:7px 0}.xr-desc{color:var(--xr-muted);margin:4px 0 17px}
.xr-stats{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:19px}
.xr-stat{background:#253b4a;border:1px solid #365467;padding:5px 11px;border-radius:9px;font-size:12px;color:#c4d3de}
.xr-stat strong{font-size:16px;color:white;margin-right:3px}
.xr-table-wrap{width:100%;overflow:auto;max-height:410px;border:1px solid #344a5b;border-radius:12px}
.xr-table{width:100%;border-collapse:collapse;font:13px/1.5 ui-monospace,SFMono-Regular,monospace;white-space:nowrap}
.xr-table th{text-align:left;background:#27384a;color:#c5d6e4;position:sticky;top:0;padding:11px 12px;border-bottom:1px solid #526574;font-weight:850}
.xr-table td{padding:9px 12px;border-bottom:1px solid #2b3a49;color:#ecf6fd}.xr-table tr:nth-child(even) td{background:#17283a}.xr-table tr:last-child td{border-bottom:0}
.xr-table td.xr-null{font-style:italic;color:#f6ba6e;background:#422c28a8}.xr-table .xr-empty{text-align:center;color:var(--xr-muted);padding:25px}
.xr-note{padding:9px 12px;border-left:3px solid #78b8cc;background:#1a3447;border-radius:0 9px 9px 0;overflow-wrap:anywhere;font-size:13px}
.xr-details{margin-top:16px}.xr-details summary{cursor:pointer;color:var(--xr-accent);font-weight:750;margin-bottom:11px}
.xr-warnings{border-left:3px solid #e6bd7c;background:#352e2a;padding:9px 16px;border-radius:8px;margin:0 0 22px}.xr-warnings p{margin:9px 0;font-size:13px}
.xr-refusal{padding:25px;border:1px solid #906c5c;border-radius:18px;background:#352a2a}.xr-refusal h2{font-size:23px;margin:9px 0}.xr-refusal p{color:#e7ceca;overflow-wrap:anywhere}.xr-refusal-mark{color:#fac294;font-size:13px;text-transform:uppercase;letter-spacing:.1em;font-weight:900}
.xr-refusal small,.xr-foot{color:var(--xr-muted);font-size:12px}.xr-foot{margin:19px 0 0}
.xr-status{color:var(--xr-muted);font-size:13px;min-height:21px;margin-top:10px}
@media(max-width:540px){.xr-page{padding:18px 10px}.xr-controls,.xr-shell{border-radius:14px}.xr-run{width:100%}.xr-stats{gap:5px}.xr-stat{font-size:11px}.xr-stage{padding:12px}.xr-step{max-width:175px}.xr-table{font-size:11px}}
@media(prefers-reduced-motion:reduce){.xr-demo *{scroll-behavior:auto!important}}

/* The trainer's inspector is much narrower than the standalone X-Ray page. */
.xr-embedded{min-width:0;max-width:100%;overflow-wrap:anywhere}
.xr-embedded :is(.xr-shell,.xr-stage,.xr-refusal){min-width:0;padding:10px;border-radius:7px}
.xr-embedded :is(.xr-heading,.xr-refusal h2){font-size:17px;letter-spacing:0}
.xr-embedded :is(.xr-lead,.xr-desc,.xr-foot){font-size:12px;margin-bottom:8px}
.xr-embedded .xr-nav{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;overflow:visible;padding:0 0 8px;margin-bottom:0}
.xr-embedded .xr-step{max-width:none;padding:6px 8px;border-radius:5px;white-space:normal}
.xr-embedded .xr-stage{min-height:0}
.xr-embedded .xr-stage h3{font-size:15px}
.xr-embedded .xr-table-wrap{max-width:100%;border-radius:5px}
.xr-embedded .xr-table :is(th,td){padding:5px 7px}
