/**
 * legal.css: /security, /privacy, /terms and /dpa (ACT-248), ported from the design system's Actorly Security.dc.html and
 * ActorlyLegal.dc.html. Tokens only (design-tokens.css); sizes the tokens do not name are rem (1rem = 16px).
 * Two worlds, as on Home: html.mk is the animated page, without it every reveal is shown (no JavaScript, reduced motion).
 */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body.lg { margin: 0; background: var(--act-paper); color: var(--act-ink); font-family: var(--act-font-display); -webkit-font-smoothing: antialiased; }
.lg-root { overflow-x: clip; }
.lg-root :focus-visible { outline: 2px solid var(--act-ember-text); outline-offset: 3px; }
.lg [data-mk-mask] { padding-bottom: var(--act-mask-pad) !important; margin-bottom: calc(-1 * var(--act-mask-pad)) !important; }
html.mk [data-mk-fade] { opacity: 0; }
html.mk [data-mk-line] { transform: translateY(110%); }


/* hero */
.lg-hero { padding: 11.25rem var(--act-gutter) 3.5rem; }
.lg-narrow { max-width: 53.75rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.lg-wide { max-width: var(--act-content-max); margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
.lg-hero-center { padding-bottom: 5.625rem; }
.lg-kicker { font-size: .9375rem; font-weight: 650; color: var(--act-ember-text); }
.lg-h1 { margin: 0; font-variation-settings: var(--act-display-wdth); font-weight: var(--act-weight-display); font-size: clamp(2.5rem, 5.8vw, 5.75rem); line-height: var(--act-lh-h2); letter-spacing: var(--act-track-h2); }
.lg-h1-big { font-size: var(--act-h1); line-height: var(--act-lh-display); letter-spacing: var(--act-track-h1); }
.lg-lede { margin: 0; font-size: 1.1875rem; line-height: var(--act-lh-lede); color: var(--act-body); text-wrap: pretty; }
.lg-hero-center .lg-lede { font-size: var(--act-lede); max-width: 40rem; }
.lg-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9375rem; color: var(--act-body); }
.lg-meta a { color: var(--act-ink); font-weight: 600; text-decoration: none; }

/* the document */
.lg-sheet { background: var(--act-white); padding: 4.5rem var(--act-gutter) 7.5rem; }
.lg-sheet-wide { padding-top: var(--act-section-pad); padding-bottom: var(--act-section-pad); }
.lg-stack { gap: 2.5rem; }
.lg-toc { padding: 1.375rem 1.5rem; border-radius: 1.375rem; background: var(--act-paper); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .375rem 1.25rem; font-size: .9375rem; }
.lg-toc a { padding: .25rem 0; color: inherit; text-decoration: none; }
.lg-toc b { font-weight: 650; color: var(--act-ember-text); margin-right: .5rem; }
.lg-clause { scroll-margin-top: 6.875rem; display: flex; flex-direction: column; gap: .75rem; }
.lg-clause h2 { margin: 0; display: flex; gap: .75rem; font-size: 1.5rem; font-weight: 700; letter-spacing: var(--act-track-card); }
.lg-clause h2 span { color: var(--act-ember-text); }
.lg-clause p { margin: 0; font-size: var(--act-body-long); line-height: var(--act-lh-long); color: var(--act-body-strong); }
.lg-others { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding-top: 1.75rem; border-top: .0625rem solid var(--act-line); }
.lg-other { height: 3rem; padding: 0 1.25rem; border-radius: var(--act-radius-pill); box-shadow: var(--act-ring); font-size: .9375rem; font-weight: 600; display: flex; align-items: center; color: var(--act-ink); text-decoration: none; transition: box-shadow .25s ease; }
.lg-other:hover { box-shadow: var(--act-ring-hover); }

/* security */
.lg-cards-sec { padding: 0 var(--act-gutter) var(--act-section-pad); }
.lg-cards { max-width: var(--act-content-max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: 1rem; }
.lg-card { background: var(--act-white); border-radius: var(--act-radius-card); box-shadow: var(--act-ring); padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; }
.lg-card .t { font-size: 1.25rem; font-weight: 700; }
.lg-card .p { font-size: var(--act-body-size); line-height: var(--act-lh-body); color: var(--act-body); }
.lg-mid { max-width: 62.5rem; margin: 0 auto; display: flex; flex-direction: column; }
.lg-stack-big { gap: 4.5rem; }
.lg-block { display: flex; flex-direction: column; gap: 1.375rem; }
.lg-h2 { margin: 0; font-variation-settings: var(--act-display-wdth); font-weight: var(--act-weight-display); font-size: clamp(2.25rem, 4.6vw, 4.5rem); line-height: var(--act-lh-h2); letter-spacing: var(--act-track-h2); }
.lg-text { margin: 0; font-size: 1.0625rem; line-height: var(--act-lh-body); color: var(--act-body); }
.lg-measure { max-width: 60ch; }
.lg-ember { color: var(--act-ember-text); font-weight: 600; text-decoration: underline; text-underline-offset: .25rem; }
.lg-table { border-radius: 1.375rem; box-shadow: var(--act-ring); overflow: hidden; }
.lg-table .lg-row { padding: 1rem 1.375rem; border-bottom: .0625rem solid var(--act-line-soft); }
.lg-table .lg-row:last-child { border-bottom: 0; }
.lg-list { display: flex; flex-direction: column; gap: .625rem; }
.lg-list .lg-row { padding: 1rem 0; border-top: .0625rem solid var(--act-line-soft); }
.lg-list .lg-row:last-child { border-bottom: .0625rem solid var(--act-line-soft); }
.lg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; font-size: var(--act-body-size); }
.lg-row .k { font-weight: 650; }
.lg-row .v { color: var(--act-body); }
.lg-subs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr)); gap: .875rem; }
.lg-sub { padding: 1.5rem; border-radius: 1.375rem; background: var(--act-paper); display: flex; flex-direction: column; gap: .375rem; }
.lg-sub .t { font-size: 1.1875rem; font-weight: 700; }
.lg-sub .p { font-size: .9375rem; line-height: 1.55; color: var(--act-body); }

