.rendering .pattern-frame::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 4px 7px;
  color: white;
  background: rgba(0, 0, 0, .6);
  content: "rendering";
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .72fr);
  min-height: 540px;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.pattern-frame {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: #153f43;
}

#pattern {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
}

.guide {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .94);
  box-shadow: 0 0 0 1px rgba(20, 20, 18, .4), 0 0 18px rgba(0, 0, 0, .18);
  pointer-events: none;
  transition: opacity .2s;
}

.guide-h {
  top: 25%;
  right: 0;
  left: 0;
  height: 12.5%;
  border-right: 0;
  border-left: 0;
}

.guide-v {
  top: 0;
  bottom: 0;
  left: 25%;
  width: 12.5%;
  border-top: 0;
  border-bottom: 0;
}

.guide-label {
  position: absolute;
  z-index: 3;
  padding: 4px 7px;
  color: white;
  background: rgba(25, 24, 21, .82);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: opacity .2s;
}

.guide-h-label {
  top: 25%;
  left: 12px;
}

.guide-v-label {
  top: 12px;
  left: calc(25% + 5px);
}

.mirror {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transition: opacity .2s;
}

.mirror-v {
  top: 0;
  bottom: 0;
  border-left: 2px solid rgba(255, 255, 255, .9);
}

.mirror-h {
  right: 0;
  left: 0;
  border-top: 2px solid rgba(255, 255, 255, .9);
}

.mirror-v-a { left: 25%; }
.mirror-v-b { left: 75%; }
.mirror-h-a { top: 25%; }
.mirror-h-b { top: 75%; }

.study-lines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.study-line {
  position: absolute;
  border-color: var(--accent);
  opacity: .95;
}

.study-line.vertical {
  top: 0;
  bottom: 0;
  border-left: 2px dashed var(--accent);
}

.study-line.horizontal {
  right: 0;
  left: 0;
  border-top: 2px dashed var(--accent);
}

.study-line.reversal {
  border-color: #ffe2c9;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .65));
}

.study-line-label {
  position: absolute;
  z-index: 5;
  display: none;
  padding: 4px 7px;
  color: white;
  background: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}

.study-line-label.visible {
  display: block;
}

.pattern-frame.no-guides .guide,
.pattern-frame.no-guides .guide-label,
.pattern-frame.no-guides .mirror,
.pattern-frame.no-guides .study-lines,
.pattern-frame.no-guides .study-line-label {
  opacity: 0;
}

.story {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 54px);
  border-left: 1px solid var(--ink);
}

.story h2 {
  margin: 0 0 16px;
  font-family: Georgia, serif;
  font-size: clamp(28px, 3vw, 43px);
  font-weight: 400;
  line-height: 1.05;
}

.band-intro {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
}

.band-description {
  display: grid;
  gap: 8px;
}

.band-description p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.technical {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.technical-key {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.symmetry-primer {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 0 14px 16px;
  border-left: 3px solid var(--accent);
}

.symmetry-primer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.symmetry-primer strong {
  color: var(--ink);
}

.paper-links {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.method-summary {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.method-summary strong {
  font-size: 13px;
}

.method-summary p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.method-summary .caveat {
  font-size: 11px;
}

.actions {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 34px;
  height: 19px;
  border: 1px solid #716a60;
  border-radius: 99px;
}

.switch input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #716a60;
  content: "";
  transition: transform .2s, background .2s;
}

.switch input:checked + span::after {
  transform: translateX(15px);
  background: white;
}

.switch input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
}

.structure-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.key-line {
  width: 22px;
  border-top: 2px solid var(--ink);
}

.key-band {
  width: 22px;
  height: 8px;
  border: 1px solid var(--muted);
}
