#hexLab.nl-number-workspace #hexContent{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#hexLab .nl-number-controls{display:flex;align-items:center;gap:14px;flex:none;min-height:56px;margin:0;padding:8px 14px;box-sizing:border-box;background:var(--settings-surface);border-color:var(--frame-border)}
#hexLab .nl-number-controls>label{display:flex;align-items:center;gap:9px;font:var(--ui-caption-font);color:var(--text)}
#hexLab .nl-number-controls input[type=number]{width:85px;min-height:32px;box-sizing:border-box;font:18px Consolas,monospace}
#hexLab .nl-number-controls input[type=range]{flex:1;min-width:100px;margin:0;height:20px}
#hexLab .nl-number-controls button{min-width:44px;height:34px;padding:4px 10px}
#hexLab .nl-word-width{font:var(--ui-caption-font);white-space:nowrap}
#hexLab .nl-number-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;flex:1;min-height:0;padding-top:10px}
#hexLab .nl-number-right{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:12px;min-width:0;min-height:0}
#hexLab .nl-number-grid .intro-card{min-width:0;min-height:0;padding:12px;box-sizing:border-box;border:1px solid var(--frame-border);border-radius:10px;background:var(--panel);display:flex;flex-direction:column;gap:8px}
#hexLab .nl-number-grid .base-title{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;margin:0;min-height:28px}
#hexLab .nl-number-grid .base-title h3{font:650 18px/24px 'Segoe UI',sans-serif;margin:0}
#hexLab .nl-number-grid .base-title>span{font:700 22px/28px 'Segoe UI',sans-serif;color:var(--section-ink);white-space:nowrap}
#hexLab .nl-decimal-body{display:flex;flex-direction:column;justify-content:center;gap:12px;flex:1;min-height:0}
#hexLab .decimal-places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0;min-height:112px}
#hexLab .decimal-places>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px;background:var(--control);border:1px solid var(--control-border);border-radius:8px}
#hexLab .decimal-places small{font:18px/23px Consolas,monospace;color:var(--muted)}
#hexLab .decimal-places b{font:650 42px/46px Consolas,monospace}
#hexLab .decimal-places span{font:16px/20px Consolas,monospace;color:var(--muted)}
#hexLab .base-formula{font:16px/22px Consolas,monospace;text-align:center;min-height:22px;flex:none;margin:0;color:var(--text)}
#hexLab .nl-hex-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:1;min-height:0;align-content:center}
#hexLab .nl-hex-groups>section{min-width:0}
#hexLab .nl-hex-digit{display:flex;align-items:center;justify-content:center;gap:14px;min-height:52px}
#hexLab .nl-hex-digit b{font:650 42px/46px Consolas,monospace;color:var(--purple)}
#hexLab .nl-hex-digit>small,#hexLab .nl-hex-digit>span{font:15px/20px Consolas,monospace;color:var(--muted)}
#hexLab .nl-number-grid .hex-picker{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;margin:0}
#hexLab .nl-number-grid .hex-picker button{display:flex;align-items:center;justify-content:center;padding:2px 0;gap:3px;min-height:26px;height:26px;min-width:0;border:1px solid var(--control-border);background:var(--control);color:var(--text)}
#hexLab .nl-number-grid .hex-picker button b{font:650 15px/19px Consolas,monospace}
#hexLab .nl-number-grid .hex-picker button small{display:none}
#hexLab .nl-number-grid .hex-picker button.selected{background:var(--selected-bg);color:var(--selected-ink);border-color:var(--mint)}
#hexLab .nl-binary-card .bit-significance{display:flex;justify-content:space-between;font:13px/18px Consolas,monospace;margin:0;color:var(--muted)}
#hexLab .nl-binary-tiles{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;flex:1;min-height:66px;max-height:112px;align-self:stretch}
#hexLab .nl-binary-tiles button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;padding:4px 0;border:1px solid var(--control-border);background:var(--control);color:var(--text);border-radius:6px}
#hexLab .nl-binary-tiles button.on{background:var(--selected-bg);color:var(--selected-ink);border-color:var(--mint)}
#hexLab .nl-binary-tiles button small,#hexLab .nl-binary-tiles button>span{font:15px/18px Consolas,monospace}
#hexLab .nl-binary-tiles button b{font:650 28px/30px Consolas,monospace}
#hexLab .nl-byte-caption{font:14px/18px 'Segoe UI',sans-serif;text-align:center;color:var(--muted)}

