:root {
  --font-family-body: Manrope, sans-serif;
  --font-family-brand: Antonio, sans-serif;
  --colour-primary: #CBF400;
  --colour-teal: #30ffff;
  --colour-orange: #ffa630;
  --colour-blue: #009DE0;
  --colour-green: #1D6F42;
  --colour-gold: #FFEF00;
  --colour-pink: #ef2dff;
  --colour-red: #c81f36;
  --colour-foreground: #171717;
  --colour-foreground-light: #595959;
  --colour-link-foreground: #4a7500;
  --colour-background: #ffffff;
  --colour-background-light: #555555;
  --colour-background-active: #e7e7e7;
  --colour-background-hover: #eeeeee;
  --colour-background-alt: #f7f7f7;
}

html {
  font-size: 1.3vw;
}

body {
  color: var(--colour-foreground);
  line-height: 1.5;
  font-family: var(--font-family-body);
}

.text-brand {
  font-family: var(--font-family-brand) !important;
}

.text-brand, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  u, .underline {
    text-decoration-color: var(--colour-primary);
    text-decoration-thickness: 0.1em;
  }
}

p {
  margin-bottom: 1.5vw;
  line-height: 1.75; /* So classes can inherit */

  &:has(+ h1),
  &:has(+ h2),
  &:has(+ h3),
  &:has(+ h4),
  &:has(+ h5),
  &:has(+ h6) {
    margin-bottom: 2vw;
  }
}

.narrow p,
p.narrow {
  line-height: 1.5;
}

.narrow li {
  line-height: 1.75;
}

p:last-child {
  margin-bottom: 0;
}

em, .em {
  font-family: "Inter", sans-serif;
  font-style: italic;
  font-weight: 300;
}


a:focus {
  text-decoration: underline;
}

p a,
figcaption a,
li a,
.link {
  color: var(--colour-link-foreground);

  &:hover {
    text-decoration: underline;
  }

  .invert & {
    color: var(--colour-background);
  }
}

blockquote {
  font-style: italic;
  font-weight: 500;
  font-size: 1.5vw;
  line-height: 1.75;
  margin-bottom: 1.5vw;
  padding: 1.5vw;
  text-align: center;
}

code {
  background-color: var(--colour-background-alt);
  padding-left: 0.25em;
  padding-right: 0.25em;
}

.underline-hover:hover {
  text-decoration: underline;
}

.strike {
  text-decoration: line-through;
}

.highlight {
  background-color: var(--colour-primary);
  border-radius: 0.5vw;
  color: var(--colour-foreground);
}

.gold {
  color: var(--colour-gold);
}

ul, ol {
  line-height: 2 !important;
  margin-left: 1.8vw;

  &:not(:last-child) {
    margin-bottom: 2vw;
  }

  li {
    padding-left: 0.5vw;
  }
}

ul {
  list-style: "•";
}

ol {
  list-style: decimal;
}

.list-style-none {
  list-style: none;
}

ul, ol {
  & ul,
  & ol {
    &:not(:last-child) {
      margin-bottom: 1.5vw;
    }
  }
}

li:not(:last-child) p:not(:last-child) {
  margin-bottom: 0.5vw !important;
}

dl {
  &:not(:last-child) {
    margin-bottom: 2vw;
  }
}

dl.dl-grid {
  display: grid;
  grid-template-columns: auto 1fr;

  dt {
    margin-right: var(--margin-sm);
    &:after {
      content: ':';
    }
  }

  dt, dd {
    &:not(:last-child) {
      margin-bottom: var(--margin-xs);
    }
  }
}

.table {
  margin-bottom: var(--margin-sm);
  th, td {
    padding: var(--margin-xs);
    vertical-align: top;
  }
}

.vertical-align-middle {
  vertical-align: middle !important;
}

strong,
.strong {
  font-weight: 600;
}

.underline {
  text-decoration: underline;
}

img {
  height: auto;
  width: 100%;
}

figure figcaption {
  font-family: "Inter", sans-seriff;
  font-size: 75%;
  font-style: italic;
  font-weight: 300;
}

