/* Search results are printed directly above the command line. The header,
   section keys and response share the same fixed aperture for every edition. */
#imprint { display:none; color:#f5ebd8; background:#141a18; }
.ready.has-edition #imprint {
  position:absolute; z-index:2; inset:auto 1px 0; height:47%; min-height:min(30cqw,100%);
  display:grid; grid-template-columns:31% minmax(0,1fr); border-top:3px double #c1ae86;
  box-shadow:0 -1px #272c24;
}
#imprint article { display:none; height:100%; }
#imprint article.current { display:grid; grid-template-rows:auto minmax(0,1fr); min-width:0; min-height:0; }
.record-key,.record-output {
  min-width:0; min-height:0; padding:clamp(10px,1.7cqw,20px) clamp(13px,2.2cqw,25px); overflow:auto;
  scrollbar-width:thin; scrollbar-color:#6c6459 transparent; overscroll-behavior:contain;
}
.record-key {
  padding-bottom:0; border-bottom:1px solid #4c5143;
  background:linear-gradient(110deg,color-mix(in srgb,var(--edition-ink) 10%,#20251e),#171d1a);
}
#binding { position:relative; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; margin:0; border-right:1px solid #726b51;
  background:radial-gradient(ellipse at 48% 47%,color-mix(in srgb,var(--edition-ink) 17%,#20271f),#101613 77%); }
#inspect-binding { position:absolute; z-index:1; top:3px; right:3px; border:0; background:#121915df; color:#d2c8a7; width:28px; height:28px; font:18px/1 var(--mono); cursor:pointer; }
#inspect-binding:is(:hover,:focus-visible) { outline:1px solid currentColor; outline-offset:-2px; }
.binding-stage { min-height:0; position:relative; cursor:grab; touch-action:none; user-select:none; }
.binding-stage.turning { cursor:grabbing; }
.binding-stage:focus-visible { outline:1px dashed #dbcba3; outline-offset:-4px; }
.binding-stage canvas { display:block; position:absolute; inset:0; width:100%; height:100%; }
.turn-control { display:flex; align-items:center; justify-content:space-between; border-top:1px solid #494c3e; color:#c2bfa6; }
.turn-control span { display:flex; align-items:baseline; gap:.6em; font:11px var(--mono); }
.turn-control b { color:var(--signal); font-weight:400; font-variant-numeric:tabular-nums; }
.turn-control button { border:0; background:transparent; color:#dfd4b5; cursor:pointer; width:clamp(27px,5cqw,42px); min-height:27px; font:22px/1 Georgia,serif; }
.turn-control button:hover,.turn-control button:focus-visible { background:#303629; outline-offset:-3px; }
.instrument figcaption,.damping,.resource,.record-output .credit,.record-key nav {
  font:clamp(11px,1.55cqw,15px)/1.3 var(--mono);
}
.record-key h2 {
  font:normal clamp(24px,4.75cqw,50px)/1 Georgia,serif; letter-spacing:-.05em;
  margin:.15em 0 .16em; text-wrap:balance; outline:none;
}
.record-key nav { display:flex; flex-wrap:wrap; gap:0 1.1em; }
.record-key nav a { color:#c8c7b7; padding:.55em 0; text-decoration:none; font-size:clamp(12px,1.56cqw,15px); }
.record-key nav a:hover { color:white; text-decoration:underline; }
.record-key nav [aria-current] { color:var(--signal); box-shadow:inset 0 -2px currentColor; }
.record-output { font:clamp(16px,2.13cqw,22px)/1.36 Georgia,serif; }
.record-output section { display:none; }
.record-output section.current { display:block; }
.record-output p { margin:0 0 .8em; }
.record-output .opening { font-size:1.32em; line-height:1.16; letter-spacing:-.035em; }
.record-output .opening::first-letter { color:var(--signal); }
.record-output a { color:inherit; }
.record-output .resource { display:inline-block; color:var(--signal); margin:.5em 0; }
.resource small { font-size:.85em; }
.instrument { margin:0; }
.instrument figcaption { color:#d2c8b5; }
.instrument svg { display:block; width:100%; height:clamp(40px,7.8cqw,83px); margin:.3em 0; color:var(--signal); }
.instrument path { fill:none; stroke:currentColor; stroke-width:1.7; vector-effect:non-scaling-stroke; }
.instrument .axes { stroke:#817665; stroke-width:.65; stroke-dasharray:2 4; }
.damping { display:flex; gap:.9em; align-items:center; color:#e7dccc; }
.damping input { flex:1; min-width:0; max-width:15em; accent-color:var(--signal); cursor:pointer; }
.damping output { color:var(--signal); }
.contents,.source-register { padding-left:1.65em; margin:0; }
.contents li,.source-register li { padding:.12em 0 .26em .2em; }
.contents li::marker,.source-register li::marker { font:12px var(--mono); color:var(--signal); }
.source-register a { display:block; text-decoration:none; }
.source-register a:hover { text-decoration:underline; }
.source-register a span { display:block; color:#c1b5a2; font:clamp(10px,1.4cqw,13px)/1.45 var(--mono); }
.record-output .credit { font-size:.68em; color:#bfb5a5; }
@container (max-width:560px) {
  .ready.has-edition #imprint { height:82%; grid-template-columns:35% minmax(0,1fr); grid-template-rows:clamp(105px,47%,165px) minmax(0,1fr); }
  #imprint article.current { display:contents; }
  #binding { grid-area:1/1; border-bottom:1px solid #4c5143; }
  .turn-control span { gap:.2em; font-size:10px; }
  .turn-control button { width:25px; min-height:24px; }
  .record-key { grid-area:1/2; padding:7px 10px 1px; align-content:center; }
  .record-key h2 { font-size:clamp(19px,5.6cqw,32px); margin:.18em 0 .05em; }
  .record-key nav { gap:0 .9em; }
  .record-key nav a { padding:7px 0; font-size:11px; }
  .record-output { grid-area:2/1/3/-1; padding:10px 13px; }
}
@container (max-width:355px) {
  .turn-control span { flex-direction:column; align-items:center; gap:0; line-height:1; }
  .turn-control b { font-size:9px; }
}
@container (max-width:275px) {
  .ready.has-edition #imprint { height:91%; grid-template-rows:97px minmax(0,1fr); }
  .turn-control button { width:20px; }
}
.ready.has-edition #imprint.inspecting { height:100%; grid-template: minmax(0,1fr) / minmax(0,1fr); }
#imprint.inspecting #binding { grid-area:1/1; border:0; }
#imprint.inspecting article.current { display:none; }
#imprint.inspecting .turn-control { justify-content:center; gap:1.4em; }
@media (min-width:641px), (max-height:609px), (orientation:landscape) {
  .desktop:has(#imprint.inspecting) :is(.portrait,.shadow-bed,#stream,#glass-ink) { visibility:hidden; }
}
/* On a tall phone the command line is the hinge. Its response occupies the
   unlit space below it, leaving the torch, face and prompt in the same place. */
@media (orientation:portrait) and (max-width:640px) and (min-height:610px) {
  .ready .printing-block { display:grid; grid-template-columns:minmax(0,1fr); padding:0; border:0; background:transparent; }
  .ready .print-bed { display:contents; }
  .ready .rail { order:0; }
  .ready .paper { order:1; }
  .ready .paper::after { height:0; }
  .ready .console { order:2; }
  .ready #imprint,.ready.has-edition #imprint {
    order:3; display:block; position:static; min-height:0;
    height:clamp(0px,calc(var(--window-height) * .88 - 81cqw - 52px),320px);
    visibility:hidden; box-shadow:none;
  }
  .ready.has-edition #imprint { display:grid; visibility:visible; border:1px solid #796e58; border-top:0; }
  .ready.has-edition #imprint.inspecting { height:clamp(0px,calc(var(--window-height) * .88 - 81cqw - 52px),320px); }
}
.desktop:not(.ready) #imprint:has(:target) { display:block; padding:1px; }
.desktop:not(.ready) #imprint article:target,.desktop:not(.ready) #imprint article:has(:target) { display:block; }
.desktop:not(.ready) .record-output section { display:block; margin-bottom:1em; }
.desktop:not(.ready) .print-bed:has(#imprint :target) .paper { display:none; }
