body.simulator {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 99vh;
  overflow: hidden;
}

.br_table {
  border-collapse: collapse;
}

.br_table td,
.br_table th {
  border: 1px solid #ddd;
  padding: 8px;
}

.br_table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.br_table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4caf50;
  color: white;
}

.top {
  text-align: center;
  padding: 5px;
}

.main {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0px; /* Necessary to make overflow work in Edge/IE */
}

#editor {
  height: 100%;
  width: 30vw;
  font-family: monospace;
  overflow: auto;
  border-style: inset;
  border-width: 1px;
}

.memory {
  font-family: monospace;
  height: calc(100% - 10px);
  white-space: nowrap;
  overflow-y: auto;
  background-color: #dfdfdf;
  margin: 0;
  padding: 5px;
  left: 0;
}

.memoryhide,
.registerhide {
  padding: 0;
  margin: 0;
  border: 0;
  background-color: #404040;
  color: white;
  font-stretch: ultra-condensed;
}

.specialdata {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 5px;
  overflow: auto;
  height: 100%;
}

.specialdata h1 {
  font-size: 1em;
  background-color: #ffff7f;
  cursor: pointer;
}

.specialdata h1.collapsible:before {
  content: "⏷";
}

.specialdata h1.collapsed:before {
  content: "⏵";
}

.specialdata h1:before {
  display: inline-block;
  width: 1.5em;
  height: 1em;
  text-align: center;
}

.genreg,
.specreg {
  display: inline-block;
  padding: 1px;
  min-width: 25ch;
}

.regname {
  font-family: monospace;
  width: 8ch;
  display: inline-block;
  text-align: right;
  padding-right: 5px;
}

.regval {
  font-family: monospace;
  width: 16ch;
}

.memaddr {
  font-weight: bold;
}

.memory .memcurline {
  text-decoration: underline black solid;
  color: #7f0000;
}

.memory .memread,
#editor .memread,
.genreg.memread .regval {
  background-color: #8fff8f;
}

.memory .memwrite,
#editor .memwrite,
.genreg.memwrite .regval {
  background-color: #ff8f8f;
}

.codeerror {
  text-decoration: underline overline red dashed;
}

.specgroup {
  display: flex;
  flex-direction: column;
}

.specgroup:nth-of-type(odd) .specgrcontent {
  background: #efefef;
}

.specgroup:nth-of-type(even) .specgrcontent {
  background: #dfdfdf;
}

.specgrdesc {
  display: block;
}

.specgrname {
  font-variant: small-caps;
}

.specgrinstr {
  float: right;
  clear: right;
  text-align: right;
  font-family: monospace;
}

.specgrcontent {
  flex: 1;
}

.cachelevel {
}

.cachelevelno {
  width: 5em;
  font-weight: bold;
  background-color: green;
  float: left;
  padding: 0.5em;
  text-align: center;
}

.cachelevel label {
  margin-left: 0.5em;
}

.cachesetcount,
.cacheassociativity,
.cacheblocksize,
.cachesize {
  width: 5ch;
}

.cacheset {
  display: flex;
  flex-direction: row;
}

.cacheset:nth-of-type(odd) {
  background: #efefef;
}

.cacheset:nth-of-type(even) {
  background: #dfdfdf;
}

.cachesetno {
  height: auto;
  margin: auto;
  width: 3em;
  text-align: center;
}

.cachesetlines {
  flex: 1;
}

.cachesetline {
  display: flex;
  flex-direction: row;
}

.cachesetline span {
  border: 1px solid black;
}

.cachelinevalid {
}

.cachelinetag {
  font-family: monospace;
  text-align: right;
  width: 16ch;
}

.cachelinedata {
  font-family: monospace;
  flex: 1;
}

.cachesetline.memread {
  background-color: #8fff8f;
}

.cachesetline.cachemiss {
  background-color: #ffff8f;
}

.cachesetline.memwrite {
  background-color: #ff8f8f;
}

/* Static toolbar layout, extracted from the saved HTML. */
.toolbar-group {
  white-space: nowrap;
}
.file-inputs {
  display: none;
}

/* Keep the mark below controls, at the panel bottom when space is available. */
.specialdata-content {
  display: flow-root;
  flex: 0 0 auto;
}

.panel-brand {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-top: auto;
  padding: 28px 12px 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.panel-brand img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}
