:root {
  --bg-color:#d7f8e5;
  --border-color:#7c9b89;
  --subtitle-color:#35a363;
  --link-color:#18bc5a;
}
/* Custom Review Score Box */
.score-box {
  background-color: var(--bg-color);
  border: 2px solid var(--border-color);
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  border-radius: 4px;
}

.score-detail {
  margin-bottom: 10px;
  font-size: 0.95em;
}

.final-score {
  font-size: 1.2em;
  font-weight: bold;
  color: #1b4332;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}

.final-score span {
  color: var(--subtitle-color);
  font-size: 1.4em;
}
html, body {
  margin:0;
  padding:0;
  background-color:#a7efb8;
  background-attachment:fixed;
  background-image:url('https://i.imgur.com/4x108uF.png');
}

/* 1. Center the whole site container */
.container {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

body a {
  color:var(--link-color);
}

article img, 
main img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}
header {
  width: 400px;
  height: 200px;                    /* Set this to your image's actual pixel height */
  background-image: url('../images/tempheader.jpg');
  background-size: cover;          /* Fills the entire 400px box completely */
  background-repeat: no-repeat;    /* Prevents tiling */
  background-position: center;     /* Centers the image within the box */
}
.flex {
  display:flex;
}

/* 2. Changed position from fixed to sticky so it stays in the layout flow */
.sidebar {
  background-color:var(--bg-color);
  max-width:250px;
  width:200px;
  height: fit-content;
  border:1px solid var(--border-color);
  position: sticky;
  top: 20px;
}

article {
  background-color:var(--bg-color);
  border:1px solid var(--border-color);
  margin-top:20px;
  max-width:370px;
  margin-left:10px;
  margin-right:10px;
}

.subtitle {
  color:var(--subtitle-color);
  font-size:18px;
  font-weight:bold;
  border-bottom:2px solid var(--subtitle-color);
  margin-left:10px;
  margin-right:10px;
  text-align:right;
  padding-top:20px;
}

article > p {
  padding:10px;
  padding-left:20px;
}

.links {
  list-style-type:'+';
  font-size:16px;
}

.links li a {
  color:var(--link-color);
  letter-spacing:1px;
  text-decoration:none;
}

main {
  margin-top:-21px;
}

section > p {
  padding:10px;
}

footer {
  margin-left:20px;
  max-width:30%;
  font-size:12px;
}

@media only screen and (max-width: 630px) {
  .sidebar {
    position:relative;
    max-width:100%;
    width:100%;
    height:150px;
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    overflow:hidden;
    top: 0;
  }
  .flex {
    flex-wrap:wrap;
    flex-direction:row;
  }
  .right {
    order:1;
    width:100%;
  }
  .left {
    order:2;
  }
  section {
    display:flex;
    flex-wrap:wrap;
    width:120px;
  }
}
