@charset "UTF-8";
/* General Styling */
body {
  margin: 0;
  padding: 0;
  padding-bottom: 20px;
}

.container {
  margin: 0 auto;
}

/* Testing zoom levels on mobiles. Non-standard / Experimental */
@media screen and (max-width: 768px) {
  :root {
    zoom: 1;
    /* transform: scale(0.7); */
    /* font-size: .7rem; */
    /* max-width: 100vw;
     margin: 0;
     padding: 0; */
  }

  .container {
    margin: 0;
    padding: 0;
    width: 100vw;
  }

  .card {
    width: 100vw;
  }

  .card-body {
    padding: 20px 0;
  }

  #old .contents,
  #new .contents {
    margin: 0;
  }

  .contents {
    font-size: .7rem;
  }
}
/* Typography Hierarchy */
/* Typeface */
body {
  font-family: 'Roboto', sans-serif;
}

/* Body Text */
body {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* Styling classes (utility classes) */
.clickable {
  color: gray;
  cursor: pointer;
}

.clickable:hover {
  color: black;
}

.fullwidth100 {
  width: 100% !important;
  height: 125px;
}

.hide,
.hidden {
  display: none !important;
}

.highlight {
  background-color: orange;
}

.inline-block {
  display: inline-block;
}

.spacer {
  width: 100%;
  height: 5px;
}

/* General Layout */
.site-header {
  text-align: center;
}

#title {
  text-align: center;
  margin-top: 2rem;
  color: black !important;
}

#explore-curriculum iframe {
  resize: vertical;
}

#summary-title-wrapper {
  font-size: 1.3625em !important;
  font-weight: bold;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

@media screen and (max-width: 720px) {
  #summary-title {
    max-height: 1.7rem !important;
    overflow-y: scroll !important;
  }
}
#summary-title-wrapper:has(#mobile-tap.active) #summary-title-inner {
  display: none;
}

#summary-title-wrapper:has(#mobile-tap.active) {
  justify-content: flex-end !important;
}

#summary-title-inner:not(:has(#summary-collapser.stated)) {
  opacity: 0.65;
  filter: invert(1) grayscale(1);
}

#summary-title {
  background-color: white;
  opacity: 1;
  margin: 0;
  padding-left: 5px;
  padding-right: 5px;
}

#summary-inner textarea {
  border-color: white;
}

#summary-inner pre {
  white-space: break-spaces;
  color: white;
  background-color: #969696;
  margin: 10px;
}

#summary-inner img {
  max-width: calc(100% - 40px);
}

#summary-inner .img-wrapper img.state-1 {
  transform: scale(0.8);
}

#summary-inner .img-wrapper img.state-2 {
  transform: scale(0.65);
}

#summary-inner .img-wrapper .centered {
  margin-left: auto;
  margin-right: auto;
}

#summary-inner .img-wrapper img {
  height: max-content;
}

@media screen and (max-width: 768px) {
  #summary-inner .img-wrapper img {
    height: auto;
  }
}
#summary-inner .img-wrapper .responsive-iframe-container.state-1 iframe {
  width: 80vh;
  height: 80vh;
}

#summary-inner .img-wrapper .responsive-iframe-container.state-2 iframe {
  width: 65vh;
  height: 65vh;
}

#summary-inner .img-wrapper .img-btns {
  z-index: 200;
}

/* Hierarchical indentation for headings */
.heading-section {
  margin-bottom: 1.5rem;
}

.indent-level-0 {
  margin-left: 0;
}

.indent-level-1 {
  margin-left: 1.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(160, 160, 160, 0.2);
}

.indent-level-2 {
  margin-left: 3rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(140, 140, 140, 0.2);
}

.indent-level-3 {
  margin-left: 4.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(120, 120, 120, 0.2);
}

.indent-level-4 {
  margin-left: 6rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(100, 100, 100, 0.2);
}

.indent-level-5 {
  margin-left: 7.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(80, 80, 80, 0.2);
}

