:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;

  --bg: #fff;
  --text: #212121;
  --text-pre: #444;
  --text-light: #585858;
  --border: #898EA4;
  --accent: #0d47a1;
  --accent-bg: #f5f7ff;
  --accent-hover: #1266e2;
  --code: #d81b60;
  --marked: #ffdd33;
  --disabled: #efefef;
  --border-radius: 0.5rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
h2, h3, h4, h5, h6 {
  margin-top: 2rem;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.6rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.44rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 0.96rem; }

/* Reduce header size on mobile */
@media only screen and (max-width: 720px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.1rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.25rem; }
}

p {
  margin: 1.5rem 0;
}
/* Prevent long strings from overflowing container */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 1rem auto;
}

mark {
  padding: 2px 5px;
  border-radius: var(--border-radius);
  background-color: var(--marked);
  color: black;
}
mark a {
  color: var(--accent);
}

img, video {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

figure {
  margin: 0;
  display: block;
  overflow-x: auto;
}
figure > img,
figure > picture > img {
  display: block;
  margin-inline: auto;
}
figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-block: 1rem;
}

blockquote {
  margin-inline-start: 2rem;
  margin-inline-end: 0;
  margin-block: 2rem;
  padding: 0.4rem 0.8rem;
  border-inline-start: 0.35rem solid var(--accent);
  color: var(--text-light);
  font-style: italic;
}
cite {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
}

dt {
  color: var(--text-light);
}

code, pre, pre span, kbd, samp {
  font-family: var(--mono-font);
  color: var(--code);
}

kbd {
  border: 1px solid var(--text-pre);
  border-bottom: 3px solid var(--text-pre);
  border-radius: var(--border-radius);
  color: var(--text-pre);
  padding: 0.1rem 0.4rem;

}

pre {
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
}

pre code {
  background: none;
  margin: 0;
  padding: 0;
}

progress {
  width: 100%;
}
progress:indeterminate {
  background-color: var(--accent-bg);
}
progress::-webkit-progress-bar {
  border-radius: var(--border-radius);
  background-color: var(--accent-bg);
}
progress::-webkit-progress-value {
  border-radius: var(--border-radius);
  background-color: var(--accent);
}
progress::-moz-progress-bar {
  border-radius: var(--border-radius);
  background-color: var(--accent);
  transition-property: width;
  transition-duration: 0.3s;
}
progress:indeterminate::-moz-progress-bar {
  background-color: var(--accent-bg);
}

/* Prevent scripts from affecting line-height. */
sup, sub {
  vertical-align: baseline;
  position: relative;
}
sup { top: -0.4em; }
sub { top: 0.3em; }

.link {
  color: var(--accent);
  text-decoration: none;
}
.link:hover, .link:focus {
  text-decoration: underline;
  color: var(--accent-hover);
}
