/* A guided, three-step introduction to the physical Soroban. */
[data-sl-hint-toggle][aria-expanded='true'] .nj-icon-plus-vertical { display: none; }
.sl-lab {
  --sl-red: var(--red, #be1e2d);
  --sl-ink: var(--ink, #050000);
  --sl-paper: #fff;
  --sl-step: 40px;
  display: grid;
  grid-template-columns: minmax(250px, 380px) minmax(0, 1fr);
  grid-template-areas: "instrument instructions" "instrument feedback";
  align-items: center;
  column-gap: clamp(30px, 5vw, 76px);
  margin-block: 48px 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid #dedcdc;
  border-radius: 0;
  background: #fff;
  color: var(--sl-ink);
  font-family: var(--sans, "Museo Sans", Arial, sans-serif);
  font-size: 16px;
  line-height: 1.55;
}
.sl-lab *,
.sl-lab *::before,
.sl-lab *::after {
  box-sizing: border-box;
}
.sl-lab [hidden] {
  display: none !important;
}
.sl-instrument {
  grid-area: instrument;
}
.sl-column-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-inline: 18px;
  margin-bottom: 13px;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sl-frame {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 326px;
  padding: 0 7px;
  isolation: isolate;
  border: 11px solid var(--sl-ink);
  border-top-width: 15px;
  border-bottom-width: 15px;
  background: var(--sl-paper);
  box-shadow: inset 0 0 0 1px rgb(5 0 0 / 12%);
}
.sl-frame::before,
.sl-frame::after {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  height: 1px;
  background: rgb(255 255 255 / 24%);
}
.sl-frame::before {
  top: -10px;
}
.sl-frame::after {
  bottom: -10px;
}
.sl-column {
  position: relative;
  min-width: 0;
}
.sl-rod {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 2px);
  width: 4px;
  background: linear-gradient(90deg, #8a8787, #dedbdb 55%, #a8a3a3);
}
.sl-beam {
  position: absolute;
  z-index: 3;
  inset: 88px 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 11px;
  padding-inline: 7px;
  background: var(--sl-ink);
  border-top: 1px solid #423432;
  border-bottom: 1px solid #423432;
  pointer-events: none;
}
.sl-beam span:last-child::after {
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  margin: 3px auto;
  background: var(--sl-paper);
}
.sl-bead {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 96px;
  height: 40px;
  margin: 0;
  padding: 0 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sl-ink);
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transform: translate(-50%, var(--sl-y));
  transition: transform 210ms cubic-bezier(0.2, 0.7, 0.25, 1);
}
.sl-bead-upper {
  --sl-y: 4px;
}
.sl-bead-upper[aria-pressed="true"] {
  --sl-y: 49px;
}
.sl-lower {
  position: absolute;
  inset: 99px 0 0;
}
.sl-bead-lower {
  --sl-y: calc(var(--sl-index) * var(--sl-step) + 35px);
}
.sl-bead-lower[aria-pressed="true"] {
  --sl-y: calc(var(--sl-index) * var(--sl-step));
}
.sl-bead svg {
  display: block;
  width: 100%;
  height: 36px;
  max-height: 36px;
  overflow: visible;
}
.sl-bead-body {
  fill: var(--sl-ink);
  transition: fill 150ms ease;
}
.sl-bead-light {
  fill: #fff;
  opacity: 0.15;
}
.sl-bead-shade {
  fill: #000;
  opacity: 0.18;
}
.sl-bead-edge {
  stroke: #fff;
  stroke-opacity: 0.08;
  stroke-width: 0.7;
}
.sl-bead[aria-pressed="true"] .sl-bead-body {
  fill: var(--sl-red);
}
.sl-bead[aria-pressed="true"] .sl-bead-light {
  opacity: 0.14;
}
@media (hover: hover) {
  .sl-bead:hover .sl-bead-light {
    opacity: 0.3;
  }
  .sl-reset:hover,
  .sl-next:not(:disabled):hover {
    color: var(--sl-red);
  }
}
.sl-bead:focus-visible {
  outline: 2px solid var(--sl-red);
  outline-offset: 1px;
}
.sl-bead:disabled {
  cursor: default;
}
.sl-instrument-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
  color: #625e5e;
  font-size: 11px;
  line-height: 1.5;
}
.sl-instrument-caption span:first-child {
  color: var(--sl-ink);
  font-weight: 700;
  letter-spacing: 0.12em;
}
.sl-instructions,
.sl-copy {
  max-width: 490px;
  min-width: 0;
  width: 100%;
}
.sl-instructions {
  grid-area: instructions;
  align-self: end;
}
.sl-copy {
  grid-area: feedback;
  align-self: start;
}
.sl-intro-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 17px;
}
.sl-eyebrow {
  margin: 0;
  color: var(--sl-red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
}
.sl-progress {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #625e5e;
}
.sl-progress-marks {
  display: flex;
  gap: 4px;
}
.sl-progress-marks i {
  display: block;
  width: 12px;
  height: 3px;
  background: #d9d5d5;
}
.sl-progress-marks .is-current {
  background: var(--sl-ink);
}
.sl-progress-marks .is-done {
  background: var(--sl-red);
}
.sl-lab h3 {
  margin: 0 0 17px;
  color: var(--sl-ink);
  font-family: var(--serif, "Bodoni Bold", serif);
  font-size: clamp(32px, 3.1vw, 43px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-style: normal;
  font-weight: 700;
}
.sl-lab h3 span {
  color: var(--sl-red);
}
.sl-help {
  max-width: 450px;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #514c4c;
}
.sl-hint-toggle {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sl-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sl-hint-toggle span {
  font-size: 21px;
  font-weight: 500;
}
.sl-hint {
  margin: 0 0 12px;
  padding: 5px 0 5px 15px;
  border-left: 2px solid var(--sl-red);
  color: #514c4c;
  font-size: 15px;
  line-height: 1.6;
}
.sl-reading {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 18px 0 14px;
}
.sl-reading-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  line-height: 1.5;
}
.sl-number {
  display: block;
  min-width: 2.5ch;
  margin-top: 5px;
  font-family: var(--serif, "Bodoni Bold", serif);
  font-size: clamp(64px, 5.8vw, 78px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.sl-equation {
  padding-left: 22px;
  border-left: 1px solid #dedada;
  color: #625e5e;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}
.sl-status {
  min-height: 3.1em;
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.55;
  color: #514c4c;
}
.sl-lab[data-sl-complete="true"] .sl-status {
  color: var(--sl-red);
  font-weight: 700;
}
.sl-lab[data-sl-complete="true"] .sl-number {
  color: var(--sl-red);
}
.sl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.sl-actions button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--sl-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.sl-actions svg {
  width: 17px;
  height: 17px;
}
.sl-actions button:focus-visible,
.sl-hint-toggle:focus-visible,
.sl-trial:focus-visible {
  outline: 2px solid var(--sl-red);
  outline-offset: 5px;
}
.sl-actions button:disabled,
.sl-hint-toggle:disabled {
  color: #756e6e;
  cursor: default;
  font-weight: 400;
}
.sl-actions .sl-next {
  color: var(--sl-red);
}
.sl-actions .sl-next:disabled {
  color: #756e6e;
}
.sl-next span {
  font-size: 21px;
  line-height: 1;
}
.sl-finish {
  margin: 18px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid #dedada;
}
.sl-finish p {
  margin: 0;
  color: #514c4c;
  font-size: 16px;
  line-height: 1.55;
}
.sl-finish .sl-finish-title {
  margin-bottom: 5px;
  color: var(--sl-ink);
  font-weight: 700;
}
.sl-trial {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 44px;
  margin-top: 13px;
  color: #514c4c;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b9b2b2;
  text-underline-offset: 4px;
}
.sl-trial span {
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
}
.sl-lab[data-sl-finished="true"] .sl-trial {
  color: var(--sl-red);
  font-size: 16px;
  font-weight: 700;
  text-decoration-color: var(--sl-red);
}
@media (hover: hover) {
  .sl-hint-toggle:hover,
  .sl-trial:hover,
  .sl-restart:hover {
    color: var(--sl-red);
  }
}
@media (max-width: 900px) {
  .sl-lab {
    column-gap: 30px;
    padding: 30px;
    grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  }
  .sl-intro-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .sl-lab {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "instructions" "instrument" "feedback";
    gap: 27px;
    padding: 28px 22px;
  }
  .sl-instrument {
    width: min(100%, 370px);
    margin-inline: auto;
  }
  .sl-instructions,
  .sl-copy {
    max-width: 440px;
    width: 100%;
    margin-inline: auto;
  }
  .sl-intro-line {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .sl-lab h3 {
    font-size: clamp(32px, 6.6vw, 40px);
  }
  .sl-lab h3 br {
    display: none;
  }
  .sl-help {
    max-width: none;
  }
  .sl-reading {
    margin-block: 0 14px;
  }
  .sl-number {
    font-size: 70px;
  }
  .sl-status {
    min-height: 0;
  }
}
@media (max-width: 380px) {
  .sl-lab {
    padding-inline: 16px;
  }
  .sl-progress-marks {
    display: none;
  }
  .sl-instrument-caption {
    gap: 10px;
  }
  .sl-instrument-caption span:last-child {
    max-width: 150px;
    text-align: right;
  }
  .sl-reading {
    gap: 22px;
  }
  .sl-equation {
    padding-left: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sl-bead,
  .sl-bead-body {
    transition: none;
  }
}
@media (forced-colors: active) {
  .sl-bead-body {
    fill: ButtonText;
  }
  .sl-bead[aria-pressed="true"] .sl-bead-body {
    fill: Highlight;
  }
  .sl-rod,
  .sl-beam {
    background: CanvasText;
  }
  .sl-frame {
    border-color: CanvasText;
  }
}
