/* Chapter scenes: the header band of a chapter overview with the robot's scene beside the title
   (assets/scenes.js; a chapter opts in with Course.overview(el, { scene: '<name>' })).
   Uses the tokens of course.css. Below 860px the scene sits under the text.
   The Blueprint look's rules are in their own section at the end; delete that section with the look. */

/* ================= Original (and the layout shared by both looks) ================= */
.ov-wrap.cr-band{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,47%);gap:24px 40px;align-items:start;padding-top:28px;padding-bottom:28px}
.cr-text{min-width:0;padding-top:12px}
.cr-text .dek{max-width:52ch}

.cr{position:relative;margin:0;min-width:0;border:1px solid var(--rule);border-radius:14px;background:var(--panel);box-shadow:0 1px 2px rgb(0 0 0 / .04)}
.cr-cv{position:relative;line-height:0;border-radius:13px 13px 0 0;overflow:hidden}
.cr-cv canvas{display:block;width:100%;cursor:crosshair;touch-action:manipulation}
.cr-cv canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;border-radius:12px 12px 0 0}
.cr-bar{display:flex;align-items:center;gap:10px;padding:8px 10px 6px 12px;border-top:1px solid var(--rule)}
.cr-ro{flex:1;min-width:0;font:12px/1.4 var(--f-mono);color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cr-btns{display:flex;gap:6px;flex:none}
.cr .btn{padding:5px 12px;min-height:32px;font-size:13.5px}
.cr .btn.primary{min-width:76px}
.cr-cap{padding:0 12px 11px;font-size:13.5px;line-height:1.5;color:var(--ink-2)}
.cr-st{color:var(--ink)}
.cr-learn{color:var(--ink-3)}
.cr-learn a{font-weight:600;white-space:nowrap}
.cr-learn a::after{content:" →"}
.cr-learn .cr-soon{font-weight:600}

@media (max-width:860px){
  .ov-wrap.cr-band{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:24px}
  .cr-text{padding-top:0}
}
@media (max-width:480px){
  .cr-bar{flex-wrap:wrap;gap:6px 10px}
  .cr-ro{flex-basis:100%;order:2;white-space:normal}
  .cr-btns{order:1;margin-left:auto}
}

/* ================= Blueprint look =================
   The scene is a detail view on the drawing: square corners, a thin rule, crop marks just outside its corners
   (as on the part cards), mono lettering for the readout and the caption's topic link. */
:root[data-look="blueprint"] .cr{border-color:var(--rule-2);border-radius:2px;box-shadow:none}
:root[data-look="blueprint"] .cr::before{
  content:"";position:absolute;inset:-9px;pointer-events:none;z-index:0;
  --t:linear-gradient(var(--draft),var(--draft));
  background:
    var(--t) 0 8px/5px 1px no-repeat, var(--t) 8px 0/1px 5px no-repeat,
    var(--t) 100% 8px/5px 1px no-repeat, var(--t) calc(100% - 8px) 0/1px 5px no-repeat,
    var(--t) 0 calc(100% - 8px)/5px 1px no-repeat, var(--t) 8px 100%/1px 5px no-repeat,
    var(--t) 100% calc(100% - 8px)/5px 1px no-repeat, var(--t) calc(100% - 8px) 100%/1px 5px no-repeat;
}
:root[data-look="blueprint"] .cr-cv{border-radius:1px 1px 0 0}
:root[data-look="blueprint"] .cr-cv canvas:focus-visible{border-radius:0}
:root[data-look="blueprint"] .cr-bar{border-top:1px solid var(--rule-2)}
:root[data-look="blueprint"] .cr-ro{font-size:11.5px;letter-spacing:.02em;color:var(--anno)}
:root[data-look="blueprint"] .cr-learn{font:500 11.5px/1.6 var(--f-mono);letter-spacing:.02em;color:var(--anno)}
:root[data-look="blueprint"] .cr-learn :is(a,.cr-soon){font-weight:600;letter-spacing:.04em;text-transform:uppercase}
@media (max-width:860px){
  /* room for the crop marks when the scene sits under the text */
  :root[data-look="blueprint"] .ov-wrap.cr-band{gap:28px}
}
