/* 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);
}

@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;
  }

.cb_newsletter {
  display: grid;
  grid-template-columns: 1fr 3fr 2fr;
  justify-content: space-around;
  align-items: center;
  max-width: 960px;
  padding: 20px;
  margin: 20px auto;
  background-color: #92C5D4;
  font-family: var(--sans);
}

@media (max-width: 600px) {

.cb_newsletter {
    display: block;
}
  }

.cb_newsletter button {
    display: block;
    border: none;
    border-radius: none;
    width: 100%;
    background-color: var(--bureau);
    padding: 10px 16px;
    color: white;
    -webkit-text-decoration: none;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 19px;
    font-weight: bold;
  }

@media (max-width: 600px) {

.cb_newsletter button {
      padding: 8px;
      font-size: 14px;
  }
    }

:is(.cb_newsletter button) svg {
      vertical-align: text-top;
      height: 1.2em;
    }

.cb_newsletter .newsletter_logo {
    padding: 16px;
  }

@media (max-width: 600px) {

.cb_newsletter .newsletter_logo {
      display: none;
  }
    }

.cb_newsletter newsletter-signup {
    display: block;
  }

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

:is(.cb_newsletter .newsletter_form) input {
      display: block;
      width: 100%;
      padding: 10px;
      margin: 10px 0;
      font-size: inherit;
    }

.cb_newsletter .status {
    font-size: 16px;
    margin-top: 8px;
  }

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;
    }
      }

.hero {
  z-index: 999;
  display: grid;
  grid-template-columns: 1fr 500px;
  align-items: center;
  background: var(--vbBureau);
  color: white;
}

@media (max-width: 1100px) {

.hero {
    display: block;
}
  }

.hero img {
    background: var(--vbBureau);
    display: block;
    align-self: stretch;
    object-fit: cover;
    object-position: center-left;
  }

.hero figure.photo-container {
    margin: 0;
    width: 100%;
  }

:is(.hero figure.photo-container) .credit {
      display: inline;
      margin: 0;
      text-align: right;
      padding: 20px;
      line-height: 1;
      font-size: 14px;
      font-family: var(--sans);
      font-style: italic;
      color: #FFF8;
    }

@media (max-width: 600px) {

:is(.hero figure.photo-container) .credit {
        display: inline;
        position: static;
        color: white;
        margin-top: 4px;
    }
      }

.hero figcaption {
    margin: 4px 20px;
    font-family: var(--sans);
    font-size: 14px;
    font-style: italic;
  }

.hero .credits {
    font-family: var(--sans);
    font-size: 16px;
    padding: 0 0 20px;
    list-style-type: none;
    margin: 0;
  }

.hero .titles {
    padding: 20px;
  }

.hero h1 {
    margin: 0;
    font-size: 2.1rem;
  }

.hero h2 {
    font-weight: normal;
    font-size: 1.8rem;
  }

.hero h3 {
    font-size: 1rem;
  }

/* Timezone Styling */
.states path.active {
    fill: var(--gray);
  }
.states .x-selected {
    stroke: white;
    stroke-width: 1px;
    font-style: bold;
  }
:is(.states .x-selected) .fill-hex {
      fill: var(--purple2);
    }
:is(.states .x-selected) .background-hex {
      fill: var(--light-gray);
    }
.states path.background-hex {
    fill: var(--map-gray);
    stroke-width: 1;
    stroke: white;
    vector-effect: non-scaling-stroke;
  }
.states path.fill-hex {
    fill: var(--vbLogo);
    stroke: none;
    pointer-events: none;
  }
.states .label {
    font-family: var(--sans);
    pointer-events: none;
    font-size: 15px;
    fill: white;
  }

/* Grid Map
========================================*/

.graphic-header {
  max-width: 800px;
  margin: auto;
}

.graphic-header h4 {
    text-align: justify;
  }

.graphic-header .source {
    font-style: normal !important;
    justify-content: left;
    text-align: left;
  }

.graphic {
  max-width: var(--graphic-width);
  margin: 1em auto;
  display: grid;
  grid-template-columns: 1fr 4fr;
  grid-template-areas:
    "dash map"
    "slide slide";
  font-family: var(--sans);
  gap: 8px 24px;
  align-items: end;
  position: relative;
}

@media (max-width: 1100px) {

.graphic {
    display: block;
}
  }

.graphic .tooltip {
    position: absolute;
    padding: 8px 16px;
    pointer-events: none;
    font-family: var(--sans);
    box-shadow: 4px 4px 8px #0008;
    background: white;
    font-size: 16px;
  }

/* Slider styling */

.graphic .slider {
    grid-area: slide;
    accent-color: var(--vbLogo);
    padding: 20px 0;
  }

:is(.graphic .slider) input {
      width: 100%;
    }