@media screen and (max-width: 768px) {
  .indent-level-1 {
    margin-left: 0.75rem;
    padding-left: 0.5rem;
  }

  .indent-level-2 {
    margin-left: 1.5rem;
    padding-left: 0.5rem;
  }

  .indent-level-3 {
    margin-left: 2.25rem;
    padding-left: 0.5rem;
  }

  .indent-level-4 {
    margin-left: 3rem;
    padding-left: 0.5rem;
  }

  .indent-level-5 {
    margin-left: 3.75rem;
    padding-left: 0.5rem;
  }
}
/* Fieldset layout */
#explore-curriculum fieldset {
  display: block;
  margin-inline-start: 2px;
  margin-inline-end: 2px;
  padding-block-start: 0.35em;
  padding-inline-start: 0.75em;
  padding-inline-end: 0.75em;
  padding-block-end: 0.625em;
  min-inline-size: min-content;
  border-width: 2px;
  border-style: groove;
  border-color: threedface;
  border-image: initial;
}
#explore-curriculum fieldset legend {
  display: inline-block !important;
  padding-inline-start: 4px;
  padding-inline-end: 4px;
  border-width: initial;
  border-style: none;
  border-color: initial;
  border-image: initial;
  border-bottom: 0 !important;
  width: auto !important;
  margin-bottom: 0;
  /* min-width: 0 !important; */
}

/* Toggle side by side curriculum explorer along notes view */
/* Superceded by collapser which is next to the summary title */
.sides:has(.side-by-side) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
}

.side-by-side {
  min-width: 50%;
  max-width: 50%;
}

.side-by-side-possible {
  padding: 0 !important;
}

#js-visible-if-contents {
  padding-top: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

#summary-collapser {
  cursor: pointer;
  /* transform rotate wouldn't work on inline */
  display: inline-block;
  color: black;
  font-weight: 400;
  background-color: lightgray;
  margin-left: 10px;
  border-radius: 5px;
  font-style: normal;
  /* To override italic from Tufte when inside heading tag */
  padding: 5px;
  width: 30px;
  text-align: center;
}

#summary-collapser.stated {
  transform: rotate(90deg);
}

#summary-sharer {
  background: none !important;
  margin-top: 5px;
}

#dashboard:not(.active) {
  display: none;
}

#dashboard {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  background-color: rgba(150, 150, 150, 0.5);
  padding: 10px 10px;
  padding-right: 30px;
  opacity: 0.5;
}

#dashboard:hover {
  opacity: 1;
}

#dashboard i {
  font-size: 20px;
}

@media screen and (max-width: 768px) {
  #dashboard {
    padding: 5px;
    padding-right: 20px;
  }

  #dashboard i {
    font-size: 28px;
  }
}
/* Table of contents at top right */
#toc-toggler {
  cursor: pointer;
  margin-top: 10px;
  padding-left: 10px;
  padding-right: 10px;
  background-color: transparent;
  z-index: 500;
}

/* Jump to explorer at bottom right */
#bottom-bar {
  cursor: pointer;
  position: fixed;
  bottom: env(safe-area-inset-bottom);
  right: env(safe-area-inset-right);
  padding-right: 20px;
  background-color: transparent;
  z-index: 500;
  width: 100%;
  text-align: right;
  height: 60px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-end;
  width: 100%;
  padding-bottom: 10px;
}
#bottom-bar > * {
  opacity: .75;
  transition: all 300ms ease;
}
#bottom-bar > *:hover {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  #bottom-bar {
    width: unset;
    padding: 5px;
    height: fit-content;
  }
}
#ai-assist-btn {
  background: #059669;
}

#ai-assist-btn.active {
  background: #dc2626;
}

#toc-toggler:not(.filled) {
  display: none;
}

