/* BalancePoint Terms and Conditions */

.terms-shell {
  min-height: 100vh;
  background: var(--screen-bg);
}

.terms-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: .85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.terms-header .brand-lockup {
  margin-bottom: 0;
  color: var(--ink);
}

.terms-main {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
}

.terms-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.terms-eyebrow {
  margin: 0 0 .45rem;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.terms-title {
  margin: 0 0 .45rem;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.6vw, 2.45rem);
  font-weight: 700;
  line-height: 1.1;
}

.terms-meta {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.terms-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.terms-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.terms-summary > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .35rem .65rem;
  min-height: 96px;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terms-summary .lucide {
  grid-row: span 2;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .1rem;
  color: var(--accent);
}

.terms-summary strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}

.terms-summary span {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}

.terms-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.terms-toc-wrap {
  position: sticky;
  top: 84px;
}

.terms-toc {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terms-toc-heading {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.terms-toc-list {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms-toc-list a {
  display: block;
  padding: .45rem .55rem;
  border-radius: 6px;
  color: #435166;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
}

.terms-toc-list a:hover {
  background: #edf3f8;
  color: #17202a;
}

.terms-toc-list a.active {
  background: #eefbfe;
  color: #287fbd;
  font-weight: 700;
  box-shadow: inset 2px 0 0 var(--accent);
}

.terms-body {
  display: grid;
  gap: .85rem;
}

.terms-body section {
  scroll-margin-top: 92px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 38, 63, .06);
}

.terms-body h2 {
  margin: 0 0 .8rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.terms-body p,
.terms-body li,
.terms-body address {
  color: #3a4a5c;
  font-size: .96rem;
  line-height: 1.65;
}

.terms-body p {
  margin: 0 0 .8rem;
}

.terms-body p:last-child {
  margin-bottom: 0;
}

.terms-body ul {
  display: grid;
  gap: .4rem;
  margin: 0 0 .85rem;
  padding-left: 1.25rem;
}

.terms-body address {
  margin: .35rem 0 0;
  font-style: normal;
}

.terms-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terms-footer-actions .btn,
.terms-hero-actions .btn {
  border-radius: 6px;
}

@media (max-width: 991.98px) {
  .terms-layout {
    grid-template-columns: 1fr;
  }

  .terms-toc-wrap {
    position: static;
  }

  .terms-toc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terms-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .terms-main {
    padding: 1rem 0 2rem;
  }

  .terms-hero,
  .terms-summary,
  .terms-layout,
  .terms-footer-actions {
    margin-right: 0;
    margin-left: 0;
  }

  .terms-hero,
  .terms-body section,
  .terms-toc,
  .terms-footer-actions,
  .terms-summary > div {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .terms-hero {
    flex-direction: column;
  }

  .terms-hero-actions,
  .terms-footer-actions {
    justify-content: stretch;
  }

  .terms-hero-actions .btn,
  .terms-footer-actions .btn {
    flex: 1 1 100%;
  }

  .terms-toc-list {
    grid-template-columns: 1fr;
  }
}
