body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  max-width: 65rem;
  padding: 2rem;
  margin: auto;
  background: #fafafa;
}

img {
  max-width: 100%;
}

a {
  color: #702bd8;
  font-size: larger;
}

h1,
h2,
strong {
  color: #111;
}

h3 {
  color: #000;
  font-weight: 700;
  font-size: 1.3em;
  border-bottom: 1px solid #ccc;
  border-top: 2px solid #ccc;
  padding-bottom: 2px;
}


table,
th,
td {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 10px;
}

#Notebox_speed {
  background-color: #D3D3D3;
  padding: 10px;
  border: 1px solid green;
}


#Notebox_Conclusion {
  background-color: #cfc;
  padding: 10px;
  border: 1px solid green;
}

.copy-link {
  cursor: pointer;
  width: 20px;
  height: 20px;
}

/* TOC panel styling (scoped to nav.toc so other navs are unaffected) */
nav.toc {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  /* Smaller font size */
  z-index: 1050;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

nav.toc a {
  text-decoration: none;
  color: #702bd8;
  font-weight: bold;
}

nav.toc a:hover {
  color: #501aa3;
}

blockquote {
  background-color: #f0f0f0;
  color: #222;
  border-left: 4px solid #702bd8;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  font-style: normal;
}

/* Hidden checkbox used to toggle the TOC on small screens */
.toc-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Floating toggle button */
.toc-button {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: #702bd8;
  color: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  font-size: 0.9rem;
  user-select: none;
}

.toc-button:hover {
  background-color: #501aa3;
}

/* Desktop layout: show fixed TOC, reserve space to avoid overlap */
@media (min-width: 901px) {
  .toc-button {
    display: none;
  }

  nav.toc {
    width: 16rem;
  }

  body.has-toc {
    padding-right: 18rem;
    /* reserve space for the fixed TOC */
  }
}

/* Small screens: make TOC hideable and non-overlapping */
@media (max-width: 900px) {

  /* Default: hide panel; it opens when toggle is checked */
  nav.toc {
    display: none;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(90vw, 320px);
    height: 100vh;
    max-height: none;
    padding: 1rem;
    border-radius: 0;
    border-left: 1px solid #ddd;
    border-top: none;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    background: #fff;
  }

  /* Reveal panel when toggled */
  #toc-toggle:checked~nav.toc {
    display: block;
  }

  /* No extra padding on small screens */
  body.has-toc {
    padding-right: 1rem;
  }
}