/* long-form legal documents (ACT-262) */
.lg-intro { margin: 0; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--act-paper); font-size: .9375rem; line-height: 1.55; color: var(--act-body); }
.lg-tocwrap { border-radius: 1.375rem; background: var(--act-paper); }
.lg-tocwrap > summary { cursor: pointer; padding: 1.125rem 1.5rem; font-weight: 700; font-size: 1.0625rem; display: flex; justify-content: space-between; gap: 1rem; list-style: none; }
.lg-tocwrap > summary::-webkit-details-marker { display: none; }
.lg-tocwrap > summary span { font-weight: 500; color: var(--act-body); font-size: .9375rem; }
.lg-tocwrap > summary:focus-visible { outline: .125rem solid var(--act-ember-text); outline-offset: .125rem; }
.lg-tocwrap .lg-toc { padding-top: 0; background: transparent; }
.lg-clause .n { display: inline-block; min-width: 2.5rem; margin-right: .25rem; font-size: .8125rem; font-weight: 650; color: var(--act-ember-text); font-variant-numeric: tabular-nums; }
.lg-clause li a { color: var(--act-ember-text); font-weight: 600; text-decoration: underline; text-underline-offset: .25rem; }
.lg-clause ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .5rem; font-size: var(--act-body-long); line-height: var(--act-lh-long); color: var(--act-body-strong); }
.lg-top { align-self: flex-start; font-size: .8125rem; color: var(--act-body); text-decoration: underline; text-underline-offset: .1875rem; }
.lg-dt { overflow-x: auto; border-radius: 1rem; box-shadow: var(--act-ring); }
.lg-dt table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.lg-dt th { text-align: left; padding: .75rem 1rem; background: var(--act-paper); font-weight: 650; }
.lg-dt td { padding: .75rem 1rem; vertical-align: top; border-top: .0625rem solid var(--act-line-soft); color: var(--act-body-strong); overflow-wrap: anywhere; }
.lg-dt td:first-child { font-weight: 600; }
.lg-h2-s { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
.lg-block { scroll-margin-top: 6.875rem; }
.lg-jump { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.lg-jump a { padding: .5rem .875rem; border-radius: var(--act-radius-pill); box-shadow: var(--act-ring); font-size: .875rem; font-weight: 600; color: var(--act-ink); text-decoration: none; }
.lg-jump a:hover { box-shadow: var(--act-ring-hover); }
@media (max-width: 40rem) {
  .lg-dt { overflow: visible; box-shadow: none; }
  .lg-dt table, .lg-dt tbody, .lg-dt tr, .lg-dt td { display: block; width: 100%; }
  .lg-dt thead { position: absolute; width: .0625rem; height: .0625rem; overflow: hidden; clip: rect(0 0 0 0); }
  .lg-dt tr { margin-bottom: .75rem; border-radius: 1rem; box-shadow: var(--act-ring); overflow: hidden; }
  .lg-dt td { border-top: 0; padding: .5rem 1rem; }
  .lg-dt td:first-child { background: var(--act-paper); }
  .lg-dt td:not(:first-child)::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 650; color: var(--act-ember-text); }
}
.lg-clause h2 span { white-space: nowrap; }

/* ---------------------------------------------------------------- phones (ACT-272)
   The legal pages and /security: the contents panel is closed by default (legal-motion.js), the hero and sheet paddings are cut,
   a row is a stacked key over its value, every link a 44px target. */
@media (max-width: 40rem) {
  .lg-hero { padding: 7rem var(--act-gutter) 1.75rem; }
  .lg-hero-center { padding-bottom: 2.5rem; }
  .lg-narrow { gap: 1rem; }
  .lg-wide { gap: 1.125rem; }
  .lg-h1 { font-size: clamp(2.5rem, 12.5vw, 3.25rem); }
  .lg-lede, .lg-hero-center .lg-lede { font-size: 1.0625rem; }
  .lg-meta { gap: .25rem 1rem; font-size: .875rem; }
  .lg-sheet { padding: 2.5rem var(--act-gutter) 4rem; }
  .lg-sheet-wide { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .lg-cards-sec { padding-bottom: 3rem; }
  .lg-stack { gap: 2rem; }
  .lg-stack-big { gap: 3rem; }
  .lg-block { gap: 1rem; scroll-margin-top: 5.5rem; }
  .lg-h2, .lg-h2-s { font-size: clamp(1.875rem, 8.6vw, 2.25rem); }
  .lg-text { font-size: 1rem; }
  .lg-card { padding: 1.25rem; border-radius: 1.25rem; }
  .lg-card .t { font-size: 1.125rem; }
  .lg-sub { padding: 1.125rem; }
  .lg-row { grid-template-columns: minmax(0, 1fr); gap: .125rem; line-height: 1.55; }
  .lg-row .k { font-size: .9375rem; }
  .lg-row .v { font-size: .9375rem; }
  .lg-table .lg-row { padding: .875rem 1.125rem; }

  .lg-jump { justify-content: flex-start; gap: .5rem; margin-top: 1rem; }
  .lg-jump a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1rem; }
  .lg-intro { padding: .875rem 1rem; font-size: .875rem; }
  .lg-tocwrap > summary { min-height: 3.5rem; align-items: center; padding: .75rem 1.125rem; }
  .lg-toc { padding: .25rem 1.125rem 1rem; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lg-toc a { display: flex; align-items: baseline; min-height: 2.75rem; padding: .5rem 0; line-height: 1.3; }
  .lg-toc b { min-width: 1.75rem; flex: none; }
  .lg-clause { gap: .625rem; scroll-margin-top: 5.5rem; }
  .lg-clause h2 { font-size: 1.3125rem; line-height: 1.15; gap: .625rem; }
  .lg-clause p, .lg-clause ul { font-size: 1rem; line-height: 1.65; }
  .lg-clause .n { display: block; min-width: 0; margin: 0 0 .125rem; }
  .lg-top { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .875rem; }
  .lg-others { flex-direction: column; gap: .5rem; padding-top: 1.25rem; }
  .lg-other { height: 3.25rem; justify-content: center; }
  .lg-dt td { font-size: .9375rem; }
}
@media (max-width: 40rem) {
  /* the jump chips are one scrolling strip, not six wrapped rows (the strip bleeds to the screen edge so the cut-off chip says "more") */
  .lg-jump { align-self: stretch; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--act-gutter)); padding-inline: var(--act-gutter); padding-bottom: .375rem; scroll-snap-type: x proximity; scrollbar-width: none; }
  .lg-jump::-webkit-scrollbar { display: none; }
  .lg-jump a { flex: none; scroll-snap-align: start; }
  .lg-jump::after { content: ""; flex: none; width: 1.5rem; } /* end spacer: the last chip scrolls clear of the screen edge */
  .lg-jump { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent); }
}
