/* LEGAL PACK v1 - minimal, scoped, host-friendly (premium typography) */

html.legal-lock,
body.legal-lock { overflow: hidden; }

.legal{
  position: fixed;
  inset: 0;
  z-index: 9999;

  /* keep host font-family, but control sizing for premium compact reading */
  font: inherit;
  color: inherit;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.legal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.45);
}

.legal__panel{
  position:relative;
  margin: min(6vh, 48px) auto;
  width: min(980px, calc(100% - 48px));
  max-height: calc(100% - 2 * min(6vh, 48px));
  overflow:auto;

  background: var(--legal-surface, #fff);
  color: var(--legal-text, inherit);
  border-radius: var(--legal-radius, 16px);
  box-shadow: var(--legal-shadow, 0 20px 60px rgba(0,0,0,.25));
}

.legal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.legal__title{
  margin:0;
  font: inherit;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: .2px;
}

.legal__close{
  cursor:pointer;
  font: inherit;
  border: 1px solid rgba(0,0,0,.15);
  background: transparent;
  padding: 6px 10px;
  border-radius: 10px;
  line-height: 1;
}

.legal__tabs{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.legal__tab{
  cursor:pointer;
  font: inherit;
  border: 1px solid rgba(0,0,0,.15);
  background: transparent;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: .95em;
  line-height: 1.1;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.legal__tab.is-active{
  border-color: rgba(0,0,0,.35);
  box-shadow: 0 0 0 2px rgba(0,0,0,.08);
}

.legal__content{ padding: 16px; }

/* Premium hierarchy */
.legal__content h3{
  margin: 0 0 10px;
  font-size: 1.2em;
  font-weight: 800;
  letter-spacing: .2px;
}

.legal__content h4{
  margin: 14px 0 8px;
  font-size: .98em;
  font-weight: 700;
  letter-spacing: .15px;
}

.legal__content p,
.legal__content li{
  opacity: .92;
  line-height: 1.6;
  font-size: 1em;
}

.legal__content p{
  margin: 0 0 10px;
}

.legal__content ul{
  margin: 8px 0 0;
  padding-left: 18px;
}

.legal__content li{
  margin: 6px 0;
}

/* Make key/value lines feel cleaner if you render them as <p><strong>Label</strong> : value</p> */
.legal__content strong{
  font-weight: 700;
}

/* Scrollbar (subtle) */
.legal__panel::-webkit-scrollbar{
  width: 10px;
}
.legal__panel::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.14);
  border-radius: 10px;
  border: 3px solid rgba(255,255,255,.9);
}
.legal__panel::-webkit-scrollbar-track{
  background: transparent;
}

@media (max-width: 640px){
  .legal__panel{ width: calc(100% - 18px); }
  .legal{ font-size: 13.5px; }
  .legal__content{ padding: 14px; }
}
