:where(.seh-demos) .eye-page {
  width: min(1280px, calc(100% - 56px));
  margin-top: clamp(24px, 4.5vh, 58px);
}

:where(.seh-demos) .eye-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(305px, 1fr);
  gap: 18px;
  align-items: stretch;
}

:where(.seh-demos) .viewer {
  overflow: hidden;
}

:where(.seh-demos) .viewer-toolbar,
:where(.seh-demos) .viewer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
}

:where(.seh-demos) .viewer-toolbar button,
:where(.seh-demos) .viewer-controls button,
:where(.seh-demos) .station-menu button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

:where(.seh-demos) .viewer-toolbar button:disabled,
:where(.seh-demos) .viewer-controls button:disabled {
  opacity: .45;
  cursor: default;
}

:where(.seh-demos) .view-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: #edf3f8;
}

:where(.seh-demos) .view-switch button {
  min-height: 36px;
  padding: 5px 12px;
  background: transparent;
  color: #233b50;
}

:where(.seh-demos) .view-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 3px rgb(28 62 88 / .19);
}

:where(.seh-demos) .viewer-toolbar .light-path {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 5px 12px;
  border-color: var(--border);
  background: #f7f9fb;
  color: #284055;
}

:where(.seh-demos) .light-path[aria-pressed="true"] {
  border-color: #ebd2a0;
  background: #fff4d9;
  color: #68420e;
}

:where(.seh-demos) .light-path span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7890a3;
}

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

:where(.seh-demos) .viewport {
  position: relative;
  isolation: isolate;
  height: clamp(310px, min(43vw, 100svh - 325px), 536px);
  background: #d7dce1;
}

:where(.seh-demos) .viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

:where(.seh-demos) .viewport canvas:active {
  cursor: grabbing;
}

:where(.seh-demos) .viewport canvas:focus-visible {
  outline-offset: -4px;
}

:where(.seh-demos) .viewport canvas[hidden],
:where(.seh-demos) .fallback[hidden] {
  display: none;
}

:where(.seh-demos) .fallback {
  display: grid;
  justify-items: center;
  align-content: center;
  height: 100%;
  padding: 12px;
}

:where(.seh-demos) .fallback img {
  display: block;
  width: min(100%, 365px);
  max-height: 83%;
  object-fit: contain;
}

:where(.seh-demos) .fallback p,
:where(.seh-demos) .viewport-note {
  padding: 5px 8px;
  color: #52677c;
  text-align: center;
  font-size: .875rem;
}

:where(.seh-demos) .viewport-note {
  position: absolute;
  inset: auto 8px 8px;
  background: #fff;
}

:where(.seh-demos) .transport {
  display: inline-flex;
  flex: none;
  gap: 7px;
}

:where(.seh-demos) .transport .step {
  display: grid;
  place-items: center;
  min-width: 40px;
  border-color: var(--border);
  background: #f5f9fb;
  color: #23455a;
  font-size: 1.44rem;
  line-height: 1;
}

:where(.seh-demos) .transport .play {
  min-width: 132px;
  padding-inline: 13px;
  background: #176781;
  color: white;
}

:where(.seh-demos) .transport .play:hover {
  background: #12556b;
}

:where(.seh-demos) .position-control {
  display: flex;
  flex: 1 1 190px;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
}

:where(.seh-demos) .position-control input {
  flex: 1;
  min-width: 76px;
  accent-color: var(--accent);
}

:where(.seh-demos) .controls-help {
  padding: 10px 16px;
  border-block-end: 1px solid var(--border);
  background: #c7cdd3;
  color: #33495d;
  font-size: .875rem;
  line-height: 1.45;
}

:where(.seh-demos) .controls-help strong {
  margin-inline-end: .4em;
  color: #16293d;
}

:where(.seh-demos) .controls-help p + p { margin-top: 4px; }

:where(.seh-demos) .station {
  padding: 24px;
}

:where(.seh-demos) .station-position {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

:where(.seh-demos) .station h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.1;
}

:where(.seh-demos) .station-description {
  margin-top: 14px;
  color: #40596d;
  font-size: .97rem;
  line-height: 1.55;
}

:where(.seh-demos) .station dl {
  margin: 20px 0 0;
}

:where(.seh-demos) .station dt {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: #203b50;
  font-size: .9rem;
  font-weight: 700;
}

:where(.seh-demos) .station dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}

:where(.seh-demos) .station-panel {
  margin-top: 18px;
  padding: 17px 20px 20px;
}

:where(.seh-demos) .station-panel h2 {
  font-size: 1.125rem;
}

:where(.seh-demos) .station-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

:where(.seh-demos) .station-menu button {
  min-height: 38px;
  padding: 5px 10px;
  border-color: var(--border);
  background: #f5f9fb;
  color: #274357;
}

:where(.seh-demos) .station-menu button:hover,
:where(.seh-demos) .station-menu button[aria-current="step"] {
  border-color: #2f8198;
  background: #e2f0f4;
  color: #15536b;
}

.seh-demos[data-theme="dark"] .view-switch {
  background: var(--theme-inset);
}

.seh-demos[data-theme="dark"] .view-switch button {
  color: var(--theme-strong);
}

.seh-demos[data-theme="dark"] :is(.viewer-toolbar .light-path, .transport .step, .station-menu button) {
  background: var(--theme-control);
  color: var(--theme-strong);
}

.seh-demos[data-theme="dark"] :is(.view-switch button[aria-pressed="true"], .station-menu button[aria-current="step"]) {
  border-color: var(--theme-hover-border);
  background: var(--accent-light);
  color: var(--accent);
}

.seh-demos[data-theme="dark"] .viewer-toolbar .light-path[aria-pressed="true"] {
  border-color: var(--theme-amber-border);
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.seh-demos[data-theme="dark"] .light-path[aria-pressed="true"] span {
  background: var(--theme-amber-text);
}

.seh-demos[data-theme="dark"] .transport .play {
  background: var(--accent);
  color: var(--theme-inset);
}

.seh-demos[data-theme="dark"] .station-description {
  color: var(--muted);
}

.seh-demos[data-theme="dark"] .station dt {
  color: var(--theme-strong);
}

.seh-demos[data-theme="dark"] .viewport canvas:focus-visible {
  outline-color: #257ba1;
}

@media (hover: hover) and (pointer: fine) {
  .seh-demos[data-theme="dark"] :is(.view-switch button, .viewer-toolbar .light-path, .transport .step, .station-menu button):enabled:hover {
    border-color: var(--theme-hover-border);
  }

  .seh-demos[data-theme="dark"] :is(.view-switch button[aria-pressed="false"], .transport .step, .station-menu button):enabled:hover {
    background: var(--accent-light);
  }

  .seh-demos[data-theme="dark"] .transport .play:enabled:hover {
    background: #a9e2f2;
  }
}

@media (max-width: 850px) {
  :where(.seh-demos) .eye-layout { grid-template-columns: 1fr; }
  :where(.seh-demos) .station { padding: 20px; }
}

@media (max-width: 550px) {
  :where(.seh-demos) .eye-page { width: calc(100% - 24px); }
  :where(.seh-demos) .viewport { height: clamp(275px, 82vw, 405px); }
  :where(.seh-demos) .viewer-toolbar,
  :where(.seh-demos) .viewer-controls { padding-inline: 12px; }
  :where(.seh-demos) .controls-help { padding-inline: 12px; }
  :where(.seh-demos) .station-panel { padding-inline: 14px; }
}