#toc {
  display: none;
  position: fixed;
  top: 55px;
  right: 0;
  padding: 20px;
  background-color: white;
  line-height: 1.5rem;
  font-size: 1rem;
  max-width: 90vw;
  /* If long TOC clipped off on mobile */
  max-height: calc(100vh - 180px);
  overflow-y: scroll;
  z-index: 500;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px dashed black;
}

@media screen and (min-width: 768px) {
  #toc {
    max-width: 40vw;
  }
}
#toc:empty {
  display: none !important;
}

#mobile-tap.active + #toc {
  display: block;
}

#toc .h1,
#toc .h2,
#toc .h3,
#toc .h4,
#toc .h5,
#toc .h6 {
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: clip;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

#toc .h1 {
  margin-bottom: 0;
}
#toc .h1.toc-group-end {
  margin-bottom: 15px;
}
#toc .h2 {
  margin-bottom: 0;
}
#toc .h2.toc-group-end {
  margin-bottom: 15px;
}
#toc .h3 {
  margin-bottom: 0;
}
#toc .h3.toc-group-end {
  margin-bottom: 15px;
}
#toc .h4 {
  margin-bottom: 0;
}
#toc .h4.toc-group-end {
  margin-bottom: 15px;
}
#toc .h5 {
  margin-bottom: 0;
}
#toc .h5.toc-group-end {
  margin-bottom: 15px;
}
#toc .h6 {
  margin-bottom: 0;
}
#toc .h6.toc-group-end {
  margin-bottom: 15px;
}

#toc .h2 {
  margin-left: 2ch;
}

#toc .h2::before {
  content: "•\00a0";
}

#toc .h3 {
  margin-left: 4ch;
}

#toc .h3::before {
  content: "—\00a0";
}

#toc .h4 {
  margin-left: 6ch;
}

#toc .h4::before {
  content: "➣\00a0";
}

#toc .h5 {
  margin-left: 8ch;
}

#toc .h5::before {
  content: "➨\00a0";
}

#toc .h6 {
  margin-left: 10ch;
}

#toc .h6::before {
  content: "◦\00a0";
}

.description-must {
  position: relative;
  overflow: visible;
  margin: 20px auto;
}

.more-notes {
  /* margin: 10px auto; */
  list-style-type: none;
  /* Removes bullet points */
  background-color: #F5F5F5;
  display: flex;
  padding: 5px;
  border-radius: 5px;
  font-weight: 250;
  overflow-y: hidden;
  text-align: center;
  transition: height 5s ease;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.more-notes .mn-header {
  transform: rotate(270deg);
}

.more-notes .mn-links {
  width: 100%;
  max-width: 600px;
  text-align: left;
  text-align: center;
  display: flex;
  align-items: flex-start;
}

.more-notes .mn-links li {
  display: inline;
  text-align: center;
  flex: 1;
  flex-grow: 1;
  min-width: 33%;
}

@media screen and (max-width: 768px) {
  .more-notes:not(.mobile-active) {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 10px;
    cursor: pointer;
  }

  .more-notes:not(.mobile-active)::after {
    content: "▼ Expand";
    font-style: italic;
    font-size: 0.7rem;
    margin-top: 10px;
    display: block;
    text-align: center;
    opacity: 0.2;
    cursor: pointer;
  }

  .more-notes:not(.mobile-active) .mn-header {
    transform: unset;
  }

  .more-notes:not(.mobile-active) .mn-links {
    display: none !important;
  }
}
/* UI UX: Left vertical green bar to collapse lesson */
#summary-outer {
  position: relative;
}

#side-a {
  border: 1px solid gray;
  padding: 2px;
  margin-left: 35px;
}
#side-a img {
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}
#side-a img:hover {
  transform: scale(1.01);
}

