* {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -khtml-user-select: none;    /* Konqueror HTML */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Standard property */
}

@media print {
  body {
    display: none !important;
  }
}

@media (prefers-color-scheme: dark) {
    :root, body {
        --primary: #171717;
        --secondary: #fffbf2;
        --accent: #3672a4;
        --highlight: #70aee0;
        --error: #ac6363;
        --shadow-primary: #474747;
        --shadow-secondary: #cfcbc2;
        --gradient: linear-gradient(to right, var(--highlight), var(--accent));
        --shadow-gradient: linear-gradient(to right, var(--shadow-primary), var(--shadow-secondary));
    }
}

@media (prefers-color-scheme: light) {
    :root, body {
        --primary: #fffbf2;
        --secondary: #171717;
        --accent: #70aee0;
        --highlight: #3672a4;
        --error: #8f2020;
        --shadow-primary: #cfcbc2;
        --shadow-secondary: #474747;
        --gradient: linear-gradient(to right, var(--highlight), var(--accent));
        --shadow-gradient: linear-gradient(to right, var(--shadow-primary), var(--shadow-secondary));
    }
}

.tos-level1 {
  text-indent: 0em !important;
  font-size: xx-large;
  margin-top: 0% !important;
  margin-bottom: 0% !important;
}
li.tos-level1 {
  padding-bottom: 5%;
}

.tos-level2 {
  font-size: medium;
  margin-top: 0% !important;
  margin-bottom: 0% !important;
}

p.copyright {
    text-align: center;
    color: var(--shadow-primary);
}

h3 {
  scroll-margin-top: 125px;
}

/* Base (desktop) styles */
#chapter-nav {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 200px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--primary);
  border: 1px solid var(--secondary);
  padding: 1rem;
  border-radius: 6px;
}

#nav-toggle {
  display: none;
}

#chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#chapter-nav li {
  margin-bottom: 0.5rem;
}

/* Mobile styles */
@media (max-width: 768px) {
  body {
    font-size: 1.2rem;
    padding-top: 50px;
  }

  #chapter-nav {
    top: 0;
    right: 0;
    width: 100%;
    max-height: none;
    border-radius: 0;
  }

  #nav-toggle {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: none;
    color: var(--accent);
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
  }

  #nav-list {
    display: none;
  }

  #nav-list.open {
    display: block;
  }
}