body {
  font-family: 'D-DIN', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
}

main {
  flex: 1;
  min-height: 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--border);
}

*::-webkit-scrollbar-track {
  background-color: transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

a, button {
  text-decoration: none;
  color: var(--text);
  font-family: inherit;
}

h2 {
  font-weight: normal;
}

:root {
  --bg: rgb(255, 255, 255);
  --text: black;
  --textsec: rgb(100, 100, 100);
  --card: rgb(245, 245, 245);
  --border: rgb(190, 190, 190);
  --border-strong: rgb(100, 100, 100);
  --space-1: 10px;
  --space-2: 16px;
  --space-3: 20px;
  --space-4: 30px;
  --fs-1: 14px;
  --fs-2: 18px;
  --fs-3: 22px;
  --fs-4: 32px;
  --color-success: rgb(60, 160, 90);
  --color-success-bg: rgba(60, 160, 90, 0.12);
  --color-error: rgb(190, 70, 70);
  --color-error-bg: rgba(190, 70, 70, 0.12);
  --border-default: 1px solid var(--border);
  --focus-ring-map: rgba(100, 149, 237, 0.8);
  --scrim: rgba(0, 0, 0, 0.5);
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.dark {
  --bg: rgb(18, 18, 18);
  --text: rgb(235, 235, 235);
  --textsec: rgb(165, 165, 165);
  --card: rgb(40, 40, 40);
  --border: rgb(90, 90, 90);
  --border-strong: rgb(180, 180, 180);
  --border-default: 1px solid var(--border);
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sitetitle {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.sitetitlelogo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.headerbox {
  display: flex;
  padding: 30px 45px 30px 45px;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  color: var(--text);
  line-height: 1;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.headerbox .sitetitle,
.headerbox .tabitems,
.headerbox .themebutton,
.headerbox .login {
  color: var(--text);
}

.left, .right {
  display: flex;
  align-items: center;
}

.right {
  gap: var(--space-4);
  margin-left: var(--space-4);
}

.tablist {
  display: flex;
  list-style-type: none;
  gap: var(--space-4);
  font-size: var(--fs-1);
  align-items: center;
  margin: 0
}

.tabitems {
  display: flex;
  text-decoration: none;
  color: var(--text);
}

.aboutlink,
.aboutlink:visited,
.aboutlink:hover,
.aboutlink:active {
  color: var(--text);
  text-decoration: none;
}

.themebutton, .login {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  margin: 0;
  padding: 0;
  font-size: var(--fs-1);
}

.profilemenulink {
  text-decoration: none;
  color: var(--text);
  font-size: var(--fs-1);
  font-weight: 500;
}

.welcometext {
  text-align: center;
  margin-top: 50px;
  font-size: var(--fs-4);
  font-weight: 500;
}

.intro {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--fs-2);
  margin-bottom: 0;
}

.firsttimelink {
  text-decoration: underline;
}

.body {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--fs-2);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

.anchorboxes {
  display: flex;
  gap: var(--space-3);
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.titleboxes {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 225px;
  height: 175px;
  text-align: center;
  margin-top: var(--space-4);
  background-color: var(--card);
  text-decoration: none;
  color: var(--text);
  font-size: var(--fs-1);
  border: var(--border-default);
}

.boxtitle {
  font-weight: 500;
  font-size: var(--fs-3);
  margin: auto;
}

.boxbody {
  margin-block-start: 0;
  margin-block-end: 0;
  padding: var(--space-3);
  padding-top: 0;
  background-color: var(--card);
}

.courseboxes {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  text-align: left;
  margin-top: 30px;
  background-color: var(--card);
  text-decoration: none;
  color: var(--text);
  border: var(--border-default);
  overflow: hidden;
}

.courseheader {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 24px;
  box-sizing: border-box;
  gap: var(--space-2);
}

.coursetitle {
  font-weight: 500;
  font-size: var(--fs-3);
  text-align: left;
  width: 100%;
  padding: 0;
  margin: 0;
}

.coursetitlelink {
  color: inherit;
  text-decoration: none;
}

.topicdetail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px;
}

main.coursebg {
  background-image: var(--course-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.topicdetailback {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-2);
  background-color: var(--card);
  padding: 10px 14px;
  border: var(--border-default);
  opacity: 0.9;
}

.competitiontakelink {
  margin-top: var(--space-3);
}

.topicdetailtitle {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-size: var(--fs-4);
  font-weight: 400;
  background-color: var(--card);
  padding: 12px 16px;
  border: var(--border-default);
  width: fit-content;
  opacity: 0.9;
}

.topicdetailgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
}

.topicdetailitem {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background-color: var(--card);
  color: var(--text);
  text-decoration: none;
  border: var(--border-default);
  opacity: 0.9;
}

.topicdetailitemtitle {
  font-size: var(--fs-2);
  font-weight: 400;
  margin-bottom: 0;
}

.topicdetailitemmeta {
  font-size: var(--fs-1);
  color: var(--textsec);
  line-height: 1.5;
}

.topicdetailpanel, .profiledetailpanel, .resetpanel, .profilecard, .calendarbox,
.savedcompetitionspanel, .aboutuspanel, .rankingsearchpanel, .problemsetresults {
  background-color: var(--card);
  border: var(--border-default);
}

.topicdetailpanel, .profiledetailpanel, .resetpanel, .profilecard, .calendarbox,
.savedcompetitionspanel, .aboutuspanel {
  padding: var(--space-3);
}

.rankingsearchpanel, .problemsetresults {
  padding: var(--space-4);
}

.topicdetailpanel {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
}

.competitiondetailpanel {
  margin-top: 0;
}

.profiledetailpanel {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.topicdetailtext {
  font-size: var(--fs-3);
  margin: 0;
}

.topicdetailtext p:first-child {
  margin-top: 0;
}

.topicdetailtext p:last-child {
  margin-bottom: 0;
}

.topicdetailsection {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.topicdetailsectionheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-1);
}

.topicdetailsectionheader h2 {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: normal;
}

.coursenetworkpage {
  min-height: calc(100vh - 111px);
  padding: 0;
  margin: 0;
}

.network-map-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 111px);
  overflow: hidden;
  background-color: var(--bg);
  touch-action: none;
  user-select: none;
}

.network-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 1400px;
  height: 900px;
  transform-origin: 0 0;
}

.network-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.network-lines line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0.45;
}

