﻿::-webkit-scrollbar {
  background-color: peachpuff;
  width: 1rem;
}
::-webkit-scrollbar-thumb {
  background-color: tomato;
}
::-webkit-scrollbar-thumb:hover {
  background-color: coral;
}
::-webkit-scrollbar-thumb:active {
  background-color: orangered;
}
* {
  box-sizing: border-box;
  font: 1rem/1rem sans-serif;
  margin: 0;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
}

hr {
  display: none;
}
p {
  margin: 1rem 0;
}
header {
  background: lightsalmon;
  display: flex;
  flex-direction: column;
  height: var(--header);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 999;
}
header ul {
  display: flex;
  flex-direction: row;
  list-style: none;
}
header a {
  background-color: tomato;
  color: white;
  display: block;
  padding: 1rem;
  text-decoration: none;
}
header a:hover {
  background-color: coral;
}
header a:active {
  background-color: gold;
}
header span {
  display: none;
}

main {
  display: flex;
  flex: 1;
  height:250px;
  justify-content: space-between;
  min-height: var(--content);
}

article {
  background-color: gold;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  height:auto;
}

section {
  background-color: lightgreen;
  list-style: none;
  padding: 1rem;
  scroll-snap-align: start;
  height:auto;
}

section:nth-of-type(even) {
  background: white;
}

section ~ section h2::before {
  content: "Item ";
}


@media (min-width: 800px) {
  :root {
    --header: 3rem;
  }
  header {
    flex-direction: row;
  }
  header ul a::before {
    content: "";
  }
  main {
    flex-direction: row;
  }
  article {
    height: 250px;
  }
  section {
    min-height: 20px;
  }
 
}