.uppercase {
  text-transform: uppercase;
}

.nowrap {
  white-space: nowrap;
}

.invert {
  color: #fff;
  background-color: var(--colour-foreground);
}

.alt {
  background-color: var(--colour-background-alt);
}

.light {
  color: var(--colour-foreground-light);
  text-decoration-color: var(--colour-foreground-light);
}

.invert .light,
.invert.light {
  color: var(--colour-background-light);
}

.danger {
  color: red;
}

.xs {
  font-size: 75%;
}

small, .sm {
  font-size: 85%;
}

.lg {
  font-size: 120%;
}

.xl {
  font-size: 150%;
}

.xxl {
  font-size: 200%;
}

.xxxl {
  font-size: 250%;
}

@media screen and (min-width: 768px) {
  .xs-md {
    font-size: 75%;
  }

  .sm-md {
    font-size: 85%;
  }

  .lg-md {
    font-size: 120%;
  }

  .xl-md {
    font-size: 150%;
  }

  .xxl-md {
    font-size: 200%;
  }

  .xxxl-md {
    font-size: 250%;
  }
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: bold;
  line-height: 1.2;

  &.strong,
  .strong,
  strong {
    font-weight: bolder;
  }
}

h1 {
  font-size: 4.5vw;
  margin-bottom: 3vw;
}

.h1 {
  font-size: 4.5vw !important;
  margin-bottom: 3vw !important;
}

h2 {
  font-size: 3vw;
  margin-bottom: 2vw;
}

.h2 {
  font-size: 3vw !important;
  margin-bottom: 2vw !important;
}

h3 {
  font-size: 2vw;
  margin-bottom: 1.4vw;
}

.h3 {
  font-size: 2vw !important;
  margin-bottom: 1.4vw !important;
}

h4 {
  font-size: 1.4vw;
  margin-bottom: 1vw;
}

.h4 {
  font-size: 1.4vw !important;
  margin-bottom: 1vw !important;
}

h1, h2, h3 {
  &:after {
    background-color: var(--colour-primary);
    content: ' ';
    display: block;
    height: 0.15em;
    margin-top: 0.25em;
    width: 10vw;
  }

  &.blue:after {
    background-color: var(--colour-blue);
  }

  &.pink:after {
    background-color: var(--colour-pink);
  }

  &.no-underline:after,
  .no-underline &:after {
    display: none;
  }
}

h1, h2, h3 {
  .text-center &:not(.no-underline):after,
  &.text-center:not(.no-underline):after {
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (max-width: calc(1024px - 1px)) {
  html {
    font-size: 14px;
  }

  p {
    margin-bottom: 20px;

    &:has(+ h1),
    &:has(+ h2),
    &:has(+ h3),
    &:has(+ h4),
    &:has(+ h5),
    &:has(+ h6) {
      margin-bottom: 25px;
    }
  }

  blockquote {
    font-size: 15px;
    margin-bottom: 15px;
    padding: 15px;
  }

  ul, ol {
    margin-left: 18px;

    &:not(:last-child) {
      margin-bottom: 20px;
    }

    li {
      padding-left: 5px;
    }
  }

  ul, ol {
    & ul,
    & ol {
      &:not(:last-child) {
        margin-bottom: 20px;
      }
    }
  }

  li:not(last-child) p {
    margin-bottom: 20px !important;
  }

  dl {
    &:not(:last-child) {
      margin-bottom: 20px;
    }
  }

  h1 {
    font-size: 32px;
    margin-bottom: 21px;
  }

  .h1 {
    font-size: 32px !important;
    margin-bottom: 21px !important;
  }

  h2 {
    font-size: 21px;
    margin-bottom: 14px;
  }

  .h2 {
    font-size: 21px !important;
    margin-bottom: 14px !important;
  }

  h3 {
    font-size: 18px;
    margin-bottom: 13px;
  }

  .h3 {
    font-size: 18px !important;
    margin-bottom: 13px !important;
  }

  h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .h4 {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }

  h1:after,
  h2:after,
  h3:after {
    width: 100px;
  }
}
