.math-bitwise-table{font-family:SF Mono,Fira Code,Consolas,monospace;font-size:14px;line-height:2;margin:8px 0;padding:12px 16px;background:var(--math-surface-alt);border-radius:var(--math-radius-sm);border:1px solid var(--math-border-light)}.math-bitwise-row{display:flex;align-items:center;gap:8px}.math-bitwise-label{width:36px;text-align:right;font-weight:700;color:var(--math-text-soft);flex-shrink:0}.math-bitwise-divider{height:2px;background:var(--math-primary);margin:4px 0;border-radius:1px}.math-bitwise-result{color:var(--math-primary);font-weight:700}.math-bw-summary-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:14px;background:linear-gradient(135deg,#c01c8e14,#fbbf2412);border:1px solid var(--math-border-light);border-radius:var(--math-radius-sm)}.math-bw-summary-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 320px}.math-bw-summary-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--math-text-muted);font-weight:600}.math-bw-summary-value{background:transparent;padding:0;font-size:22px;font-weight:700;color:#7d0f5e;font-family:SF Mono,Monaco,Consolas,monospace;word-break:break-word}.math-bw-summary-sub{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;color:var(--math-text-muted)}.math-bw-summary-sub i{margin-right:3px;color:var(--math-primary);opacity:.8}.math-bw-summary-sub code{background:#c01c8e14;color:#7d0f5e;padding:1px 6px;border-radius:4px;font-size:11.5px}.math-bw-summary-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.math-bw-op-badge,.math-bw-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:var(--math-radius-full);font-size:12px;font-weight:600;border:1px solid var(--math-border-light);background:#fff;color:var(--math-text-soft)}.math-bw-op-badge code{background:#c01c8e26;color:#7d0f5e;padding:0 5px;border-radius:3px;font-size:11px;font-weight:700}.math-bw-op-badge[data-op=and]{background:#10b9811f;color:#047857;border-color:#10b98159}.math-bw-op-badge[data-op=or]{background:#0ea5e91f;color:#0369a1;border-color:#0ea5e94d}.math-bw-op-badge[data-op=xor]{background:#a855f71f;color:#7c3aed;border-color:#a855f74d}.math-bw-op-badge[data-op=not]{background:#ef44441f;color:#b91c1c;border-color:#ef44444d}.math-bw-op-badge[data-op=shl],.math-bw-op-badge[data-op=shr]{background:#fbbf2424;color:#92400e;border-color:#fbbf2459}.math-bw-panel{padding:14px 16px;margin-bottom:12px;background:#fff;border:1px solid var(--math-border-light);border-radius:var(--math-radius-sm)}.math-bw-panel:empty{display:none}.math-bw-panel-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;font-weight:700;color:var(--math-primary-hover);margin-bottom:12px}.math-bw-panel-title i{color:var(--math-primary)}.math-bw-col-grid{display:flex;flex-direction:column;gap:4px;font-family:SF Mono,Monaco,Consolas,monospace;overflow-x:auto}.math-bw-col-row{display:grid;grid-template-columns:40px repeat(var(--math-bw-bits, 8),minmax(24px,1fr));gap:3px;align-items:center}.math-bw-col-grid[data-bits="8"] .math-bw-col-row{grid-template-columns:40px repeat(8,minmax(26px,1fr))}.math-bw-col-grid[data-bits="16"] .math-bw-col-row{grid-template-columns:40px repeat(16,minmax(22px,1fr))}.math-bw-col-grid[data-bits="32"] .math-bw-col-row{grid-template-columns:40px repeat(32,minmax(18px,1fr))}.math-bw-col-label{font-size:11px;font-weight:700;color:var(--math-text-muted);text-align:right;padding-right:6px;font-family:system-ui,sans-serif}.math-bw-col-cell{display:flex;align-items:center;justify-content:center;height:32px;background:var(--math-surface-alt);border:1px solid var(--math-border-light);border-radius:4px;font-size:13px;font-weight:700;color:var(--math-text-soft)}.math-bw-col-cell.bw-bit-1{background:#10b98126;color:#047857;border-color:#10b98159}.math-bw-col-cell.bw-bit-0{background:#94a3b81f;color:#475569;border-color:#94a3b84d}.math-bw-col-cell-pos{background:transparent!important;border:none!important;font-size:10px;font-weight:600;color:var(--math-text-muted);height:18px}.math-bw-col-row-pos{margin-bottom:2px}.math-bw-col-divider{position:relative;display:flex;align-items:center;margin:6px 0 2px 46px;height:16px}.math-bw-col-divider:before{content:"";position:absolute;left:0;right:0;top:50%;height:2px;background:var(--math-primary);border-radius:1px}.math-bw-col-divider[data-op=AND]:before{background:#10b981}.math-bw-col-divider[data-op=OR]:before{background:#0ea5e9}.math-bw-col-divider[data-op=XOR]:before{background:#a855f7}.math-bw-col-divider span{position:relative;z-index:1;background:#fff;padding:0 8px;font-size:12px;font-weight:700;color:var(--math-primary-hover);border:1px solid var(--math-border-light);border-radius:4px;font-family:SF Mono,Monaco,Consolas,monospace}.math-bw-col-row-result .math-bw-col-cell.bw-result.is-highlight{box-shadow:0 0 0 2px #10b98159}.math-bw-col-cell-arrow{background:transparent!important;border:none!important;color:var(--math-primary);font-weight:400;font-size:14px}.math-bw-breakdown-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.math-bw-breakdown-cell{display:flex;align-items:center;gap:6px;padding:8px 10px;background:var(--math-surface-alt);border:1px solid var(--math-border-light);border-radius:6px;font-size:12px;font-family:SF Mono,Monaco,Consolas,monospace}.math-bw-breakdown-cell.is-set{background:#10b9811a;border-color:#10b9814d}.math-bw-bd-pos{font-family:system-ui,sans-serif;font-size:10.5px;font-weight:700;color:var(--math-text-muted);text-transform:uppercase;letter-spacing:.05em;flex:0 0 auto}.math-bw-bd-expr{background:transparent;padding:0;color:var(--math-text)}.math-bw-bd-op{color:var(--math-primary);font-weight:700;font-family:system-ui,sans-serif;font-size:10.5px;margin:0 2px}.math-bw-bd-eq{color:var(--math-text-muted)}.math-bw-bd-res{background:transparent;padding:1px 6px;border-radius:4px;font-weight:700}.math-bw-bd-res.is-one{background:#10b98133;color:#047857}.math-bw-bd-res.is-zero{background:#94a3b826;color:#475569}.math-bw-truth-wrap{display:flex;justify-content:center;overflow-x:auto}.math-bw-truth-table{border-collapse:collapse;font-family:SF Mono,Monaco,Consolas,monospace;min-width:min(520px,100%);border-radius:6px;overflow:hidden}.math-bw-truth-table th{background:var(--math-primary);color:#fff;padding:10px 24px;font-size:13px;font-weight:700;border:1px solid var(--math-primary);text-align:center;min-width:80px}.math-bw-truth-table td{padding:10px 24px;text-align:center;font-size:16px;font-weight:700;border:1px solid var(--math-border-light);min-width:80px}.math-bw-truth-table td.bw-cell.bw-1{background:#10b98126;color:#047857}.math-bw-truth-table td.bw-cell.bw-0{background:#94a3b81f;color:#475569}.math-bw-fmt-table-wrap{overflow-x:auto}.math-bw-fmt-table{width:100%;border-collapse:collapse;font-size:12.5px}.math-bw-fmt-table th{text-align:left;padding:6px 10px;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--math-text-muted);background:var(--math-surface-alt);border-bottom:1px solid var(--math-border-light)}.math-bw-fmt-table td{padding:6px 10px;border-bottom:1px solid var(--math-border-light);font-family:SF Mono,Monaco,Consolas,monospace;color:var(--math-text)}.math-bw-fmt-table th.math-bw-fmt-rowh{font-family:system-ui,sans-serif;background:transparent;font-weight:700;color:var(--math-text-muted);width:40px}.math-bw-fmt-table tr.is-result{background:#10b98112}.math-bw-fmt-table tr.is-result th.math-bw-fmt-rowh{color:#047857}.math-bw-fmt-table tr.is-result td{color:#047857;font-weight:700}.math-bw-fmt-table code{background:transparent;padding:0;font-size:12.5px}.math-bw-fmt-u{font-size:10.5px;color:var(--math-text-muted);margin-left:4px;font-family:system-ui,sans-serif}.math-bw-shift-list{display:flex;flex-direction:column;gap:6px}.math-bw-shift-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px;background:var(--math-surface-alt);border:1px solid var(--math-border-light);border-radius:6px;font-family:SF Mono,Monaco,Consolas,monospace;font-size:13px}.math-bw-shift-row.is-initial{background:#94a3b81a;border-color:#94a3b84d}.math-bw-shift-row.is-final{background:#fbbf241f;border-color:#fbbf2459}.math-bw-shift-step{flex:0 0 auto;font-family:system-ui,sans-serif;font-size:11.5px;font-weight:700;color:var(--math-text-muted);text-transform:uppercase;letter-spacing:.04em}.math-bw-shift-row.is-final .math-bw-shift-step{color:#92400e}.math-bw-shift-arrow{color:#d97706;font-weight:700;margin-left:2px;font-family:SF Mono,Monaco,Consolas,monospace}.math-bw-shift-bin{flex:1 1 auto;background:transparent;padding:0;color:var(--math-text);font-size:13px;font-weight:700;word-break:break-all}.math-bw-shift-meta{flex:1 1 100%;font-family:system-ui,sans-serif;font-size:11px;color:var(--math-text-muted)}.math-bw-shift-dropped code{background:#ef44441f;color:#b91c1c}.math-bw-shift-entered code{background:#10b98126;color:#047857}.math-bw-shift-meta code{padding:1px 5px;border-radius:3px;font-size:11px;margin:0 2px}.math-bw-usecase-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.math-bw-usecase{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:var(--math-surface-alt);border:1px solid var(--math-border-light);border-left:3px solid var(--math-primary);border-radius:6px}.math-bw-usecase-title{font-size:12.5px;font-weight:700;color:var(--math-text)}.math-bw-usecase-desc{font-size:12px;color:var(--math-text-soft);line-height:1.5}.math-bw-usecase-desc code{background:#c01c8e14;color:#7d0f5e;padding:1px 5px;border-radius:3px;font-size:11.5px}.math-bw-usecase-desc em{font-style:italic;color:var(--math-text);font-weight:600}.math-bw-usecase-code{background:#0f172a;color:#e2e8f0;padding:6px 10px;border-radius:4px;font-family:SF Mono,Monaco,Consolas,monospace;font-size:12px;word-break:break-word}@media(max-width:640px){.math-bw-summary-head{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px}.math-bw-summary-main{flex:0 0 auto;align-items:center;text-align:center}.math-bw-summary-sub,.math-bw-summary-meta{justify-content:center}.math-bw-summary-value{font-size:18px}.math-bw-col-grid[data-bits="16"] .math-bw-col-row{grid-template-columns:32px repeat(16,minmax(16px,1fr))}.math-bw-col-grid[data-bits="32"] .math-bw-col-row{grid-template-columns:32px repeat(32,minmax(14px,1fr))}.math-bw-col-cell{height:26px;font-size:11px}.math-bw-fmt-table{font-size:11.5px}.math-bw-fmt-table th,.math-bw-fmt-table td{padding:5px 7px}}
