/* Error Bar Judge: the Results Desk inside the practice shell's stage (about 1066 x 628 at 1366 x 768). */
.ebj { position: absolute; inset: 0; overflow: auto; display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: 12px; padding: 10px 12px; font-size: 16px; line-height: 1.3;
  color: #1f2933; background: linear-gradient(#e6eef3, #d5e1e9);
  --ebj-card: #ffffff; --ebj-line: #a9b8c4; --ebj-soft: #44525f; --ebj-accent: #1f6f78; --ebj-head: #e4eff1; --ebj-in: #ffffff;
  --ebj-ok: #1f7a44; --ebj-ok-bg: #e3f6e8; --ebj-bad: #b42318; --ebj-bad-bg: #fde7e4;
  --ebj-a: #2b63b0; --ebj-b: #c2551b; --ebj-mine: #7b3fa0; --ebj-plot: #fbfdff; --ebj-grid: #dfe6ec; --ebj-ink: #1f2933; }
html[data-theme="dark"] .ebj { color: #eef2f6; background: linear-gradient(#1a222c, #141b23);
  --ebj-card: #222c38; --ebj-line: #56657a; --ebj-soft: #c9d3de; --ebj-accent: #8fd3d9; --ebj-head: #2a3a44; --ebj-in: #121820;
  --ebj-ok: #7fdca0; --ebj-ok-bg: #173d27; --ebj-bad: #ffb4a8; --ebj-bad-bg: #4a1e1a;
  --ebj-a: #8db8f2; --ebj-b: #f4a26f; --ebj-mine: #d2a6f0; --ebj-plot: #18212b; --ebj-grid: #2e3a47; --ebj-ink: #eef2f6; }
.ebj *, .ebj *::before, .ebj *::after { box-sizing: border-box; }
.ebj p { margin: 0; }
.ebj-example { position: static; display: block; padding: 0; background: none; overflow: visible; }

/* ── the chart (drawn at its real pixel size) ── */
.ebj-chart { display: block; }
.ebj-c-bg { fill: var(--ebj-plot, #fbfdff); stroke: none; }
.ebj-c-grid { stroke: var(--ebj-grid, #dfe6ec); stroke-width: 1; }
.ebj-c-axis { stroke: var(--ebj-ink, #1f2933); stroke-width: 2; fill: none; }
.ebj-c-t { font: 16px/1 system-ui, -apple-system, "Segoe UI", sans-serif; fill: var(--ebj-ink, #1f2933); }
.ebj-c-b { font-weight: 700; }
.ebj-c-sub { fill: var(--ebj-soft, #44525f); }
.ebj-c-pt { stroke-width: 1.5; fill-opacity: .35; }
.ebj-c-g0-pt { fill: var(--ebj-a, #2b63b0); stroke: var(--ebj-a, #2b63b0); }
.ebj-c-g1-pt { fill: var(--ebj-b, #c2551b); stroke: var(--ebj-b, #c2551b); }
.ebj-c-bar { stroke-width: 3.5; fill: none; stroke-linecap: round; }
.ebj-c-g0-bar { stroke: var(--ebj-a, #2b63b0); } .ebj-c-g1-bar { stroke: var(--ebj-b, #c2551b); }
.ebj-c-mean { stroke: var(--ebj-plot, #fff); stroke-width: 2.5; }
.ebj-c-g0-mean { fill: var(--ebj-a, #2b63b0); } .ebj-c-g1-mean { fill: var(--ebj-b, #c2551b); }
.ebj-c-mine { stroke: var(--ebj-mine, #7b3fa0); stroke-width: 3; stroke-dasharray: 7 5; fill: none; stroke-linecap: round; }
.ebj-c-minehead { stroke: var(--ebj-mine, #7b3fa0); stroke-width: 3; fill: none; }
.ebj-c-minemean { fill: var(--ebj-plot, #fff); stroke: var(--ebj-mine, #7b3fa0); stroke-width: 2.5; }
.ebj-c-sd { fill: var(--ebj-soft, #44525f); fill-opacity: .1; stroke: var(--ebj-soft, #44525f); stroke-opacity: .5; stroke-dasharray: 3 4; }
.ebj-c-overlap { stroke: none; }
.ebj-c-ovline { stroke: #b07a00; stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.ebj-c-ovtext { paint-order: stroke; stroke: var(--ebj-plot, #fff); stroke-width: 5px; stroke-linejoin: round; fill: #7a5200; }
html[data-theme="dark"] .ebj-c-ovtext { fill: #ffd54a; }
html[data-theme="dark"] .ebj-c-ovline { stroke: #e0b43a; }
.ebj-c-gap { stroke: var(--ebj-ok, #1f7a44); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.ebj-c-gapbar { stroke: var(--ebj-ok, #1f7a44); stroke-width: 2.5; fill: none; }
.ebj-c-gaptext { paint-order: stroke; stroke: var(--ebj-plot, #fff); stroke-width: 5px; stroke-linejoin: round; fill: var(--ebj-ok, #1f7a44); }
.ebj-scene { display: block; width: 100%; height: auto; }

/* ── stage layout ── */
.ebj-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ebj-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.ebj-card { background: var(--ebj-card); border: 1.5px solid var(--ebj-line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ebj-k { font-size: 16px; font-weight: 800; color: var(--ebj-accent); margin-bottom: 4px !important; }
.ebj-pic { border-radius: 10px; overflow: hidden; border: 1px solid var(--ebj-line); }
.ebj-cap { display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-weight: 800; margin: 3px 0 4px; line-height: 1.2; }
.ebj-cap span:first-child { color: var(--ebj-a); } .ebj-cap span:last-child { color: var(--ebj-b); }
.ebj-cap span.is-off { color: var(--ebj-soft); font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }
.ebj-setup { line-height: 1.3; }
.ebj-eqline { line-height: 1.35; }
.ebj-eqline span { color: var(--ebj-soft); }
.ebj-note { color: var(--ebj-soft); line-height: 1.25; margin-top: 3px !important; }

.ebj-top { flex: 1 1 auto; min-height: 280px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.ebj-top--one, .ebj-top--raw { grid-template-columns: auto minmax(0, 1fr); }
.ebj-datacard { display: flex; flex-direction: column; min-height: 0; }
.ebj-tablewrap { min-width: 0; overflow: auto; }
.ebj-table { border-collapse: collapse; font-size: 16px; width: 100%; }
.ebj-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ebj-table th, .ebj-table td { border: 1.5px solid var(--ebj-line); padding: 3px 9px; height: 32px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ebj-table thead th { background: var(--ebj-head); font-weight: 800; white-space: normal; line-height: 1.15; }
.ebj-table tbody th { font-weight: 700; }
.ebj-table td { font-weight: 700; }
.ebj-table--raw thead th:nth-child(2), .ebj-table--one thead th:nth-child(2) { color: var(--ebj-a); }
.ebj-table--raw thead th:nth-child(3) { color: var(--ebj-b); }
.ebj-table--raw thead th, .ebj-table--one thead th { max-width: 118px; }
.ebj-table--summary th, .ebj-table--summary td { padding: 3px 6px; }
.ebj-table--summary tbody tr:first-child th { color: var(--ebj-a); } .ebj-table--summary tbody tr:last-child th { color: var(--ebj-b); }
.ebj-chartcard { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ebj-charthead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.ebj-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ebj-soft); }
.ebj-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ebj-charthost { flex: 1 1 auto; min-height: 160px; position: relative; overflow: hidden; }
.ebj-charthost svg { position: absolute; left: 0; top: 0; }
.ebj-reading { line-height: 1.25; margin-top: 4px !important; }

.ebj-sheet { flex: none; display: flex; flex-direction: column; gap: 6px; background: var(--ebj-card); border: 1.5px solid var(--ebj-line); border-radius: 14px; padding: 8px 12px 10px; box-shadow: 0 6px 16px rgba(20, 35, 50, .12); }
.ebj-step { display: flex; align-items: center; gap: 8px; line-height: 1.25; }
.ebj-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ebj-accent); color: #fff; font-weight: 800; font-size: 16px; }
html[data-theme="dark"] .ebj-num { color: #0f2326; }
.ebj-step-s { color: var(--ebj-soft); }
.ebj-cells { display: grid; gap: 6px 12px; }
.ebj-cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ebj-cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ebj-rawgrid { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 4px 12px; align-items: center; }
.ebj-colhead { line-height: 1.2; }
.ebj-gname { font-weight: 800; line-height: 1.2; }
.ebj-gname--0 { color: var(--ebj-a); } .ebj-gname--1 { color: var(--ebj-b); }
.ebj-gcell .ebj-gname { padding-bottom: 2px; }
.ebj-cell { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ebj-cell-l { line-height: 1.2; }
.ebj-cell-s { color: var(--ebj-soft); }
.ebj-cell-row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.ebj .ebj-in { width: 100px; height: 44px; padding: 0 8px; font: inherit; font-size: 18px; font-weight: 700; text-align: center; color: inherit; background: var(--ebj-in); border: 2px solid var(--ebj-accent); border-radius: 8px; }
.ebj .ebj-in:focus-visible, .ebj .ebj-chip:focus-visible { outline: 3px solid var(--tlg-focus, #b84c00); outline-offset: 2px; }
.ebj .ebj-in:disabled { opacity: 1; -webkit-text-fill-color: currentColor; }
.ebj .ebj-in.is-ok { border-color: var(--ebj-ok); background: var(--ebj-ok-bg); }
.ebj .ebj-in.is-bad { border-color: var(--ebj-bad); background: var(--ebj-bad-bg); text-decoration: line-through; }
.ebj-unit { color: var(--ebj-soft); font-weight: 600; }
.ebj-mark { font-weight: 800; white-space: nowrap; }
.ebj-mark:empty { display: none; }
.ebj-mark.is-ok { color: var(--ebj-ok); } .ebj-mark.is-bad { color: var(--ebj-bad); }
.ebj-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ebj .ebj-chip { min-height: 52px; padding: 5px 8px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.2; font: inherit; font-size: 16px; font-weight: 700; white-space: normal;
  border: 2px solid var(--ebj-line); border-radius: 12px; background: var(--ebj-in); color: inherit; cursor: pointer; }
.ebj .ebj-chip[aria-checked="true"] { border: 3px solid var(--ebj-accent); background: var(--ebj-head); }
.ebj .ebj-chip[aria-checked="true"] .ebj-chip-m:empty::before { content: "●"; color: var(--ebj-accent); }
.ebj .ebj-chip:disabled { opacity: 1; cursor: default; }
.ebj .ebj-chip.is-right { border: 3px solid var(--ebj-ok); background: var(--ebj-ok-bg); }
.ebj .ebj-chip.is-wrong { border: 3px solid var(--ebj-bad); background: var(--ebj-bad-bg); }
.ebj-chip-m { font-weight: 800; }
.ebj-chip.is-right .ebj-chip-m { color: var(--ebj-ok); } .ebj-chip.is-wrong .ebj-chip-m { color: var(--ebj-bad); }
.ebj-msg:empty { display: none; }
.ebj--judge .ebj-top { min-height: 300px; }

/* Briefing example and Start art */
.ps-brief-exstage .ebj-chart, .ebj-example .ebj-chart { width: auto; max-width: 100%; height: auto; max-height: none; margin: 0 auto; }
.ebj-start { display: flex; justify-content: center; }
.ebj-start { width: 100%; }
.ebj-start .ebj-chart { max-width: 100%; height: auto; }

/* The assignment card sits at the foot of the customer column, so it never covers the worksheet. */
@media (min-width: 901px) { html.ps-locked .lga-card { right: auto !important; left: 12px; max-width: 276px; } }
/* The calculator opens over the customer column (left), not over the conclusion buttons. */
@media (min-width: 901px) { .ps .ps-calc, .ps-calc { right: auto; left: 30px; bottom: 76px; } }

/* Narrower than a Chromebook (1024 wide and tablets): one column; the experiment sits above the data and chart. */
@media (max-width: 1180px) {
  .ebj { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .ebj-left { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .ebj-right { min-height: 0; }
  .ebj-top { flex: none; min-height: 0; grid-template-rows: auto; }
  .ebj-charthost { flex: none; height: 290px; }
}
@media (max-width: 900px) {
  .ebj { position: static; overflow: visible; }
}
@media (max-width: 640px) {
  .ebj { padding: 8px; }
  .ebj-left { grid-template-columns: minmax(0, 1fr); }
  .ebj-top--one, .ebj-top--raw { grid-template-columns: minmax(0, 1fr); }
  .ebj-table--raw thead th, .ebj-table--one thead th { max-width: none; }
  .ebj-charthost { height: 280px; }
  .ebj-cells--3 { grid-template-columns: minmax(0, 1fr); }
  .ebj-rawgrid { grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 4px 6px; }
  .ebj .ebj-rawgrid .ebj-in { width: 76px; padding: 0 3px; }
  .ebj-rawgrid .ebj-cell-s { display: none; }
  .ebj-chips { grid-template-columns: 1fr 1fr; }
  .ebj-sheet { padding: 8px; }
}
@media (max-width: 400px) { .ebj-cells--2 { grid-template-columns: minmax(0, 1fr); } .ebj-chips { grid-template-columns: 1fr; } }
.ebj.ebj-example { padding: 0; }
