.seh-demos {
  color-scheme: light;
  font-family: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color: #16293d;
  background: #edf3f8;
  --surface: #fff;
  --border: #dce5ee;
  --muted: #52677c;
  --accent: #1a6e8a;
  --track: #dbe7ee;
}

:where(.seh-demos) *, :where(.seh-demos) *::before, :where(.seh-demos) *::after {
  box-sizing: border-box;
}

.seh-demos {
  margin: 0;
}

:where(.seh-demos) .demo-main {
  margin: clamp(32px, 5vh, 68px) auto 36px;
}

:where(.seh-demos) :is(h1, .demo-section-title), :where(.seh-demos) h2, :where(.seh-demos) p {
  margin: 0;
}

:where(.seh-demos) :is(h1, .demo-section-title) {
  font-size: clamp(2.15rem, 5vw, 3.5rem);
}

:where(.seh-demos) .page-header {
  margin-bottom: 25px;
}

:where(.seh-demos) .page-header p {
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.5;
}

:where(.seh-demos) .back {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 10px;
  border-radius: 4px;
  color: #245a76;
  font-size: 1.0625rem;
  font-weight: 650;
  text-decoration: none;
}

:where(.seh-demos) .back:hover {
  text-decoration: underline;
}

:where(.seh-demos) .demo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 38px rgb(33 63 91 / .07);
  overflow: clip;
}

:where(.seh-demos) .demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px 10px;
}

:where(.seh-demos) h2 {
  font-size: 1.0625rem;
  font-weight: 650;
}

:where(.seh-demos) .demo-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

:where(.seh-demos) .demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6f9fc;
  color: #203a50;
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

:where(.seh-demos) .demo-toggle:hover {
  border-color: #9bb5c6;
}

:where(.seh-demos) .light[aria-pressed="true"] {
  background: #fff6dc;
  border-color: #ead8ab;
  color: #583e12;
}

:where(.seh-demos) .correction[aria-pressed="true"] {
  background: #e4f1f5;
  border-color: #aaccd7;
  color: #174a60;
}

:where(.seh-demos) .switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 18px;
  background: #61778a;
}

:where(.seh-demos) .switch::before {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 12px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 150ms ease;
}

:where(.seh-demos) .light[aria-pressed="true"] .switch {
  background: #986000;
}

:where(.seh-demos) .correction[aria-pressed="true"] .switch {
  background: var(--accent);
}

:where(.seh-demos) .demo-toggle[aria-pressed="true"] .switch::before {
  transform: translateX(14px);
}

:where(.seh-demos) .stage {
  display: grid;
  flex: 1;
  align-items: center;
  padding: 0 12px;
  background: var(--eye-background);
}

:where(.seh-demos) .stage svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 370px;
  translate: min(15mm, 8%) 0;
}

:where(.seh-demos) .axis {
  fill: none;
  stroke: #9bb0c1;
  stroke-dasharray: 3 7;
  stroke-width: 1.35;
}

:where(.seh-demos) .correction-glass {
  fill: url(#correction-paint);
  stroke: #357a90;
  stroke-width: 1;
}

:where(.seh-demos) .correction-plane {
  fill: none;
  stroke: #357a90;
  stroke-dasharray: 2 3;
  opacity: .6;
}

:where(.seh-demos) .correction-power {
  fill: #174a60;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

:where(.seh-demos) .beam-area {
  fill: url(#beam-paint);
  fill-rule: evenodd;
}

:where(.seh-demos) .beam-rays, :where(.seh-demos) .beam-projection {
  fill: none;
  stroke: #a36500;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:where(.seh-demos) .beam-projection {
  stroke-dasharray: 4 4;
}

:where(.seh-demos) .focus {
  fill: #ffdf76;
  stroke: #8b5100;
  stroke-width: 1.2;
}

:where(.seh-demos) .beam-reveal {
  transform-origin: 0 0;
  transform: scaleX(0);
  transition: transform 450ms ease-in;
}

:where(.seh-demos) [data-light="on"] .beam-reveal {
  transform: scaleX(1);
  transition: transform 2.6s cubic-bezier(.25, .75, .38, 1);
}

:where(.seh-demos) .model-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 26px 40px;
  align-items: center;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  background: #f9fbfd;
}

:where(.seh-demos) .model-state {
  display: grid;
  gap: 5px;
  font-size: .9rem;
  line-height: 1.45;
}

:where(.seh-demos) .model-state strong {
  font-size: 1rem;
  font-weight: 700;
}

:where(.seh-demos) .model-state span {
  color: var(--muted);
}

:where(.seh-demos) .control-heading, :where(.seh-demos) .scale {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

:where(.seh-demos) .control-heading {
  font-weight: 650;
}

:where(.seh-demos) .control-heading output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

:where(.seh-demos) .scale {
  color: var(--muted);
  font-size: .8125rem;
}

:where(.seh-demos) input[type="range"] {
  display: block;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 4px 0 1px;
  padding: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
  --position: 62%;
  --range-fill: linear-gradient(to right, var(--accent) var(--position), var(--track) var(--position));
}

:where(.seh-demos) input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: var(--range-fill);
}

:where(.seh-demos) input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 6px;
  background: var(--range-fill);
}

:where(.seh-demos) input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
}

:where(.seh-demos) input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
}

:where(.seh-demos) :is(a, button, input):focus-visible {
  outline: 3px solid #257ba1;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  :where(.seh-demos) .demo-main {
    margin-top: 20px;
  }

  :where(.seh-demos) .page-header {
    margin-bottom: 20px;
  }

  :where(.seh-demos) .demo {
    border-radius: 18px;
  }

  :where(.seh-demos) .demo-header {
    padding: 12px 16px 10px;
  }

  :where(.seh-demos) .stage {
    padding: 0;
  }

  :where(.seh-demos) .model-controls {
    grid-template-columns: 1fr;
    gap: 21px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.seh-demos) .switch::before, :where(.seh-demos) .beam-reveal, :where(.seh-demos) [data-light="on"] .beam-reveal {
    transition: none;
  }
}
