/** Variables  **/
/* https://colors.muz.li/color-palette-generator/FDF5BF */
:root {
  --lemon: #FDF5BF;
  --blue: #8699b1;
  --blue-light: #bfdafd;
  --violet: #B47EB3;
  --pink: #FFD5FF;
  --teal: #92D1C3;
  --teal-dark: #8BB8A8;
  --black: #222;
  --mudkip: #008c9e;
  --white: #fff;
  --off-white: #fffeef;
  --gray: #999;
  --purple: #9c86b1;
  --lavender: #dfbffd;
  --mint: #dafdbf;
  --olive: #99b186;
  --green: #38c495;
}

/** Layout **/
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  color: var(--black);
  font-family: sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

}

section {
  display: block;
  max-width: 990px;
  margin: 0 auto;
  padding: 25px 15px 0;

  &:first-child {
    padding-top: 50px;
  };

  &:last-child {
    padding-bottom: 50px;
  };
}

.section--wide {
  max-width: 1200px;
}

.section__description {
  font-size: 1.2em;
  text-align: center;
  margin: 1em auto;
  max-width: 900px;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/** Text */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  text-align: center;
}

h2 {
  margin-bottom: 1rem;
}

/** Links **/
a, a:visited {
  color: var(--mudkip);
  font-style: bold;
  text-decoration: none;
}

a:hover, a:active {
  color: var(--purple);
  transition: all, .2s;
}

.bottom-link {
  margin: 25px 0 0 0;
}

/** Header  **/
.header {
  background-color: var(--lemon);
  padding: 15px 0;
  position: relative;
}

.header--candidate {
  min-height: 0;
}

.header__body {
  margin: 0 auto;
  padding: 15px;
  text-align: center;

  h1 {
    font-size: 1.8em;
  }

  p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
  }

  .header__smalltext {
    font-size: .8em;
    margin: 1em auto;
  }
}

.header__body--candidate {
  margin: 0 auto 25px;
  padding-bottom: 0;

  .header__head {
    margin: 0;
  }
}

.header__presents {
  display: block;
  width: 100%;

  img {
    display: inline-block;
    float: left;
    height: 35px;
  }

  p {
    display: inline-block;
    font-weight: bold;
    font-size: .9em;
    line-height: 35px;
    padding-left: 5px;
  }
}

.header__heads {
  .header__head {
    margin: 0;
    width: 10vw;
  }
}

.header__head {
  display: inline-block;
  margin: 0 10px;
  max-width: 100px;
  position: relative;
}

.header__head--wide {
  max-width: 125px;
}

.header__link,
.header__link:visited {
  color: var(--black);
}

.header__smalltext {
  font-size: .7em;
  font-style: italic;
}

.crown {
  margin: 75px 0 0 0;
  position: relative;
  display: inline-block;
}

.crown:after {
  content:url('images/crown.png');
  position: absolute;
  top: -55px;
  right: 110px;
  transform: rotate(-5deg) scale(0.18);
  width: 0px;
  height: 0px;
}

.crown--mitra:after {
  top: -65px;
  right: 156px;
  transform: rotate(-8deg) scale(0.24);
}

.crown--sarkodieh:after,
.crown--pepple:after,
.crown--rosen:after {
  top: -70px;
  right: 155px;
  transform: rotate(-8deg) scale(0.25);
}

.crown--luster:after {
  top: -65px;
  right: 150px;
  transform: rotate(-8deg) scale(0.24);
}

/** Footer */
footer {
  background: var(--black);
  border-top: 2px solid var(--gray);
  color: var(--gray);
  padding: 15px;
  text-align: center;

  a {
    color: var(--white);
  }

  a:hover,
  a:visited,
  a:active {
    color: var(--gray);
  }

  h2, h3 {
    text-align: left;
  }

  h3 {
    margin: 1em 0 0;
  }

  ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
  }

  .grid {
    padding-bottom: 25px;
  }
}

.footer__hed {
  margin: 0;
}

.footer__grid {
  display: grid;
  grid-template-areas:
  "column"
  "column"
  "logo";
}

.footer__logo-container {
  margin: 2em 0;
  grid-area: logo;
}

.footer__logo {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}

.timestamp {
  font-size: .8em;
  font-style: italic;
  margin: 1em 0 0 0;
}

/** Tables **/
table {
  font-size: 1.2em;
  margin: 0 auto;
  width: 100%;
}

caption {
  font-size: .8em;
  font-weight: bold;
}

th, td {
  text-align: left;
  padding: 5px;
}

th {
  color: var(--black);
}

tr:nth-child(2n) {
  background: var(--lemon);
}

tr:nth-child(2n+1) {
  background: var(--white);
}

tr:first-child {
  background: var(--teal)
}

.table__candidate {
  font-weight: bold;
}

.table__value {
  color: var(--green);
  font-weight: bold;
}

.table__district {
  font-size: .9em;
}

.table__title {
  min-height: 3em;
}

.table__percent {
  color: var(--violet);
  font-weight: bold;
}

/** Pills */
.pill {
  display: inline-block;
  background: var(--lemon);
  border-radius: 100px;
  font-weight: bold;
  padding: 10px 25px;
  text-transform: uppercase;
}

.pill--blue {
  background: var(--mudkip);
}

.pill--blue-light {
  background: var(--blue-light);
  color: var(--white);
}

.pill--lavender {
  background: var(--lavender);
}

