/*
 * https://developer.apple.com/design/human-interface-guidelines/foundations/color/
 */
:root {
  --labelColor: rgb(39, 39, 39);
  --secondaryLabelColor: rgb(128, 128, 128);
  --tertiaryLabelColor: rgb(189, 189, 189);
  --quaternaryLabelColor: rgb(230, 230, 230);
  --textColor: rgb(0, 0, 0);
  --textBackgroundColor: rgb(255, 255, 255);
  --windowBackgroundColor: rgb(236, 236, 236);
  --disabledControlTextColor: rgb(192, 192, 192);
}

  /*
   * https://developer.apple.com/design/human-interface-guidelines/foundations/typography
   */

.largeTitle {
  font-size: 26pt;
  line-height: 32pt;
}

.title1 {
  font-size: 22pt;
  line-height: 26pt;
}

.title2 {
  font-size: 17pt;
  line-height: 22pt;
}

.title3 {
  font-size: 15pt;
  line-height: 20pt;
}

.headline {
  font-size: 13pt;
  font-weight: bold;
  line-height: 16pt;
}

.subheadline {
  font-size: 11pt;
  line-height: 14pt;
}

.body {
  font-size: 13pt;
  line-height: 16pt;
}

.callout {
  font-size: 12pt;
  line-height: 15pt;
}

.footnote {
  color: var(--secondaryLabelColor);
  font-size: 10pt;
  line-height: 13pt;
}

.caption1 {
  color: var(--labelColor);
  font-size: 10pt;
  line-height: 13pt;
}

.caption2 {
  color: var(--labelColor);
  font-size: 10pt;
  font-weight: bold;
  line-height: 13pt;
}

.sticky {
  position: sticky;
  top: 0;
}

a {
  color: var(--labelColor);
  font-weight: bold;
  text-decoration: none;
}

a::hover {
  text-decoration: underline;
}

a.disabled {
  color: var(--disabledControlTextColor);
  pointer-events: none;
  text-decoration: line-through;
}

article a {
  text-decoration: underline;
}

article p {
  margin-bottom: 0.75em;
  margin-top: 0.25em;
}

aside {
  float: left;
}

body {
  background: var(--windowBackgroundColor);
  color: var(--labelColor);
  font-family: 'PT Sans', sans-serif;
  margin: auto;
  max-width: 210mm;
}

code {
  font-family: 'PT Mono', monospace;
}

div.hstack {
  align-items: center;
  display: flex;
  flex-direction: row;
}

div.view {
  border-color: var(--labelColor);
  border-radius: 2pt;
  border-style: solid;
  border-width: 1pt;
  box-shadow: 1pt 1pt var(--labelColor);
  margin-bottom: 1em;
  margin-top: 0.5em;
  overflow: hidden;
}

div.view div {
  padding: 1em;
}

div.view div a.caption2::after {
  content: ' »';
}

div.view header {
  border-bottom-color: var(--labelColor);
  border-bottom-style: dotted;
  padding: 1em;
}

div.view.padding {
  padding: 0.25em 0.5em;
}

div.vstack {
  display: flex;
  flex-direction: column;
}

footer {
  align-items: center;
  border-top-color: var(--secondaryLabelColor);
  border-top-style: dotted;
  border-top-width: 1pt;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 1em;
}

footer nav {
  border: none;
  box-shadow: none;
  padding: 0;
}

header {
  align-items: center;
  background: var(--windowBackgroundColor);
  border-bottom-color: var(--secondaryLabelColor);
  border-bottom-style: dotted;
  border-bottom-width: 1pt;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: space-between;
  padding: 1em;
}

hr {
  border-bottom: 1px dashed var(--secondaryLabelColor);
  border-left: none;
  border-right: none;
  border-top: none;
}

main {
  margin-bottom: 0.5em;
  margin-left: 1em;
  margin-right: 1em;
  margin-top: 1em;
}

math {
  font-family: 'PT Serif', serif;
}

nav {
  align-items: center;
  border-color: var(--labelColor);
  border-radius: 2pt;
  border-style: solid;
  border-width: 1pt;
  box-shadow: 1pt 1pt var(--labelColor);
  display: flex;
  flex-grow: 1;
  gap: 1em;
  justify-content: space-around;
  padding: 1em;
}

nav img {
  height: 1em;
}

.padding {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

path {
  fill: var(--textColor)
}

picture {
  width: 13pt;
}

pre {
  background: var(--textBackgroundColor);
  border-style: solid;
  border-width: 1pt;
  color: var(--textColor);
  font-family: 'PT Mono', monospace;
  font-size: 11pt;
  line-height: 14pt;
  overflow-x: auto;
  scrollbar-width: 0;
}

pre div {
  font-family: 'PT Mono', monospace;
  overflow-x: auto;
  padding: 1em;
}

pre div.path {
  background: var(--textColor);
  color: var(--textBackgroundColor);
  display: block;
  font-family: 'PT Mono', monospace;
  font-style: italic;
  padding: 0.25em 0.25em;
}

.tag {
  font-family: 'PT Mono', monospace;
}

ul {
  /* list-style: inherit; */
}

/*
 * https://developer.apple.com/design/human-interface-guidelines/foundations/typography
 */
@media (max-width: 320px) {
  .largeTitle {
    font-size: 22pt;
    line-height: 26pt;
  }

  .title1 {
    font-size: 17pt;
    line-height: 22pt;
  }

  .title2 {
    font-size: 15pt;
    line-height: 20pt;
  }

  .title3 {
    font-size: 13pt;
    line-height: 16pt;
  }

  .headline {
    font-size: 11pt;
    font-weight: bold;
    line-height: 14pt;
  }

  .subheadline {
    font-size: 10pt;
    line-height: 13pt;
  }

  .body {
    font-size: 10pt;
    line-height: 13pt;
  }

  .callout {
    font-size: 10pt;
    line-height: 13pt;
  }

  pre {
    font-size: 10pt;
    line-height: 13pt;
  }
}

@media (prefers-color-scheme: dark) {
  /*
   * https://developer.apple.com/design/human-interface-guidelines/foundations/color/
   */
  :root {
    --labelColor: rgb(221, 221, 221);
    --secondaryLabelColor: rgb(154, 154, 154);
    --tertiaryLabelColor: rgb(86, 87, 87);
    --quaternaryLabelColor: rgb(53, 54, 54);
    --textColor: rgb(255, 255, 255);
    --textBackgroundColor: rgb(30, 30, 30);
    --windowBackgroundColor: rgb(50, 50, 50);
    --disabledControlTextColor: rgb(86, 87, 87);
  }
}
