/* ==========================================================================
   Terms & Conditions — page-specific overrides of the legal template
   ========================================================================== */
.legal--terms .legal-mast { box-shadow: none; }
.legal--terms .legal-mast__inner { min-height: 240px; padding-block: 41px; }
.legal--terms .legal-mast__lead { flex-grow: 1; flex-basis: 900px; }
.legal--terms .legal-mast__meta { font-weight: 500; }
.legal--terms .legal-mast__eyebrow { color: var(--legal-text); }
.legal--terms .legal-mast__title { gap: 0; font-size: 72px; line-height: 64px; }
.legal--terms .legal-mast__aside { flex-basis: 380px; }
.legal-mast__facts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: var(--legal-text);
  font: 500 11px/14px var(--f-sans);
  text-align: right;
  text-transform: uppercase;
}

/* Utility bar */
.legal--terms .legal-bar { box-shadow: inset 0 1px 0 var(--legal-rule), inset 0 -1px 0 var(--legal-rule); }
.legal-bar__label { color: var(--legal-text); font: 600 12px/16px var(--f-sans); text-transform: uppercase; white-space: nowrap; }
.legal-bar__pipe { color: var(--legal-faint); font-weight: 400; }
.legal-bar__range { color: var(--c-accent); }
.legal--terms .legal-bar__link { font-size: 12px; line-height: 16px; }

/* Workspace */
.legal--terms .legal-body { padding-bottom: 80px; }
.legal--terms .legal-toc__head .legal-toc__title { font-weight: 600; }
.legal--terms .legal-toc__count { color: var(--legal-faint); font: 400 11px/14px var(--f-sans); text-transform: uppercase; }
.legal--terms .legal-toc__list { display: flex; flex-direction: column; gap: 2px; }
.legal--terms .legal-toc__link { padding: 10px 12px; color: var(--legal-soft); font-weight: 500; font-size: 12px; line-height: 16px; }
.legal--terms .legal-toc__link:hover { color: var(--c-ink); }
.legal--terms .legal-toc__link.is-active { color: var(--c-ink); font-weight: 700; }
.legal--terms .legal-toc__link.is-active .legal-toc__num { color: inherit; }

/* Sections 13–19 sit in a slightly narrower measure; section 13 continues section 12 without a break */
.legal-sec--narrow > * { max-width: 680px; }
.legal-sec--narrow::after { width: 100%; max-width: 680px; }
.legal-sec--joined { margin-top: -40px; }
.legal-part-rule { height: 1px; margin: -40px 0 -1px; border: 0; background: var(--legal-rule); }

@media (max-width: 1199.98px) {
  .legal--terms .legal-mast__title { font-size: 64px; line-height: 58px; }
}

@media (max-width: 1023.98px) {
  .legal--terms .legal-mast__lead,
  .legal--terms .legal-mast__aside { flex: none; }
  .legal-mast__facts { align-items: flex-start; text-align: left; }
  .legal-sec--joined { margin-top: 0; }
}

@media (max-width: 767.98px) {
  /* Masthead: labels, title, facts; the utility bar continues it on paper */
  .legal--terms .legal-mast__inner { gap: 24px; padding: 32px 20px 24px; }
  .legal--terms .legal-mast__lead { gap: 24px; }
  .legal--terms .legal-mast__meta { gap: 6px; }
  .legal--terms .legal-mast__eyebrow { color: var(--c-accent); font-weight: 600; }
  .legal--terms .legal-mast__kicker { color: var(--legal-text); opacity: .6; }
  .legal--terms .legal-mast__title { gap: 4px; font-size: 48px; line-height: 43px; }
  .legal-mast__facts { gap: 4px; opacity: .8; }

  .legal--terms .legal-bar { background: var(--c-paper); box-shadow: none; }
  .legal--terms .legal-bar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px 16px;
    padding-block: 24px 32px;
    background: linear-gradient(var(--c-dark-line), var(--c-dark-line)) var(--pad-x) 0 / calc(100% - var(--pad-x) * 2) 1px no-repeat;
  }
  .legal--terms .legal-bar__label { display: block; color: var(--legal-text); font-weight: 700; }
  .legal--terms .legal-bar__pipe,
  .legal--terms .legal-bar__range { color: inherit; font-weight: inherit; }
  .legal--terms .legal-bar__link { color: var(--c-accent); font-weight: 700; }
  .legal--terms .legal-bar__link--top {
    grid-column: 1 / -1;
    justify-self: end;
    color: var(--legal-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    opacity: .5;
  }

  /* Contents */
  .legal--terms .legal-toc { padding: 32px 0; }
  .legal--terms .legal-toc__head .legal-toc__title { color: var(--c-ink); font: 700 14px/19px var(--f-narrow); }
  .legal--terms .legal-toc__count { color: var(--legal-text); }
  .legal--terms .legal-toc__link { color: var(--legal-text); font-size: 13px; line-height: 17px; }
  .legal--terms .legal-toc__num { flex-basis: 20px; }
  .legal--terms .legal-rail { display: none; }

  /* Sections */
  .legal--terms .legal-sec { --sec-gap: 24px; padding: 40px 0; }
  .legal--terms .legal-sec::after { content: none; }
  .legal--terms .legal-sec__head { padding-bottom: 0; }
  .legal--terms .legal-p { line-height: 22px; }
  .legal--terms .legal-defs { gap: 16px; font-size: 14px; line-height: 20px; }
  .legal--terms .legal-clauses { gap: 18px; }
  .legal--terms .legal-clause { gap: 12px; }
  .legal--terms .legal-clause__num { flex-basis: 32px; }
  .legal--terms .legal-clause__text { font-size: 14px; line-height: 20px; }
  .legal--terms #general .legal-clause__num,
  .legal--terms #authorisation .legal-clause__num,
  .legal--terms #account-verification .legal-clause__num,
  .legal--terms .legal-sec--narrow .legal-clause__num { flex-basis: 28px; }
  .legal--terms .legal-sec--narrow .legal-sec__title { font-size: 20px; line-height: 27px; }

  /* 20–25: stacked heading, no separators */
  .legal--terms .legal-sec--inline { --sec-gap: 20px; padding: 32px 0; }
  .legal--terms .legal-sec.legal-sec--inline::after { content: none; }
  .legal--terms .legal-sec--inline .legal-sec__head { flex-direction: column; align-items: stretch; gap: 8px; }
  .legal--terms .legal-sec--inline .legal-sec__head::after { content: ''; }
  .legal--terms .legal-sec--inline .legal-sec__num { flex: none; }
  .legal--terms .legal-sec--inline .legal-sec__body { gap: 20px; }
  .legal--terms .legal-clauses--accent { gap: 16px; }
  .legal--terms .legal-clauses--accent .legal-clause__num { color: var(--c-ink); }
  .legal--terms .legal-clauses--accent .legal-clause__text { line-height: 20px; }
  .legal--terms .legal-link--narrow { padding: 8px 0 0; }
  .legal--terms .legal-link--narrow .legal-link__a { gap: 4px; font-size: 13px; line-height: 18px; }
  .legal--terms .legal-link--narrow .icon { width: 12px; height: 12px; }
}
