:root {
  --bg: #FFFFF0;
  --bg2: #F7EDDC;
  --box: #FFFFFF;
  --text: #000000;
  --border: #770000;
  --gray: #696969;
  --gray2: #3B3B3B;
}

@font-face {
  font-family: Elstob;
  src: url(fonts/Elstob/Elstob.ttf);
}

@font-face {
  font-family: Elstob;
  src: url(fonts/Elstob/Elstob-Italic.ttf);
  font-style: italic;
}

@font-face {
  font-family: Mondwest;
  src: url(fonts/Mondwest.otf);
}

@font-face {
  font-family: STKaiti;
  src: url(fonts/STKaiti.ttf)
}

* {
  color: var(--text);
  font-family: Elstob;
}

*:lang(zh) {
  font-family: STKaiti;
}

a {
  color: var(--border);
  text-decoration: 1px underline wavy;
}

a:hover {
  text-decoration: none;
}

a:not([href]) {
    text-decoration: line-through;
    color: var(--gray);
}

html {
  background-color: var(--bg);
}

body {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-template-columns: repeat(10, 10vw);
  overflow-x: hidden;
}

header {
  height: auto;
  grid-row: 1;
  grid-column: 2/ span 10;
  text-align: center;
  width: 35vw;
  margin: auto;
  background-color: var(--bg2);
  border: 4px var(--gray) ridge;
}

header h1 {
  font-style: italic;
}

header h2 {
  font-size: 1.15rem;
}

header p {
  background-color: var(--box);
  padding: 0 5px;
  width: fit-content;
  margin: auto;
  text-wrap: nowrap;
  border: 2px var(--border) dashed;
  margin-bottom: 10px;
}

main {
  grid-column: 2 / span 10;
  grid-row: 2;
  margin: auto;
  margin-top: 2vw;
  width: 85vw;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: auto;
}

section h2 {
  background-color: var(--bg2);
  position: relative;
  margin-top: -0.5rem;
  margin-left: -3rem;
  padding-left: 1rem;
  max-width: 25vw;
  border: 2px var(--border) dashed;
}

section summary {
  font-size: 1.5rem
}

section {
  grid-column: 2 / 7;
  text-align: justify;
  border: 1px var(--border) dotted;
  padding: 0 2vw;
  background-color: var(--box);
  margin-bottom: 2vw;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vw;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1vw;
}

.two-col *:nth-child(1),.three-col *:nth-child(1) { grid-column: 1; }
.two-col *:nth-child(2),.three-col *:nth-child(2) { grid-column: 2; }
.three-col *:nth-child(3) { grid-column: 3; }

main > .two-col {
  grid-column: 2 / 7;
}

main > aside {
  grid-column: 7;
  padding-left: 2vw;
}

aside {
  grid-column: 1;
  padding: 0 1vw;
  max-width: 10vw;
  display: flex;
  flex-direction: column;
  position: fixed;
  grid-row: 1 / span 3;
  border-right: 4px black solid;
  height: auto;
}

body > aside > a > span {
  font-size: calc(80vh / 7);
}

body > aside > a {
  top: 0;
  height: auto;
  text-decoration: none;
}

body > aside:hover {
  background-color: var(--box);
}

body > aside > a br {
  display: block;
}

.left { float: left; }
.right { float: right; }
.center { margin: auto; }

figcaption {
  color: var(--gray);
  text-align: center;
  margin-top: 5px;
}

img {
  margin: auto;
  display: block;
}

li {
  text-align: left;
}

rt {
  font-size: .6rem;
}

footer {
  grid-column: 2 / span 10;
  grid-row: 3;
  height: auto;
  font-style: italic;
}

/* MEDIA QUERIES */

@media (max-width: 960px) {
  aside {
    border: none;
  }
}
