@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply bg-gray-200 tracking-normal;
  }
  a {
    @apply text-blue-500;
  }
  a:hover {
    @apply text-blue-600;
  }

  /* Headings style */
  h1 {
    @apply text-2xl font-bold my-6;
  }
  h2 {
    @apply text-xl font-bold mt-4 mb-2;
  }
  h3 {
    @apply text-xl font-bold my-2;
  }

  /* Monospace styling */
  pre {
    @apply my-4;
  }
  code {
    @apply leading-tight text-sm;
  }

  /* Paragraph indentation */
  p {
    @apply indent-4;
  }
  h2 + p,
  h3 + p,
  h4 + p {
    @apply indent-0;
  }
  div.page-column > p:first-child,
  div[data-section-title] > p:first-child,
  div[data-section-title] > p:first-of-type {
    @apply indent-0;
  }
}

html {
  scroll-behavior: auto !important;
}

div.references > p {
  @apply indent-0 mb-4 break-words;
}

div.annotation * {
  @apply text-justify indent-0;
}
div.annotation div.content > p {
  @apply font-sans mb-1;
}
div.annotation div.toggle {
  @apply font-sans;
}
div.annotation div.collapsed {
  @apply line-clamp-2;
}
div.annotation div.collapsed *:not(:first-child) {
  @apply hidden;
}
div.annotation code {
  @apply bg-gray-100 p-1 rounded;
}

.katex { font-size: 1em; }

a[id] {
  display: block;
  position: relative;
  top: -50px;
  visibility: hidden;
}

.scrolled {
  @apply shadow-xl;
  border-bottom: 0px;
}

div.annotation-markdown p {
  display: inline-block;
  font-weight: normal;
}

div.annotation-markdown a {
  color: black;
}
