.cubical-panel { padding: 1.5rem; margin-top: 1.5rem; }
button:disabled { cursor: default; }
.cubical-panel .kernel-term { overflow-x: auto; padding: 1rem; margin-bottom: 1rem; }
#syntax { width: 100%; min-height: 24rem; font-family: monospace; }
#trace-fallback { width: 100%; font-family: monospace; }
#context .context-entry { display: flex; align-items: baseline; gap: .6rem; }
#context .context-entry > span { font-family: monospace; }
.term-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.term-heading [role="group"] { display: flex; flex-wrap: wrap; gap: .4rem; }
.reduction-site { background: #fff0b8; outline: 1px dashed #a66a0a; cursor: pointer; border-radius: 3px; }
.reduction-site:hover, .reduction-site:focus { background: #ffd879; outline: 2px solid #805004; }
[data-reduction][aria-pressed="true"] { background: #fff0b8; border-color: #a66a0a; }
.assembly-roots, .assembly-table { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.assembly-roots { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1rem 0; }
.assembly-math { display: grid; gap: .4rem; margin: .8rem 0; }
.assembly-math-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: center; gap: .6rem; }
.assembly-math-row > span { font-size: .8rem; color: #5b665b; }
.assembly-math-row > .kernel-term.typeset { padding: 8px 12px; }
.assembly-scroll { overflow: auto; max-height: 65vh; border: 1px solid #dce2dc; border-radius: 6px; }
.assembly-table { border-collapse: collapse; width: 100%; }
.assembly-table th, .assembly-table td { text-align: left; vertical-align: top; padding: .6rem; border-bottom: 1px solid #dce2dc; }
.assembly-table th { position: sticky; top: 0; background: #edf5e9; z-index: 1; }
.assembly-table td:nth-child(-n+4) { white-space: nowrap; }
.assembly-table td:last-child { overflow-wrap: anywhere; min-width: 12rem; }
.assembly-reference { border: 0; padding: 0 .15rem; text-decoration: underline; background: transparent; font: inherit; }
.assembly-table tr.selected { background: #fff0b8; outline: 2px solid #a66a0a; outline-offset: -2px; }
.assembly-definition-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.assembly-definition-actions button { font-size: .75rem; }
#kernel-controls { min-width: 0; border: 1px solid #dce2dc; border-radius: 6px; margin: 1rem 0; }
#kernel-controls .toolbar { flex-wrap: wrap; }
#kernel-selection { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.kernel-preview { padding: .7rem; background: #edf5e9; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; overflow-wrap: anywhere; }
.kernel-operand { display: flex; flex-wrap: wrap; gap: .3rem; }
.assembly-table tr.current-occurrence { background: #edf5e9; box-shadow: inset 4px 0 #3f7f4a; }
#kernel-budget { width: 8rem; }
#kernel-rule { max-width: 100%; }
#kernel-tree { margin: .8rem 0; }
#kernel-tree-content { overflow: auto; max-height: 28rem; }
.native-tree, .native-tree ul { padding-left: 1.25rem; list-style: none; }
.native-tree ul { border-left: 1px solid #c9d7c9; }
.native-tree li { margin: .35rem 0; }
.native-tree details { margin: 0; }
.native-tree-node { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.native-tree-node button { margin-left: .6rem; padding: .1rem .4rem; font-size: .75rem; }

.graph-listing { list-style: none; padding: 0; margin: 0; max-height: 65vh; overflow: auto; border: 1px solid #dce2dc; border-radius: 6px; }
.graph-row { padding: .55rem .7rem; border-bottom: 1px solid #dce2dc; }
.graph-row.selected { background: #fff0b8; outline: 2px solid #a66a0a; outline-offset: -2px; }
.graph-row.graph-root { border-left: 4px solid #3f7f4a; }
.graph-head, .graph-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; font-size: .8rem; }
.graph-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #5b665b; min-width: 2.5rem; }
.graph-rule { font-weight: 600; }
.graph-statement { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; margin: .25rem 0; overflow-wrap: anywhere; }
.graph-highlight { font-size: .8rem; color: #7a4a00; overflow-wrap: anywhere; }
.graph-definition { font-size: .8rem; margin: .15rem 0; }
.graph-expand { font-size: .75rem; }
.graph-link, .graph-node { border: 0; padding: 0 .15rem; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
.graph-node { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.graph-entries h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.graph-entry-list { font-size: .85rem; }
