/* --- Core Resets & Variables --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100vh;
  height: 100svh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Source Sans 3', sans-serif;
}

/*
body,
html {
  position: absolute;
  height: 100vh;
  font-family: 'Source Sans 3', sans-serif;
  overflow: hidden;
}*/
/*
#mainbox {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}*/

#mainbox {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  overflow: hidden;
  height: 100svh;
  height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #f5f6fa;
}

#top_bar {
  display: flex;
  height: 56px;
  width: 100%;
  font-size: 1.5rem;
  font-weight: 400;
  padding-left: 20px;
  line-height: 56px;
  background-color: var(--bkgr);
  color: var(--txt);
  border-bottom: 1px solid var(--nav_line);
  position: relative;
}

#top_bar span {
  color: var(--txt);
  padding-left: 15px;
}

.menu-icon {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#sectionbox {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* --- Focus States & Section UI --- */
section {
  flex: 1;
  min-width: 500px;
  padding: 20px;
  border-right: 1px solid #dcdde1;
  background: #fff;
  overflow-y: auto;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

section.active {
  border-top: 3px solid var(--nav_bkgr)
}

article {
  height: calc(100% - 42px);
  background-color: var(--bkgr);
  overflow: hidden;
}

/* When any section is focused, non-active sections dim down */
#sectionbox:focus-within section:not(.active) {
  border-top: none;
}

section:focus {
  outline: none;
  border-top: 3px solid var(--nav_bkgr)
}

.back-arrow {
  background: #e2e8f0;
  border: none;
  padding: 8px 12px;
  margin-bottom: 15px;
  cursor: pointer;
  border-radius: 4px;
}

hr {
  display: block;
  /*border: 2px solid var(--line);*/
}

#mst,
#det,
#rel {
  display: flex;
  flex-direction: column;
}