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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin-block-end: 0;
  margin-block-start: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  margin: 0;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
button,
input,
label {
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: inline-block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

figure {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

svg {
  display: inline-block;
  vertical-align: top;
}

articles {
  display: block;
}

blockquote {
  margin: 0;
}
:root {
  --background-color-primary: white;
  --background-color-secondary: hsl(30, 3%, 93%);
  --background-gradient: linear-gradient(hsl(0, 0%, 90%), hsl(0, 0%, 95%));

  --image-background-gradient: var(--background-gradient);
  --block-vertical-padding: 3rem;
  --max-width: 69rem;
  --min-width: 20rem;
  --min-side-padding: 1rem;
  --side-padding: max(
    var(--min-side-padding),
    calc((100% - var(--max-width)) / 2)
  );

  --dot-matrix-bg-image: url("/images/dot-matrix_light.svg");
}

@media only screen and (min-width: 720px) {
  :root {
    --min-side-padding: 1.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color-primary: black;
    --background-color-secondary: hsl(0, 0%, 8%);

    --background-gradient: linear-gradient(
      hsla(0, 0%, 20%, 0.2),
      hsla(0, 0%, 5%, 0.2)
    );
    --image-background-gradient: linear-gradient(
      hsl(0, 0%, 5%),
      hsl(0, 0%, 20%)
    );

    --dot-matrix-bg-image: url("/images/dot-matrix_dark.svg");
  }
}

html {
  min-width: var(--min-width);
  background: var(--background-color-primary) var(--dot-matrix-bg-image) repeat
    50% 0;
  padding: 0 var(--min-side-padding);
}

body {
  max-width: var(--max-width);
  width: round(down, 100%, 48px);
  margin: 0 auto;
}
:root {
  --font-weight: 300;
  --font-weight-bold: 700;
  --base-size: 16px;
  --base-line-height: 24px;
  --h1-size: 40px;
  --h1-line-height: 48px;
  --h2-size: 20px;
  --h2-line-height: 24px;
  --h3-size: 20px;
  --h3-line-height: 24px;
  --h4-size: 16px;
  --h4-line-height: 24px;
  --h1-weight: var(--font-weight-bold);
  --h2-weight: var(--font-weight-bold);
  --h3-weight: var(--font-weight-bold);

  --primary-color: hsl(0, 0%, 16%);
  --secondary-color: hsl(0, 0%, 50%);
  --tertiary-color: hsl(0, 0%, 75%);
  --accent-color: hsl(44, 59%, 45%);

  --heading-color: var(--primary-color);
}

@media only screen and (min-width: 720px) {
  :root {
    --h1-size: 64px;
    --h1-line-height: 72px;
    --h2-size: 40px;
    --h2-line-height: 48px;
    --h3-size: 40px;
    --h3-line-height: 48px;
    --h4-size: 16px;
    --h4-line-height: 24px;
  }

  .bread {
    margin-left: 6rem;
    margin-right: 6rem;
  }
}

@media only screen and (prefers-color-scheme: dark) {
  :root {
    --primary-color: hsl(0, 0%, 75%);
    --tertiary-color: hsl(0, 0%, 25%);
    --heading-color: white;
    --accent-color: hsl(44, 59%, 45%);
  }
}

html {
  color: var(--primary-color);
  font-size: var(--base-size);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-weight: var(--font-weight);
  line-height: var(--base-line-height);
}

h1 {
  font-size: var(--h1-size);
  line-height: var(--h1-line-height);
  font-stretch: 125%;
  font-weight: var(--h1-weight);
}

h2 {
  font-size: var(--h2-size);
  line-height: var(--h2-line-height);
  font-weight: var(--h2-weight);
}

h3 {
  font-size: var(--h3-size);
  line-height: var(--h3-line-height);
  font-weight: var(--h3-weight);
  margin-bottom: 1.5rem;
}

h4 {
  font-size: var(--h4-size);
  line-height: var(--h4-line-height);
  margin-bottom: 1.5rem;
}

h5 {
  font-size: var(--h4-size);
  line-height: var(--h4-line-height);
  margin: 0;
}

h3:not(:first-child) {
  margin-top: 3rem;
}

h4:not(:first-child) {
  margin-top: 1.5rem;
}

h5:not(:first-child) {
  margin-top: 1.5rem;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--heading-color);
}

p + p {
  margin-top: 1.5rem;
}

a {
  text-decoration: none;
  color: var(--accent-color);
}

p b {
  color: var(--heading-color);
}

.page ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

a.appstore {
  height: 3rem;
  display: inline-block;
  margin-top: 1.5rem;
}

blockquote::before {
  content: open-quote;
}
blockquote::after {
  content: close-quote;
}
blockquote {
  quotes: "“" "”" "‘" "’";
  margin-bottom: 0.75rem;
}

.bread {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  font-weight: var(--font-weight);
}

.label {
  border-radius: 50%;
  padding: 0 0.75rem;
  color: var(--accent-color);
  text-transform: uppercase;
  margin: 0;
}

.subtitle {
  font-weight: 100;
  color: var(--secondary-color);
}

.center {
  text-align: center;
}

.large-inline {
  display: none;
}

@media only screen and (min-width: 720px) {
  :root {
    --h1-size: 64px;
    --h1-line-height: 72px;
    --h2-size: 40px;
    --h2-line-height: 48px;
    --h3-size: 40px;
    --h3-line-height: 48px;
    --h4-size: 16px;
    --h4-line-height: 24px;
  }

  .bread {
    margin-left: 6rem;
    margin-right: 6rem;
  }

  .large-inline {
    display: inline;
  }
}

.bold {
  font-weight: var(--font-weight-bold);
}
.block + .block {
  margin-top: 3rem;
}

.bg {
  background: var(--background-gradient);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.page {
  margin: var(--block-vertical-padding) 0;
  min-height: 40rem;
}

.block.with-label {
  margin-top: -1.5rem;
}

@media only screen and (min-width: 720px) {
  .article-with-aside {
    display: grid;
    grid-template-columns: auto 18rem;
    gap: 3rem;
  }
}
.blog a {
  color: var(--accent-color);
}

.blog .meta {
  margin-bottom: 1.5rem;
  color: var(--tertiary-color);
}

article {
  margin-bottom: 3rem;
}

.blog article img {
  border-radius: 8px;
}

.app-store-ratings {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--heading-color);
}

.app-store-ratings .leaves {
  height: 44px;
  width: 21px;
  display: inline-block;
  vertical-align: top;
}

.app-store-ratings .leaves.right {
  transform: rotateY(180deg);
}

.app-store-ratings .rating {
  display: inline-block;
  line-height: 44px;
  text-align: center;
  margin: 0 1rem;
  font-size: 24px;
}

.app-store-ratings .disclaimer {
  display: block;
  color: var(--tertiary-color);
  margin-top: 4px;
}
footer {
  margin-top: -1px;
  border-top: 1px solid var(--tertiary-color);
  padding-top: 1.5rem;
  padding-bottom: 6rem;
  color: var(--tertiary-color);
}

footer nav {
  margin-bottom: 1.5rem;
}

footer a {
  color: var(--tertiary-color);
}

@media only screen and (min-width: 720px) {
  footer nav ul {
    display: flex;
    column-gap: 1rem;
  }
}
input,
button {
  background-color: var(--background-color-secondary);
  color: var(--primary-color);
  border: 1px solid var(--tertiary-color);
  padding: calc(0.75rem - 1px) 1rem;
  font-size: 1rem;
  line-height: 24px;
  border-radius: 0.75rem;
}

button {
  color: var(--accent-color);
}

.bg input,
.bg button {
  background-color: var(--background-color-primary);
}

.ml-form-embedSubmit {
  margin-top: 1.5rem;
}

.ml-block-form {
  margin-top: 1.5rem;
}

@media only screen and (min-width: 720px) {
  .inline .ml-block-form {
    display: flex;
    gap: 1rem;
  }

  .inline .ml-form-embedSubmit {
    margin-top: 0;
  }
}
section.gallery picture {
  display: block;
  margin-bottom: 1.5rem;
}

section.gallery picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

section.gallery.with-bg picture {
  background: var(--image-background-gradient);
  border-radius: 0.75rem;
}

section.gallery.with-bg.padded picture img {
  padding: 1.5rem;
}

figure-container {
  display: block;
  container-type: inline-size;
}

@media only screen and (min-width: 720px) {
  section.gallery picture,
  section.gallery img {
    margin: 0;
  }

  section.gallery.row {
    display: flex;
    flex-direction: row;
    gap: 3rem;
  }

  section.gallery.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
  }

  figure.landscape.a3-2 {
    --n: 24px;
    --ratio: 3 / 2;

    width: 100%;
    height: round(up, calc(100cqw / (var(--ratio))), var(--n));
  }

  figure.landscape.a2-1 {
    --n: 24px;
    --ratio: 2 / 1;

    width: 100%;
    height: round(up, calc(100cqw / (var(--ratio))), var(--n));
  }
}

figure.square {
  --n: 24px;
  --ratio: 1 / 1;

  width: 100%;
  height: round(up, calc(100cqw / (var(--ratio))), var(--n));
}

figure.square picture {
  aspect-ratio: 1;
}

article figure {
  margin-bottom: 1.5rem;
}
header nav ul li a {
  color: var(--tertiary-color);
}

header nav ul li.active a {
  color: var(--primary-color);
}

header nav {
  display: grid;
  grid-template-columns: 1fr 3rem 1fr;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

header nav ul {
  display: flex;
  column-gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

header nav ul.trailing {
  justify-content: flex-end;
  grid-column: 3;
  grid-row: 1;
}

header nav .home {
  grid-column: 2;
  grid-row: 1;
}

header nav .home svg {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.75rem 0.75rem;
}

header nav.leading {
  grid-column: 1;
  grid-row: 1;
}
th {
  text-align: left;
  width: 15rem;
  color: var(--tertiary-color);
}

th,
td {
  padding-bottom: 1.5rem;
}

table {
  margin-top: 1.5rem;
}
