/* Percent Composition Lab Bench: the work order + answer cards and the Composition Lab bench inside the practice shell's stage. */
.pc { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 8px 12px; }
.pc-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }

/* the work order */
.pc-ticket { padding: 6px 12px 8px; border-radius: var(--tlg-radius-lg, 14px); border: 2px dashed #8fb3c2; background: #f2f8fb; color: #13293a; }
.pc-ticket-k { margin: 0; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--tlg-tracking-caps, .08em); color: #245c70; }
.pc-ticket-h { margin: 0 0 2px; font-size: 19px; line-height: 1.25; }
.pc-given { margin: 2px 0 0; font-size: 16px; line-height: 1.35; }
html[data-theme="dark"] .pc-ticket { background: #152a36; color: #e2f0f6; border-color: #3f6f84; }
html[data-theme="dark"] .pc-ticket-k { color: #8fd0e6; }

/* answer cards */
.pc-ctl { display: flex; flex-direction: column; gap: 6px; }
.pc-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.pc-field legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--tlg-text, #172c38); }
.pc-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-card {
  position: relative; font: inherit; color: #1b2a33; cursor: pointer; border-radius: 10px; min-height: 60px; padding: 6px 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(#ffffff, #f1f4f6); border: 2px solid var(--tlg-border, #a5b6c1); box-shadow: 0 2px 0 rgba(0, 0, 0, .1);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.pc-card--label { background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(36, 92, 112, .06) 6px 7px), linear-gradient(#fffdf4, #f6efd9); border-color: #c9b991; border-style: dashed; }
.pc-card-k { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fffdf6; border: 2px solid #5e6a71; font-size: 17px; font-weight: 900; }
.pc-card-v { font-size: 24px; font-weight: 800; letter-spacing: .01em; }
.pc-card-v sub { font-size: .75em; line-height: 0; }
.pc-card[aria-pressed="true"] { border-color: #245c70; border-style: solid; background: #e3f1f6; box-shadow: 0 0 0 3px #245c70 inset; }
.pc-card[aria-pressed="true"]::after {
  content: '✓'; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; font-weight: 900; line-height: 1; color: #ffffff; background: #245c70; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pc-card:hover:not(:disabled) { border-color: #245c70; }
.pc :focus-visible { outline: 3px solid #b16a08; outline-offset: 2px; }
.pc button:disabled { cursor: default; }
.pc.is-locked .pc-card:not([aria-pressed="true"]) { opacity: .6; }
html[data-theme="dark"] .pc-card { color: #e6eef2; background: linear-gradient(#22313a, #1b272e); border-color: #4c6370; }
html[data-theme="dark"] .pc-card--label { background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(143, 208, 230, .06) 6px 7px), linear-gradient(#2a2a20, #24231a); border-color: #7d7150; }
html[data-theme="dark"] .pc-card-k { background: #1b272e; border-color: #9fb3bd; }
html[data-theme="dark"] .pc-card[aria-pressed="true"] { background: #143341; border-color: #8fd0e6; box-shadow: 0 0 0 3px #8fd0e6 inset; }
html[data-theme="dark"] .pc-card[aria-pressed="true"]::after { color: #0d2630; background: #8fd0e6; }

.pc-tip { margin: 0; font-size: 16px; color: var(--tlg-text-muted, #4b5d68); }
.pc-msg { margin: 0; min-height: 1.2em; font-size: 16px; font-weight: 700; color: var(--tlg-danger, #b42318); }
html[data-theme="dark"] .pc-msg { color: #ffb4a8; }
.pc-about { font-size: 16px; line-height: 1.4; }
.pc-about summary { cursor: pointer; font-weight: 700; }
.pc-about p { margin: 4px 0 0; }

/* drag ghost */
html .pc-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .92; transform: scale(1.06) rotate(-2deg); box-shadow: 0 10px 22px rgba(0, 0, 0, .3); margin: 0; }

/* the bench */
.pc-view { position: relative; min-width: 0; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.pc-scene { position: relative; width: 100%; aspect-ratio: 720 / 620; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: var(--tlg-border-width, 1px) solid var(--tlg-border, #a5b6c1); user-select: none; -webkit-user-select: none; }
.pc-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-wall { fill: url(#pc-g-wall); }
.pc-tile { fill: url(#pc-p-tile); }
html[data-theme="dark"] .pc-wall { fill: url(#pc-g-wall-d); }
html[data-theme="dark"] .pc-tile { fill: url(#pc-p-tile-d); }

.pc-t { font-family: var(--tlg-font-body, system-ui, sans-serif); fill: #1d2b33; }
.pc-sign { font-size: 27px; font-weight: 800; fill: #f4e7c0; letter-spacing: .02em; }
.pc-t-poster { font-size: 18px; font-weight: 800; fill: #5a3d0a; }
.pc-t-dev { font-size: 19px; font-weight: 800; fill: #23465a; }
.pc-t-screen { font-size: 19px; font-weight: 700; fill: #d6e8f4; }
.pc-t-letter { font-size: 24px; font-weight: 900; paint-order: stroke; stroke-width: 4px; }
.pc-t-letter--A { fill: #ffffff; stroke: #0f4f47; }
.pc-t-letter--B { fill: #2b1d00; stroke: #fbe7b0; }
.pc-t-run { font-size: 19px; font-weight: 900; fill: #ffffff; paint-order: stroke; stroke: #13293a; stroke-width: 4px; }
.pc-t-tick { font-size: 24px; font-weight: 900; fill: #ffffff; paint-order: stroke; stroke: #13293a; stroke-width: 4px; pointer-events: none; }
.pc-t-vial { font-size: 24px; font-weight: 900; }
.pc-t-bench { font-size: 18px; font-weight: 700; fill: #e6eef2; }
.pc-t-lcd { font-size: 26px; font-weight: 800; fill: #7cf0a8; font-variant-numeric: tabular-nums; }
.pc-t-lcd-el { font-size: 30px; font-weight: 900; fill: #7cf0a8; }
.pc-t-lcd-big { font-size: 30px; font-weight: 800; fill: #7cf0a8; font-variant-numeric: tabular-nums; }
.pc-t-tile-sym { font-size: 22px; font-weight: 900; }
.pc-t-tile { font-size: 19px; font-weight: 800; }
.pc-t-model { font-size: 18px; font-weight: 700; fill: #cfdbe2; font-style: italic; }
.pc-t-tray { font-size: 20px; font-weight: 700; fill: #8a9ba5; }
.pc-t-calc { font-size: 20px; font-weight: 800; fill: #ffffff; }
.pc-t-calc--big { font-size: 24px; fill: #ffd36b; }
.pc-t-axis { font-size: 18px; font-weight: 700; fill: #9fc3dc; }
.pc-t-peak { font-size: 20px; font-weight: 800; fill: #8ff0b9; }
.pc-t-unit { font-size: 18px; font-weight: 900; fill: #ffffff; }
.pc-t-wrong { font-size: 20px; font-weight: 800; fill: #ffb4a8; paint-order: stroke; stroke: #0d1f30; stroke-width: 5px; stroke-linejoin: round; }
.pc-t-card-h { font-size: 18px; font-weight: 800; fill: #245c70; }
.pc-t-card { font-size: 18px; font-weight: 700; fill: #3c4a52; }
.pc-t-formula { font-size: 34px; font-weight: 900; fill: #13293a; }
.pc-t-clip-h { font-size: 18px; font-weight: 900; fill: #245c70; text-transform: uppercase; letter-spacing: .08em; }
.pc-t-clip { font-size: 18px; font-weight: 700; fill: #2b3a42; }
.pc-t-slot { font-size: 24px; font-weight: 900; fill: #13293a; }
.pc-t-slot-e { font-size: 18px; font-style: italic; fill: #6b7a82; }
.pc-t-ok { font-size: 28px; font-weight: 900; fill: #1d7a46; }
.pc-t-x { font-size: 28px; font-weight: 900; fill: #b42318; }
.pc-slot { fill: #f4f7f9; stroke: #7c8a92; stroke-width: 2.5; stroke-dasharray: 7 5; }
.pc-socket.is-set .pc-slot { fill: #fff3c4; stroke: #94680c; stroke-dasharray: none; }
.pc-socket.is-ok .pc-slot { fill: #ddf5e5; stroke: #1d7a46; stroke-width: 3.5; stroke-dasharray: none; }
.pc-socket.is-bad .pc-slot { fill: #fde4e0; stroke: #b42318; stroke-width: 3.5; stroke-dasharray: none; }
html.pc-dragging .pc-slot { stroke: #d9a514; stroke-width: 3.5; }
.pc-socket.is-over .pc-slot { fill: #fff0b0; stroke: #d9a514; stroke-dasharray: none; }
.pc-slice[data-slice] { cursor: pointer; }
.pc-slice[data-slice]:focus { outline: none; }
.pc-slice[data-slice]:focus-visible path:first-child { stroke: #ffb347; stroke-width: 6; }
.pc-slice.is-dim { opacity: .6; }

/* reveal badge (over the wall, left of the report) */
.pc-badge { position: absolute; left: 2%; right: 39%; top: 14%; padding: 6px 12px; border-radius: 10px; font-size: 16px; font-weight: 700; line-height: 1.3; pointer-events: none;
  background: rgba(255, 255, 255, .96); color: #10202c; border: 3px solid #1d7a46; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); animation: pc-pop .25s ease-out; }
.pc-badge.is-bad { border-color: #b42318; }
.pc-badge.is-count { border-color: #245c70; }
@keyframes pc-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* briefing + start */
.pc-example-svg { display: block; width: 100%; height: auto; max-height: 460px; }
.pc-start-svg { display: block; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) { .pc-badge { animation: none; } html .pc-ghost { transform: none; } }
@media (max-width: 1100px) { .pc { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 900px) {
  .pc { position: static; grid-template-columns: 1fr; }
  .pc-panel { overflow: visible; }
  .pc-view { display: block; order: -1; }
  .pc-scene { width: 100% !important; }
}
.pc-t-tag { font-size: 22px; font-weight: 900; fill: #13293a; }
