/* SHARED LEGAL PAGES: terms + privacy */

:root{
  --legal-sticky-top: 96px;
}

.legal-note{
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
}

.legal-note--section-intro{
  margin: 0 0 40px;
}

.legal-layout__grid{
  display:grid;
  grid-template-columns: minmax(0, 890px) 202px;
  gap: 72px;
  align-items:start;
}

.legal-sidebar{
  position: sticky;
  top: var(--legal-sticky-top);
  align-self:start;
  display:block;
}

.legal-sidebar .legal-help{
  margin-top: 16px;
}

.legal-toc{
  background:#fff;
  padding: 14px 14px 12px;
}

.legal-toc__title{
  margin: 0;
}

.legal-toc__line{
  height: 1px;
  background: rgba(12,22,48,0.10);
  margin: 10px 0 8px;
}

.legal-toc__list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.legal-toc__heading{
  margin: 0;
}

.legal-toc__heading a{
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
}

.legal-toc__heading a:focus,
.legal-toc__heading a:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}

.legal-toc__heading:focus-within{
  outline: none !important;
}

.legal-toc__heading a:-moz-focusring{
  outline: none !important;
}

.legal-toc a,
.legal-toc-float a{
  outline: none !important;
}

.legal-toc :focus,
.legal-toc :focus-visible,
.legal-toc-float :focus,
.legal-toc-float :focus-visible{
  outline: none !important;
  box-shadow: none !important;
}

.legal-toc__heading.is-active{
  color:#1A83D4;
  font-weight: 500;
}

.legal-help{
  border-radius: 16px;
  background: #2f61e6;
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.legal-help__title{
  margin: 0;
  color: var(--bg);
}

.legal-help__text{
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: .92;
}

.legal-help__btn{
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  color: #1A83D4;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.0);
  box-shadow: none;
}

.legal-toc-float{
  display:none;
}

.legal-help--mobile{
  display:none;
}

@media (max-width: 980px){
  .legal-layout__grid{
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-sidebar{
    display:none;
  }

  .legal-help--mobile{
    display:block;
    margin: 18px 0 6px;
  }

  .legal-toc-float{
    display:block;
    position: fixed;
    left: 50%;
    top: var(--legal-sticky-top);
    transform: translate(-50%, -8px);
    width: calc(100% - 24px);
    max-width: 360px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 50;
  }

  .legal-toc-float.is-visible{
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .legal-toc-float__card{
    background:#fff;
    border: 1px solid rgba(12,22,48,0.14);
    border-radius: 12px;
    padding: 12px 12px 10px;
    box-shadow: none;
  }

  .legal-toc-float__head{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
  }

  .legal-toc-float__title{
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    color: #0b1a37;
  }

  .legal-toc-float__close{
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(12,22,48,0.12);
    background:var(--surface-soft);
    cursor:pointer;
    position: relative;
  }

  .legal-toc-float__close::before,
  .legal-toc-float__close::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width: 12px;
    height: 2px;
    background: rgba(11,26,55,0.65);
    transform-origin:center;
  }

  .legal-toc-float__close::before{ transform: translate(-50%,-50%) rotate(45deg); }
  .legal-toc-float__close::after{ transform: translate(-50%,-50%) rotate(-45deg); }

  .legal-toc__line{
    margin: 8px 0 8px;
  }
}