:is(:is(.graphic .slider) input)::-webkit-slider-thumb {
        background: var(--vbBureau);
        border: 1px solid var(--vbLogo);
      }

@media (max-width: 600px) {

        :is(:is(.graphic .slider) input)::-webkit-slider-thumb { transform: scale(2); }
        :is(:is(.graphic .slider) input)::-moz-range-thumb { transform: scale(2); }

      }

:is(.graphic .slider) vote-time.time {
      display: block;
      width: 100%;
      text-align: center;
    }

@media (max-width: 600px) {

.graphic .slider {
      padding: 1em 1em;
  }
    }

.graphic .dash-panel {
    grid-area: dash;
    padding-top: 16px;
    height: 100%;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: 2fr auto auto auto;
    grid-template-areas:
      "tz"
      "clock"
      "clock"
      "clock";
  }

@media (max-width: 1100px) {

.graphic .dash-panel {
      align-items: end;
      grid-template-columns: 2fr 1fr 1fr;
      grid-template-areas:
        "tz clock clock";
  }
    }

@media (max-width: 600px) {

.graphic .dash-panel {
      grid-template-columns: 1fr 2fr;
      grid-template-areas:
        "tz tz"
        "clock clock";
  }
    }

:is(.graphic .dash-panel) .tz-dash {
      max-width: 600px;
      text-align: center;
      font-family: var(--sans);
      font-size: 15px;
      grid-area: tz;
    }

@media (max-width: 1100px) {

:is(.graphic .dash-panel) .tz-dash {
        display: flex;
        gap: 8px;
        align-items: center;
    }

        :is(:is(.graphic .dash-panel) .tz-dash) .tz-select {
          flex: 1;
          display: flex;
        }
      }

:is(:is(.graphic .dash-panel) .tz-dash) input {
        position: absolute;
        left: -1000px;
      }

:is(:is(.graphic .dash-panel) .tz-dash) label {
        flex: 1;
        background: white;
        border: 1px solid var(--light-gray);
        text-align: center;
        padding: 8px 16px;
        cursor: pointer;
        display: block;
      }

@media (max-width: 600px) {

:is(:is(.graphic .dash-panel) .tz-dash) label {
          padding: 4px 8px;
      }
        }

:is(:is(:is(.graphic .dash-panel) .tz-dash) label):first-child {
          border-radius: 8px 8px 0 0;
        }

@media (max-width: 1100px) {

:is(:is(:is(.graphic .dash-panel) .tz-dash) label):first-child {
            border-radius: 8px 0 0 8px;
        }
          }

:is(:is(:is(.graphic .dash-panel) .tz-dash) label):last-child {
          border-radius: 0 0 8px 8px;
        }

@media (max-width: 1100px) {

:is(:is(:is(.graphic .dash-panel) .tz-dash) label):last-child {
            border-radius: 0 8px 8px 0;
        }
          }

:is(:is(:is(.graphic .dash-panel) .tz-dash) label):has(input:checked) {
          background: var(--vbLogo);
          color: white;
        }

:is(:is(.graphic .dash-panel) .tz-dash) .mobile-only {
        display: none;
      }

@media (max-width: 600px) {

:is(:is(.graphic .dash-panel) .tz-dash) .mobile-only {
          display: block;
      }
        }

@media (max-width: 600px) {

:is(:is(.graphic .dash-panel) .tz-dash) .desktop-only {
          display: none;
      }
        }

@media (max-width: 1100px) {

.graphic .info {
      display: none;
  }
    }

.graphic .clock {
    grid-area: clock;
    display: grid;
    grid-template-rows: subgrid;
    grid-template-columns: subgrid;
    align-items: end;
  }

@media (max-width: 1100px) {

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

.graphic h3.current-time {
    font-size: 18px;
    font-variant: tabular-nums;
    margin: .5em 0 0;
    width: 100%;
  }

.graphic ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
  }

:is(.graphic ul) li {
      display: block;
      margin-bottom: 16px;
    }

.graphic .sundial {
    width: 100%;
    display: block;
    margin: auto;
  }

@media (max-width: 1100px) {

.graphic .sundial {
      width: 150px;
  }
    }

@media (max-width: 600px) {

.graphic .sundial {
      width: 100px;
  }
    }

:is(.graphic .sundial) .outline {
      stroke: var(--dark-blue);
      stroke-width: 1;
      vector-effect: non-scaling-stroke;
      fill: none;
    }

:is(.graphic .sundial) .day-hemisphere {
      fill: var(--light-blue);
    }

:is(.graphic .sundial) .night-hemisphere {
      fill: var(--blue);
    }

:is(.graphic .sundial) .dial {
      stroke: var(--vbLogo);
      stroke-width: 4;
      fill: none;
      display: none;
    }