.network-node {
  position: absolute;
  min-width: 140px;
  min-height: 46px;
  padding: 10px 16px;
  font-size: var(--fs-1);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.network-node:focus-visible {
  outline: 1px solid var(--focus-ring-map);
  outline-offset: 2px;
}

.network-node.topic {
  font-weight: 500;
}

.network-node.subtopic {
  padding: 10px 18px;
}

.network-node.unit {
  padding: 8px 14px;
  font-size: var(--fs-1);
}

.network-node:active {
  cursor: grabbing;
}

.network-map-controls {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  z-index: 2;
  user-select: none;
  margin-bottom: 15px;
}

.network-exit-button, .network-reset-button, .network-collapse-button {
  padding: 8px 12px;
  border: var(--border-default);
  color: var(--text);
  cursor: pointer;
  background: var(--card);
  font-weight: 400;
  user-select: none;
  -webkit-user-select: none;
}

.network-exit-button:hover, .network-reset-button:hover, .network-collapse-button:hover {
  background: var(--background);
}

.rankingsearchpanel {
  max-width: 800px;
  margin: 40px auto 0;
}

.rankingsearchform {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rankingsearchlabel {
  font-size: var(--fs-2);
  font-weight: 500;
}

.rankingsearchcontrols {
  display: flex;
  gap: var(--space-1);
}

.rankingsearchinput {
  flex: 1;
  padding: 10px 12px;
}

.rankingsearchbutton {
  padding: 10px 16px;
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.problemsetresults {
  max-width: 800px;
  margin: 40px auto 0;
  max-height: 500px;
  overflow-y: auto;
}

.leaderboardpanel {
  max-width: 800px;
  margin: var(--space-4) auto 0;
  padding: var(--space-4);
  background-color: var(--card);
  border: var(--border-default);
}

.leaderboardtitle {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-3);
  font-weight: 500;
}

.leaderboardlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.leaderboarditem {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  border: var(--border-default);
}

.leaderboardplacement {
  font-weight: 500;
  width: 40px;
  flex-shrink: 0;
}

.leaderboardusername {
  flex: 1;
  color: var(--text);
}

.leaderboardid, .leaderboardscore {
  font-size: var(--fs-1);
  color: var(--textsec);
}

.leaderboardempty {
  color: var(--textsec);
}

.problemsetpage {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--space-3);
  height: calc(100vh - 160px);
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
  box-sizing: border-box;
}

.problemsetpage .rankingsearchpanel {
  margin: 0;
  flex-shrink: 0;
}

.problemsetpage .problemsetresults {
  margin: 0;
  max-height: none;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.problemsetgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.problemsetlist {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.problemsetcard, .suggestioncard, .problemtakeitem {
  background-color: var(--card);
  border: var(--border-default);
  display: flex;
  flex-direction: column;
}

.problemsetcard {
  padding: var(--space-3);
  gap: var(--space-1);
}

.suggestionactions button, .markdownbutton, .desmosmodaltab, .resetbutton, .authsubmit {
  border: var(--border-default);
}

.problemsetid {
  font-size: var(--fs-2);
  background-color: var(--card);
  width: fit-content;
}

.problemsetcard h2 {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: normal;
}

.problemsetcard p {
  margin: 0;
  line-height: 1.5;
}

.problemtakeitem {
  padding: var(--space-4);
  gap: var(--space-2);
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

.problemtakeitem.problemtakecorrect {
  border-color: var(--color-success);
  background-image: linear-gradient(var(--color-success-bg), var(--color-success-bg));
}

.problemtakeitem.problemtakeincorrect {
  border-color: var(--color-error);
  background-image: linear-gradient(var(--color-error-bg), var(--color-error-bg));
}

.problemtakeprompt {
  margin: 0;
  font-size: var(--fs-2);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.problemtakenumber {
  font-size: var(--fs-3);
  font-weight: 500;
}

.problemtakeid {
  font-size: var(--fs-1);
  color: var(--textsec);
}

.problemtakeprompt p {
  margin: 0;
}

.problemtakeprompt img {
  display: block;
  max-width: 100%;
}

.problemtakeinput {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.problemtakechoice {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background-color: var(--card);
  cursor: pointer;
  font-size: var(--fs-2);
  padding: var(--space-1);
  border: var(--border-default);
}

.problemtakechoice:has(.problemtakechoiceinput:checked) {
  border-color: var(--border-strong);
}

.problemtakechoice:has(.problemtakechoiceinput:focus-visible) {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.problemtakeitem .problemtakechoice.problemtakechoicecorrect {
  border-color: var(--color-success);
  background-image: linear-gradient(var(--color-success-bg), var(--color-success-bg));
}

.problemtakeitem .problemtakechoice.problemtakechoiceincorrect {
  border-color: var(--color-error);
  background-image: linear-gradient(var(--color-error-bg), var(--color-error-bg));
}

.problemtakechoice .problemtakechoiceinput {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.problemtakechoice .problemtakechoiceletter, .problemtocitem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background-color: var(--card);
  border: var(--border-default);
  font-size: var(--fs-2);
  font-weight: 500;
}

.problemtakechoice:has(.problemtakechoiceinput:checked) .problemtakechoiceletter, .problemtocitemactive {
  border-color: var(--border-strong);
}

.problemtakeitem .problemtakechoice.problemtakechoicecorrect .problemtakechoiceletter {
  background-color: var(--color-success);
  color: var(--bg);
  border-color: var(--color-success);
}

.problemtakeitem .problemtakechoice.problemtakechoiceincorrect .problemtakechoiceletter {
  background-color: var(--color-error);
  color: var(--bg);
  border-color: var(--color-error);
}

.problemtoc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.problemsetdetailpage {
  display: flex;
  height: calc(100vh - 160px);
  overflow: hidden;
}

.problemsetdetailleft {
  width: 33.333%;
  padding: 50px;
  box-sizing: border-box;
  overflow-y: auto;
}

.problemsetdetailright {
  width: 66.667%;
  padding: 50px;
  box-sizing: border-box;
}

.suggestionform.problemsetdetailpage {
  flex-direction: row;
  gap: 0;
}

.suggestionform .problemsetdetailleft {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

#suggest-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.suggestionform .problemtoc {
  margin-top: 0;
}

.suggestionform .problemsetdetailright {
  display: flex;
  flex-direction: column;
}

.suggestionform .problemsetdetailright.hidden {
  display: none;
}

.suggestionform .problem-builder {
  flex: 1;
  min-height: 0;
}

.suggestionform .problem-items {
  flex: 1;
  min-height: 0;
}

.problemtakefeedback {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: 500;
}

.problemtakefeedback:empty {
  display: none;
}

.problemtakenav {
  display: flex;
  margin-top: auto;
}

.problemtakenav .topicdetailback {
  margin-bottom: 0;
}

.problemtakenavright {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
}

.problemtakeexplanation {
  margin: 0;
  line-height: 1.5;
}

.problemsettags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.problemsettag {
  font-size: var(--fs-1);
  color: var(--textsec);
}

.profilecontainer {
  max-width: 1000px;
  margin: 0 auto;
}

.profileactions {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.profilecard {
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
}

.profilesectiontitle {
  font-size: var(--fs-3);
}

.profileform {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.profilefieldlabel {
  font-size: var(--fs-2);
  font-weight: 500;
}

.markdowntoolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.markdownbutton {
  background: none;
  box-shadow: none;
  color: var(--text);
  padding: 4px 6px;
  font-size: var(--fs-1);
  font-family: inherit;
  cursor: pointer;
}

.markdownbutton:hover {
  opacity: 0.8;
}

.profilebio {
  min-height: 100px;
  resize: none;
  overflow-y: hidden;
  padding: var(--space-1);
  line-height: 1.5;
}

.profilebiooutput {
  line-height: 2;
  width: fit-content;
  max-width: 100%;
}

.profilebiooutput p {
  margin: 0;
}

.profilebiooutput p + p {
  margin-top: 0.75em;
}

.profilebiooutput a {
  color: var(--text);
  text-decoration: underline;
}

.profiletoggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-2);
}

.desmostoolbutton {
  width: fit-content;
}

.desmosmodaloverlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-3);
  box-sizing: border-box;
}

.desmosmodal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 700px;
  height: 100%;
  max-height: 600px;
  background-color: var(--card);
  border: var(--border-default);
  box-sizing: border-box;
}

.desmosmodalheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.desmosmodaltabs {
  display: flex;
  gap: var(--space-1);
}

.desmosmodaltab {
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-1);
  padding: 6px 12px;
  cursor: pointer;
}

.desmosmodaltabactive {
  background: var(--card);
  font-weight: 500;
}

.desmosmodalclose {
  border: none;
  background: none;
  color: var(--text);
  font-size: var(--fs-3);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.desmosmodalcalculator {
  flex: 1;
  position: relative;
  min-height: 0;
  background-color: white;
}

.desmosmodalstatus {
  padding: 0 16px;
  font-size: var(--fs-1);
  color: var(--textsec);
}

.desmosmodalactions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.problempreviewoverlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-3);
  box-sizing: border-box;
}

.problempreviewmodal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  background-color: var(--card);
  border: var(--border-default);
  box-sizing: border-box;
}

.problempreviewheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.problempreviewclose {
  border: none;
  background: none;
  color: var(--text);
  font-size: var(--fs-3);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.problempreviewcontent {
  padding: var(--space-3);
  overflow-y: auto;
}

.problempreviewcontent .problemtakeitem {
  height: auto;
  border: none;
}

.resetpanel {
  margin-top: 0;
}

.resetpanel .topicdetailtext {
  margin-bottom: var(--space-3);
}

.resetform {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.resetinput {
  width: 100%;
  box-sizing: border-box;
}

.resetbutton {
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  padding: 12px 16px;
}

.resetstatus {
  margin-top: var(--space-1);
  font-size: var(--fs-1);
  color: var(--textsec);
}

.resetstatus:empty {
  margin-top: 0;
}

.hidden {
  display: none;
}

.dropdownbutton {
  background: none;
  color: var(--text);
  border: none;
  font-size: 20px;
  line-height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
  transform-origin: center;
  flex-shrink: 0;
}

.dropdowncontent {
  background-color: var(--card);
  width: 100%;
  margin-top: 2px;
  box-sizing: border-box;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.4s ease, opacity 0.2s ease, transform 0.2s ease;
}

.dropdowncontent a {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 14px 20px;
  text-align: left;
  font-size: var(--fs-2);
}

.dropdowncontent.show {
  transform: translateY(0);
  opacity: 1;
  max-height: 1300px;
}
.dropdownbutton.open {
  transform: rotate(180deg);
}

.tag {
  font-size: var(--fs-1);
  color: var(--textsec);
}

.timeselect {
  display: flex;
  gap: var(--space-1);
}

.timeselect .inputs {
  flex: 1;
  min-width: 0;
  padding-right: 30px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: var(--icon-arrow);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}

.calendaractions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.joincompetitionform {
  display: flex;
  gap: var(--space-1);
}

.joincompetitionform .inputs {
  flex: 1;
  min-width: 0;
}

.calendarlayout {
  display: flex;
  gap: 50px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  padding-left: 50px;
  padding-right: 50px;
}

.calendarbox {
  margin-top: var(--space-4);
  width: 500px;
  box-sizing: content-box;
}

.savedcompetitionspanel {
  width: 500px;
  box-sizing: content-box;
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
}

.savedcompetitionsheader {
  font-size: var(--fs-3);
  font-weight: 500;
  margin: 0;
}

.savedcompetitionsempty {
  font-size: var(--fs-1);
  color: var(--textsec);
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.savedcompetitionsempty:empty {
  margin: 0;
}

.savedcompetitionslist {
  list-style: none;
  margin: 0;
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.savedcompetitionitem {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-1);
  padding: 10px 12px;
  background-color: var(--bg);
  border: var(--border-default);
}

.savedcompetitioninfo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.savedcompetitiontitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.savedcompetitiontitle:hover {
  text-decoration: underline;
}

.savedcompetitiondates {
  font-size: var(--fs-1);
  color: var(--textsec);
}

.savedcompetitionremove {
  border: none;
  background: none;
  color: var(--textsec);
  font-size: var(--fs-1);
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  flex-shrink: 0;
  align-self: center;
}

.savedcompetitionremove:hover {
  color: var(--text);
}

.calendarlabels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-1);
  font-weight: 500;
  padding-left: 30px;
  padding-right: 30px;
  text-align: center;
}

.calendarbutton {
  all: unset;
  font-family: inherit;
  font-size: 20px;
  line-height: 20px;
  color: var(--text);
}

.calendarheader {
  display: flex;
  line-height: 1;
  align-items: center;
  margin-bottom: var(--space-3);
  gap: var(--space-3);
  padding-left: 20px;
  padding-right: 20px;
}

.monthyear {
  font-size: var(--fs-3);
  font-weight: 500;
  color: var(--text);
  margin-left: auto;
}

#calendarcontainer {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(30px, auto);
  gap: var(--space-3);
  padding: var(--space-3);
}

.calendarcell {
  font-size: var(--fs-1);
}

.competitiontime {
  color: var(--textsec);
}

.auth {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  padding: 0 24px;
}

.authcontainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-color: var(--card);
  width: 320px;
  height: fit-content;
  padding: 28px 24px 32px;
  box-sizing: border-box;
  flex: 1 1 0;
  max-width: 320px;
}

