.reveal .slides section {
  text-align: left;
}

.reveal .slides section h1,
.reveal .slides section h2,
.reveal .slides section h3 {
  text-align: center;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.reveal input,
.reveal button,
.reveal select,
.reveal textarea,
.reveal label,
.reveal summary {
  touch-action: manipulation;
}

.reveal input[type="range"] {
  touch-action: pan-x;
}

.reveal {
  font-size: 24px;
  color: #3f3f3f;
}

.reveal,
.reveal .slides,
.reveal .slide-background,
.reveal .slide-background-content {
  background: rgb(247, 247, 247);
}

.reveal h1 {
  font-size: 1.8em;
}

.reveal h2 {
  font-size: 1.4em;
}

.reveal h3 {
  font-size: 1.15em;
}

.reveal .attention-label {
  color: #c10000;
  font-weight: 700;
}

.back-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: 12px;
}

.back-link {
  display: inline-block;
  margin: 6px auto 0;
  font-size: 0.95em;
  letter-spacing: 0.03em;
}

.back-link a {
  color: #1f1f1f;
  text-decoration: none;
}

.reveal .definition-box {
  border: 2px solid #222222;
  border-radius: 8px;
  padding: 16px 20px;
  background: rgb(247, 247, 247);
}

.reveal .plot-narrow {
  display: block;
  width: 520px;
  max-width: 80%;
  margin: 8px auto;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px auto 8px;
}

.slide-btn {
  display: block;
  margin: 0;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 0 #1b4c61;
  background: #2e6f8e;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.slide-btn:hover {
  background: #3a7f9f;
}

.slide-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0 #1b4c61;
}

.slide-btn:disabled {
  background: #9aa9b3;
  cursor: not-allowed;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #c4c4c4;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-slider {
  background: #2e6f8e;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9em;
}

.slider-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto 14px;
  width: min(620px, 90%);
}

.slider-row input[type="range"] {
  flex: 1 1 auto;
  max-width: 360px;
  accent-color: #2e6f8e;
}

.slider-value {
  display: inline-block;
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.slider-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  width: min(760px, 95%);
  margin: 10px auto 14px;
}

.slider-row.slider-row-inline {
  margin: 0;
  width: min(320px, 90%);
}

.formula-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
  width: fit-content;
  max-width: 90%;
  margin: 12px auto 18px;
  text-align: center;
}

.instruction-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: 12px;
}

.instruction-link {
  display: inline-block;
  margin: 6px auto 0;
  font-size: 0.95em;
  letter-spacing: 0.03em;
  animation: instruction-pulse 1.6s ease-in-out infinite;
}

.instruction-link a {
  color: #1f1f1f;
  text-decoration: none;
}

@keyframes instruction-pulse {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(4px);
  }
  60% {
    transform: translateY(2px);
  }
}
