:root {
    /* --font-size-body: 1.0625rem; */
    --font-size-body: 1rem;
    --font-size-mono: 0.98rem;
    /* --font-size-pre-mono: 12px; */
  
    --color-base: #fafafa; /* better color(s) naming system needed */
    --color-background: #f6f6f6;
    --color-offset: #eee;
    --color-faded: #ccc;
    --color-gray-lighter: #808080;
    --color-gray: #767676;
    --color-text: #414141;
    /* --color-text-extreme: #000; */
  
    --font-family-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
    --radius: 15px;
    --radius-small: 0.5rem;
    --radius-mini: 0.3rem;
  
    --width: 550px;
  }
  
  @media (prefers-color-scheme: dark) {
    :root {
      --color-base: #0f0f0f; /* better color(s) naming system needed */
      --color-background: #202020;
      --color-offset: #363636;
      --color-faded: #555;
      --color-gray-lighter: #808080;
      --color-gray: #767676;
      --color-text: #FFFEFA;
      /* --color-text-extreme: #fff; */
    }
  }
  
  /* Reset -------------------------------------------------------------------- */

  *,
  *::before,
  *::after {
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
  }
  
  * {
    margin: 0;
    padding: 0;
  }
  
  html,
  body {
    height: 100%;
  }
  
  html {
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    background: var(--color-background);
    color: var(--color-text);
  }
  
  body {
    max-width: var(--width);
    /* margin: 0 auto; */
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    -ms-font-feature-settings: "kern" 1;
    -o-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1,"kern","kern";
    -webkit-font-kerning: normal;
    font-kerning: normal;
  }

  main {
    padding: 2rem 2rem 1rem;
  }
  
  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
    object-fit: cover;
    -o-object-fit: cover; /* for older versions of Opera */
    object-position: center; /* for older versions of Safari */
  }

  img {
    border-radius: var(--radius);
    margin: 2rem 0rem; 
  }  
  
  input,
  button,
  textarea,
  select {
    font: inherit;
    border: 0;
    line-height: 1;
    background: none;
    color: var(--color-text);
  }
  
  input,
  textarea,
  select {
    display: block;
    width: 100%;
  }
  
  button {
    cursor: pointer;
    background: var(--color-faded);
  }
  
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  /* @media (max-width: var(--width)){
    html {
        font-size: var(--font-size-body);
    }

    main {
        padding: 1rem 1rem 4rem;
        margin: 0 0 3.5rem 0;
      }
  } */

  

  /* Typography --------------------------------------------------------------- */

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: var(--font-size-body);
    color: var(--color-text);
    font-weight: normal;
    margin-bottom: 1rem;
  }

  /* h1:first-child {
    margin-top: 10vh;
  } */
  
  h1 {
    margin-top: 3rem;
  }

  h2 {
    margin-top: 2rem;
  }

  h3 {
    margin-top: 1rem;
  }
  
  /* h5 {
    color: var(--color-faded)
  } */
  
  p,
  ol,
  ul,
  pre {
    margin: 0 0 1rem 0; 
  }

  blockquote {
    margin: 1rem 0; 
  }

  
  a {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--color-text);
    text-underline-offset: 3px;
    color: inherit;
  }
  
  a:hover {
    text-decoration-color: var(--color-faded);
  }

  
  ul {
    list-style-type: none;
    margin-left: 2rem;
  }
  
  ul li:before,
  ol ul li:before {
    position: absolute;
    margin-left: -2rem;
    content: "â€”";
    color: var(--color-faded);
    font-weight: 500;
    margin-right: 0.5rem;
  }
  
  ol {
    list-style-type: none;
    margin-left: 2rem;
    counter-reset: list;
  }
  
  ol li:before {
    position: absolute;
    margin-left: -2rem;
    color: var(--color-faded);
    font-weight: 500;
    margin-right: 0.5rem;
    content: counter(list) ".";
    counter-increment: list;
  }
  
  b,
  strong {
    font-weight: 700;
  }
  
  /* aside,
  aside p {
    font-size: 0.8rem;
    color: var(--color-gray);
  }
  
  aside p:first-of-type {
    margin-top: 0;
  }

  aside p:last-of-type {
    margin-bottom: 0;
  }
  
  aside a {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--color-faded);
    text-underline-offset: 0px;
  }
  
  aside code {
    background: none;
    padding: 0;
    font-size: calc(var(--font-size-mono) * 0.9);
  } */
  
  pre,
  code {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-mono);
  }
  
  pre {
    overflow: auto;
    padding: 0.5rem;
    overflow-x: scroll;
    border-radius: var(--radius-mini);
    background-color: var(--color-offset);
    tab-size: 1rem;
    white-space: pre;
    font-size: var(--font-size-pre-mono);
  }
  
  code {
    padding: 2px 6px 3px 6px;
    border-radius: var(--radius-mini);
    background: var(--color-offset);
    color: var(--color-text);
  }

  pre code {
    background-color: var(--color-offset);
    /* font-size: var(--font-size-pre-mono); */
    border-radius: 0;
    padding: 0;
  }
  
  blockquote {
    border-left: 2px solid var(--color-offset);
    padding-left: 1rem;
    margin: 2rem 0;
    color: var(--color-gray-lighter);
  }

  blockquote a {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--color-gray-lighter);
    text-underline-offset: 3px;
    color: inherit;
  }

  hr {
    border: none;
    border-top: 2px solid var(--color-offset);
    color: var(--color-faded);
    margin: 2rem 0;
  }

  .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 2rem 0;
  }
  
  .video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    /* white-space: nowrap; */
    border-spacing: 0;
  }

  table > *:first-child > *:first-child > * {
    border-top-width: 2px;
  }

  table > *:last-child > *:last-child > * {
    border-bottom-width: 2px;
  }

  table td:first-child,
  table th:first-child {
    border-left-width: 2px;
  }

  table td:last-child,
  table th:last-child {
    border-right-width: 2px;
  }

  table > *:first-child > *:first-child > *:first-child {
    border-top-left-radius: var(--radius);
  }

  table > *:first-child > *:first-child > *:last-child {
    border-top-right-radius: var(--radius);
  }

  table > *:last-child > *:last-child > *:first-child {
    border-bottom-left-radius: var(--radius);
  }

  table > *:last-child > *:last-child > *:last-child {
    border-bottom-right-radius: var(--radius);
  }

  th, td {
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    font-weight: normal;
    text-align: left;
    border: 1px solid var(--color-offset);
    padding: 0.75rem;
  }

  td {
    max-width: 400px;
  }

  tr:hover {
    background-color: var(--color-base);
  }