/* ============================================================
   TBB Academy: Terms and Conditions + Privacy Policy
   ~70ch reading column, numbered sections; the table of contents
   is sticky beside it on desktop and a boxed list above it on
   smaller screens. Shared UI is in tbb-academy-base.css.
   ============================================================ */

.tbb-ah.tbb-ah-legal { padding-block: 56px 96px; }

.tbb-ah .tbb-ah-legal__head { max-width: calc(736px + 96px); text-align: center; }
.tbb-ah .tbb-ah-legal__title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--tbb-ah-fg);
  text-wrap: balance;
}
.tbb-ah .tbb-ah-legal__updated { margin-top: 12px; font-size: 14px; color: var(--tbb-ah-subtle); }
.tbb-ah .tbb-ah-legal__intro { margin-top: 20px; font-size: 17px; line-height: 1.7; color: var(--tbb-ah-muted); text-wrap: pretty; }

.tbb-ah .tbb-ah-legal__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 736px);
  justify-content: center;
  gap: 56px;
  margin-top: 56px;
}
.tbb-ah .tbb-ah-legal__layout--no-toc { grid-template-columns: minmax(0, 736px); }

/* Table of contents */
.tbb-ah .tbb-ah-legal__toc {
  position: sticky;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px);
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.tbb-ah .tbb-ah-legal__toc-title { font-family: var(--tbb-ah-font-display); font-size: 13px; font-weight: 600; color: var(--tbb-ah-fg); }
.tbb-ah .tbb-ah-legal__toc ol { display: grid; gap: 2px; margin-top: 12px; border-left: 1px solid var(--tbb-ah-border); }
.tbb-ah .tbb-ah-legal__toc a,
.tbb-ah .tbb-ah-legal__toc a:is(:link, :visited) {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tbb-ah-muted);
  transition: color .2s, border-color .2s;
}
.tbb-ah .tbb-ah-legal__toc a:is(:hover, :focus-visible) { color: var(--tbb-ah-fg); border-left-color: var(--tbb-ah-edge-hover); }
.tbb-ah .tbb-ah-legal__toc a span { color: var(--tbb-ah-subtle); font-variant-numeric: tabular-nums; }

/* Body */
.tbb-ah .tbb-ah-legal__body { max-width: 70ch; font-size: 16px; line-height: 1.75; color: var(--tbb-ah-muted); }
.tbb-ah .tbb-ah-legal__summary { margin-bottom: 48px; padding: 24px; }
.tbb-ah .tbb-ah-legal__summary .tbb-ah-card__title { margin-top: 0; }
.tbb-ah .tbb-ah-legal__summary .tbb-ah-points { margin-top: 14px; }
.tbb-ah .tbb-ah-legal__summary .tbb-ah-points li { color: var(--tbb-ah-muted); }
.tbb-ah .tbb-ah-legal__note { margin-top: 14px; font-size: 13px; color: var(--tbb-ah-subtle); }

.tbb-ah .tbb-ah-legal__section { scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px); }
.tbb-ah .tbb-ah-legal__section + .tbb-ah-legal__section { margin-top: 40px; }
.tbb-ah .tbb-ah-legal__section h2 {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--tbb-ah-fg);
}
.tbb-ah .tbb-ah-legal__section h2 span { color: var(--tbb-ah-subtle); font-weight: 500; }
.tbb-ah .tbb-ah-legal__section p + p,
.tbb-ah .tbb-ah-legal__section p + ul,
.tbb-ah .tbb-ah-legal__section ul + p { margin-top: 14px; }
.tbb-ah .tbb-ah-legal__section ul { display: grid; gap: 6px; }
.tbb-ah .tbb-ah-legal__section li { position: relative; padding-left: 20px; }
.tbb-ah .tbb-ah-legal__section li::before {
  content: "";
  position: absolute;
  top: .7em;
  left: 4px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--tbb-ah-subtle);
  border-radius: 1px;
  transform: rotate(45deg);
}
.tbb-ah .tbb-ah-legal__body strong { font-weight: 600; color: var(--tbb-ah-fg); }
.tbb-ah .tbb-ah-legal__body :is(p, li) a:is(:link, :visited) {
  color: var(--tbb-ah-fg);
  text-decoration: underline;
  text-decoration-color: var(--tbb-ah-edge-hover);
  text-underline-offset: 3px;
  transition: color .2s;
}
.tbb-ah .tbb-ah-legal__body :is(p, li) a:is(:hover, :focus-visible) { color: var(--tbb-ah-brand); }

.tbb-ah .tbb-ah-legal__help { margin-top: 48px; }
.tbb-ah .tbb-ah-legal__help .tbb-ah-card__title { margin-top: 0; }

@media (min-width: 768px) {
  .tbb-ah.tbb-ah-legal { padding-top: 80px; }
  .tbb-ah .tbb-ah-legal__title { font-size: 48px; }
}
@media (max-width: 1023px) {
  .tbb-ah .tbb-ah-legal__layout { grid-template-columns: minmax(0, 736px); gap: 40px; margin-top: 40px; }
  .tbb-ah .tbb-ah-legal__toc {
    position: static;
    max-height: none;
    padding: 20px;
    border: 1px solid var(--tbb-ah-edge);
    border-radius: calc(var(--tbb-ah-radius) + 4px);
  }
}
