/* export to custom props */
:root {
  /* Colors */
  /* Chalkbeat brand colors */
  --cbLogo: #3666EC;
  --cbBureau: #03938F;
  /* Votebeat colors */
  --vbLogo: #7E509E;
  --vbBureau: #331B3D;
  /* Healthbeat colors */
  --hbLogo: #F25A4D;
  --hbBureau: #DD405E;


  /* Primary colors */
  --darker-gray: #222222;
  --dark-gray: #393939;
  --teal: #178287;

  --primary-color: var(--teal);

  /* Secondary colors */
  --yellow: #F4C96C;
  --blue: #268CBA;
  --peach: #F79C75;
  --purple: #BD75AC;
  --cream: #F5F2E9;

  /* Extended colors */
  --lighter-gray: #ECECEC;
  --light-gray: #DCDCDC;
  --gray: #828282;

  --light-teal: #9CD1D4;
  --dark-teal: #127479;

  --light-yellow: #F0DFBC;
  --dark-yellow: #AC8E4C;

  --light-peach: #F1CEBF;
  --dark-peach: #AE6E52;

  --light-purple: #DBC0D4;
  --dark-purple: #855279;

  --light-blue: #A1C8DA;
  --dark-blue: #1B6383;

  --dark-red: #AE5252;
  --red: #F77575;
  --light-red: #F1BFBF;

  --dark-green: #4A8B44;
  --green: #19AB76;
  --light-green: #A7DCBC;

  /* Font stacks */
  --serif: "Crimson Pro", Times, serif;
  --sans: Figtree, Helvetica, Arial, sans-serif;
}
.Votebeat:root {
    --logo: var(--vbLogo);
    --bureau: var(--vbBureau);
  }
.Chalkbeat:root {
    --logo: var(--cbLogo);
    --bureau: var(--cbBureau);
  }
.Healthbeat:root {
    --logo: var(--hbLogo);
    --bureau: var(--hbBureau);
  }