.authform {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  font-size: var(--fs-3);
  width: 100%;
}

.logoutbutton {
  display: block;
  width: fit-content;
}

.authsubmit {
  background-color: var(--card);
  font-size: var(--fs-2);
  color: var(--text);
  font-family: inherit;
  width: fit-content;
  cursor: pointer;
  padding: 10px 14px;
}

.authactions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.resetlink {
  border: none;
  background: none;
  color: var(--textsec);
  font-family: inherit;
  font-size: var(--fs-1);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.resetlink:hover {
  opacity: 1;
}

#loginResetPanel {
  margin-top: var(--space-2);
}

.autherrorhidden {
  display: none;
}

.authdivider {
  padding-bottom: 20px;
  font-size: var(--fs-1);
  color: var(--textsec);
  text-align: center;
}

.authcheckboxlabel {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--fs-1);
  line-height: 1.4;
  color: var(--textsec);
}

.authcheckboxlabel input {
  margin-top: 3px;
  flex-shrink: 0;
}

.authcheckboxlabel .footerlink {
  color: var(--textsec);
}

.authcheckboxnote {
  margin: -12px 0 12px;
  font-size: var(--fs-1);
  color: var(--textsec);
  text-align: center;
}

.authcheckboxnote.hidden {
  display: none;
}

