html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

audio,canvas,iframe,img,svg,video {
  vertical-align: middle;
}

video {
  width: 90%;
  height: auto;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}
  
  /* external css */
  /* fontello */
  @font-face {
    font-family: 'fontello';
    src: url('../font/fontello.eot?86837330');
    src: url('../font/fontello.eot?86837330#iefix') format('embedded-opentype'),
         url('../font/fontello.woff2?86837330') format('woff2'),
         url('../font/fontello.woff?86837330') format('woff'),
         url('../font/fontello.ttf?86837330') format('truetype'),
         url('../font/fontello.svg?86837330#fontello') format('svg');
    font-weight: normal;
    font-style: normal;
  }
  
   [class^="icon-"]:before, [class*=" icon-"]:before 
   {
      font-family: "fontello";
      font-style: normal;
      font-weight: normal;
      speak: none;
   
      display: inline-block;
      text-decoration: inherit;
      width: 1em;
      margin-right: .2em;
      text-align: center;
   
    /* For safety - reset parent styles, that can break glyph codes*/
      font-variant: normal;
      text-transform: none;
   
    /* fix buttons height, for twitter bootstrap */
      line-height: 1em;
   
    /* Animation center compensation - margins should be symmetric */
    /* remove if not needed */
      margin-left: .2em;
   
    /* Font smoothing. That was taken from TWBS */
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
  }
   
  .icon-search:before { content: '\e800'; }
  .icon-mail:before { content: '\e801'; } 
  .icon-videocam:before { content: '\e802'; } 
  .icon-download:before { content: '\e803'; } 
  .icon-pencil:before { content: '\e804'; } 
  .icon-cog-alt:before { content: '\e805'; } 
  .icon-road:before { content: '\e806'; } 
  .icon-th-large:before { content: '\e807'; } 
  .icon-globe:before { content: '\e808'; } 
  .icon-chart-bar:before { content: '\e809'; } 
  .icon-help-circled:before { content: '\e80a'; } 
  .icon-menu:before { content: '\f0c9'; } 
  .icon-list-bullet:before { content: '\f0ca'; } 
  .icon-download-cloud:before { content: '\f0ed'; } 
  .icon-gamepad:before { content: '\f11b'; } 
  .icon-yen:before { content: '\f157'; } 
  .icon-thumbs-up-alt:before { content: '\f164'; } 
  .icon-graduation-cap:before { content: '\f19d'; } 
  .icon-wechat:before { content: '\f1d7'; } 

  /* Author's custom styles */
  /* variables */
  :root {
      --primaryColor: #8080FF;
      --darkblue: #755CF4;
      --blueShadow: #264b80;
      --orange: #f8a936;
      --darkGray: #444444;
      --pyyellow: #f5d752;
      --pyblue:#3778ae;
      --numberOfSections: 7;
  } 

  /* generic classes */ 
  .wrapper {
    width: 1080px;
    margin: 1em auto;
  }

  .wrapper--long {
    margin: 2em auto;
  }

  .wrapper--zero {
    margin: 0 auto;
  }

  .margin--top10 {
    margin: 10px 0 0 0;
  }

  img  {
    max-width: 100%;
    background-size: cover;
    margin: 0 auto;
  }

  .center {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .bg {
      background-color: var(--primaryColor);
  }

  .bg--white {
      background-color: white;
  }

  .bg--darkgray {
      background-color:  var(--darkGray);
  }

  .bg--lightgray {
      background-color: lightgray;
  }

  .bg--green {
    background-color: mediumseagreen;
  }

  .bg--yellow {
    background-color: var(--pyyellow);
  }

  .shadow {
      z-index: 5;
      -webkit-box-shadow: 0 5px 10px #aaa;
      -moz-box-shadow: 0 5px 10px #aaa;
      box-shadow: 0 5px 10px #aaa;
  }

  .shadow--scratch {
      -webkit-box-shadow: 5px 5px 10px var(--blueShadow);
      -moz-box-shadow: 5px 5px 10px var(--blueShadow);
      box-shadow: 5px 5px 10px var(--blueShadow);
  }

  .border--blue {
      border: dashed 2px var(--darkblue);
  }

  .border--orange {
    border: dashed 2px var(--orange);
  }

  .border__top--none {
    border-top: none;
  }

  .border--thin {
    border: 1px solid black;
  }

  a:hover { 
    background-color: var(--orange);
    font-weight: bold;
    cursor:pointer;
  }

  a { 
    text-decoration: none; 
  }

  ul {
    list-style-type: none; 
  }

  .text--title {
    color : white;
    margin: 0;
  }

  .text--white {
    color : white;
  }

  .text--subtitle {
    color : white;
    margin: 0 0 1em 0;
  }

  .text--center {
    text-align:center;
  }

  .text--blue {
    color: var(--darkblue);
    font-weight: bold;
  }

  .text--pyblue {
    color: var(--pyblue);
    font-weight: bold;
  }

  .text--orange {
    color: var(--orange);
    font-weight: bold;
  }

  .text--green {
    color: mediumseagreen;
    font-weight: bold;
  }

  .text--red {
    color: tomato;
    font-weight: bold;
  }

  .modal {
    display: none;
    position: fixed; 
    z-index: 20; 
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4);
  }

  .modal__content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width:864px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s;
  }

  @-webkit-keyframes animatetop {
    from {top:-300px; opacity:0} 
    to {top:0; opacity:1}
  }

  @keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
  }

  .modal__close {
    color: white;
    float: right;
    font-size: 2em;
    font-weight: bold;
  }

  .modal__close:hover,
  .modal__close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }

  .modal__header {
    padding: 2px 16px;
    background-color: var(--primaryColor);
    color: white;
  }
  
  .modal__body {
    padding: 2px 16px;
  }
  
  .modal__footer {
    padding: 2px 16px;
    background-color: var(--primaryColor);
    color: white;
  }

  .modal__qr {
    width: 200px;
    height: 200px;
  }

  /* alert box */
  .alert {
    padding: 20px;
    margin: 10px 0 0 0;
    background-color: var(--orange);
    color: white;
    -webkit-box-shadow: 0 5px 10px #aaa;
    -moz-box-shadow: 0 5px 10px #aaa;
    box-shadow: 0 5px 10px #aaa;
  }

  .alert--resource {
    background-color: mediumseagreen;
  }
  
  .alert__close {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 2em;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
  }
  
  .alert__close:hover {
    color: black;
  }

  .alert__a {
    color: #222;
    text-decoration: underline;
  }

  .alert__a--resource:hover {
    background-color: mediumseagreen;
  }

  /* base template */
  body {
    margin:0;
    font-family: "Microsoft YaHei","微软雅黑","STXihei","华文细黑",sans-serif;
    font-size: 20px;
    display: grid;
    grid-template-rows: auto auto auto;
  }

  /* base - header */

  .header {
    border-bottom: 5px solid var(--darkblue);
  }

  header {
    display: grid;
    grid-template-columns: 220px auto;
    overflow: hidden;
  }

  .header__logo {
    font-weight: bold;
    font-size:24px;
  }

  .header__sublogo {
    font-style: italic;
    font-size: 12px;
  }

  .header__a--logo {
    color: white;
  }

  .header__a--logo:hover {
    background-color: transparent;
    font-weight: inherit;
  }

  .header__ul {
    float: right;
  }

  .header__li {
    font-size: 16px;
    display:inline;
    margin-left:0.7em;
  }

  .header__tab { 
    background-color:none;
    color: #fff; 
    padding: 0.7em;
  }

  .header__active, .header__active--mobile { 
    background-color: var(--orange);
    font-weight: bold;
  }

  .header__nav--mobile {
    display:none;
  }

  .header__hr {
    margin: 0;
    display: none;
  }

  .header__dropdown {
    overflow: hidden;
  }

  .header__dropcontent {
    display: none;
    position: absolute;
    margin: 8px 0 0 82px;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
  }

  .header__droplink {
    float: none;
    color: black;
    padding: 12px 16px;
    display: block;
    text-align: left;
  }

  .header__droplink:hover {
    background-color: #ddd;
  }

  .header__dropdown:hover .header__dropcontent {
    display: block;
  }
  
  /* base - main */
  .main {
    display: grid;
    grid-template-rows: repeat(var(--numberOfSections), auto);
  }

  /* base - footer */
  .footer {
      background-color: #20221f;
      color: lightgray;
      font-size: 15px;
  }

 /* index page */
 /* about */
  .about__grid {
      display: grid;
      grid-template-columns: auto 30%;
  }

  .about__intro {
      grid-row-start: 1;
      grid-row-end: 3;
  }

  .about__pic {
      width: 200px;
      height: 200px;
      justify-self: center;
  }

  .about__label {
      font-size: 15px;
      justify-self: center; 
      margin: 0 auto;
  }
  
  /* feature */
  .feature__grid {
      display: grid;
      grid-template-columns: repeat(3, auto);
      text-align: center;
      align-items: start;
      margin: 0;
      padding: 0;
  }

  .feature__i {
      font-size: 2em;
      color: white;
      background-color: var(--primaryColor);
      padding: 8px 16px;
      position:relative;
      top:-48px;
  }

  .feature__li {
      border-style: solid;
      border-width: 2px;
      border-color: white;
      padding: 1em 0;
      margin: 1.5em 1em;
  }

  .feature__p {
      color: white;
      font-size:18px;
      margin-top: -30px;
  }

  .feature__icon--scratch {
      border-radius: 45px;
      width: 180px;
      height: 180px;
  }

  .feature__box--store {
      margin:10px auto;
  }

  .feature__img--store {
      width: 125px;
  }

  .feature__img--store:hover{
      cursor: pointer;
  }

  .feature__btn--learn {
      background-color: white;
      font-weight: bold;
      color: var(--primaryColor);
      padding: 0.4em 2em;
      border: 8px solid var(--primaryColor);
  }

  .feature__btn--learn:hover {
      color: white;
  }

  .feature__box--learn {
      margin: 20px 0 -30px 0;
  }

  .feature__qr:hover {
      cursor: pointer;
  }
  /* info */
  .info__section {
      margin: 10px 0 0 0;
  }

  .info__grid {
      display: grid;
      grid-template-columns: 30% 10% 28% 4% 28%;
      grid-template-rows: auto auto auto;
  }

  .info__grid > div {
    text-align: center;
    position: relative;
  }

  .info__box1 { grid-area: 1 / 1 / 2 / 2; }
  .info__box2 { grid-area: 2 / 1 / 3 / 2; }
  .info__box3 { grid-area: 3 / 1 / 4 / 2; }
  .info__box4 { grid-area: 1 / 2 / span 3 / 3; }
  .info__box5 { grid-area: 1 / 3 / 2 / span 3; }
  .info__box6 { grid-area: 2 / 3 / 3 / 4; }
  .info__box7 { grid-area: 3 / 3 / 4 / 4; }
  .info__box8 { grid-area: 2 / 4 / span 2 / 5; }
  .info__box9 { grid-area: 2 / 5 / 3 / 6; }
  .info__box10 { grid-area: 3 / 5 / 4 / 6; }

  .info__plus, .info__or {
    color: #222;
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .info__or {
    color: var(--darkblue);
  }

  .info__plus {
    font-size: 100px;
  }

  .info__badge {
    width: 100px;
  }

  /* faq */

  .faq__accordion {
    background-color: #eee;
    color: var(--primaryColor);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 20px;
    font-weight: bold;
    transition: 0.4s;
  }

  .faq__active, .faq__accordion:hover {
    background-color: #ccc;
  }

  .faq__accordion:after {
    content: '\002B';
    color: var(--primaryColor);
    font-weight: bold;
    float: right;
    margin-left: 5px;
  }

  .faq__active:after {
    content: "\2212";
  }

  .faq__panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
  }

  .faq__box {
    margin: 10px 0;
    border-radius: 20px;
    border: dashed 2px var(--darkblue);
  }

  .faq__answer {
    margin: 12px;
  }

  .faq__ul {
    list-style-type: circle;
  }

  .faq__a {
    color: var(--darkblue);
    text-decoration: underline;
    font-weight: bold;
  }

  .faq__a:hover {
    background-color: transparent;
  }

  /* counter */
  .counter__grid {
    display: grid;
    grid-template-columns: repeat(4, 25%);
    text-align: center;
    margin-top: 24px;
  }

  .counter {
    border-style: solid;
    border-width: 2px;
    border-color: var(--primaryColor);
    margin: 24px;
  }

  .counter__i {
    font-size: 2em;
    color: var(--primaryColor);
    background-color: var(--darkGray);
    padding: 10px 24px;
    position:relative;
    top:-30px;
  }

  .counter__p {
    padding-bottom: 20px;
  }

  .odometer {
    color: white;
    font-size:36px;
    margin-top: -12px;
  }

  /* contact */
  .contact__i {
    color: mediumseagreen;
    font-size: 1.2em;
  }

  /* pages */
  .course__menu, .course__intro {
    margin: 0 1em;
  }

  .course__chapter {
    color: var(--primaryColor);
  }

  .course__key {
    color: white;
    margin: 0 1em;
  }

  .course__ul--key {
    list-style-type: disc;
  }

  .course__grid--link {
    display: grid;
    grid-template-columns: auto auto auto;
    border: 1px solid lightgray;
  }

  .download__grid {
    display: grid;
    grid-template-columns: auto auto;
  }

  .download__box {
    position: relative;
    border: 1px solid black;  
    margin: 1em;
  }

  .download__box--python {
    position: relative;
    border: 1px solid white;  
    margin: 1em;
  }

  .download__img {
    width: 100px;
    padding: 10px;
    background-color: white;
    position:relative;
    top:-36px;
  }

  .download__img--mac {
    width: 100px;
    padding: 10px;
    background-color: mediumseagreen;
    position:relative;
    top:-36px;
  }

  .download__system {
    margin-top: -40px;
  }

  .download__btn {
    background-color: var(--darkblue);
    padding: 20px 60px 10px 60px;
    border-radius: 5px;
    border: solid 2px white;
  }

  .download__btn--disable {
    background-color: gray;
    padding: 20px 60px 10px 60px;
    border-radius: 5px;
  }

  .download__i {
    color: white;
    font-size: 36px;
  }

  .download__i--cloud {
    color: var(--darkblue);
    font-size: 1.5em;
  }

  .download__i--cloud:hover {
    color: var(--orange);
  }

  .download__a:hover{
    background-color: transparent;  
  }

  .download__btn--disable:hover{
    background-color: grey;  
    cursor: not-allowed;
  }

  /* step */
  .step__grid {
    display: grid;
    grid-template-columns: 45% 10% 45%;
    grid-template-rows: auto auto;
  }

  .step__box1 { grid-area: 1 / 1 / 2 / 2; }
  .step__box2 { grid-area: 1 / 2 / 2 / 3; }
  .step__box3 { grid-area: 1 / 3 / 2 / 4; }
  .step__box4 { grid-area: 2 / 1 / 3 / 2; }
  .step__box5 { grid-area: 2 / 2 / 3 / 3; }
  .step__box6 { grid-area: 2 / 3 / 3 / 4; }

  .step__content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
  }

  div[class^="step__box"]{
    position: relative;
  } 

  .step__ruler {
    position: absolute;
    background-color: white;
    width: 6px;
    height: 100%;
    left: 50%;
    margin-left: -3px;
  }

  .step__circle {
    position: absolute;
    top: 15%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: white;
    border: 4px solid var(--orange);
    border-radius: 50%;
    z-index: 11;
    margin-left: -24px;
  }

  .step__number {
    position: absolute;
    left: 50%;
    margin-left: -10px;
    font-size: 30px;
    font-weight: bold;
    color: var(--primaryColor);
  }
  
  .step__arrow--left {
    height: 0;
    width: 0;
    position: absolute;
    top: 15%;
    z-index: 11;
    right: 0;
    border: medium solid white;
    border-width: 24px 24px 24px 0;
    border-color: transparent white transparent transparent;
  }

  .step__arrow--right {
    height: 0;
    width: 0;
    position: absolute;
    top: 15%;
    z-index: 11;
    left: 0;
    border: medium solid white;
    border-width: 24px 0 24px 24px;
    border-color: transparent transparent transparent white;
  }

  .step__empty {
    display: none;
  }

  /* globe page related */
  .globe__grid--link {
    display: grid;
    grid-template-columns: auto auto;
    border: 1px solid white;
  }

  /*-----------------------End of index page grid areas -----------------------*/

  @media screen and (max-width: 1200px) {
      .wrapper {
        width: 90%;
      }
  }


  @media screen and (max-width: 900px) {
      
      header {
          grid-template-columns: auto;
      }
    
      .header__ul {
        float: left;
        display: inline-block;
        white-space: nowrap;
      }

      .header__hr {
        display: block;
      }

      .header__logo {
        text-align: center;
      }

      .header__sublogo {
        display: none;
      }
  
      .feature__grid {
          grid-template-columns: repeat(2, auto);
          grid-template-rows: repeat(3, auto);
      }  

      .counter__grid {
          grid-template-columns: 50% 50%;
          grid-template-rows: 50% 50%;
      }

      .step__grid {
        grid-template-columns:12% 88%;
      }

      .step__empty {
        display: initial;
      }

      .step__box3, .step__box4, .step__arrow--right {
        display: none;
      }

      .step__box1, .step__box6 {
        margin: 10px 0;
      }

      .step__box1 { grid-area: 1 / 2 / 2 / 3; }
      .step__box2 { grid-area: 1 / 1 / 2 / 2; }
      .step__box5 { grid-area: 2 / 1 / 3 / 2; }
      .step__box6 { grid-area: 2 / 2 / 3 / 3; }

      .step__arrow--left {
        border-width: 12px 12px 12px 0;
        top: 18%;
      }
  }


  @media screen and (max-width: 600px) {

  /* cancel shadow effects on phone */
  /*
      .shadow, .shadow--scratch {
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
      }
  */    
  /* ------------------------------ */    
  
      .header__nav, .header__ul, .header__li, .header__tab { 
          display: none;
      }

      .header__nav--mobile, .header__tab--mobile {   
          display: block;
      }

      .header__tab--mobile {
          text-align: center;
          color: white;
      }

      .about__grid {
        grid-template-columns: auto;
      }

      .feature__grid {
        grid-template-columns: 100%;
        grid-template-rows: repeat(5, auto);
      }  

      .counter__grid {
        grid-template-columns: 100%;
        grid-template-rows: repeat(4, auto);
      }
      
      .download__grid {
        display: grid;
        grid-template-columns: auto;
      }

      /* info */
      .info__grid {
        grid-template-columns: auto;
      }

      .info__grid > div {
        grid-area: auto;
      }

      .info__plus, .info__or{
        position: static;
        margin: 0 auto;
        top: initial;
        left: initial;
        transform: initial;
      }

      .step__grid {
        grid-template-columns:15% 85%;
      }
  }

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */
}

.clearfix:after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    /* Black prints faster */
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  /*
     * Printing Tables:
     * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
     */
  thead {
    display: table-header-group;
  }
  tr,
  img {
    page-break-inside: avoid;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
}