/* Media queries */
/* Replace these variables with better syntax when it becomes available */
/*defensive coding */
* {
  /*border-box, you're the best */
  -ms-box-sizing: border-box;
  box-sizing: border-box;

  /*Safari, you're the worst */
  -webkit-tap-highlight-color: transparent;
}
/*elements */
body {
  padding: 0;
  margin: 0;
  /*remove 300ms click delay in Safari, AKA still the worst */
  touch-action: manipulation;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
  color: var(--dark-gray);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body main {
    flex: 1;
  }
img, svg {
  max-width: 100%;
}
h1 {
  font-size: 44px;
  font-family: var(--sans);
}
@media (max-width: 600px) {
h1 {
    font-size: 34px;
}
  }
h2 {
  font-size: 30px;
  font-family: var(--sans);
  font-weight: normal;
}
@media (max-width: 600px) {
h2 {
    font-size: 24px;
}
  }
a, a:visited {
  color: var(--bureau);
}
:is(a,a:visited):active,:is(a,a:visited):hover,:is(a,a:visited):focus {
    color: var(--logo);
  }
img:not([alt]) {
  outline: 3px solid red;
}
[aria-hidden] img:not([alt]),[role="img"] img:not([alt]) {
    outline: none;
  }
header {
  text-align: center;
  padding: 20px;
}
header img {
    max-height: 50px;
  }
footer {
  background: var(--cream);
  padding-top: 4em;
}
footer .rhombus {
    position: relative;
    color: var(--cream);
    margin: auto;
    width: 600px;
    max-width: 100%;
    text-align: center;
    font-family: var(--sans);
    font-size: 13px;
    text-transform: uppercase;
    padding: 1em;
  }
@media (max-width: 1100px) {
footer .rhombus {
      overflow: hidden;
  }
    }
:is(footer .rhombus)::before {
      z-index: 0;
      position: absolute;
      inset: 0;
      transform: skew(-20deg);
      background: #333;
      content: "";
      display: block;
    }
:is(footer .rhombus) .content {
      position: relative;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
:is(footer .rhombus) .copyright {
      flex: 1;
    }
:is(footer .rhombus) img {
      max-height: 20px;
    }
@media (max-width: 600px) {
:is(footer .rhombus) img {
        max-height: 40px;
    }
      }
circle {
  transition-property: fill, stroke;
  transition-duration: .5s;
  transition-timing-function: linear;
}
/*scrolly styles*/
.graphic {
  position: fixed;
  z-index: -1;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.graphic svg {
    max-width: 800px;
    transition: opacity 1s linear;
    opacity: 1;
    overflow: visible;
  }
@media (max-aspect-ratio: 1 / 1) {
.graphic svg {
      transform-origin: center;
      transform: rotate(90deg);
      max-width: 80vh;
  }
    }
[data-districts="previz"]:is(.graphic svg) {
      opacity: 0;
    }
[data-districts="previz"]:is(.graphic svg) circle,[data-districts="previz"]:is(.graphic svg) rect,[data-districts="previz"]:is(.graphic svg) path {
        fill: transparent;
        stroke: transparent;
      }
.graphic circle {
    vector-effect: non-scaling-stroke;
  }
@keyframes fillDistrict {
  from {
    fill: transparent;
  }
  to {
    fill: var(--fill-color);
  }
}
@keyframes drawDistrict {
  from {
    stroke-dasharray: 100 100;
    stroke-dashoffset: 100;
  }

  to {
    stroke-dasharray: 100 100;
    stroke-dashoffset: 0;
  }
}
/*districts styles and filters*/
.district {
  stroke: black;
  stroke-width: .2;
  --fill-color: var(--lighter-gray);
  animation-name: drawDistrict, fillDistrict;
  animation-duration: 1s, 2s;
  animation-timing-function: steps(20, jump-start), linear(0, 0 50%, 1);
  animation-fill-mode: both;
  stroke-dasharray: var(--path-length) var(--path-length);
  vector-effect: none;
  filter: url(#squiggle);
}
.district.possible {
    --fill-color: var(--lighter-gray);
    display: none;
  }
.district.gerrymandered {
    --fill-color: var(--lighter-gray);
    display: none;
  }
.district.default { display: none; }
/*district filters*/
[data-districts="show-current"] .default { display: block; }
[data-districts="show-gerry"] .gerrymandered { display: block; }
[data-districts="show-possible"] .possible { display: block; }
[data-districts="show-partisan"] .possible {
    display: block;
  }
.republican:is([data-districts="show-partisan"] .possible) {
      --fill-color: #F003;
    }
.democratic:is([data-districts="show-partisan"] .possible) {
      --fill-color: #00F3;
    }
/* districts highlights/subfilters */
[data-highlight="citizens-row"] #possible-row-1 {
    stroke: var(--teal);
    --fill-color: var(--teal);
    fill-opacity: 40%;
  }
[data-highlight="noncitizens-row"] #possible-row-4 {
    stroke: var(--teal);
    --fill-color: var(--teal);
    fill-opacity: 40%;
  }
/* people filters */
/* dot defaults */
.dots circle {
    vector-effect: non-scaling-stroke;
    fill: var(--vbLogo);
  }
.dots .citizen,.dots .noncitizen {
    fill: var(--vbLogo);
  }
.dots .hidden {
    fill: white;
    stroke: var(--light-gray);
    stroke-dasharray: 3 2;
  }
[data-category="init"] .citizen { display: none; }
[data-category="init"] .noncitizen { display: none; }
[data-category="init"] .hidden { display: none; }
[data-category="old"] .noncitizen:not(.hidden) {
    fill: var(--peach);
  }
[data-category="fade"] .noncitizen {
    fill: white;
    stroke: var(--light-gray);
    stroke-width: 1px;
    stroke-dasharray: 2 2;
  }
[data-category="new"] .noncitizen {
    fill: white;
    stroke: var(--light-gray);
    stroke-width: 1px;
    stroke-dasharray: 2 2;
  }
[data-category="new"] .hidden.citizen {
    fill: var(--vbLogo);
    stroke: var(--vbLogo);
    stroke-dasharray: 3 2;
  }
@supports (color: lab(from red l 1 1% / calc(alpha + 0.1))) {
[data-category="new"] .hidden.citizen {
    fill: rgb(from var(--vbLogo) r g b / .2);
  }
}
[data-category="parties"] .hidden {
    fill: none;
    stroke: var(--light-gray);
    stroke-dasharray: 3 2;
  }
[data-category="parties"] .republican { 
    fill: var(--red);
  }
[data-category="parties"] .democrat { 
    fill: var(--blue);
  }
[data-category="parties"] .noncitizen {
    fill: #FFF3;
    stroke: var(--gray);
    stroke-dasharray: 3 2;
  }
.svg-defines {
  position: absolute;
  height: 1;
  width: 1;
  left: -10000px;
  opacity: 0;
}
.hero {
  z-index: 999;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: white;
}
@media (max-width: 1100px) {
.hero {
    display: block;
}
  }
.hero svg {
    width: 100%;
    height: 100%;
    background: var(--vbBureau);
    aspect-ratio: 1 / 1;
    display: block;
  }
.hero .illustration-container {
    position: relative;
    width: 100%;
  }
:is(.hero .illustration-container) .credit {
      margin: 0;
      text-align: right;
      line-height: 1;
      font-size: 14px;
      font-family: var(--sans);
      font-style: italic;
      color: #FFF8;
      position: absolute;
      bottom: 8px;
      right: 8px;
    }
@media (max-width: 600px) {
:is(.hero .illustration-container) .credit {
        display: block;
        position: static;
        color: black;
        margin-top: 4px;
    }
      }
.hero .credits {
    font-family: var(--sans);
    font-size: 16px;
    padding: 0 0 20px;
    list-style-type: none;
    margin: 0;
  }
.hero .titles {
    padding: 20px;
  }
:is(.hero .people) .person {
      stroke: var(--vbBureau);
      stroke-width: 2;
      fill: var(--vbLogo);
      vector-effect: non-scaling-stroke;
    }
.hero h3 {
    font-family: var(--sans);
    font-size: 16px;
  }
.blocking {
  background: white;
  padding: 1px 0;
}
.blocking p {
    margin: 0 0 1em;
  }
.blocking + .text-block {
    margin-top: 20vh;
  }
article .blocking:first-child {
    padding-top: 3em;
  }
side-chain {
  display: block;
}
.constrained {
  width: 650px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 600px) {
.constrained {
    padding-left: 20px;
    padding-right: 20px;
    max-width: 100%;
}
  }
@media (max-width: 600px) {
article {
    font-size: 1.3rem;
}
  }
article p .widont {
    display: inline-block;
  }
.text-block {
  margin: 0 auto 80vh;
  background-color: white;
  color: black;
  padding: 1em;
  width: 33%;
  min-width: 300px;
  min-width: min(400px, 80%);
  max-width: 100%;
  border: 1px solid #AAA;
  box-shadow: 0 16px 32px -16px #0008;
}