/* Shared decimal value controls, kept in place while the value changes. */
#introLab>.nl-number-controls,#hexLab>.nl-number-controls{display:flex!important;align-items:center;gap:14px;min-height:56px!important;height:56px!important;margin:0;padding:8px 14px;box-sizing:border-box;background:var(--settings-surface);border:1px solid var(--frame-border);border-radius:8px}
#introLab>.nl-number-controls>label,#hexLab>.nl-number-controls>label{display:flex;align-items:center;gap:9px;font:var(--ui-caption-font);color:var(--text);white-space:nowrap}
#introLab>.nl-number-controls input[type=number],#hexLab>.nl-number-controls input[type=number]{width:85px;min-height:32px;box-sizing:border-box;font:18px Consolas,monospace}
#introLab>.nl-number-controls input[type=range],#hexLab>.nl-number-controls input[type=range]{flex:1;min-width:100px;margin:0;height:20px;width:auto}
#introLab>.nl-number-controls button,#hexLab>.nl-number-controls button{min-width:44px;height:34px;padding:4px 10px}
#introLab>.nl-number-controls select{margin:0;height:34px}
#hexLab .nl-capacity{flex:none;margin-top:10px}
#hexLab .nl-capacity .capacity-card{margin:0}
#hexLab .nl-number-grid{padding-top:10px}
#hexLab .nl-number-grid .nl-decimal-card{justify-content:center;gap:8px}
#hexLab .nl-decimal-card>.base-title{margin-bottom:auto}
#hexLab .nl-decimal-card .decimal-places{flex:none;min-height:100px;height:112px;max-height:140px;margin:0;gap:10px}
#hexLab .nl-decimal-card .decimal-places>div{justify-content:space-evenly;padding:8px}
#hexLab .nl-decimal-card .decimal-places b{font:400 36px/1.1 Consolas,monospace;margin:5px 0}
#hexLab .nl-decimal-card .decimal-places small{font-size:20px}
#hexLab .nl-decimal-card .decimal-places span{font-size:17px}
#hexLab .nl-decimal-card .base-formula{text-align:left;font-size:14px;color:var(--mint)}
#hexLab .nl-decimal-card .quantity-dots{margin:4px 0 0;min-height:105px;flex:none}
#hexLab .nl-decimal-card .decimal-groups{height:100%;gap:7px}
#hexLab .nl-decimal-card .decimal-groups>div{height:130px;min-height:105px;padding:8px;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}
#hexLab .nl-decimal-card .decimal-groups h4{font-size:17px;line-height:23px;white-space:normal;margin-bottom:9px}
#hexLab .nl-decimal-card .decimal-groups h4 b{font-size:21px}
#hexLab .nl-decimal-card .quantity-dots{margin-bottom:0}
#hexLab .nl-hex-value{font:650 40px/44px Consolas,monospace;color:var(--purple);text-align:center;flex:none}
#hexLab .nl-hex-groups{gap:12px}
#hexLab .nl-hex-digit{min-height:32px;gap:10px}
#hexLab .nl-hex-digit b{font-size:28px;line-height:32px}
#hexLab .nl-number-grid .hex-picker button{height:23px;min-height:23px}
#hexLab .nl-number-right{grid-template-rows:minmax(0,1.15fr) minmax(0,1fr)}
#hexLab .nl-binary-tiles{min-height:56px}
#hexLab .nl-binary-tiles button{gap:2px}
#hexLab .nl-binary-tiles button b{font-size:25px;line-height:27px}
#hexLab .nl-byte-caption{display:none}
@media(min-height:850px){#hexLab .nl-hex-value{font-size:52px;line-height:58px}#hexLab .nl-decimal-card .quantity-dots{margin-bottom:auto}}

#hexLab .nl-decimal-card .decimal-places>div{box-sizing:border-box;height:100%;min-height:0;gap:2px;padding:6px 8px}
#hexLab .nl-decimal-card .base-title h2{font:650 18px/24px 'Segoe UI',sans-serif;margin:0}
#hexLab .nl-capacity .capacity-card{padding:10px;box-sizing:border-box;min-height:128px;height:128px}
#hexLab .nl-capacity .capacity-top h3{font:650 16px/22px 'Segoe UI',sans-serif;margin:0}
#hexLab .nl-capacity .capacity-controls{margin:6px 0;gap:10px}
#hexLab .nl-capacity .capacity-controls button{padding:5px 8px;font-size:14px;min-height:30px}
#hexLab .nl-capacity .capacity-controls label{font-size:14px}
#hexLab .nl-capacity .capacity-range{font-size:14px;margin:4px 0 0}

/* Same counting objects in both notations. */
#hexLab .nl-decimal-card .group-objects{display:grid;grid-template-columns:repeat(3,23px);gap:2px;align-content:start;justify-content:start}
#hexLab .nl-decimal-card .decimal-groups>div:first-child .group-objects{grid-template-columns:repeat(2,27px)}
#hexLab .nl-decimal-card .hundred-bundle{width:27px;height:27px;font-size:10px}
#hexLab .nl-decimal-card .ten-bundle{grid-template-columns:repeat(5,3px);gap:.5px;padding:2px}
#hexLab .nl-decimal-card .ten-bundle i{width:3px;height:3px}
#hexLab .nl-decimal-card .unit-cube{width:9px;height:9px}
#hexLab .nl-decimal-card .group-objects{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:6px;align-items:center;justify-items:center}
#hexLab .nl-decimal-card .decimal-groups>div:first-child .group-objects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;align-items:start;gap:6px}
#hexLab .nl-decimal-card .hundred-bundle{width:min(100%,62px);height:auto;aspect-ratio:1;font-size:18px;background:repeating-linear-gradient(0deg,#384934 0px,#384934 5px,#536b41 5px,#536b41 6px)}
#hexLab .nl-decimal-card .ten-bundle{width:min(100%,40px);height:min(100%,38px);min-height:0;box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:2px;padding:3px}
#hexLab .nl-decimal-card .ten-bundle i{width:100%;height:100%;min-height:0}
#hexLab .nl-decimal-card .unit-cube{width:min(100%,26px);height:auto;aspect-ratio:1;box-sizing:border-box}

/* One heading baseline and one toolbar baseline across number lessons. */
#hexLab.wi-lab{padding:6px 0 0!important;gap:4px!important}
#hexLab.wi-lab>.ws-header{height:32px!important;min-height:32px!important;flex:0 0 32px!important;padding:0!important;margin:0 0 4px!important}
#hexLab .nl-number-grid{padding-top:0}
