body {
    text-align: center;
    background-color: #F0EAD6; /* eggshell */
}

main {
    display: flex;
}

main article {
    flex: 3;
    padding-right: 10px;
}

main aside {
    flex: 1;
    border-left: 10px double #FF6550;
}

@media (max-width: 768px) {
  main article {
      padding-right: 0;
  }
  main aside {
    display: none;
  }
}

p + ul {
    list-style-position: inside;
    text-align: left;
    padding-left: 1em;
}

p#search-results {
    text-align: left;
}

p.news-entry {
    text-align: left;
    padding-left: 2em;
}

nav ul {
    display: flex;
    flex: 2;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

nav li {
    text-align: center;
    flex: 1;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

div.subscribe-example {
    white-space: pre;
    font-family: monospace;
    display: inline-block;
    padding: 6px;
    justify-content: center;
    text-align: left;
    background-color: #D3D3D3;
    border: 2px solid purple;
}

span.unselectable {
  user-select: none;
}

a.citation {
    color: brown;
    text-decoration: none;
    border-bottom: 3px dotted;
}

a.menu-button:link, a.menu-button:visited {
    font-weight: bold;
    border: 1px solid #c96f2a;
    border-radius: 20px;
    min-width: 9ch;             /* 9 characters; as long as the word "subscribe". */
    color: black;
    padding: 14px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

a.menu-button:hover, a.menu-button:active {
    border: 1px solid transparent;
    background-color:  #fc7562;
}

input[type=text] {
    padding: 6px;
    margin-top: 8px;
    margin-right: 0px;
    font-size: 27px;
}

.search-container {
    align-items: center;
}

.search-container button {
    padding: 8px;
    background: #ddd;
    font-size: 27px;
    border: none;
    cursor: pointer;
}

.search-container button:hover {
    background: #ccc;
}

.banner-link {
  text-decoration: none;
  color: inherit;
}

/* Styling the subscribe example with tooltips. */

.tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-text {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Styling the search results table. */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

th, td {
  overflow: auto;
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #f4f4f4;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:nth-child(odd) {
  background-color: #f4f4f4;
}

tr:hover {
  background-color: #e8e8e8;
}

@media (max-width: 600px) {
    table, td, tr {
        display: block;
    }
    tr {
        margin-bottom: 15px;
    }
    td {
        text-align: right;
        padding-left: 35%;
        position: relative;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 5px;
        width: 15%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
    }
    .hide-on-narrow {
        visibility: hidden;
    }
}