@media screen and (max-width: 768px) {
  #side-a {
    border: 0 !important;
  }
}
@media screen and (min-width: 768px) {
  #side-a img {
    max-width: 800px;
  }
}
#summary-left-bar {
  position: absolute;
  height: calc(100% + 50px + 10px);
  width: 15px;
  left: -20px;
  top: -55px;
  cursor: pointer;
  background-image: repeating-linear-gradient(45deg, transparent, transparent calc(10vh - 1px), rgba(128, 128, 128, 0.25) calc(10vh - 1px), rgba(128, 128, 128, 0.25) calc(10vh));
  background-position: 0 0;
}

#explorer {
  border-radius: 5px;
  display: inline-block;
  text-align: left;
  width: 100%;
  height: 580px;
}

/* Get rid of markdown it with latext's ruler lines */
.stretchy svg {
  display: none !important;
}

/* Prevents duplicate Latex */
.katex-html {
  display: none;
}

/* Scroll markers on the left */
.scroll-marker {
  position: absolute;
  left: 0;
  /* top is js controlled */
  transform: translateX(-100%);
  border-radius: 3px;
  padding: 5px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 12px;
  transition: all 0.5s ease;
  transform: rotate(0) translateX(-100%) translateY(0);
  transform-origin: left bottom;
  opacity: 0.50;
}

.scroll-marker.past {
  transform: rotate(45deg) translateX(-30px) translateY(25px);
  transform-origin: left bottom;
  opacity: 0.20;
}

@media screen and (max-width: 768px) {
  .scroll-marker {
    transform: rotate(0) translateX(-100%) translateY(25px);
    font-size: 50%;
    padding: 0;
    padding-left: 2px;
    padding-right: 2px;
  }

  .scroll-marker.past {
    transform: rotate(45deg) translateX(-6px) translateY(25px);
  }
}
/** GENERAL LAYOUT **/
/** Stop ios making buttons rounded **/
.override-ios-button-style {
  -webkit-appearance: none !important;
  -webkit-border-radius: 0 !important;
  border-radius: 0 !important;
  /* color: red; */
}

/** STYLING CLASSES **/
.error {
  color: red;
  border: 1px solid red;
  background-color: lightred;
  padding: 10px 20px 10px 20px;
  margin-top: 10px;
  border-radius: 2px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.text-black {
  color: black;
}

/** COMPONENTS **/
#search-results {
  padding-bottom: 60px;
}
#search-results th,
#search-results td {
  padding: 5px;
  vertical-align: top;
}
#search-results td:nth-child(3) {
  width: 100%;
}
#search-results pre {
  white-space: pre-wrap;
  width: 100%;
}

#share-search-title-wrapper {
  cursor: pointer;
  position: fixed;
  bottom: 0;
  right: 0;
  padding-right: 20px;
  background-color: white;
  z-index: 501;
  width: 100%;
  text-align: right;
  height: 60px;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
}

#share-search-title-wrapper a {
  text-decoration: none;
}

/* List Items */
.accordion {
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  #explorer ol ol,
  #explorer ol ul,
  #explorer ul ol,
  #explorer ul ul {
    padding-inline-start: 10px !important;
  }

  #explorer li {
    padding: 5px 0;
  }
}
dt:not(:first-child),
li:not(:first-child) {
  margin-top: 0 !important;
}

#explorer li {
  color: blue;
  margin-bottom: 0.5rem;
}

#explorer li:hover {
  color: darkblue;
  cursor: pointer;
}

#explorer ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.name {
  text-wrap: nowrap;
}

.note-item-buttons:empty {
  display: none !important;
}

.note-item-buttons .fa {
  cursor: pointer;
}

#explorer .fa-book-reader {
  opacity: 0.5;
  font-size: 80%;
}

#explorer .fa-book-reader::after {
  content: "\00a0Opened";
}

.responsive-iframe-container {
  position: relative;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
}