:is(.graphic .sundial) .sky-icon {
      text-anchor: middle;
      font-size: 20px;
      text-shadow: 2px 2px 4px #0004;
    }

:is(:is(.graphic .sundial) .faceplate) line {
        stroke: black;
        stroke-width: 2px;
      }

/* States Line Chart Styling */
.states-grid {
  --bg-color: white;
  font-family: var(--sans);
}
:is(.states-grid .graphic-header) .selection-row {
      display: flex;
      gap: 8px;
      font-size: 16px;
      border-top: 4px solid var(--vbLogo);
      padding-top: 8px;
      /*color: white;
      background: var(--vbLogo);
      padding: 8px;
      border-radius: 8px;*/
    }
:is(:is(.states-grid .graphic-header) .selection-row) select {
        flex: 1;
        font-size: inherit;
        font-family: inherit;
      }
.states-grid .state-card {
    margin-bottom: 2ch;
  }
:is(.states-grid .state-card) h2 {
      margin: .5em 0;
    }
:is(.states-grid .state-card) h3 {
      font-size: 1rem;
    }
:is(.states-grid .state-card) h4 {
      font-size: normal;
    }
:is(.states-grid .state-card) .chatter {
      font-size: 16px;
      font-style: italic;
      margin: 0;
    }
:is(.states-grid .state-card) svg {
      display: block;
      height: auto;
      width: 100%;
      margin-top: 20px;

    }
:is(:is(.states-grid .state-card) svg) line,:is(:is(.states-grid .state-card) svg) path {
        vector-effect: non-scaling-stroke;
      }
:is(:is(.states-grid .state-card) svg) .axis {
        stroke: black;
        stroke-width: 2;
      }
:is(:is(.states-grid .state-card) svg) .grid {
        stroke-dasharray: 2 2;
        stroke: #0003;
        stroke: 1;
      }
:is(:is(.states-grid .state-card) svg) .grid-tick {
        font-family: var(--sans);
        font-size: 12px;
        font-style: italic;
      }
:is(:is(.states-grid .state-card) svg) .vote-line {
        stroke: var(--purple1);
        stroke-width: 3;
        fill: none;
      }
:is(:is(.states-grid .state-card) svg) .vote-fill {
        stroke: var(--purple1);
        stroke-width: 10;
        fill: transparent;
        mask: url(#line-mask);
        filter: url(#line-blur);
      }
:is(:is(.states-grid .state-card) svg) .sweep {
        stroke-width: 1;
        stroke-dasharray: 6 1;
        vector-effect: non-scaling-stroke;
        stroke: black;
      }
:is(:is(.states-grid .state-card) svg) .veil {
        fill: var(--bg-color);
        opacity: .8;
      }
:is(:is(.states-grid .state-card) svg) .dot {
        r: 5px;
        filter: url(#dot-blur);
        fill: var(--vbLogo);
        stroke: #0008;
      }
:is(:is(.states-grid .state-card) svg) .percentage {
        font-size: 14px;
        font-family: var(--sans);
        fill: var(--vbBureau);
        text-shadow: 0 0 5px var(--bg-color);
      }
.right:is(:is(:is(.states-grid .state-card) svg) .percentage) {
          text-anchor: end;
        }
:is(.states-grid .state-card) .labels {
      position: relative;
    }
:is(:is(.states-grid .state-card) .labels) .label {
        position: absolute;
        font-size: 13px;
        text-align: center;
        white-space: nowrap;
        font-variant: tabular-nums;
        font-family: var(--sans);
        pointer-events: none;
      }
:is(:is(.states-grid .state-card) .labels) .current {
        text-align: center;
      }
:is(:is(.states-grid .state-card) .labels) [data-position="middle"] {
        transform: translateX(-50%);
      }
:is(:is(.states-grid .state-card) .labels) [data-position="end"] {
        transform: translateX(-100%);
      }
:root {
  --graphic-width: 1000px;
  --purple2: #A268CC;
  --purple1: #7e509ead;
  --map-gray: #c7c5c5;
  --bg-color: #FFF6ED;
}
@media @mobile {
:root {
    font-size: 1.3rem;
}
  }

.story {
  padding: 0 10px;
}

h2 {
  margin: 1em 0;
}

h3 {
  margin: 0;
  font-family: var(--sans);
}

h4 {
  margin: 1em 0;
  font-style: italic;
  font-weight: normal;
  font-family: var(--sans);
}

.block {

  margin-left: auto;
  margin-right: auto;
}

.block.constrained {
    max-width: 650px;
  }

@media @mobile {

.block {
    margin-left: 20px;
    margin-right: 20px;
}
  }

.block.map {
    max-width: 1000px;
  }

.source {
  font-size: 1rem;
  font-family: var(--sans);
  justify-content: right;
  text-align: right;
  font-style: italic;
}