:root {
  /* Apple Color Palette */
  --red-light: rgb(255, 59, 48);
  --red-dark: rgb(255, 69, 58);
  --blue-light: rgb(0, 122, 255);
  --blue-dark: rgb(10, 132, 255);
  --gray-light: rgb(142, 142, 142);
  --gray-dark: rgb(142, 142, 142);
  --gray2-light: rgb(174, 172, 178);
  --gray2-dark: rgb(99, 99, 102);
  --gray3-light: rgb(199, 199, 204);
  --gray3-dark: rgb(72, 72, 74);
  --gray4-light: rgb(209, 209, 214);
  --gray4-dark: rgb(58, 58, 60);
  --gray5-light: rgb(229, 229, 234);
  --gray5-dark: rgb(44, 44, 46);
  --gray6-light: rgb(242, 242, 247);
  --gray6-dark: rgb(28, 28, 30);

  --lbl-font-family: verdana, sans-serif;
  --lbl-color-blue: #224A78;
  --lbl-mobile-width: 600px;
  --lbl-radius-default: 0.5rem;
  --lbl-radius-small: 0.25rem;

  --main-bg-color: white;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  background: var(--main-bg-color);
  font-family: var(--lbl-font-family);
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  margin: 1rem;
}

nav {
  display: flex;
}

nav ul {
  list-style: none;

  display: flex;
  align-items: flex-end;

  /* spacing between normal menu items */
  gap: 1.5rem;
}

nav ul li {
  display: flex;
}

header .spacer {
  flex-grow: 1;
  /* pushes right-side items to the opposite end */
}

nav a {
  color: var(--lbl-color-blue);
  text-decoration: none;
}

nav a.active {
  font-weight: bold;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
}

main {
  margin: 1rem;
  border-top: 1px var(--lbl-color-blue) solid;
}

main>*:first-child {
  margin-top: 1rem;
}

p {
  margin: 1rem 0;
  line-height: 1.5em;
}

figcaption {
  font-size: smaller;
  text-align: center;
  color: var(--gray-light);
}

footer {
  font-size: 0.7rem;
  text-align: center;
  color: var(--gray-light);
  padding: 1rem;
}

footer>*:first-child {
  border-top: 1px var(--lbl-color-blue) solid;
  padding: 1rem;
}

.product {
  display: flex;
  align-items: center;
}

.product>div {
  margin: 0 1rem;
}

.product p {
  margin: 1rem;
}

.product h1 {
  margin: 1rem;
  font-size: 2rem;
}

main h1 {
  margin-top: 2rem;
  font-size: 1.6rem;
}

main h2 {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

main h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

main ul {
  margin-left: 2em;
  line-height: 1.5em;
}

main li {
  margin-bottom: 0.25em;
}

main blockquote {
  border-left: var(--lbl-color-blue) 2px solid;
  padding-left: 1em;
  margin-left: 1em;
}

@media (prefers-color-scheme: dark) {

  /* This is a hack, it might be eventually better to just to swap the color variables. */
  html {
    filter: invert(95%) hue-rotate(180deg) brightness(0.95);
  }

  img:not([src$=".svg"]) {
    filter: invert(95%) hue-rotate(180deg) brightness(1.05);
  }
}

@media (max-width: 600px) {

  /* Handle mobile devices / narrow layout */
  .product {
    flex-direction: column;
  }

  .product>div {
    margin: 0;
  }
}

form {
  padding: 1rem;
  border: 1px solid var(--gray3-light);
  border-radius: var(--lbl-radius-default);
}

.form-row {
  display: flex;
  flex-direction: column;
}

/* Responsive two-column on wider screens */
/* @media (min-width: 600px) {
  .form-row.two-column {
    flex-direction: row;
    gap: 1rem;
  }

  .form-row.two-column .field {
    flex: 1;
  }
} */

label {
  font-weight: bold;
  margin: 0.5rem 0;
  display: block;
}

input,
textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: var(--lbl-radius-small);
  border: 1px solid var(--gray-light);
}

textarea:user-invalid,
input:user-invalid {
  border: 2px dashed var(--red-light);
  /* Make sure the input control doesn't change size when the border gets thicker. */
  padding: calc(0.5rem - 1px);
}

button {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  min-width: 6rem;
  font-size: 1rem;
  background: var(--lbl-color-blue);
  color: white;
  border: none;
  border-radius: var(--lbl-radius-default);
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}