.legal-hero__content{
  display:grid;
  margin-top:var(--hm-space-4);
  grid-template-columns:minmax(0,1fr) auto;
  gap:var(--hm-space-5);
  align-items:end;
}

.legal-hero__content>div{
  min-width:0;
}

.legal-hero h1{
  margin-bottom:var(--hm-space-2);
}

.legal-hero__lead{
  max-width:760px;
  margin-bottom:0;
  color:var(--hm-muted);
  font-size:var(--hm-fs-3);
}

.legal-version{
  display:flex;
  min-width:0;
  padding:var(--hm-space-2);
  flex-direction:column;
  gap:var(--hm-space-1);
  border:1px solid var(--hm-line-strong);
  border-radius:var(--hm-radius-md);
  background:var(--hm-soft);
}

.legal-version span{
  color:var(--hm-muted);
  font-family:var(--hm-font-mono);
  font-size:var(--hm-fs-0);
  letter-spacing:.08em;
  text-transform:uppercase;
}

.legal-version strong{
  color:var(--hm-ink);
  font-family:var(--hm-font-mono);
  font-size:var(--hm-fs-1);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.legal-main{
  background:var(--hm-light);
}

.legal-layout{
  display:grid;
  grid-template-columns:minmax(190px,260px) minmax(0,1fr);
  gap:var(--hm-space-5);
  align-items:start;
}

.legal-layout>*{
  min-width:0;
}

.legal-rail{
  position:sticky;
  top:calc(var(--hm-header-height) + var(--hm-space-3));
}

.legal-rail__panel{
  padding:var(--hm-space-2);
  border:1px solid var(--hm-line);
  border-radius:var(--hm-radius-md);
  background:var(--hm-white);
}

.legal-rail__title{
  margin-bottom:var(--hm-space-2);
  color:var(--hm-ink);
  font-family:var(--hm-font-heading);
  font-weight:650;
}

.legal-rail nav{
  display:grid;
  gap:var(--hm-space-1);
}

.legal-rail a{
  padding-block:4px;
  color:var(--hm-muted);
  font-size:var(--hm-fs-1);
  line-height:1.45;
}

.legal-rail a:hover{
  color:var(--hm-orange-dark);
}

.legal-document{
  width:100%;
  max-width:var(--hm-container-narrow);
  min-width:0;
  font-size:var(--hm-fs-3);
  line-height:1.7;
}

.legal-document a:not(.c-btn){
  color:var(--hm-orange-dark);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}

.legal-document a:not(.c-btn):hover{
  color:var(--hm-ink);
}

.legal-summary{
  margin-bottom:var(--hm-space-4);
}

.legal-summary strong{
  display:block;
  margin-bottom:var(--hm-space-1);
  color:var(--hm-ink);
}

.legal-summary p{
  margin-bottom:0;
}

.legal-section{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:var(--hm-space-2);
  padding:var(--hm-space-4) 0;
  border-top:1px solid var(--hm-line-strong);
  scroll-margin-top:calc(var(--hm-header-height) + var(--hm-space-2));
}

.legal-summary+.legal-section{
  padding-top:0;
  border-top:0;
}

.legal-section__number{
  display:grid;
  width:34px;
  height:34px;
  place-items:center;
  border:1px solid var(--hm-line-strong);
  border-radius:var(--hm-radius-sm);
  color:var(--hm-positive);
  background:var(--hm-amber-pale);
  font-size:var(--hm-fs-0);
}

.legal-section__body{
  min-width:0;
}

.legal-section h2{
  margin-bottom:var(--hm-space-3);
}

.legal-section h3{
  margin-bottom:var(--hm-space-1);
}

.legal-section p{
  margin-bottom:var(--hm-space-2);
}

.legal-section p:last-child{
  margin-bottom:0;
}

.legal-data-grid,
.legal-control-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--hm-space-2);
  margin:var(--hm-space-3) 0;
}

.legal-data-grid>*,
.legal-control-grid>*{
  min-width:0;
}

.legal-data-card,
.legal-control-grid>div{
  padding:var(--hm-space-2);
  border:1px solid var(--hm-line);
  border-radius:var(--hm-radius-md);
  background:var(--hm-white);
}

.legal-data-card p,
.legal-control-grid p{
  margin-bottom:0;
  color:var(--hm-muted);
}