/** Cards **/
.card {
  border: 2px solid var(--mudkip);
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  margin-bottom: 15px;
  text-align: center;

  p {
    margin: .5em 0;
  }

  h3 {
    margin-bottom: .5em;
  }

  h3 a {
    color: var(--black);
  }

  .header__head {
    margin: 0 auto;
  }
}

.card--donor {
  padding: 5px;

  h3 {
    margin: 0;
  }
}

.card__cta {
  text-decoration: underline;
}

.race-card {
  border-width: 4px;
  max-width: 800px;
  margin: 0 auto 25px;

  h4 a {
    font-size: 1.4em;
    color: var(--black);
  }

  .wavy-line {
    margin: 0 auto;
  }
}

.race-card__title {
  font-size: 1.6em;
}

.race-card__vs {
  color: var(--mudkip);
  font-size: 3em;
  font-weight: bold;
  text-shadow: 4px 4px 0px var(--teal);
}

/**  Collapible **/
.collapsible__container {
  max-height: none;
}
.collapsible__container--collapsed {
  max-height: 450px;
  overflow:hidden;
}

.collapsible__trigger {
  font-weight: bold;
  padding: 5px 0;
  text-align: center;
  display: block;
}

.collapsible__trigger:hover {
  cursor: pointer;
  cursor: hand;
}
/** Utilities **/
.center {
  text-align: center;
}

.footnote {
  color: var(--gray);
  font-size: .8em;
  font-style: italic;
}

.container {
  display: inline-block;
  max-width: 990px;
  margin: 0 auto;
}

.container--sm {
  max-width: 320px;
}

.grid {
  display: grid;
}

.down {
  animation: float 3s ease-in-out infinite;
  color: var(--mudkip);
  display: inline-block;
  font-size: 3em;
  line-height: 1em;
  margin: 0 auto 15px;
  position: absolute;
  bottom: 0;
  text-align: center;
}

.wavy-line {
  --s: 14px; /* size of the wave */
  --b: 6px; /* thickness of the line */
  --m: 0.8; /* curvature of the wave [0 2] */

  background: var(--mudkip);
  --R: calc(var(--s)*sqrt(var(--m)*var(--m) + 1) + var(--b)/2);
  height: calc(2*var(--R));
  width: 100%;
  --_g: #0000 calc(99% - var(--b)), #000 calc(101% - var(--b)) 99%, #0000 101%;
  mask:
    radial-gradient(var(--R) at left 50% bottom calc(-1*var(--m)*var(--s)), var(--_g))
     calc(50% - 2*var(--s)) calc(50% - var(--s)/2 - var(--b)/2)/calc(4*var(--s)) calc(var(--s) + var(--b)) repeat-x,
    radial-gradient(var(--R) at left 50% top calc(-1*var(--m)*var(--s)),var(--_g))
     50% calc(50% + var(--s)/2 + var(--b)/2)/calc(4*var(--s)) calc(var(--s) + var(--b)) repeat-x;
  width: 270px;
  margin: 1rem auto;
  display: block;
}

.bignumber {
  color: var(--green);
  font-size: 4em;
  font-weight: bold;
}

.card .bignumber--donor {
  margin: 0;
}

.bignumber--alt {
  color: var(--violet);
}

.centered {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

/** Responsive **/
@media screen and (min-width: 480px) {
  .header {
    display: flex;
    align-items: center;
    min-height: 95vh;
  }

  .header--candidate {
    min-height: 300px;
    display: flex;
    align-items: center;
  }

  .header__body {
    font-size: 1.3em;
    padding: 50px 15px;
  }

  .header__body--candidate {
    padding: 50px 10px 0;
  }

  .header__heads {
    position: relative;
  }

  .header__presents {
    position: absolute;
    left: 15px;
    top: 15px;

    img {
      height: 50px;
    }

    p {
      font-size: 1em;
      line-height: 50px;
    }
  }

  .header__body--candidate {
    margin: 0 auto;
    display: grid;
    grid-gap: 15px;
    grid-template-columns: 125px 1fr;
    text-align: left;
  }

  .header__candidate-info {
    display: flex;
    align-items: center;
  }

  .grid {
    grid-gap: 10px;
  }

  .grid--2, .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .race-card__grid {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    grid-gap: 10px;

    .wavy-line {
      max-width: 100px;
      margin: -10px 0;
    }
  }

  .race-card__vs {
    padding-top: 40px;
  }
  .footer__grid {
    grid-template-areas:
      "column1 column2"
      "logo logo";
  }
}

@media screen and (min-width: 768px) {
  .header__body {
    padding: 25px 15px;
    font-size: 1.6em;

    p {
      font-size: 1em;
    }
  }

  .header__body--candidate {
    padding: 50px 10px 0;
  }

  .header__heads {
    padding: 25px 0;
  }

  .down {
    margin-bottom: 25px;
  }
  .grid--3, .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-areas: "logo column1 column2";
  }

  .footer__hed {
    margin-bottom: 1em;
  }

  .footer__logo-container {
    margin: 0 0 1em 0;
  }

  .footer__logo {
    width: auto;
    max-width: 225px;
    margin: 0;
  }

  footer {
    .grid--3 {
      grid-gap: 50px;
      grid-template-columns: repeat(3, 1fr);
    }

    h3 {
      margin: 0;
    }
  }
}

@media screen and (min-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/** Animation **/
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
