@view-transition {
  navigation: auto;
}

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

:root {
  --width-site: 920px;
  --width-content: 800px;
  container: root / size;
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: #007bff;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: #3d98f9;
  text-decoration: underline;
}

main {
  margin: 0 auto;
  padding: 1rem;
  max-width: var(--width-content);
  flex: 1;
}

img {
  max-width: 100%;
}

header {
  position: sticky;
  top: 0;
  padding: 1rem;
  background-color: #333;
  color: #fff;

  & div {
    margin: 0 auto;
    max-width: var(--width-site);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    @container root (min-width: 768px) {
      flex-direction: row;
    }
  }

  & a {
    color: #fff;
    margin: 0 0.5rem;
  }
}

footer {
  & div {
    border-top: 1px solid #ccc;
    margin: 0 auto;
    padding: 0.25rem;
    max-width: var(--width-site);
    text-align: center;
  }
}

[id] {
  scroll-margin-top: 4rem;
}

.box-message {
  border-radius: 0.25rem;
  border: 1px solid #f9f93b;
  margin: 1rem auto;
  padding: 1rem;
  background-color: #ffc;
  color: #333;
}

.flex-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  @container root (min-width: 768px) {
    flex-direction: row;
  }

  & img {
    max-width: 25%;
  }
}
