.ht-bench { display:grid; grid-template-columns:minmax(0,62fr) minmax(0,38fr); border:1px solid var(--border-strong); border-radius:var(--radius); background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); overflow:hidden; }
.ht-bench *, .ht-bench { box-sizing:border-box; }
.ht-work,.ht-controls { min-width:0; padding:24px; }
.ht-controls { border-left:1px solid var(--border); }
.ht-bench .ht-heading,.ht-bench h3,.ht-bench p { margin:0; }
.ht-bench .ht-heading { font:700 22px/1.2 var(--font-display); letter-spacing:-.04em; }
.ht-bench h3 { font:600 14px/1.2 var(--font-body); }
.ht-bench button,.ht-bench input,.ht-bench select { font:inherit; }
.ht-bench button { cursor:pointer; }
.ht-bench button,.ht-bench select,.ht-bench input[type=number] { color:var(--ink); background:var(--surface); border:1px solid var(--border-strong); border-radius:6px; }
.ht-bench button:hover,.ht-bench select:hover { border-color:var(--accent); }
.ht-bench :is(button,input,select,summary):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.ht-bar,.ht-controlhead { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; min-height:36px; }
.ht-bench .ht-file { display:none; }
.ht-bench .ht-upload,.ht-bench .ht-reset { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:8px 12px; font:600 12px/1.3 var(--font-body); }
.ht-bench .ht-reset { color:var(--muted); border-color:transparent; }
.ht-board { --shirt:#111318; --split:43%; border:1px solid var(--border-strong); border-radius:6px; overflow:hidden; }
.ht-board { position:relative; }
.ht-board.is-drop::after { content:"Drop artwork to load"; position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; z-index:4; background:rgba(0,37,110,.82); color:white; font:600 18px/1.2 var(--font-display); }
.ht-board.is-drop { outline:3px dashed var(--accent); outline-offset:3px; }
.ht-proofbar { min-height:32px; padding:4px 12px; display:flex; gap:8px; align-items:center; justify-content:space-between; background:var(--surface-subtle); color:var(--muted); font:500 12px/1.5 var(--font-mono); }
.ht-proofbar:first-child { text-transform:uppercase; letter-spacing:.07em; }
.ht-stage { aspect-ratio:1.65; position:relative; isolation:isolate; overflow:hidden; background:var(--shirt); }
.ht-stage.is-grid, .ht-bench .ht-gridicon { background-color:#fff; background-image:repeating-conic-gradient(#dce0e5 0% 25%,transparent 0% 50%); background-size:16px 16px; }
.ht-stage canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.ht-before { clip-path:inset(0 calc(100% - var(--split)) 0 0); }
.ht-after { clip-path:inset(0 0 0 var(--split)); }
.ht-bench .ht-curtain {
  position:absolute; z-index:3; top:50%; left:clamp(22px,var(--split),calc(100% - 22px));
  transform:translate(-50%,-50%); width:44px; height:44px; margin:0; padding:0;
  border:1px solid var(--border-strong); border-radius:50%; background:var(--surface); color:var(--ink);
  cursor:ew-resize; touch-action:none; user-select:none;
}
.ht-splitline { position:absolute; top:0; bottom:0; left:var(--split); border-left:1px solid white; filter:drop-shadow(0 0 2px #0006); pointer-events:none; }
.ht-curtain svg { display:block; margin:auto; }
.ht-stage.is-picking { cursor:crosshair; }
.ht-stage.is-picking :is(.ht-curtain,.ht-splitline,.ht-after) { display:none; }
.ht-stage.is-picking .ht-before { clip-path:none; }
.ht-cross { position:absolute; width:14px; height:14px; color:var(--accent-2); border:1px solid currentColor; border-radius:50%; opacity:.88; }
.ht-cross::before,.ht-cross::after { content:""; position:absolute; background:currentColor; }
.ht-cross::before { top:50%; left:-4px; right:-4px; height:1px; }
.ht-cross::after { top:-4px; bottom:-4px; left:50%; width:1px; }
.ht-nw,.ht-ne { top:12px; } .ht-sw,.ht-se { bottom:12px; } .ht-nw,.ht-sw { left:12px; } .ht-ne,.ht-se { right:12px; }
.ht-readout { flex-wrap:wrap; color:var(--ink); }
.ht-readout>span { color:var(--muted); }
.ht-proofoptions { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 0; border-bottom:1px solid var(--border); }
.ht-caption,.ht-samples h3,.ht-field,.ht-range { font:600 14px/1.45 var(--font-body); }
.ht-optiongroup,.ht-swatches,.ht-zoom { display:flex; align-items:center; }
.ht-optiongroup { gap:8px; flex-wrap:wrap; } .ht-swatches { gap:4px; }
.ht-bench .ht-swatches button { flex:none; width:24px; height:24px; padding:0; border:2px solid var(--surface); border-radius:50%; background-color:var(--swatch); box-shadow:0 0 0 1px var(--border-strong); }
.ht-bench .ht-swatches [aria-pressed=true] { box-shadow:0 0 0 2px var(--accent); }
.ht-zoom { padding:2px; border-radius:6px; border:1px solid var(--border); background:var(--surface-subtle); }
.ht-bench .ht-zoom button { background:transparent; border:0; border-radius:4px; padding:4px 8px; color:var(--muted); font:500 12px/1.4 var(--font-mono); }
.ht-bench .ht-zoom [aria-pressed=true] { background:white; color:var(--ink); box-shadow:var(--shadow-sm); }
.ht-samples { padding:16px 0; }
.ht-sampler { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:8px; }
.ht-bench .ht-sampler button { display:flex; align-items:center; padding:4px; gap:8px; text-align:left; background:var(--surface); border:1px solid var(--border); font:600 12px/1.3 var(--font-body); min-width:0; }
.ht-sampler canvas { width:40px; max-width:36%; height:36px; flex:none; background:#171a20; border-radius:3px; }
.ht-bench .ht-sampler [aria-pressed=true] { border-color:var(--accent); color:var(--accent); }
.ht-proofnote { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 0 8px; border-top:1px solid var(--border); }
.ht-loupe,.ht-proofnote p { display:flex; align-items:center; gap:8px; }
.ht-loupe canvas { width:68px; height:48px; border:1px solid var(--border-strong); border-radius:4px; }
.ht-loupe span { font:600 12px/1.45 var(--font-body); } .ht-loupe small,.ht-proofnote p,.ht-bench .ht-note { color:var(--muted); font:400 12px/1.5 var(--font-body); }
.ht-loupe small { display:block; } .ht-bench .ht-note { margin-top:4px; }
.ht-field,.ht-range { display:grid; gap:4px; margin-bottom:12px; min-width:0; }
.ht-field select,.ht-field input { width:100%; min-width:0; min-height:40px; padding:8px; font:400 14px/1.5 var(--font-body); }
.ht-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ht-range>span { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ht-range output { color:var(--accent); font:500 12px/1.4 var(--font-mono); }
.ht-range input { width:100%; min-width:0; height:20px; margin:0; accent-color:var(--accent); cursor:pointer; }
.ht-anglebuttons { display:flex; gap:4px; margin:-4px 0 12px; }
.ht-bench .ht-anglebuttons button { padding:4px 8px; color:var(--muted); font:500 12px/1.4 var(--font-mono); }
.ht-controls details { border-top:1px solid var(--border); }
.ht-controls details:last-of-type { border-bottom:1px solid var(--border); }
.ht-controls summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:40px; cursor:pointer; font:600 14px/1.4 var(--font-body); list-style:none; }
.ht-controls summary::-webkit-details-marker { display:none; }
.ht-controls summary::after { content:"+"; font:500 18px/1 var(--font-mono); color:var(--muted); }
.ht-controls details[open] summary::after { content:"−"; }
.ht-detailbody { padding:4px 0; }
.ht-actions { display:grid; gap:8px; margin-top:16px; }
.ht-bench .ht-actions button { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:44px; padding:8px; font:600 14px/1.4 var(--font-body); }
.ht-bench .ht-actions .ht-primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.ht-bench .ht-actions .ht-primary:hover { background:var(--accent-hover); }
.ht-bench button:disabled { opacity:.6; cursor:wait; }
.ht-bench .ht-status { margin-top:8px; color:var(--muted); font:400 12px/1.5 var(--font-body); }
.ht-coverage { display:block; padding-block:8px; font:500 12px/1.5 var(--font-mono); color:var(--ink); }
.ht-picker { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.ht-picker button, .ht-bench [data-pick] { min-height:44px; padding:8px 12px; font:600 14px/1.3 var(--font-body); }
.ht-controls .ht-note { margin:0 0 12px; }
.ht-bench .print-handoff { margin-top:8px; }
@media (max-width: 900px) {
  .ht-work,.ht-controls { padding:16px; }
  .ht-sampler button { flex-direction:column; }
  .ht-sampler canvas { max-width:none; width:100%; height:40px; }
}
@media (max-width: 640px) {
  .ht-bench { display:block; overflow:visible; }
  .ht-work { display:contents; }
  .ht-work > :not(.ht-board) { margin-inline:12px; }
  .ht-bench .ht-bar { margin-block:0; min-height:52px; }
  .ht-bench .ht-heading { font-size:18px; }
  .ht-bench .ht-upload { min-height:40px; }
  .ht-board {
    display:grid; grid-template-rows:auto minmax(0,1fr) auto;
    height:34vh; height:34svh; background:var(--surface);
    border-inline:0; border-radius:0;
  }
  .ht-board[data-pinned=true] { position:sticky; top:0; z-index:30; }
  .ht-stage { aspect-ratio:auto; min-height:0; }
  .ht-board .ht-proofbar { gap:4px 8px; min-height:24px; }
  .ht-readout { line-height:1.3; }
  .ht-controls { padding:12px; border-left:0; border-top:1px solid var(--border); }
  .ht-controls summary,.ht-zoom button,.ht-sampler button { min-height:44px; }
  .ht-proofoptions { gap:8px; }
  .ht-work > .ht-note { margin-bottom:16px; }
  .ht-sampler { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ht-bench .ht-sampler button { flex-direction:column; align-items:stretch; gap:4px; }
  .ht-sampler canvas { width:100%; height:36px; }
  .ht-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ht-range input { height:32px; }
  .ht-bench .ht-anglebuttons button { min-height:36px; }
}
