.lb { max-width: 1250px; margin: 1rem auto 3rem; }
.lb-controls, .lb-table-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:1rem; }
.lb-controls fieldset { min-width:0; padding:0; margin:0; border:0; }
.lb-controls legend, .lb-summary small, .lb-status, .lb-method { color:var(--muted); font-size:.82rem; }
.lb-controls legend { margin-bottom:.45rem; }
.lb-controls fieldset div { display:flex; flex-wrap:wrap; gap:2px; background:var(--surface); padding:3px; border-radius:4px; }
.lb-controls button { padding:.52rem .8rem; min-height:36px; display:inline-flex; align-items:center; gap:.45rem; color:var(--muted); border-radius:3px; }
.lb-controls button[aria-pressed=true] { background:var(--selected-bg); color:var(--ink); }
.lb-controls button:hover, .lb-results a:hover { color:var(--accent); }
.lb-controls .token { width:18px; height:18px; }
.lb-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.3rem; background:var(--surface); border-radius:4px; margin:1.45rem 0 2rem; padding:1.25rem 1.5rem; }
.lb-summary div { display:grid; gap:.38rem; align-content:start; }
.lb-summary strong { font:400 clamp(1.75rem,4vw,3.4rem)/1.15 "Instrument Serif", Georgia, serif; color:var(--ink); }
.lb-summary em { font-size:.55em; font-style:normal; color:var(--muted); }
.lb-summary a, .lb-summary span { color:var(--muted); font-size:.85rem; }
.lb-table-head h2 { margin:0; font:400 1.9rem/1.1 "Instrument Serif",Georgia,serif; }
.lb-table-head label { display:flex; align-items:center; gap:.42rem; color:var(--muted); font-size:.86rem; }
.lb-table-head input { accent-color:var(--accent); }
.lb-results table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.lb-results :is(th,td) { padding:.78rem .75rem; text-align:right; font-size:.92rem; }
.lb-results thead { background:var(--surface); }
.lb-results thead th, .lb-results td:first-child { color:var(--muted); font-weight:400; }
.lb-results th:nth-child(-n+2), .lb-results td:first-child { text-align:left; }
.lb-results td:first-child { width:3rem; }
.lb-results tbody tr { border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent); }
.lb-results tbody tr:hover { background:var(--surface); }
.lb-results th a { display:flex; align-items:center; gap:.65rem; color:var(--ink); overflow-wrap:anywhere; }
.lb-results th small { display:block; margin-top:.2rem; color:var(--muted); font-size:.75rem; font-weight:400; }
.lb-marks { display:flex; flex-shrink:0; padding-right:5px; }
.lb-marks .token + .token { margin-left:-5px; }
.lb-results button { color:inherit; font:inherit; white-space:nowrap; }
.lb-results [aria-sort=ascending] button, .lb-results [aria-sort=descending] button { color:var(--ink); }
.lb-results i { margin-left:.25rem; font-style:normal; }
.lb-status { margin:.6rem 0 1rem; }
.lb-status button { margin-left:.4rem; text-decoration:underline; color:var(--accent); }
.lb-method,.lb-empty { line-height:1.55; margin-top:1rem; }
@media(max-width:590px) {
  .lb-summary { gap:.7rem; padding:.8rem; }
  .lb-summary small, .lb-summary span, .lb-summary a { font-size:.75rem; }
  .lb-controls button { padding:.45rem .6rem; }
  .lb-results :is(th,td) { padding:.65rem .22rem; font-size:.8rem; }
  .lb-results td:first-child { width:auto; }
  .lb-marks { display:none; }
}
.lb-calculation { margin:-.35rem 0 .85rem; color:var(--muted); font-size:.8rem; }
.lb-calculation summary { width:fit-content; cursor:pointer; }
.lb-calculation .lb-method { max-width:80ch; margin:.5rem 0 .8rem; }
