/* CSS Variables */
:root {
  --dark-red: #1F0000;
  --light-red: #FF1313;
  --very-light-red: #FFDCDC;
  --background: var(--dark-red);
  --foreground: var(--light-red);

  /* Text selection variables using inverted colors */
  --selection-background: white;
  --selection-foreground: var(--dark-red);
}

/* Reset and base styles */
* {
  line-height: 1.4;
  box-sizing: border-box;
  background-color: var(--background);
  color: var(--foreground);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  line-height: 1;
}

body {
  margin: 0;
  padding: 0;
  font-family: monospace;
  margin: 0 auto;
  max-width: 1048px;
  display: flex;
  flex-direction: column;
  gap: 2em;
  padding: 2em;
}

header {
  display: flex;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

p {
  margin-block: 1em;
}

ul {
  list-style-position: inside;
  padding-left: 1em;
}

ul.unstyled {
  list-style-type: none;
  padding: 0;
}

a:hover {
  color: var(--very-light-red);
}

footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--foreground);
}

section>header {
  display: flex;
  justify-items: left;
  border: 1px var(--foreground) solid;
  /* Fix Safari sub-pixel rendering */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

section>header>h2 {
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.5em;
  text-transform: uppercase;
  /* Extend slightly to cover any gaps */
  margin: -1px;
  border: 1px var(--foreground) solid;
}

section>div {
  border: 1px var(--foreground) solid;
  border-top: none;
  padding: 0.5em;
  /* Fix Safari sub-pixel rendering */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Text selection styling */
::selection {
  background-color: var(--selection-background);
  color: var(--selection-foreground);
}

::-moz-selection {
  background-color: var(--selection-background);
  color: var(--selection-foreground);
}
