:root {
  color-scheme: light;
  --background: #fff;
  --text: #222;
  --muted: #666;
  --rule: #ddd;
  --link: #315c43;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 19px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

main {
  width: min(100% - 40px, 660px);
  margin: 0 auto;
  padding: 72px 0 64px;
}

.page-header {
  margin-bottom: 44px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}

h2 {
  margin: 44px 0 10px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin-bottom: 22px;
}

.intro {
  font-size: 21px;
  line-height: 1.45;
}

.note {
  color: var(--muted);
  font-size: 17px;
}

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 34px 0 6px;
}

.photos img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

section {
  margin-top: 38px;
  padding-top: 1px;
}

footer {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 17px;
}

footer p {
  margin-bottom: 0;
}

footer p + p {
  margin-top: 10px;
}

@media (max-width: 560px) {
  body {
    font-size: 18px;
  }

  main {
    width: min(100% - 32px, 660px);
    padding-top: 46px;
  }

  .page-header {
    margin-bottom: 34px;
  }

  h1 {
    font-size: 28px;
  }

  .intro {
    font-size: 20px;
  }

  .photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
