@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  overflow-y: scroll;
}

dockit-layout [slot='logo'] > :first-child {
  width: auto;
  height: var(--private--dockit-layout-logo-height);
}

.prose :where(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: calc(var(--private--dockit-layout-header-height) + 1rem);
}

.prose figcaption {
  margin: 0.5rem 0;
  text-align: center;
}

.prose {
  max-width: unset;
}

/* copied from typography styles */
/* double-class is due to a specificity war with the Prism theme */
.prose.prose :where(pre):not(:where([class~='not-prose'] *)) {
  font-weight: 400;
  font-size: 0.875em;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  padding-top: 0.8571429em;
  padding-right: 1.1428571em;
  padding-bottom: 0.8571429em;
  padding-left: 1.1428571em;
}

/* copied from typography styles */
/* double-class is due to a specificity war with the Prism theme */
.prose.prose :where(pre code):not(:where([class~='not-prose'] *)) {
  padding: 0;
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

.story_padded {
  line-height: initial;
}

.preview-story {
  border: 1px solid #404040;
  border-radius: 6px;
  margin-bottom: 15px;
}

.preview-story .story_padded {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  padding: 15px;
}

.preview-story details {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  border-top: 1px solid #404040;
  overflow: hidden;
}

.preview-story summary {
  background-color: #e5e5e5;
  cursor: pointer;
  padding: 5px 20px;
}

.preview-story summary:hover {
  background-color: #d4d4d4;
}

/* double-class is due to a specificity war with typography and Prism theme */
.preview-story.preview-story pre {
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 15px;
}

html {
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

html.dark .preview-story,
html.dark .preview-story details {
  border-color: #404040;
}

html.dark .preview-story summary {
  background-color: #262626;
}

api-viewer,
api-docs,
api-demo {
  --ave-border-radius: 6px;
  --ave-tab-indicator-size: 6px;

  --ave-primary-color: #e5e5e5;
  --ave-accent-color: #000000;
  --ave-border-color: #404040;
  --ave-header-background: #e5e5e5;
  --ave-header-color: #404040;
  --ave-item-color: #404040;
  --ave-label-color: #404040;
  --ave-link-color: #171717;
  --ave-link-hover-color: #171717;
  --ave-tab-color: #404040;
  --ave-tab-selected-color: #737373;
}

html.dark api-viewer,
html.dark api-docs,
html.dark api-demo {
  --ave-primary-color: #262626;
  --ave-accent-color: #ffffff;
  --ave-border-color: #404040;
  --ave-header-background: #262626;
  --ave-header-color: #d4d4d4;
  --ave-item-color: #d4d4d4;
  --ave-label-color: #a3a3a3;
  --ave-link-color: #ffffff;
  --ave-link-hover-color: #ffffff;
  --ave-tab-color: #d4d4d4;
  --ave-tab-selected-color: #a3a3a3;
}
