/* ----------------Menu-------------------- */
.menu-item {
  cursor: pointer;
  justify-content: flex-start;
  display: list-item;
  list-style: circle;
  align-items: center;
  margin-left: 30px;
  padding-left: 2px;
  color: var(--black);
  border-left: 0;
  position: relative;
}
.menu-item-title {
    min-height: 30px;
    display:flex;
    align-items:center;
    opacity:0.5;
    transition: all 0.3s ease;
    font-size: 1.1em;
    line-height: 30px;
    font-weight:300;
    padding-right: 40px;
    padding-left: 12px;
}
.menu-item-header {
    border-top: none;
    padding: 9px 9px 1px 30px;
    font-size: 1.3em;
    display: block;
    margin: 0;
    background: var(--white);
    opacity: 1;
}
.menu-item-header .menu-icon {
    top:12px;
    left:0;
}
.submenu {
  margin-left: 25px;
  position: relative;
}
.menu-item:hover  .menu-item-title,
.menu-item-active  .menu-item-title,
.menu-item-active:hover .menu-item-title{
  font-weight: bold;
  opacity:1;
}
/* ---------------Menu and Triage------------------- */
.unit-flags,
.unit-triage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.unit-triage-cat,
.flag {
  border-radius: 90px;
  font-size: 1.4em;
  min-width: 40px;
  min-height: 30px;
  cursor: pointer;
  margin: 3px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flag:hover,
.flag:focus,
.active-flag {
  transform: scale(1.5);
  position: relative;
  z-index: 5;
  transition: transform 0.15s linear;
}
.menu-icon {
  width: 26px;
  box-sizing: border-box;
  position: absolute;
  left: -24px;
  top: 0;
  background: var(--white);
  border-radius: 60px;
  padding: 3px;
}
.unit-icon {
  position: absolute;
  left: 12px;
  stroke-width: 1;
  line-height: 1em;
  top: 24px;
}
h3 .unit-icon {
  left: -50px;
  top: 3px;
  font-size: 20px;
}
.triage0 svg {
}
.flag0{
    display:none;
}
.triage1 .triage-flag,
.triage1 path {
  fill: var(--colour5);
  color: var(--colour5);
}
.triage2 .triage-flag,
.triage2 path {
  fill: var(--colour4);
  color: var(--colour4);
}
.triage3 .triage-flag,
.triage3 path {
  fill: var(--colour3);
  color: var(--colour3);
}
.triage4 .triage-flag,
.triage4 path {
  fill: var(--colour2);
  color: var(--colour2);
}
.triage5 .triage-flag,
.triage5 path {
  fill: var(--colour1);
  color: var(--colour1);
}
.unit-triage .triage1:hover,
.active-triage1, .triage1 .menu-item-title {
  background: var(--colour5) !important;
  color: var(--white);
}
.unit-triage .triage2:hover,
.active-triage2, .triage2 .menu-item-title {
  background: var(--colour4) !important;
  color: var(--white);
}
.unit-triage .triage3:hover,
.active-triage3, .triage3 .menu-item-title {
  background: var(--colour3) !important;
  color: var(--black);
}
.unit-triage .triage4:hover,
.active-triage4, .triage4 .menu-item-title {
  background: var(--colour2) !important;
  color: var(--white);
}
.unit-triage .triage5:hover,
.active-triage5, .triage5 .menu-item-title {
  background: var(--colour1) !important;
  color: var(--white);
}
/*-------------------Menu quiz results ------------------*/

.menu-item-results{
    position:absolute;
    right:3px;
    bottom:6px;
    width: 30px;
    opacity:0.5;
}
.menu-item-results circle {
    fill:none;
}
.menu-item-results .dot-active {
    fill:var(--black);
}
.triage1 .dot-active, .triage2 .dot-active, .triage4 .dot-active, .triage5 .dot-active {
    fill:var(--white);
}
.menu-item:hover  .menu-item-results,
.menu-item-active  .menu-item-results,
.menu-item-active:hover .menu-item-results{
  opacity:1;
}
/* ---------------Unit------------------- */
.unit-parent,
.unit-child,
#feedback,
#dictionary {
  border-radius: 20px;
  background: var(--white);
  color: var(--black);
  margin: 6px;
  position: relative;
  overflow: hidden;
  border:2px solid var(--grey);
}
.unit-grandchild {
  border-top: 2px dotted var(--grey);
  position: relative;
}
.unit-grandchild-box {
  display: flex;
}
.unit-challenge {
  background-color: #f8f8f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='30' viewBox='0 0 1000 120'%3E%3Cg fill='none' stroke='%23F2F2F2' stroke-width='10' %3E%3Cpath d='M-500 75c0 0 125-30 250-30S0 75 0 75s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 45c0 0 125-30 250-30S0 45 0 45s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 105c0 0 125-30 250-30S0 105 0 105s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 15c0 0 125-30 250-30S0 15 0 15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500-15c0 0 125-30 250-30S0-15 0-15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 135c0 0 125-30 250-30S0 135 0 135s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3C/g%3E%3C/svg%3E");
}
.unit-header {
  position: relative;
  z-index: 999;
}
.unit-image {
  min-height: 500px;
  border: 1px solid var(--grey);
  border-width: 1px 0;
}
.unit-content {
  padding-left: 2em;
}
.svg {
  border: 2px dashed var(--grey);
  border-radius: 12px;
  overflow: hidden;
  padding: 6px;
}
.svg > svg {
  height: auto;
  border: 2px solid var(--colour1);
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
}
/* ---------------Pill menu------------------- */
.pill-menu {
  display: flex;
  flex-wrap: wrap;
}
.pill-menu-image {
  position: relative;
  min-height: 80px;
  width: 100%;
  border-right: 1px solid var(--grey);
}
.pill-menu-item {
  display: flex;
  margin-bottom: 12px;
  border-radius: 100px;
  overflow: hidden;
  border: 2px solid var(--grey);
  transition: 1s all ease;
  color: var(--black);
  width: 50%;
  cursor:pointer;
}
.pill-menu-title {
  padding: 12px 60px 12px 20px;
  margin: 0 !important;
  font-size: 1.3em;
  min-height: 80px;
  text-align: left;
  width: 100%;
  position: relative;
  font-family: "Comfortaa", sans-serif;
  background: var(--white);
  display: flex;
  align-items: center;
  color: var(--black);
}

