/* Scoped to the calculator so host themes and other widgets are unaffected. */
.rpc { --rpc-ink:#183040; --rpc-accent:#14645e; --rpc-line:#cbd8dc; color:var(--rpc-ink); background:#fff; border:1px solid var(--rpc-line); border-radius:16px; padding:clamp(16px,4vw,32px); max-width:900px; margin:24px auto; font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color-scheme:light; }
.rpc *, .rpc *::before, .rpc *::after { box-sizing:border-box; }
.rpc [hidden] { display:none !important; }
.rpc h2 { font:700 clamp(24px,4vw,32px)/1.2 system-ui,sans-serif; margin:0 0 12px; color:var(--rpc-ink); }
.rpc h3 { font:700 22px/1.3 system-ui,sans-serif; margin:24px 0 12px; color:var(--rpc-ink); }
.rpc p { margin:12px 0; }
.rpc fieldset { min-width:0; padding:18px 0; margin:16px 0 0; border:0; border-top:1px solid var(--rpc-line); }
.rpc legend { padding:0 10px 0 0; font-weight:700; font-size:18px; }
.rpc .rpc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:18px; margin:12px 0; padding:0; }
.rpc .rpc-field { display:flex; flex-direction:column; gap:6px; margin:0; font-weight:600; min-width:0; }
.rpc small { display:block; font-size:13px; line-height:1.45; font-weight:400; color:#49616f; }
.rpc input, .rpc select { display:block; width:100%; max-width:100%; min-height:46px; margin:0; border:1px solid #879fa9; border-radius:6px; background:#fff; color:var(--rpc-ink); padding:10px 12px; font:inherit; box-shadow:none; }
.rpc input:focus-visible, .rpc select:focus-visible, .rpc button:focus-visible, .rpc summary:focus-visible { outline:3px solid #bd6a17; outline-offset:3px; }
.rpc details { border-top:1px solid var(--rpc-line); padding:16px 0; }
.rpc summary { cursor:pointer; font-weight:600; }
.rpc .rpc-actions { display:flex; flex-wrap:wrap; gap:12px; margin:12px 0 20px; }
.rpc button { cursor:pointer; background:var(--rpc-accent); color:#fff; border:1px solid var(--rpc-accent); border-radius:6px; padding:11px 18px; font:600 16px/1.4 system-ui,sans-serif; text-transform:none; letter-spacing:normal; min-height:46px; }
.rpc button.rpc-secondary { color:var(--rpc-ink); background:#fff; border-color:#879fa9; }
.rpc .rpc-card { padding:16px; border:1px solid var(--rpc-line); border-radius:8px; background:#f2f7f7; min-width:0; }
.rpc dt { font-size:14px; font-weight:500; }
.rpc dd { font-size:25px; font-weight:700; margin:4px 0; overflow-wrap:anywhere; }
.rpc .rpc-status { padding:12px 16px; background:#fff7e8; border-left:4px solid #a35c11; }
.rpc .rpc-error { color:#8a221d; font-weight:600; }
.rpc .rpc-method { font-size:14px; margin-top:24px; }
@media print { .rpc { border:0; margin:0; padding:0; } .rpc .rpc-actions { display:none; } .rpc .rpc-card { break-inside:avoid; } }

.rpc .rpc-card-danger { border-color:#b33630; background:#fff2f0; }
.rpc .rpc-card-danger dd, .rpc .rpc-card-danger small { color:#9b241f; }
.rpc .rpc-card-caution { border-color:#a56a13; background:#fff8e9; }
.rpc .rpc-card-caution dd, .rpc .rpc-card-caution small { color:#805000; }

.rpc .rpc-primary { grid-column:1 / -1; border:2px solid var(--rpc-accent); background:#eaf5f3; }
.rpc .rpc-primary dt { font-size:18px; font-weight:700; }
.rpc .rpc-primary dd { font-size:clamp(36px,6vw,48px); line-height:1.2; margin:10px 0; }
.rpc .rpc-primary small + small { margin-top:8px; font-weight:600; }

.rpc .rpc-primary.rpc-card-caution { border-color:#a56a13; background:#fff8e9; }

.rpc .rpc-status-danger { background:#fff2f0; border-color:#b33630; color:#9b241f; font-weight:600; }
.rpc .rpc-status-info { background:#f2f7f7; border-color:#879fa9; }
.rpc .rpc-primary.rpc-card-danger { border-color:#b33630; background:#fff2f0; }
.rpc .rpc-guidance, .rpc .rpc-explanation { font-size:14px; }
