@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/*@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');*/
/*@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');*/
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:ital,opsz,wght@0,8..144,100..900;1,8..144,100..900&display=swap');


*, *::before, *::after {box-sizing: border-box; }
* { margin: 0; }
body { line-height: 1.5; -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; }
* { font-variant-ligatures: none; }

html, html.light {
  color-scheme: light;
  --font: "Roboto Serif", serif;
  --mono: "Source Code Pro", monospace;
  --text: #200000e0; 
  --accent: #f80; 
  --bg: #fefdf8; 
  --asidebg: #fef8e8; 
  --codebg: #f8f0e0;
  --asidecodebg: #f8f0e0;
  --instop: #d6e6c6;
}

html.dark {
  color-scheme: dark;
  --text: #dde; 
  --accent: #ec0; 
  --bg: #334; 
  --codebg: #445;
  --asidecodebg: #334;
  --instop: #667;
}

.hljs-keyword, .hljs-built_in { font-weight: bold; }
.hljs-comment { color: var(--accent); font-style: italic; }

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
    --text: #eed; 
    --accent: #ec0; 
    --bg: #334; 
    --asidebg: #223; 
    --codebg: #445;
    --asidecodebg: #334;
    --instop: #667;
  }
}

body {
  transition: background-color 0.2s;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font), sans-serif;
  line-height: 1.5;
  /* font-feature-settings:  "liga", "kern";*/
  display: flex;
  flex-direction: column;
  align-items: center;
  /* et cetera */
}

h1 { margin-top: 2em; font-size: 3rem; line-height: 1.0; }
h2 { margin-top: 2em; font-size: 2rem; line-height: 1.1; }
h3 { margin-top: 1em; font-size: 1.5rem; line-height: 1.2; }
p { margin-top: 1em; }

header { margin-top: 2em; }
footer { margin-bottom: 2em; }

article { width: 100%; margin-bottom: 5em; }

article>*:not(aside), article>aside>* {
  max-width: 42rem;
  padding: 0 1rem;
  margin-left: auto;
  margin-right: auto;
}

article ol {
  margin-top: 1em;
  margin-bottom: 1em;
} 

article pre {
  /*clip-path: polygon(0 1em, 0 100%, 100% calc(100% - 1em), 100% 0);*/
  max-width: 44rem;
  /*display: grid;*/
  /*grid-template-columns: 1fr 40rem 1fr;*/
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  overflow-x: auto;
  background: var(--codebg);
  /*border-radius: 4px;*/
  padding: 0.5em 0.5em 0.5em 2em;
  border-top: 2px solid var(--instop);
}

aside pre {
  background: var(--asidecodebg);
}

pre.wrap { white-space: pre-wrap; }
@media screen and (max-width: 700px) { pre.shrink code { font-size: 0.7rem; } }
pre.grid-explanation { display: grid; grid-template-columns: auto 1fr; gap: 0.25em 2em; }

code {
  font-family: var(--mono);
  font-size: 0.875rem;
  /*background: var(--codebg);*/
  padding: 0 1px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  font-size: 0.875rem;
  padding: 0;
}

a[href] {
  color: var(--accent);
}

.chat-log {
  background: #336;
  color: #ddd;
  border-radius: 4px;
  border: 1px solid #448;
  padding: 1em 2em;
  margin: 2em auto;
  font-family:  var(--mono);
  font-size: 0.875rem;
}

.chat-line {
  margin-left: 1em;
}

.chat-log a {
  color: inherit;
}

.speaker {
  color: #ff8888;
  font-weight: 900;
}


.speaker.lynn {
  color: #ffdd88;
}

div + .speaker {
  margin-top: 0.5em;
}

section.instructions {
  margin-top: 2em;
  margin-bottom: 2em;
  /*display: grid;*/
  display: flex;
  flex-wrap: wrap;
  max-width: 48rem;
  /*grid-template-columns: repeat(2, minmax(0, 1fr));*/
  gap: 0.5em;
  justify-content: center;
}

.instruction {
  flex: 1 0 calc(50% - 1em);
  max-width: 50%;
  background: var(--codebg);
  border-radius: 8px;
  overflow: hidden;
}


@media screen and (max-width: 700px) {
  .instruction {
  max-width: 100%;
    flex: 1 0 100%;
  }
}


h3 .ins-name {
  font-weight: 600;
  float: right;
}

.instruction h3 {
  overflow: hidden;
  font-family:  var(--mono);
  background-color: var(--instop);
  margin: 0 0 0 0;
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  /*color: #000000c0;*/
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.instruction p { margin: 0.5em 0; }

.ins-doc {
  font-family: Inter, sans-serif;
  font-size: 0.875rem;
  padding: 0.5rem 1rem 0.5rem 1rem;
}

.ins-opcode {
  /*color: #8639ff;*/
}

h3 .ins-operand {
  font-style: italic;
  border: 1px solid var(--text);
  padding: 0 0.2rem;
  border-radius: 4px;
}

.ins-cache {
  /*opacity: 0.5;*/
  /*color: #e38d51;*/
}

figure.anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1.5fr;
  width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
}

code.parseltongue {
  background: var(--codebg);
  margin: -2px 0px;
  padding: 2px 4px;
  font-weight: bold;
}

.anatomy-part {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.anatomy-part code {
  font-size: 24px;
}
.anatomy-part span {
  font-size: 12px;
}

pre.parseltongue i {
  font-family: Inter;
  font-size: 0.8rem;
  font-style: normal;
  white-space: pre-wrap;
}

article>aside {
  background: var(--asidebg);
  padding-top: 1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

article>aside>h2:first-of-type {
  margin-top: 1rem;
}