.pill-menu-item:hover {
  border: 2px dashed var(--white);
  transform: scale(1.1);
  position: relative;
  z-index: 5;
  color: var(--colour1);
}
/*-----------------Unit Buttons---------*/
.unit-btns,
.unit-view-btns {
  position: absolute;
  bottom: -20px;
  right: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.unit-btns {
  bottom: 0;
}
.unit-btns-parent {
  position: static;
}
.unit-btns > svg {
  cursor: pointer;
  width: 26px;
  padding: 20px;
}
.quiz-start {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: monospace;
}
.quiz-start-label {
  font-family: monospace;
  text-wrap: nowrap;
}
/*------------------Quiz background-----------------------------------*/
.quiz-back {
  position: absolute;
  top: -20px;
  left: -2%;
  width: 104%;
  min-height: 400px;
  max-height: 100%;
  z-index: 0;
}
.quiz-back path {
  fill: none;
  stroke: var(--grey);
  stroke-width: 0.16;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.unit-child-quiz .quiz-back {
  top: 50px;
}
.quiz-back ellipse,
.quiz-back rect {
  fill: none;
  stroke: var(--grey);
  stroke-width: 0.16;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dark .quiz-back path,
.dark .quiz-back rect {
  border-color: var(--lightwhite);
  stroke: var(--lightwhite);
  fill: var(--black);
}
/* --------------------------------Quiz---------------------------------- */
.quiz {
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  justify-content: center;
  position: relative;
}
.quiz-content {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  border-radius: 20px;
  border: 2px solid var(--grey);
  overflow: hidden;
  z-index: 2;
  background: var(--white);
}
/*----------------------------QUIZ QUESTION -----------*/
.quiz-question {
  width: 100%;
}
.quiz-speak,
.quiz-stimulus,
.quiz-choices, .quiz-nav {
  padding: 12px 20px;
}
.quiz-speak {
    background: var(--colour1light);
    border-radius: 6px;
    position: relative;
    color: var(--black);
    margin: 12px;
}
.quiz-title {
    font-weight:bold;
    padding:12px 0 0 0;
}
.quiz-speak:after {
    content: '';
    position: absolute;
    display: block;
    width: 0;
    z-index: 1;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent var(--colour1light) transparent;
    top: 64%;
    left: -12px;
}
.quiz-stimulus {
  border-top: 1px dashed var(--grey);
  border-bottom: 1px dashed var(--grey);
  background: var(--lightgrey);
  position:relative;
}
.quiz-stimulus svg {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  padding: 3px;
  background: var(--white);
  max-width: 100vw;
  max-height: 50vh;
}
/*----------------------Quiz choices -----------------*/
.quiz-choices {
  text-align: center;
}
button.choice,
button.tag,
button.choice:hover,
button.tag:hover {
  padding: 6px 20px;
  border-radius: 60px;
  text-align: left;
  width: 100%;
  display: inline-block;
  text-align: center;
  font-family: monospace;
  background: var(--grey);
  color: var(--black);
}
.unanswered button.choice,
.unanswered button.tag {
  cursor: pointer;
  background: var(--colour1);
  color: var(--dullwhite);
}
.unanswered button.choice:hover,
button.quiz-selected-choice,
.unanswered button.quiz-selected-choice,
.unanswered button.quiz-selected-choice:hover,
.unanswered button.quiz-selected-tag,
.unanswered button.quiz-selected-tag:hover,
.unanswered button.tag,
.unanswered button.tag:hover {
  background: var(--colour1dark);
  color: var(--dullwhite);
  border: 2px dashed var(--dullwhite);
}
.svg-choice-area {
    opacity:0.01;
}
.choice .svg-pin-circle, .choice .svg-pin-line {
    fill:var(--colour1);
    stroke:var(--colour1);
}
.quiz-selected-choice .svg-pin-circle, 
.quiz-selected-choice .svg-pin-line {
    fill:var(--colour1dark);
    stroke:var(--colour1dark);
}
.quiz-correct .svg-pin-circle, 
.quiz-correct .svg-pin-line {
    fill:var(--colour2);
    stroke:var(--colour2);
}
.quiz-incorrect .svg-pin-circle, 
.quiz-incorrect .svg-pin-line {
    fill:var(--colour5);
    stroke:var(--colour5);
}
.quiz-correct,
.quiz-correct:hover {
  background: var(--colour2) !important;
  color: var(--white);
  cursor: default;
}
.quiz-incorrect,
.quiz-incorrect:hover {
  background: var(--colour5) !important;
  color: var(--white);
  cursor: default;
}
.quiz-missed,
.quiz-missed:hover {
  background: var(--colour2dark) !important;
  cursor: default;
}
.quiz-svg-area-selected .quiz-selected-choice {
  fill: var(--colour1);
  opacity: 0.5;
  stroke: none;
  stroke-width: 0;
}
.quiz-svg-area-selected .quiz-correct {
  fill: var(--colour2);
  opacity: 0.5;
}
.quiz-svg-area-selected .quiz-incorrect {
  fill: var(--colour5);
  opacity: 0.3;
}
.quiz-svg-area-selected .quiz-missed {
    fill: var(--colour2dark);
    opacity: 0.3;
  }
.quiz-emoji {
  display: flex;
  border-radius: 60px;
  border: 2px dashed var(--dullwhite);
  justify-content: space-between;
  background: var(--colour1);
}
.quiz-nav {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
  }
  .quiz-nav button {
    padding: 6px 20px;
    font-family: 'Comfortaa';
    min-height:20px;
    font-size: 0.9em;
  }
  .choice .star {
    cursor:default;
    opacity:1;
    display: inline-block;
    padding: 0;
    max-width: 30px;
  }
  .quiz-stimulus .starred {
    width: 30px;
    opacity: 1;
    position: absolute;
    bottom: 6px;
    left: 6px; 
    border: 1px solid var(--grey);
    fill: var(--grey);
  }
/*------------------------Quiz timer --------------------*/
.quiz-timer {
  width: 100%;
  margin: 0 10%;
  border-radius: 0 0 60px 60px;
  border: 2px solid var(--grey);
  border-top: none;
  overflow: hidden;
}
progress {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  margin-left: 0;
  height: 14px;
}
progress::-webkit-progress-value {
  -webkit-appearance: none;
  background: var(--colour1light);
  white-space: pre;
  box-shadow: 0 2px 5px var(--stark) inset;
}
progress::-webkit-progress-bar {
  -webkit-appearance: none;
  white-space: pre;
  background: var(--stark);
}
.quiz-timerLabel {
  position: absolute;
  bottom: 0;
  font-size: 0.8em;
}
.warning-orange progress::-webkit-progress-value {
  background: var(--colour4);
}
.warning-red progress::-webkit-progress-value {
  background: var(--colour5);
}
/*----------------------Quiz Bar - scoring and nav -----------------*/
.quiz-footer {
  padding: 0 20px;
  justify-content: center;
  width: 100%;
}
.quiz-bar {
  background: var(--grey);
  border-radius: 3px 3px 60px 60px;
  overflow: hidden;
  border: 2px solid var(--grey);
  border-top: none;
  display: flex;
  align-items: center;
  fill: white;
}
.quiz-bar svg {
  padding: 3px 15px;
  height: 26px;
  width: 26px;
  display: inline-block;
}
.quiz-av-confidence svg, .quiz-speed svg {
    padding:0 6px;
    fill:var(--halfblack);
}
.exit-fullscreen:hover,
.start-fullscreen:hover {
  background: var(--colour2);
  cursor: pointer;
}
.quiz-quit {
    padding-right:20px;
}
.quiz-quit:hover {
  background: var(--colour5);
}
.quiz-scoring {
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0.3;
}
.quiz-progress,
.quiz-av-confidence {
  display: flex;
  margin: 0 12px;
  border-radius: 3px;
  overflow: hidden;
}
.quiz-progress {
  height: 20px;
}
.quiz-progress-bar {
  height: 20px;
  width: 7px;
  background: var(--white);
  display: inline-block;
}
.quiz-progress-bar-active {
  background: var(--black);
}
.quiz-streak, .quiz-points {
  font-family: "Chewy", sans-serif;
  font-size: 1.1em;
}
/*----------------------------Quiz finish ---------------*/
.quiz-finish {
  width: 100%;
  height: 100%;
  font-size: 1.5em;
  text-align: center;
  padding: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--colour1);
  border-radius: 20px;
  position: relative;
  background: var(--white);
}
.quiz-finish svg {
    width:50px;
}
.quiz-summary-points {
  font-size: 3em;
}
.quiz-summary-line {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border-radius:12px;
}
/*------------------Quiz help --------------------*/
.quiz .dictionary {
  text-align: left;
}
.quiz-scaffold {
  width: 25%;
  border: 2px solid var(--grey);
  border-radius: 100px 0 0;
  overflow: hidden;
  padding: 6px;
  padding-top: 40px;
}
/*----------------------------Unit navigation -------------------*/
.nav-arrow,
.chevron {
  transition: 0.5s all ease;
  opacity: 0.3;
  cursor: pointer;
  padding: 2px;
}
.nav-arrow {
  stroke: var(--white);
  stroke-width: 1;
  fill: var(--white);
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 20px;
}
.chevrons {
  gap: 3px;
  padding: 2px 2px 6px;
  align-items: center;
}
.chevron {
  height: 12px;
  flex-grow: 1;
  position: relative;
}
.chevron:before,
.chevron:after {
  content: "";
  position: absolute;
  left: 0;
  height: 50%;
  width: 100%;
  background: var(--white);
  z-index: -1;
}
.chevron:before {
  top: 0;
  transform: skew(30deg);
}
.chevron:after {
  bottom: 0;
  transform: skew(-30deg);
}
.counter-done {
  opacity: 0.7;
}
.counter-active,
.nav-arrow:hover,
.chevron:hover {
  opacity: 1;
}
.nav-txt {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
}
/*------------------------------Full screen ----------------------*/
.fullscreen {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x:hidden;
  max-height: 100vh;
  align-content: flex-start;
  background: var(--white);
  padding: 12px;
}
.fullscreen .quiz-content {
  min-height: 80vh;
}
/*----------------Dark quiz ---------------*/
.dark .quiz-content {
  background: var(--black);
}
.dark .quiz-speak {
    background: var(--lightwhite);
    color: var(--dullwhite);
}
.dark .quiz-speak:after {
    border-color: transparent transparent var(--lightwhite) transparent;
}
.dark .quiz-stimulus > svg {
  background: var(--lightwhite);
}
.dark .quiz-stimulus {
  background: none;
  border: none;
}
.dark .quiz-bar,
.dark .quiz-timer,
.dark .quiz-content {
  border-color: var(--grey);
  stroke: var(--grey);
  fill: var(--black);
  background: var(--black);
  border-color: var(--lightwhite);
}
.dark .quiz-footer svg {
  fill: var(--white);
}
.dark progress::-webkit-progress-value { 
    background: var(--colour1dark);
  }
/*-----------------Alternate Views --------------*/
.no-halves {
  display: block;
}
.no-halves .half {
  width: 100%;
  column-count: 1;
  padding-left: 0;
}
.view-summary {
  .unit-content,
  .unit-btns {
    display: none;
  }
  .half {
    width: 100%;
  }
  .unit,
  .unit-grandchild .svg {
    border: none;
  }
  .unit-grandchildren {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    padding: 2em;
  }
  .unit-grandchild-box {
    border: 2px solid var(--grey);
    border-radius: 20px;
    overflow: hidden;
    background: var(--white);
    position: relative;
    z-index: 7;
  }
  .unit-grandchild {
    padding: 0 0 36px 0;
    background: none;
  }
  .unit-grandchild .svg {    
    min-height: 140px;
    display: flex;
  }
  .grandchild-wide {
    /*grid-column: span 2;*/
  }
  .unit-grandchild-focus {
    grid-column: span 4;
  }
  h3 {
    font-size: 0.8em;
    padding: 3px 30px;
  }
  h3 .unit-icon {
    left: 0;
    top: 0px;
  }
}
/*---------------------------Loader ----------------------*/
.loader {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 13px 4px 13px 2px;
  border-radius: 0 3px 3px 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.loader div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 32px;
  height: 32px;
  margin: 4px;
  border: 6px solid var(--colour1);
  border-radius: 50%;
  animation: loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--colou1) transparent transparent transparent;
}
.loader div {
  border-color: var(--colour1) transparent transparent transparent;
}
.loader div:nth-child(1) {
  animation-delay: -0.45s;
}
.loader div:nth-child(2) {
  animation-delay: -0.3s;
}
.loader div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/*-----------------Animations---------------*/
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}
.anim-pulse {
  animation: pulse 1s linear infinite alternate;
}
@keyframes linearwipe {
  0% {
    clip-path: polygon(0 -5%, 1% -5%, 1% 105%, 0 105%);
  }
  100% {
    clip-path: polygon(0 -5%, 100% -5%, 100% 105%, 0 105%);
  }
}
.anim-wipe-trace {
  white-space: nowrap;
  overflow: hidden;
  width: 30em;
  animation-name: linearwipe;
  animation-duration: 2.5s;
  animation-iteration-count: 1;
  animation-timing-function: linear;
}
.anim-wipe-rhythm {
  white-space: nowrap;
  overflow: hidden;
  width: 30em;
  animation-name: linearwipe;
  animation-duration: 10s;
  animation-iteration-count: 1;
  animation-timing-function: linear;
}
@keyframes flash {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.anim-flash {
  animation: flash 2s;
  animation-direction: alternate;
  animation-iteration-count: 1;
  animation-timing-function: linear;
}
@keyframes dash {
  to {
    stroke-dashoffset: 2;
  }
}
.chaser {
  stroke-dasharray: 1;
  animation: dash 1s linear infinite;
  stroke: var(--white);
  stroke-width: 0.5px;
  fill: var(--colour1);
}
.fade {
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }  
  .fade-in {
    opacity: 1;
  }
@media only screen and (max-width: 600px) {
    body {
        background: none !important;
    }
    button {
        font-size: 0.9em;
        padding: 6px 20px;
    }
    .chevron::before, .chevron::after, .nav-arrow {
        background:var(--colour1);
        fill:var(--colour1);
        stroke: var(--colour1);
    }
    .unit-image {display:none}
  .container,
  .unit {
    margin: 0;
    border: 0;
  }
  .unit {
    border-radius: 0;
    border-top: 1px solid var(--grey);
  }
  header, footer, menu, .unit-parent, .unit-child, #feedback, #dictionary {
    box-shadow:none;
}
  .unit-grandchild-box {
    display: block;
  }
  .unit-image,
  .quiz,
  .loader {
    min-height: 300px;
    min-width: 100%;
  }
  h3,
  .unit-content,
  .unit-triage {
    padding: 0 1em;
  }
  h3 .unit-icon {
    left: -6px;
    top: -3px;
    position: relative;
    display: inline-block;
  }
  .pill-menu-item {
    width: 100%;
  }
  .pad-xxl {
    padding: 4em 0;
  }
  .svg, .unit-svg {    
    padding: 6px;
  }

}
