/* Trimmed from the original eastbaybiosecurity.org stylesheet (2018-2021). */
:root {
  --darkgray: #333;
  --lightgray: #e0e0e0;
  --midgray: #6b6b6b;
  --darkgreen: #134713;
  --white: #fff;
  /* Text column width; rem so bigger headings don't get a wider column */
  --measure: 53.6rem;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Cormorant, Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--darkgray);
  background-color: var(--white);
}
#container {
  max-width: 90%;
  margin: auto;
  padding-bottom: 2rem;
  /* Footer sits at the bottom on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a[href] {
  color: var(--darkgreen);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a[href]:hover {
  color: var(--midgray);
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 2rem;
  padding: 0 1rem;
  border-bottom: 1px dashed var(--lightgray);
  letter-spacing: 0.14rem;
}
.home {
  margin: 1rem 0;
  font-size: 1.5rem;
  font-weight: 300;
  text-transform: uppercase;
}
.home a,
nav a:not(:hover) {
  text-decoration: none;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1em;
  font-size: 1.2rem;
}
nav a[aria-current] {
  font-weight: 600;
  text-decoration: underline;
}

/* Content */
main {
  flex: 1;
  padding: 1rem;
  font-size: 1.3em;
}
main > * {
  max-width: var(--measure);
}
main > :first-child {
  margin-top: 0;
}
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 600;
}
h1 {
  font-size: 1.6em;
}
h2 {
  margin-top: 2.8em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--lightgray);
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--darkgreen);
}
h3 {
  font-size: 1.1em;
  margin: 1.8em 0 0;
}
.lead {
  font-size: 1.3em;
  font-weight: 400;
}
.date {
  margin: 0;
  color: var(--midgray);
  font-style: italic;
}
blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 2px solid var(--lightgray);
}
a {
  overflow-wrap: anywhere;
}

/* Event cards: date above the title */
.event {
  display: flex;
  flex-direction: column;
  margin: 1.2em 0;
  padding: 0.9em 1.2em;
  border-radius: 4px;
  background: #f5f6f2;
}
.event > * {
  margin: 0 0 0.6em;
}
.event > :last-child {
  margin-bottom: 0;
}
.event > .date {
  order: -1;
  margin-bottom: 0.2em;
  font-size: 1.05em;
}

/* "On this page" sidebar, wide screens only */
.toc {
  display: none;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  margin: 0.35em 0;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}
.toc .label {
  margin: 0 0 0.5em;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--midgray);
}
@media (min-width: 1000px) {
  main.has-toc {
    display: grid;
    grid-template-columns: minmax(0, var(--measure)) 15em;
    column-gap: 3rem;
    justify-content: space-between;
  }
  main.has-toc > * {
    max-width: none;
  }
  .content > * {
    max-width: var(--measure);
  }
  .content > :first-child {
    margin-top: 0;
  }
  .toc {
    display: block;
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding-left: 1em;
    border-left: 1px dashed var(--lightgray);
    font-size: 0.72em;
    line-height: 1.3;
  }
  .has-toc .contents {
    display: none;
  }
}

/* Phones: 16px gutters, edge-to-edge event cards */
@media (max-width: 700px) {
  #container {
    max-width: none;
  }
  main {
    padding-left: 0;
    padding-right: 0;
  }
  main > :not(.content),
  .content > * {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .content > .event {
    margin-left: 0;
    margin-right: 0;
    padding: 1em;
    border-radius: 0;
  }
}

footer {
  margin: 2rem 1rem 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--lightgray);
  color: var(--midgray);
}