.img-wrapper > .responsive-iframe-container {
  padding-top: initial;
  height: 100%;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.img-wrapper > .responsive-iframe-container iframe {
  position: initial;
  top: unset;
  left: unset;
}

/* Tooltip for .json file's description property  */
.tooltip {
  opacity: 1 !important;
}

.tooltip-inner {
  font-size: 12px;
  background: lightgreen;
  border: 1px solid #737373;
  text-align: left;
  max-width: 80% !important;
  max-height: 80% !important;
  overflow: scroll;
}
.tooltip-inner img {
  width: 100%;
}

/* Explore Curriculum */
.card-footer {
  padding: 0;
}

#topics-list .name.is-file {
  text-decoration: none;
}

#topics-list > ul > li > .name.is-folder[icon]::before {
  filter: sepia(1) hue-rotate(180deg);
  display: inline-block;
  min-width: 15px;
}

/* The default folder icon is actually nested */
#topics-list > ul > li > .name.is-folder[icon] > .fa-folder::before {
  content: "" !important;
}

#topics-list > ul > li > .name.is-folder:not([icon]) > .fa-folder::before {
  min-width: 15px;
  display: inline-block;
}

#topics-list .fa-book-reader {
  margin-left: 1ch;
}

button {
  cursor: pointer;
  border: 0;
}

.custom-icon + .fa-folder {
  display: none;
}

.custom-icon > svg {
  display: inline;
}

#explorer-btns {
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  gap: 50px;
}

#explorer-btns button {
  margin-top: 5px;
}

.highlight {
  background-color: #FFC966;
}

#explorer-btns .info-flex-child:nth-child(1) {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  width: fit-content;
  gap: 5px;
}

@media screen and (max-width: 944px) {
  #explorer-btns {
    justify-content: center;
  }

  #explorer-btns .info-flex-child:nth-child(1) {
    flex-direction: column;
  }

  /* Most mobiles can't print. And toggling all opening will be horrible on mobile */
  #explorer-btns .info-flex-child:nth-child(2) {
    display: none;
  }
}
#topics-list {
  overflow-x: scroll;
}

#explore-header {
  border-top: 1px dashed lightgray;
}

@media screen and (max-width: 768px) {
  #explore-header {
    width: unset;
    padding: 10px 30px 0 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}
@media screen and (max-width: 500px) {
  #explore-header {
    justify-content: center;
    flex-flow: column;
  }
}
#get-random-note * {
  font-weight: 200;
}

#side-a {
  width: calc(100vw - 60px);
}

@media screen and (max-width: 768px) {
  #side-a {
    width: calc(100vw - 25px);
  }
}
#side-b {
  width: calc(100vw - 60px);
}

@media screen and (max-width: 768px) {
  #side-b {
    width: 100vw;
  }
}
/* Table Styling */
table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #ccc;
}

th,
td {
  border: 1px solid #ccc;
  padding: 8px 12px;
  text-align: left;
}

th {
  background-color: #f4f4f4;
}

tr:nth-child(even) {
  background-color: #fafafa;
}

/* Heading sizes */
h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

h5 {
  font-size: 0.875rem;
}

h6 {
  font-size: 0.75rem;
}

/* Responsive images */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
}
.image-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
.image-modal img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: default;
}
.image-modal .close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: background-color 0.2s;
}
.image-modal .close-button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Scrollspy */
#toc .toc-link {
  text-decoration: none;
  color: #666;
  transition: color 0.2s ease;
}

#toc .toc-link:hover {
  color: #000;
}

#toc .toc-link.active {
  color: #000;
  font-weight: bold;
}

/* Centering */
center li {
  width: fit-content;
}

/* Bottom Bar Button Styling */
.bottom-btn {
  background: #4f46e5;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.bottom-btn:hover {
  background: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.bottom-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-btn {
  background: #059669;
}
.ai-btn:hover {
  background: #047857;
}
.ai-btn .ai-text {
  margin-left: 8px;
  display: inline;
  line-height: 1.3;
}
.ai-btn .ai-text small {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 400;
}

@media screen and (max-width: 768px) {
  .bottom-btn {
    padding: 10px 16px;
    font-size: 13px;
    margin: 0 4px;
  }
}
