/* Courier Prime, bundled so the site and its pdf look the same everywhere:
   https://github.com/google/fonts/tree/main/ofl/courierprime, licensed under
   fonts/OFL.txt */
@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
}

:root {
  --spacer: 8px;
  --borderRadius: 4px;

  --textBackgroundGrey: #EEEEEE;
  /* the link color of ourarewhy.dev */
  --linkPurple: #5E4D75;
}

body {
  margin: 0;
  font-family: "Courier Prime", monospace;
  /* set explicitly: browsers default plain monospace to 13px but a named font
     to 16px */
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: calc(5 / 4);  
}

/* links as on ourarewhy.dev: italic rather than underlined, and white on
   purple when hovered or focused from the keyboard, like a highlighted menu
   item. The padding gives the highlight room around the word, and the
   negative margin cancels it, so nothing shifts. */
a {
  position: relative;
  margin: 0 -0.25em;
  padding: 0 0.25em;
  color: var(--linkPurple);
  font-style: italic;
  text-decoration: none;

  &:visited {
    color: var(--linkPurple);
  }

  &:hover,
  &:focus-visible {
    background-color: var(--linkPurple);
    color: white;
  }

  /* keyboard focus: also a square ring in the link color, clear of the
     highlight */
  &:focus-visible {
    outline: 2px solid var(--linkPurple);
    outline-offset: 2px;
  }

  /* an invisible tap area bigger than the word, at least 44px tall on
     phones as touch guidelines recommend, without moving anything */
  &::after {
    content: "";
    position: absolute;
    inset: -1em -0.5em;
  }
}

.body-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.body-content-container {
  flex-basis: 832px;
  flex-grow: 0;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
}

/* visually hidden, but still read by screen readers */
.body-main-header {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.document-section-container {
  display: flex;
  flex-direction: column;
  padding-inline: calc(var(--spacer) * 3 / 2);
  padding-block-end: calc(var(--spacer) * 2);
}

.document-section-content-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding-inline-start: calc(var(--spacer) / 4);
}

.document-section-header-container {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 256px;
  display: flex;
  flex-direction: column;
  padding-block-start: calc(var(--spacer) / 2);
}

/* visually hidden, but still read by screen readers */
.document-section-accessibility-header {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.document-section-label-container {
  display: flex;
  padding-top: var(--spacer);
}

.document-section-header-label {
  /* a link label's own padding already gives its highlight room, so it
     keeps its place rather than taking a link's negative margin */
  margin: 0;
  padding-left: calc(var(--spacer) * 5 / 8);
  padding-right: calc(var(--spacer) * 5 / 8);
  padding-top: calc(var(--spacer) * 3 / 8);
  padding-bottom: calc(var(--spacer) * 3 / 8);
  background-color: var(--textBackgroundGrey);
  border-radius: var(--borderRadius);
  font-weight: 700;
}

.document-section-body-container {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 512px;
  padding-inline-start: calc(var(--spacer) / 2);
  padding-inline-end: var(--spacer);
  padding-block-start: calc(var(--spacer) * 3);
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.document-section-body-content-container {
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 512px;
}

.section-content-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: calc(var(--spacer) * 3);
}

.section-content-label-container {
  font-weight: 700;
  margin-bottom: calc(var(--spacer) * 5 / 4);
}

.section-content-label-underline {
  margin-left: var(--spacer);
  width: 100%;
  height: 1px;
  border-radius: 1px;
  background-color: black;
}

.section-content-text-container {
  padding-inline-start: calc(var(--spacer) * 9 / 8);
}

.section-content-column-list-container {
  padding-inline-start: calc(var(--spacer) * 9 / 8);
}

.section-content-column-list-item-container {
  display: flex;
  flex-direction: row;
  &:not(:last-child) {
    padding-bottom: calc(var(--spacer) * 5 / 4);
  }
}

.section-content-column-list-item-bullet {}

.section-content-column-list-item {
  padding-left: var(--spacer);
}

.section-content-wrap-list-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-inline-start: calc(var(--spacer) * 9 / 8);
  margin-top: calc(var(--spacer) * -5 / 4);
}

.section-content-wrap-list-item-container {
  display: flex;
  flex-direction: row;
  padding-top: calc(var(--spacer) * 5 / 4);
  padding-right: calc(var(--spacer) * 3 / 2);
}

.section-content-wrap-list-item {}

.section-divider {
  background-color: var(--textBackgroundGrey);
  height: calc(var(--spacer) / 2);
  border-radius: calc(var(--spacer) / 4);
}

.navigation-footer-container {
  padding: calc(var(--spacer) * 3 / 2);
  padding-bottom: calc(var(--spacer) * 5);
}

.navigation-footer-divider {
  height: 1px;
  background-color: var(--textBackgroundGrey);
}

.navigation-footer-navigation-container {
  display: flex;
  flex-direction: row;
  padding: var(--spacer);
  padding-left: calc(var(--spacer) / 4);
  padding-right: calc(var(--spacer) / 4);
}

.navigation-footer-links-container {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.navigation-footer-link-container {
  display: flex;
  flex-direction: row;
  padding: var(--spacer);
  padding-left: calc(var(--spacer) * 3);
}

.navigation-footer-link {
  font-size: 16px;
  font-weight: 600;
}

.pdf-link-container {
  padding-left: calc(var(--spacer) * 4);
  padding-right: calc(var(--spacer) * 2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}