.googledisabled {
  pointer-events: none;
  opacity: 0.4;
}

.suggestioncard {
  padding: var(--space-3);
  margin-top: var(--space-3);
  gap: var(--space-1);
}

.suggestioncard p {
  margin: 0;
}

.suggestionproblem {
  background-color: var(--bg);
  padding: var(--space-1);
  border: var(--border-default);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggestionactions {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.suggestionactions button {
  padding: 8px 14px;
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.suggestionform {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.suggestionform label {
  display: block;
  font-size: var(--fs-2);
}

.suggestionform input,
.suggestionform textarea {
  padding: 12px 14px;
  font-size: var(--fs-2);
}

.suggestionform textarea {
  resize: vertical;
  min-height: 140px;
}

.problemsetstatus {
  margin-top: var(--space-1);
  min-height: 20px;
  display: none !important;
}

.inputs, .suggestionform input, .suggestionform textarea {
  border: var(--border-default);
  font-family: inherit;
  color: var(--text);
}

.inputs {
  background-color: var(--bg);
  font-size: var(--fs-3);
  caret-color: var(--text);
  padding: 8px 12px;
}

.inputs:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.inputs.profilebio {
  font-size: var(--fs-2);
}

.inputs::placeholder {
  color: var(--textsec);
}

.sitefooter {
  padding: 18px 24px;
  text-align: center;
  font-size: var(--fs-1);
  color: var(--text);
}

.footerlink {
  color: var(--text);
  text-decoration: none;
}

.footerlink:hover {
  text-decoration: underline;
}

.aboutustitle {
  font-size: var(--fs-3);
}

#contribute-page-heading {
  margin: 0;
}

.sectionheading {
  font-size: var(--fs-3);
}

.pagetitle {
  font-size: var(--fs-4);
}

.aboutuspanel {
  margin-top: var(--space-4);
}

.problem-builder {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.inputs.problem-type {
  padding: 12px 16px;
  width: fit-content;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none;
}

.problem-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.problem-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.problem-items .problemtakeitem {
  margin-top: 0;
}

.problem-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.problem-item-header-actions {
  display: flex;
  gap: var(--space-1);
}

.problem-points-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.problem-points-field .problem-points {
  width: 100px;
}

.problem-choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.problem-item-header .aboutustitle {
  font-weight: 500;
}

.problem-item label.aboutustitle {
  font-size: var(--fs-2);
  font-weight: 500;
}

.problem-prompt {
  font-size: var(--fs-2);
}

.choice-input {
  flex: 1;
  font-size: var(--fs-2);
}

.choice-buttons {
  display: flex;
  gap: var(--space-2);
}

.choice-buttons button {
  padding: 8px 14px;
}

.remove-problem-button {
  padding: 8px 14px;
}

.aboutustext {
  font-size: var(--fs-2);
  text-decoration: none;
  margin: 0;
}

.navtoggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--fs-3);
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit;
}

@media (max-width: 900px) {
  .headerbox {
    padding: 16px 20px;
  }

  .left {
    flex: 1;
    min-width: 0;
    gap: var(--space-1);
  }

  .navtoggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tablist {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }

  .tablist.open {
    display: flex;
  }

  .tablist li {
    width: 100%;
  }

  .tablist .tabitems, .tablist .profilemenulink {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: var(--fs-2);
  }

  .right {
    gap: var(--space-2);
    margin-left: var(--space-1);
  }

  .themebutton, .login {
    font-size: var(--fs-1);
  }

  .auth {
    flex-wrap: wrap;
    margin-top: var(--space-4);
  }

  .authcontainer {
    width: 100%;
    max-width: 360px;
  }

  .calendarbox {
    margin: 24px 0;
    padding: var(--space-3);
    width: 100%;
    max-width: 500px;
  }

  .savedcompetitionspanel {
    width: 100%;
    max-width: 500px;
  }

  .calendarheader {
    padding-left: 4px;
    padding-right: 4px;
    gap: var(--space-1);
  }

  .calendarlabels {
    padding-left: 4px;
    padding-right: 4px;
    gap: 4px;
    font-size: var(--fs-1);
  }

  #calendarcontainer {
    gap: 6px;
    padding: 10px 4px;
  }

  .coursenetworkpage,
  .network-map-wrapper {
    height: calc(100vh - 58px);
    min-height: calc(100vh - 58px);
  }

  .choice-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .welcometext {
    font-size: var(--fs-4);
    margin-top: 32px;
  }

  .calendarlayout {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .body {
    padding: 0 4px;
  }

  .topicdetailtitle {
    font-size: var(--fs-3);
  }

  .titleboxes {
    width: 100%;
    max-width: 280px;
  }

  .network-map-controls {
    left: 12px;
    top: 12px;
    gap: var(--space-1);
  }

  .network-exit-button, .network-reset-button, .network-collapse-button {
    padding: 8px 12px;
    font-size: var(--fs-1);
  }

  .timeselect {
    flex-direction: column;
  }

  .rankingsearchcontrols {
    flex-wrap: wrap;
  }
}