#hero {
  padding: 8rem calc((100vw - 72rem) / 2) 4rem;
  background: linear-gradient(to bottom, #E9F2FF, white 18rem);
  time  {
    margin: 0 2rem;
    color: #626E89;
    font-size: 1.125rem;
  }
  h1 {
    margin: 1rem 2rem 1em;
    font-size: clamp(1.75rem, 3vw + .9rem, 3rem);
  }
  img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 18 / 7;
    object-fit: cover;
    border-radius: clamp(0rem, 50vw - 36rem, 1rem);
  }
}

#hero + section {
  display: grid;
  grid: "content aside" auto / minmax(0, 1fr) 20rem;
  place-items: start stretch;
  gap: 4rem;
  padding: 0 max((100vw - 72rem) / 2 + 2rem, 2rem) 4rem;
  aside {
    grid-area: aside;
    background: #F1F6F8;
    margin: 0 clamp(-2rem, 72rem - 100vw, 0rem) 4rem 0;
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    border-radius: 1rem;
  }
  #toc {
    h2 {
      margin: 0 0 1em;
      padding: 2rem 2rem 1em;
      font-size: 1.625rem;
      border-bottom: 1px solid #9FB3BB;
    }
    nav {
      display: flex;
      flex-flow: column;
      padding: 0 2rem 2rem;
    }
    a {
      padding: .25em 0;
      color: black;
      text-decoration: none;
      &.header-h2 { font-size: 1.125rem; }
      &:is(:hover, :focus) { text-decoration: underline; }
    }
  }
  #cta {
    padding: 2rem;
    color: white;
    background-color: #1B2A37;
    h2 {
      margin: 0 0 1em;
      font-size: 1.5rem;
    }
    p {
      line-height: 1.25;
    }
    input[type="email"], button {
      display: block;
      width: 100%;
      box-sizing: border-box;
      border-radius: .5rem;
      padding: 1rem;
      margin: 1rem 0;
      border: none;
      font-size: 1rem;
      font-family: inherit;
    }
    input[type="email"], .cta-consent {
      margin-top: 2rem;
    }
    button {
      color: white;
      background-color: #0076DE;
      text-align: center;
      font-weight: 600;
      transition: opacity .2s;
      cursor: pointer;
      &:is(:hover, :focus){ opacity: .8; }
    }
    .cta-consent {
      display: block;
      font-size: .875rem;
      line-height: 1.25;
      a { color: inherit; }
    }
    input[type="checkbox"]{
      width: 1rem;
      height: 1rem;
      margin: 0 .5rem 0 0;
      vertical-align: center;
      accent-color: #0076DE;
    }
  }
  article {
    grid-area: content;
    h2 {
      margin: 2.5em 0 1em;
      font-size: clamp(1.5rem, 3vw + .8rem, 2rem);
      &:first-child { margin-top: 1em; }
    }
    h3 { margin: 2.5em 0 1em; }
    h4 { margin: 2em 0 1em; }
    & > blockquote {
      padding: 1.5rem 2rem;
      margin: 2rem 0;
      border-left: 3px solid;
      color: #5E6974;
      background: #F1F6F8;
      position: relative;
      font-weight: 500;
      border-radius: 0 .5rem .5rem 0;
      & > :first-child { margin-top: 0; }
      & > :last-child { margin-bottom: 0; }
    }
    img {
      max-width: 100%;
      height: auto;
      border-radius: .5rem;
    }
    & > img {
      display: block;
      width: auto;
      max-height: 25rem;
      margin: 2rem auto;
    }
    ul, ol {
      li { padding: .25rem .5rem; }
      ul, ol { margin: 1rem 0; }
    }
    simplecast-player, youtube-video, hr, ul, ol { margin: 2rem 0; }
    hr {
      border: none;
      height: 1px;
      background-color: #9aadb4;
    }
    a {
      color: #245aff;
      text-decoration: none;
      &:is(:hover, :focus) { text-decoration: underline; }
    }
    .columns {
      display: flex;
      flex-flow: row;
      gap: 2rem;
      .column {
        flex: 1 0 0;
        & > :first-child { margin-top: 0; }
        & > :last-child { margin-bottom: 0; }
      }
      &:has(p):has(img:first-child:last-child){
        .column:has(img:first-child:last-child){
          flex: 0 1 auto;
          max-width: 30%;
        }
      }
    }
    .callout-blue_background, .callout-gray_background {
      background-color: #f1f6f8;
      padding: 2rem 2.5rem;
      margin: 2rem 0;
      border-radius: .5rem;
      .callout-header { display: none; }
      .callout-header + * { margin-top: 0; }
      & > :first-child { margin-top: 0; }
      & > :last-child { margin-bottom: 0; }
    }
    pre[data-language]{
      background-color: #f1f6f8;
      overflow: auto;
      padding: 1rem 1.5rem;
      border-radius: .5rem;
    }
    .tweet {
      padding: 1.5rem 2rem;
      margin: 2rem 0;
      border: 1px solid #9FB3BB;
      border-radius: 1rem;
      & > a {
        float: right;
        color: black;
        padding: .5rem;
        margin: 0 -.5rem 1rem 0;
        border-radius: 2rem;
        text-decoration: none;
        transition: opacity .2s;
        &:is(:hover, :focus){ opacity: .8; }
        svg {
          width: 2rem;
          height: 2rem;
          vertical-align: center;
        }
        @media(width > 40rem){
          padding: .625rem 1rem;
          color: white;
          background: black;
          &::before {
            content: "View on ";
            content: "View on " / "";
          }
          svg {
            width: 1.5rem;
            height: 1.5rem;
          }
        }
      }
      cite {
        display: grid;
        grid: auto auto / 3rem 1fr;
        gap: 0 1rem;
        width: max-content;
        font-style: normal;
        img {
          grid-row: span 2;
          width: 3rem;
          height: 3rem;
          object-fit: cover;
          border-radius: 50%;
        }
        .tweet-username { font-weight: 600; }
        .tweet-handle { color: #536471; }
      }
      blockquote {
        margin: 2rem 0 0;
      }
      blockquote + figure {
        &:has(img:nth-child(2)){
          display: flex;
          flex-flow: row wrap;
          aspect-ratio: 2 / 1;
          img {
            flex: 1 0 50%;
            min-width: 0;
            object-fit: cover;
          }
        }
      }
      time {
        display: block;
        text-align: end;
        font-style: italic;
        color: #536471;
      }
    }
  }
  @media(width < 60rem){
    display: block;
    #toc {
      display: grid;
      grid: auto / auto 1fr;
      position: static;
      h2 {
        margin: 0;
        border: none;
      }
      nav { padding: 2rem; }
    }
    #cta { display: none; }
  }
  @media(width < 45rem){
    #toc {
      display: block;
      nav { padding-top: 0; }
    }
  }
}

.footer-cta {
  background-image: url("/-/layouts/story/footer-cta.svg?v=foCz13wWWc");
  color: white;
  a {
    padding: .875rem 1.5rem;
    border-radius: .5rem;
  }
  a:first-child {
    color: black;
    background: white;
    border: 2px solid white;
  }
  a:last-child {
    color: white;
    background: none;
    border: 2px solid #FFF8;
    transition: border-color .2s;
    &:hover {
      border-color: white;
      text-decoration: none;
    }
  }
}