.legal-purpose-list{
  display:grid;
  gap:0;
  margin:var(--hm-space-3) 0;
  border:1px solid var(--hm-line);
  border-radius:var(--hm-radius-md);
  background:var(--hm-white);
}

.legal-purpose-list>div{
  display:grid;
  grid-template-columns:minmax(max-content,140px) minmax(0,1fr);
  gap:var(--hm-space-2);
  padding:var(--hm-space-2);
  border-bottom:1px solid var(--hm-line);
}

.legal-purpose-list>div:last-child{
  border-bottom:0;
}

.legal-purpose-list dt{
  color:var(--hm-ink);
  font-weight:650;
}

.legal-purpose-list dd{
  min-width:0;
  margin:0;
  color:var(--hm-muted);
}

.legal-document .c-table-scroll{
  margin:var(--hm-space-3) 0;
}

.legal-document .c-table{
  font-size:var(--hm-fs-2);
  line-height:var(--hm-lh-body);
}

.legal-list{
  margin:var(--hm-space-3) 0;
  padding-left:1.25rem;
}

.legal-list li{
  margin-bottom:var(--hm-space-2);
  padding-left:var(--hm-space-1);
}

.legal-list li:last-child{
  margin-bottom:0;
}

.legal-rights{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--hm-space-2);
  margin:var(--hm-space-3) 0;
}

.legal-rights>div{
  min-width:0;
  padding:var(--hm-space-2);
  border:1px solid var(--hm-line);
  border-radius:var(--hm-radius-md);
  background:var(--hm-white);
}

.legal-rights span{
  display:inline-flex;
  margin-bottom:var(--hm-space-1);
  padding:4px 7px;
  border:1px solid var(--hm-line-strong);
  border-radius:var(--hm-radius-sm);
  color:var(--hm-positive);
  background:var(--hm-amber-pale);
  font-size:var(--hm-fs-0);
}

.legal-rights p{
  margin-bottom:0;
  color:var(--hm-muted);
}

.legal-actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--hm-space-2);
  margin-top:var(--hm-space-3);
}

.legal-cta{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:var(--hm-space-4);
  align-items:center;
  padding:var(--hm-space-4);
  border:1px solid var(--hm-line-strong);
  border-radius:var(--hm-radius-lg);
  background:var(--hm-amber-soft);
}

.legal-cta>div{
  min-width:0;
}

.legal-cta h2{
  margin-bottom:var(--hm-space-2);
}

.legal-cta p{
  max-width:700px;
  margin-bottom:0;
  color:var(--hm-muted);
  font-size:var(--hm-fs-3);
}

.legal-cta__actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--hm-space-1);
  justify-content:flex-end;
}

@media (max-width:900px){
  .legal-hero__content{
    grid-template-columns:1fr;
    gap:var(--hm-space-3);
  }

  .legal-version{
    width:fit-content;
  }

  .legal-layout{
    grid-template-columns:1fr;
    gap:var(--hm-space-4);
  }

  .legal-rail{
    position:static;
  }

  .legal-rail nav{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .legal-document{
    max-width:none;
  }

  .legal-cta{
    grid-template-columns:1fr;
    gap:var(--hm-space-3);
  }

  .legal-cta__actions{
    justify-content:flex-start;
  }
}

@media (max-width:640px){
  .legal-version{
    width:100%;
  }

  .legal-version strong{
    white-space:normal;
  }

  .legal-rail nav,
  .legal-data-grid,
  .legal-control-grid,
  .legal-rights{
    grid-template-columns:1fr;
  }

  .legal-section{
    grid-template-columns:1fr;
  }

  .legal-section__number{
    width:32px;
    height:32px;
  }

  .legal-purpose-list>div{
    grid-template-columns:1fr;
    gap:var(--hm-space-1);
  }

  .legal-actions,
  .legal-cta__actions{
    flex-direction:column;
    align-items:stretch;
  }

  .legal-actions .c-btn,
  .legal-cta__actions .c-btn{
    width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
  }

  .legal-cta{
    padding:var(--hm-space-3);
  }
}

@media (max-width:390px){
  .legal-rail__panel,
  .legal-data-card,
  .legal-control-grid>div,
  .legal-rights>div{
    padding:var(--hm-space-2);
  }
}
