@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');
:root {
  color-scheme: light dark;
  --page-background: Canvas;
  --page-text: CanvasText;
  --page-muted: CanvasText;
  --page-link: LinkText;
  --page-rule: GrayText;
  --page-inset: rgba(128, 128, 128, 0.11);
  --syntax-string: CanvasText;
  --syntax-detail: CanvasText;
  background-color: var(--page-background);
  color: var(--page-text);
}

@supports (color: light-dark(white, black)) {
  :root {
    --page-background: light-dark(#fff, #212124);
    --page-text: light-dark(#333, #e2e2e2);
    --page-muted: light-dark(#545c66, #bbc2cb);
    --page-link: light-dark(#285781, #a5c9ec);
    --page-rule: light-dark(#dce1e6, #454851);
    --syntax-string: light-dark(#17634e, #95d9bf);
    --syntax-detail: light-dark(#853457, #efa9cb);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

a {
  color: var(--page-link);
}

:where(a, button, pre[tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.theme-toggle {
  font: inherit;
  padding: 0.4rem 0.75rem;
}

body {
  margin: 1rem auto;
  max-width: 800px;
  padding: 0 2rem;
  font-family: "Inter", Tahoma, sans-serif;
  line-height: 1.3;
}

.tutorial-content {
  overflow-wrap: break-word;
}

.tutorial-content :where(a, code, td, th) {
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", "Times New Roman", serif;
}

h2 {
  margin-top: 1.5em;
}

pre {
  background-color: var(--page-inset);
  overflow-x: auto;
  padding: 10px;
  white-space: pre;
}

.tutorial-content pre code {
  overflow-wrap: normal;
}

pre > code.hljs {
  box-sizing: border-box;
  display: block;
  inline-size: max-content;
  min-inline-size: 100%;
  overflow: visible;
}

.theme-example :is(.bu, .cf, .dt, .fu, .kw),
.hljs :is(.hljs-built_in, .hljs-keyword, .hljs-name, .hljs-section, .hljs-selector-tag, .hljs-title, .hljs-type) {
  color: var(--page-link);
}

.theme-example :is(.ch, .st),
.hljs :is(.hljs-regexp, .hljs-string) {
  color: var(--syntax-string);
}

.theme-example :is(.at, .dv, .ot, .va),
.hljs :is(.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-number, .hljs-property, .hljs-variable) {
  color: var(--syntax-detail);
}

.hljs :is(.hljs-comment, .hljs-meta, .hljs-quote) {
  color: var(--page-muted);
}

code {
  font-size: 14px;
  font-family: "Fira Code", monospace;
}

img,
video {
  display: block;
  height: auto;
  margin: 0 auto;
  max-inline-size: 100%;
}

li {
  margin-bottom: 0.5em;
  line-height: 1.5;
}

li code:not(pre code) {
  background-color: rgba(128, 128, 128, 0.11);
  padding: 5px;
}
/* Details styling */
details {
  background-color: var(--page-inset);
  padding: 10px;
  margin-bottom: 2rem;
  border-radius: 10px;
}
/* keep native arrow and pointer behavior */
details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: revert; /* ensures the default disclosure arrow remains visible */
  padding: 10px;
}

footer {
  text-align: center;
  font-size: 0.75em;
  color: var(--page-muted);
  padding: 2em 0;
  margin-top: 3em;
  font-style: italic;
}

/* Responsive iframe styling */
iframe {
  max-width: 100%;
}

/* Tablet styles (600px to 800px) */
@media (min-width: 601px) and (max-width: 800px) {
  body {
    padding: 0 1.5rem;
    margin: 1rem auto;
  }
}

/* Add padding for mobile devices */
@media (max-width: 600px) {
  body {
    padding: 0 1em;
  }

  /* Make iframe smaller on mobile */
  iframe {
    width: 100%;
    /* height: 200px; */
  }
}
