:root {
  --ratio: 1.5;
  --s-4: calc(var(--s-3) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-1: calc(var(--s0) / var(--ratio));
  --s0: 1rem;
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --measure: 50rem; /* default measure of the site */
  --space: var(--s0); /* default spacing of the site */
  --color: #171920;
  --color-mid: #888;
  --color-active: #fff;
  --interactive-color: #0000b7;
  --visted-color: #a60000;
  --background-color: #f8f8f8;
}

html {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color);
  background-color: var(--background-color);
}

html * {
  box-sizing: border-box;
  max-width: var(--measure);
}

html, body {
  height: 100%;
  max-height: 100%;
  margin: 0;
}

html, body, div{
  max-width: 100%;
}

body {
  padding: var(--s-1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

h1,h2,h3,h4,h5,h6 {
  line-height: 1.2;
}
h1 {
  margin-bottom: .5em;
}
h2 {
  margin-bottom: .125em;
}

header {
  margin: 0 auto;
}

.content {
  flex-grow: 1;
}

main {
  margin: 0 auto;
}

footer {
  margin: 0 auto;
  font-size:small;
  margin-top:1em;
}

header > ul {
  list-style: none;
  padding: 0;
}

img {
  max-width: 100%;
}

hr {
  border: 0;
  border-bottom: 1px dashed var(--background-color);
  background: var(--color-mid);
}

p {
  margin: var(--s-1) 0;
}

button {
  border: 1px solid var(--interactive-color);
  background-color: var(--background-color);
  box-shadow: var(--s-4) var(--s-4) var(--color-mid);
  padding: var(--s-3) var(--s-2);
  color: var(--interactive-color);
}

button:hover{
  background-color: var(--color-active);
  cursor: pointer;
}

button:active {
  transform: translate(0, var(--s-4));
  box-shadow: none;
}

button:focus {
  border: 2px dashed var(--interactive-color);
  padding-top: calc(var(--s-3) - 1px);
  padding-bottom: calc(var(--s-3) - 1px);
  padding-right: calc(var(--s-2) - 1px);
  padding-left: calc(var(--s-2) - 1px);
}

a {
  color: var(--interactive-color);
}

a:visited {
  color: var(--visted-color);
}

pre {
  overflow-x: scroll;
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-top: 0;
  margin-bottom: 0;
}

.stack > * + * {
  margin-top: var(--space);
}

.cluster {
  overflow: hidden;
}

.cluster > * {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  margin: calc(var(--space) * -1); /* allow gap between children */
}

.cluster > * > * {
  margin: var(--space);
}

.center {
  box-sizing: content-box;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--measure);
  padding-left: var(--s0);
  padding-right: var(--s0);
}

.with-sidebar {
  overflow: hidden;
}
.with-sidebar > * {
  display: flex;
  flex-wrap: wrap;
  margin: calc(var(--s0) * -1); /* allow gap between children */
}
.with-sidebar > * > * {
  margin: var(--s0);
  flex-basis: 20%;
  flex-grow: 1;
}
.with-sidebar > * > :last-child {
  flex-basis: 0;
  flex-grow: 999;
  min-width: calc(60% - var(--s0));
}

.icon {
  width: 0.75em;
  width: 1cap;
  height: 0.75em;
  height: 1cap;
}

.with-icon {
  display: inline-flex;
  align-items: baseline;
}

.with-icon .icon {
  margin-inline-end: 1rem;
}
