/* CSS Reset */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-size: 1rem;
  line-height: 1.5rem;
  scroll-behavior: smooth;
  overscroll-behavior-y: none; /* Chrome Pull-to-Refresh Off */
  text-rendering: optimizeSpeed;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-size-adjust: inherit;
}

#root, #__next {
  isolation: isolate;
}

/* Style for MACS */

body {
  background-color: #f4f6f8;
  min-width: 22rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
}

h1, h2, h3 {
  white-space: nowrap;
  font-weight: normal;
  color: white;
  padding: 0 0.7rem;
}

h1 {
  font-size: 1.2rem;
  line-height: 1.6;
  background-color: #192f60;
  border-top: 1px solid #1e50a2;
  border-bottom: 1px solid black;
}

h2 {
  font-size: 1.1rem;
  font-weight: normal;
  line-height: 1.7;
  background-color: #26499d;
  border-top: 1px solid #4169b4;
  border-bottom: 1px solid #001e43;
}

h3 {
  font-size: 1rem;
  line-height: 1.9;
  background-color: #4169e1; /* royalblue */
  padding: 0 0.7rem;
  border-top: 1px solid #7a99cf;
  border-bottom: 1px solid #192f60;
}

h4 {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.6;
  color: #19448e;
  background-color: #f3f3f3; /* silverwhite #efefef */ /* smokewhite #f5f5f5 */
  padding: 0 0.4rem;
  border-top: 1px solid #1e50a2;
  border-left: 6px solid #1e50a2;
}

p {
  margin: 0.7rem 0.7rem;
  /*padding: 0.7rem 0.7rem;*/
}

button,
[type=button],
[type=reset],
[type=submit] {
  color: black;
  line-height: 1.4;
  height: 2.2rem;
  border-radius: 8px;
  border-width: 1px;
  border-color: #aaaaaa;
  padding: 0 0.7rem;
  background-color: #fcfafa;
  cursor: pointer;
}

.disabled,
button:disabled,
[type=button]:disabled,
[type=reset]:disabled,
[type=submit]:disabled {
  color: silver;
  opacity: 0.5;
  cursor: default;
}

p.node, p.itrem {
  white-space: nowrap;
}

p.node {
  line-height: 1.5;
  margin-top: 0.9rem;
}

p.itrem {
  line-height: 1.5;
  margin-left: 2.0rem;
}

button.help {
  height: 1.9rem;
  margin-right: 0.8rem;
  padding: 0 0.2rem;
  min-width: 3rem;
  background-color: #fafdfa;
}

.next, .back {
  min-width: 5.0rem;
}

.back {
  margin-right: 1.6rem;
}

.jump {
  padding: 0 0.4rem;
  min-width: 12.0rem;
}

ul {
  list-style: none;
  line-height: 1.5;
  margin: 0.3rem 0.8rem;
  /*padding-left: 0.8rem;*/
}

ul ul {
  list-style: none;
  line-height: 1.4;
  margin: 0 0 0 0.7rem;
  /*padding-left: 0.2rem;*/
}

li {
  position: relative;
  padding-left: 0.8rem;
}

li:before {
  content: "";
  position: absolute;
  display: inline-block;
}

div > ul > li:before {
  top: 0.35rem;
  left: 0;
  width: 0;
  height: 0;
  border-top: 0.3rem solid transparent;
  border-bottom: 0.3rem solid transparent;
  border-left: 0.6rem solid #4d5aaf;
}

div > ul > ul > li:before {
  top: 0.35rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #4169e1;
  border-radius: 50%;
}

#header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1;
}

.underhead * {
  color: transparent;
  border-color: transparent;
  background: transparent;
}

#main {
  /* overflow: auto; */
  background-color: #eaedf7;
  /*padding-bottom: 0.4rem;*/
  border-top: 1px solid white;
  border-bottom: 1px solid gray;
  min-height: 14.7rem;
  height: auto;
}

#navi {
  background-color: #b0c4de; /* lightsteelblue */
  border-top: 1px solid #f0f8ff; /* aliceblue */
  border-bottom: 1px solid #696969; /* dimgray */
}

#navi .disabled {
  pointer-events: none;
  cursor: default;
}

#navi * {
  vertical-align: middle;
}

#navi p {
  white-space: nowrap;
}

#footer {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#footer button {
  margin-right: 0.3rem;
  pointer-events: none;
  cursor: default;
}

#footer h3 {
  white-space: normal;
}

#setopen {
  display: none;
}

footer {
  position: relative;
  width: 100%;
  height: auto;
  background-color: #eaedf7;
}

footer p {
  white-space: nowrap;
  font-size: clamp(0.7rem, 3vw, 0.9rem);
  line-height: 1;
}

footer p:first-child {
  margin: 0.3rem 0.7rem 0 0.7rem;
}

footer p:last-child {
  margin: 0.2rem 0.7rem 0.4rem 0.7rem;
}

.node button {
  line-height: 1.3rem;
	padding: 0.4rem 0.8rem;
  width: 16.8rem;
  height: auto;
}

.node button.menu {
  display: flex;
	justify-content: space-between;
	align-items: center;
}

.node button.help {
  text-align: center;
}

.file {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  background: #c1e0ff;
  border-radius: 1.0em;
  border: 1px outset #aaaaaa;
  width: 6.0em;
  height: 1.7em;
  margin-right: 1em;
}

em {
  color: red;
}
