/* Resource bench: preparation, explicit training, and model use stay distinct. */
body.ai-atelier #activity-stage[data-activity="resources"] { padding:0!important; border:0!important; background:transparent!important; box-shadow:none!important; color:#d9e9f3; }
.resource-bench { --rb-blue:#aad5f2; --rb-green:#9fdac4; --rb-amber:#e5c18c; --rb-line:#45647d; color:#d9e9f3; background:linear-gradient(145deg,#132b3d,#0c1c2c 75%); border:1px solid #44647c; border-radius:15px; padding:18px 20px 13px; min-width:0; }
.resource-bench * { box-sizing:border-box; }
body.ai-atelier #activity-stage .resource-bench :is(h2,h3,h4) { color:#e4f1f8; }
.resource-bench .rb-titlebar { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:14px; }
.resource-bench .rb-eyebrow { color:#9bb9d1; font-size:10px; letter-spacing:.12em; }
body.ai-atelier #activity-stage .resource-bench .rb-titlebar h3 { font-size:22px; font-weight:500; letter-spacing:.025em; line-height:1.6; margin:5px 0 0; color:#e2eef7; }
.resource-bench .rb-simulation { border:1px solid #607587; color:#b6cbd9; padding:5px 9px; border-radius:20px; font-size:9px; white-space:nowrap; }
.resource-bench .rb-phase-bar { border-bottom:1px solid #405d75; padding-bottom:13px; margin-bottom:17px!important; gap:9px; }
body.ai-atelier #activity-stage .resource-bench .rb-phase-bar button { color:#b7d0e2; background:#132f45; border-color:#567b98; box-shadow:none; padding:8px 15px; }
body.ai-atelier #activity-stage .resource-bench .rb-phase-bar button[aria-pressed="true"] { color:#effaff; background:#2c4d64; border-color:#add9ee; box-shadow:inset 0 -2px #add9ee; }
.resource-bench .rb-workspace { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:27px; align-items:start; }
.resource-bench .rb-training-flow { grid-template-columns:minmax(0,1fr) 120px minmax(0,1.15fr); gap:15px; }
.resource-bench .rb-preparation,.resource-bench .rb-allocation-panel { border:0; border-radius:0; padding:0!important; background:transparent; min-width:0; }
body.ai-atelier #activity-stage .resource-bench :is(.rb-preparation,.rb-allocation-panel) { color:#d6e8f5; background:#10283c!important; border:1px solid #46647e!important; border-radius:8px; padding:15px!important; }
body.ai-atelier #activity-stage .resource-bench :is(.rb-preparation,.rb-allocation-panel) .rb-zone-title > strong { color:#e0eef7; }
.resource-bench .rb-zone-title { display:grid; gap:4px; margin-bottom:15px; }
.resource-bench .rb-zone-title > span { color:#8eafc7; font-size:9px; letter-spacing:.08em; }
.resource-bench .rb-zone-title > strong { color:#d6e9f4; font-size:16px; font-weight:500; line-height:1.7; }
.resource-bench .rb-preparation > .ex-toolbar { gap:6px; margin-bottom:14px; }
body.ai-atelier #activity-stage .resource-bench .rb-preparation > .ex-toolbar button { color:#b7cde0; background:#152e43; border-color:#55718d; box-shadow:none; font-size:11px; min-height:38px; padding:7px 10px; }
body.ai-atelier #activity-stage .resource-bench .rb-preparation > .ex-toolbar button[aria-pressed="true"] { color:#e4f5fc; background:#2c4a61; border-color:#b3d4e8; box-shadow:inset 0 -2px #b3d4e8; }
.resource-bench .rb-sample-rack { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; margin:0; padding:16px 12px; border:1px solid #4b657c; border-radius:7px; background:#102539; }
.resource-bench .rb-sample-rack .pr-piece { min-width:0; }
.resource-bench .rb-sample-rack .pr-piece svg { width:100%; height:auto; border:1px solid #577489; border-radius:6px; }
.resource-bench .rb-sample-rack .pr-piece figcaption { color:#c2d9e7; font-size:11px; line-height:1.6; text-align:center; margin-top:6px; }
body.ai-atelier #activity-stage .resource-bench .rb-preparation .pr-caption { color:#b7ccdc!important; font-size:11px!important; line-height:1.7!important; margin:11px 0!important; }
.resource-bench .rb-training-gate { align-self:center; position:relative; text-align:center; min-width:0; display:grid; justify-items:center; gap:12px; }
.resource-bench .rb-training-gate > small { color:#adc4d7; font-size:9px; letter-spacing:.07em; }
.resource-bench .rb-algorithm-note { color:#c0d6e6; font-size:11px; line-height:1.8; margin:0; max-width:100%; overflow-wrap:anywhere; }
.resource-bench .rb-work-origin { color:#aac5d9; font-size:11px; line-height:1.8; margin:3px 0 0; }
.resource-bench .rb-training-glyph { width:100%; max-width:108px; height:auto; pointer-events:none; }
.resource-bench .rb-training-circuit { stroke:#a5c9dc; stroke-width:1.6; }
.resource-bench .rb-training-gate::before,.resource-bench .rb-training-gate::after { content:""; position:absolute; top:80px; width:18px; border-top:1px solid #91b6cf; pointer-events:none; }
.resource-bench .rb-training-gate::before { right:calc(100% + 1px); }
.resource-bench .rb-training-gate::after { left:calc(100% + 1px); }
body.ai-atelier #activity-stage .resource-bench .rb-training-gate button.ex-primary { color:#123047; background:#b0dbe9; border-color:#c5ebf6; box-shadow:none; font-size:12px; line-height:1.8; padding:10px; min-height:52px; width:100%; }
body.ai-atelier #activity-stage .resource-bench .rb-training-gate .pr-pending { color:#c1d2df!important; font-size:10px!important; line-height:1.8!important; margin:0!important; }
.resource-bench[data-rb-pending="true"] .rb-training-circuit { stroke:var(--rb-amber); stroke-dasharray:3 3; }
.resource-bench[data-rb-pending="true"] .rb-training-gate::after { border-top-style:dashed; border-color:#d0b285; }
.resource-bench .rb-model-status { display:block; color:#a9cdbf; font-size:10px; line-height:1.8; padding:7px 9px; border:1px solid #4e796f; border-radius:4px; margin-bottom:11px; }
.resource-bench[data-rb-pending="true"] .rb-model-status { color:#e2cda5; background:#5c4b2e22; border-color:#a48d65; border-style:dashed; }
.resource-bench .rb-live-model { padding:15px 17px!important; margin:0!important; border:1px solid #506f87!important; border-radius:8px; background:#122c40!important; color:#d1e6f2!important; display:flex; flex-direction:column; gap:0; min-width:0; }
.resource-bench .rb-live-model .rb-zone-title { margin-bottom:13px; }
.resource-bench .rb-live-model > small { font-size:10px; color:#a1c0d1; line-height:1.7; }
.resource-bench .rb-live-model > strong { font-size:16px; color:#d7eaf5; line-height:1.8; font-weight:500; margin-top:8px; }
.resource-bench .rb-rule-canvas { display:block; width:100%; height:auto; overflow:visible; margin:8px 0 1px; pointer-events:none; }
.resource-bench .rb-rule-canvas text { font-family:inherit; }
.resource-bench .rb-rule-bed { fill:#17384b; stroke:#648499; stroke-width:1; }
.resource-bench .rb-rule-region { opacity:.28; }
.resource-bench .rb-region-short { fill:#8bd5b6; }
.resource-bench .rb-region-long { fill:#e4bb75; }
.resource-bench .rb-rule-threshold { stroke:#c8dbe5; stroke-width:1.8; stroke-dasharray:4 4; }
.resource-bench .rb-region-label { fill:#dceef6; font-size:26px; font-weight:500; }
.resource-bench .rb-threshold-label { fill:#bdd5e6; font-size:18px; }
.resource-bench .rb-rule-axis { stroke:#7696aa; stroke-width:1; }
.resource-bench .rb-axis-label { fill:#a2bed1; font-size:16px; }
.resource-bench .rb-untrained-label { fill:#bdd2df; font-size:22px; }
.resource-bench .rb-untrained-hatch { stroke:#92aab8; stroke-width:1; opacity:.15; }
.resource-bench .rb-probe-wire { stroke:#b9d7e8; stroke-width:1; }
.resource-bench .rb-probe { fill:#c2e4f5; stroke:#e1f4fc; stroke-width:1; }
.resource-bench .rb-probe-label { fill:#d4eaf6; font-size:18px; }
.resource-bench .rb-prediction-label { fill:#d1e8f1; font-size:21px; }
.resource-bench .rb-live-model .pr-range { margin:10px 0 8px; gap:5px 10px; font-size:11px; }
.resource-bench .rb-live-model .pr-range output { color:#bce5e8; font-size:22px; }
.resource-bench .rb-live-model .pr-range input { accent-color:#abd4e6; }
.resource-bench .rb-live-model > span:not(.rb-model-status) { color:#abc9dc; font-size:12px; line-height:1.8; margin-top:5px; padding-top:10px; border-top:1px solid #405e77; }

/* A work matrix shows exactly the original tokens and simplified batch count. */
.resource-bench .rb-allocation-panel > .ex-toolbar { gap:7px; margin:0 0 18px; }
body.ai-atelier #activity-stage .resource-bench .rb-allocation-panel > .ex-toolbar button { color:#b7d0e2; background:#153047; border-color:#53748e; box-shadow:none; min-height:40px; padding:8px 12px; font-size:12px; }
body.ai-atelier #activity-stage .resource-bench .rb-allocation-panel > .ex-toolbar button[aria-pressed="true"] { color:#e7f7fc; background:#31556a; border-color:#afd9e8; box-shadow:inset 0 -2px #afd9e8; }
.resource-bench .rb-worker-lanes { display:grid; gap:12px; padding:17px 13px; background:#10273a; border:1px solid #48677f; border-radius:6px; min-width:0; }
.resource-bench .rb-worker-lane { display:grid; grid-template-columns:62px minmax(0,1fr); gap:12px; align-items:center; min-width:0; }
.resource-bench .rb-worker-name { display:flex; flex-direction:column; align-items:center; gap:4px; color:#a8d4e7; }
.resource-bench .rb-worker-name svg { width:34px; height:34px; stroke:#acd2e3; stroke-width:1.5; pointer-events:none; }
.resource-bench .rb-worker-name strong { font-size:10px; font-weight:500; white-space:nowrap; }
.resource-bench .rb-batch-row { display:grid; grid-template-columns:repeat(var(--rb-batches),minmax(0,1fr)); gap:5px; min-width:0; }
.resource-bench .rb-batch-task { display:flex; flex-direction:column; align-items:center; gap:6px; padding:7px 2px; background:#1a374c; border:1px solid #42647c; border-radius:3px; min-width:0; }
.resource-bench .rb-batch-task > small { font-size:8px; color:#a4bdcf; white-space:nowrap; }
.resource-bench .rb-batch-task > span:last-child { font-size:11px; font-variant-numeric:tabular-nums; color:#d1e6f2; }
.resource-bench .rb-work-token { display:block; width:13px; height:18px; border:1px solid #98c5ce; border-radius:2px; background:color-mix(in srgb,#8bcbb8 calc(100% - var(--batch)*15%),#9cbbdd); }
.resource-bench .rb-allocation-meaning { font-size:11px; color:#9db9cd; line-height:1.8; margin:12px 0 9px; }
body.ai-atelier #activity-stage .resource-bench .pr-work-count { color:#c2deed!important; font-size:17px!important; line-height:1.8!important; margin:12px 0 7px!important; }
body.ai-atelier #activity-stage .resource-bench .rb-allocation-panel .pr-caption { color:#a6c2d6!important; font-size:11px!important; }
body.ai-atelier #activity-stage .resource-bench .rb-allocation-panel > .ex-primary { color:#d3ebf8; background:#25435b; border-color:#789cba; font-size:12px; }
.resource-bench > .ex-detail,.resource-bench .rb-condition-details { border-top:1px solid #405c74; color:#a8bfd2; font-size:11px; margin-top:15px; padding-top:9px; }
.resource-bench :is(.ex-detail,.rb-condition-details) > summary { cursor:pointer; min-height:30px; line-height:1.8; color:#b0c9dc; }
body.ai-atelier #activity-stage .resource-bench .ex-detail .ex-note { color:#b2cbdc; background:#193247; border-left-color:#8caabf; font-size:11px!important; }
.resource-bench .rb-condition-details .pr-resource-strip { margin:6px 0 0; }
.resource-bench .rb-condition-details .pr-resource-strip > div { border-bottom-color:#6c8da3; }
.resource-bench .rb-condition-details .pr-resource-strip small { color:#99b9d1; }
.resource-bench .rb-condition-details .pr-resource-strip strong { color:#c8dfed; font-size:14px; }

@media (min-width:1500px) {
  .resource-bench .rb-training-flow { grid-template-columns:minmax(0,1fr) 145px minmax(0,1.1fr); gap:22px; }
  .resource-bench .rb-zone-title > strong { font-size:19px; }
  .resource-bench .rb-live-model > strong { font-size:19px; }
  .resource-bench .rb-sample-rack .pr-piece figcaption { font-size:13px; }
}
@media (max-width:1100px) {
  .resource-bench .rb-training-flow { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
  .resource-bench .rb-training-gate { grid-column:1; grid-row:2; display:grid; grid-template-columns:48px minmax(0,1fr); justify-items:stretch; text-align:left; align-self:start; gap:9px 12px; }
  .resource-bench .rb-training-gate > small { grid-column:1/-1; }
  .resource-bench .rb-training-glyph { width:48px; grid-column:1; grid-row:2; }
  .resource-bench .rb-training-gate > button { grid-column:2; grid-row:2; }
  .resource-bench .rb-training-gate .pr-pending { grid-column:1/-1; }
  .resource-bench .rb-training-gate .rb-algorithm-note { grid-column:1/-1; }
  .resource-bench .rb-training-gate::before,.resource-bench .rb-training-gate::after { display:none; }
  .resource-bench .rb-training-flow > .rb-live-model { grid-column:2; grid-row:1 / span 2; }
  .resource-bench .rb-workspace:not(.rb-training-flow) { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:18px; }
  .resource-bench .rb-worker-lane { grid-template-columns:43px minmax(0,1fr); gap:8px; }
  .resource-bench .rb-worker-lanes { padding:12px 9px; }
  .resource-bench .rb-batch-row { gap:3px; }
  .resource-bench .rb-batch-task > small { font-size:7px; }
}
@media (max-width:750px) {
  .resource-bench { padding:16px 14px 12px; }
  .resource-bench .rb-titlebar { display:block; }
  body.ai-atelier #activity-stage .resource-bench .rb-titlebar h3 { font-size:20px; }
  .resource-bench .rb-simulation { display:inline-block; font-size:9px; margin-top:9px; }
  .resource-bench .rb-workspace,.resource-bench .rb-workspace:not(.rb-training-flow) { grid-template-columns:1fr; gap:18px; }
  .resource-bench .rb-training-flow > .rb-live-model { grid-column:auto; grid-row:auto; }
  .resource-bench .rb-training-gate { grid-column:auto; grid-row:auto; padding:4px 8px; }
  .resource-bench .rb-sample-rack { padding:13px; gap:13px; }
  .resource-bench .rb-sample-rack .pr-piece figcaption { font-size:12px; }
  .resource-bench .rb-live-model { padding:15px!important; }
  .resource-bench .rb-live-model > strong { font-size:16px; }
  .resource-bench .rb-region-label { font-size:36px; }
  .resource-bench .rb-threshold-label { font-size:29px; }
  .resource-bench .rb-axis-label { font-size:24px; }
  .resource-bench .rb-untrained-label { font-size:30px; }
  .resource-bench .rb-probe-label { font-size:28px; }
  .resource-bench .rb-prediction-label { font-size:30px; }
  .resource-bench .rb-worker-lanes { gap:13px; padding:14px 9px; }
  .resource-bench .rb-worker-lane { grid-template-columns:38px minmax(0,1fr); gap:7px; }
  .resource-bench .rb-worker-name svg { width:29px; height:29px; }
  .resource-bench .rb-worker-name strong { font-size:9px; }
  .resource-bench .rb-batch-row { grid-template-columns:repeat(var(--rb-mobile-batches),minmax(0,1fr)); gap:6px; }
  .resource-bench .rb-batch-task { padding:8px 1px; gap:6px; }
  .resource-bench .rb-batch-task > small { font-size:8px; }
  .resource-bench .rb-worker-lanes[style*="12"] .rb-worker-lane { align-items:start; }
  .resource-bench .rb-zone-title { margin-bottom:12px; }
  .resource-bench .rb-zone-title > strong { font-size:17px; }
  .resource-bench .rb-condition-details .pr-resource-strip { grid-template-columns:1fr; gap:8px; }
}
@media (prefers-reduced-motion:reduce) {
  .resource-bench *,.resource-bench *::before,.resource-bench *::after { animation:none!important; transition:none!important; }
}
