/* Weyl chamber panel (two-qubit gate pages) */

.weyl-panel {
  border: 2px solid black;
  border-radius: 5px;
  background: white;
  padding: 14px 18px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px 28px;
  align-items: start;
}

.weyl-side {
  padding-top: 6px;
}

@media (max-width: 680px) {
  .weyl-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

.weyl-figure {
  position: relative;
}

.weyl-svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 3px;
}

.weyl-svg:focus-visible {
  outline: 2px solid black;
  outline-offset: 2px;
}

.weyl-svg.is-dragging {
  cursor: grabbing;
}

.weyl-svg text {
  font-family: "TASA Orbiter", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  fill: black;
  pointer-events: none;
}

.weyl-svg .weyl-axis-label {
  font-family: KaTeX_Math, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  fill: #444;
}

.weyl-svg .weyl-ghost-label {
  fill: #777;
  font-weight: 400;
}

.weyl-svg .weyl-landmark {
  cursor: pointer;
}

.weyl-svg .weyl-landmark:focus {
  outline: none;
}

.weyl-svg .weyl-landmark .weyl-dot {
  fill: white;
  stroke: black;
  stroke-width: 1.6;
  transition: r 0.12s ease, stroke-width 0.12s ease;
}

.weyl-svg .weyl-landmark:hover .weyl-dot,
.weyl-svg .weyl-landmark:focus-visible .weyl-dot {
  stroke-width: 2.6;
}

.weyl-svg .weyl-landmark:hover text,
.weyl-svg .weyl-landmark:focus-visible text {
  text-decoration: underline;
}

.weyl-svg .weyl-ghost .weyl-dot {
  stroke: #777;
  stroke-dasharray: 2 2;
}

.weyl-svg .weyl-hit {
  fill: transparent;
}

.weyl-svg .weyl-current-dot {
  fill: #b3315f;
  stroke: white;
  stroke-width: 2;
}

.weyl-svg .weyl-current-twin {
  fill: none;
  stroke: #b3315f;
  stroke-width: 1.6;
  stroke-dasharray: 2.5 2.5;
}

.weyl-svg .weyl-current-drop {
  stroke: #b3315f;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.8;
}

.weyl-svg .weyl-path {
  fill: none;
  stroke: #b3315f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 4;
  opacity: 0.55;
}

.weyl-reset {
  position: absolute;
  top: 2px;
  right: 2px;
  border: 2px solid black;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--gradient2);
  font-family: "TASA Orbiter", sans-serif;
  font-size: 11px;
  cursor: pointer;
}

.weyl-reset:hover {
  transform: translateY(-1px);
}

.weyl-tooltip {
  position: absolute;
  background: #222;
  color: #fff;
  font-family: "TASA Orbiter", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 8px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 5;
}

.weyl-tooltip small {
  display: block;
  opacity: 0.75;
  font-size: 11px;
}

.weyl-key {
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: "TASA Orbiter", sans-serif;
  font-size: 11px;
  color: #333;
}

.weyl-key li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #333;
}

.weyl-key-current {
  fill: #b3315f;
}

.weyl-key-landmark {
  fill: white;
  stroke: black;
  stroke-width: 1.6;
}

.weyl-key-pe {
  fill: #8a6d00;
  fill-opacity: 0.18;
  stroke: #8a6d00;
  stroke-width: 1.5;
}

.weyl-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.weyl-controls:empty {
  display: none;
}

.weyl-control {
  display: grid;
  grid-template-columns: 1.6em minmax(0, 1fr) 4.2em;
  align-items: center;
  gap: 10px;
  font-family: "TASA Orbiter", sans-serif;
  font-size: 13px;
}

.weyl-control output {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.weyl-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.weyl-control input[type="range"]:focus {
  outline: none;
}

.weyl-control input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: black;
  border-radius: 1px;
}

.weyl-control input[type="range"]::-moz-range-track {
  height: 2px;
  background: black;
  border-radius: 1px;
}

.weyl-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--gradient2);
  border: 2px solid black;
  box-sizing: border-box;
}

.weyl-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient2);
  border: 2px solid black;
  box-sizing: border-box;
}

.weyl-control input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.weyl-control input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}

.weyl-readout {
  margin-top: 0;
}

.weyl-facts {
  font-size: 14px;
}

.weyl-coords .katex {
  font-size: 1.05em;
}

.weyl-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
  min-height: 22px;
}

.weyl-badge {
  font-size: 12px;
  padding: 4px 11px;
}

.weyl-badge[hidden],
.weyl-equiv[hidden] {
  display: none;
}

.weyl-badge-pe::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  vertical-align: -1px;
  background: rgba(138, 109, 0, 0.18);
  border: 1.5px solid #8a6d00;
  box-sizing: border-box;
}

.weyl-equiv a {
  white-space: nowrap;
}

.weyl-note {
  margin-top: 16px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.45;
  color: #333;
}

.weyl-note .katex {
  font-size: 1.05em;
  font-style: normal;
}
