a { color: var(--color-brand); }
  /* Fluid gutter: a fixed 24px each side is 15% of a 320px phone. */
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4.5vw, 24px) 80px; }
  .legal-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
  .logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: #0f172a; }
  .logo a { color: inherit; text-decoration: none; }
  .legal-nav-back { font-size: 14px; color: #64748b; text-decoration: none; }
  .legal-nav-back:hover { color: #0f172a; text-decoration: underline; }

  .legal-head { max-width: 720px; margin-bottom: 34px; }
  h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.02em; margin: 28px 0 6px; color: #0f172a; }
  .legal-standfirst { font-size: 17px; line-height: 1.6; color: #475569; margin: 0; }

  /* Contents on the left, document on the right. The contents stick so a long
     policy can be jumped around without scrolling back to the top. */
  .legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 44px;
    align-items: start; }
  .legal-toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
    padding-right: 6px; }
  .legal-toc-title { display: block; margin-bottom: 10px; color: #64748b; font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  .legal-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
  .legal-toc li { counter-increment: toc; margin: 0; }
  .legal-toc a { display: block; padding: 5px 0 5px 26px; position: relative;
    color: #475569; font-size: 13.5px; line-height: 1.4; text-decoration: none; }
  .legal-toc a::before { content: counter(toc) "."; position: absolute; left: 0; top: 5px;
    color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
  .legal-toc a:hover { color: var(--color-brand-dark); }

  .legal-body { max-width: 720px; min-width: 0; }
  .legal-section { margin-bottom: 36px; scroll-margin-top: 24px; }
  h2 { font-size: 21px; margin: 0 0 10px; color: #0f172a; letter-spacing: -.01em;
    padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
  h3 { font-size: 16px; margin: 26px 0 6px; color: #0f172a; }
  p, li { color: #334155; line-height: 1.65; }
  p { margin: 10px 0; }
  ul { padding-left: 20px; margin: 10px 0; }
  li { margin: 6px 0; }
  .muted { color: #64748b; }
  .small { font-size: 14px; }
  strong { color: #0f172a; }

  /* The subprocessor table is two columns of prose. Left to itself on a 320px
     phone each column gets about 140px, which turns every row into a narrow
     ribbon of one or two words, so the pair keeps a readable minimum width and
     slides inside this box instead. Named for this page rather than reusing the
     admin's .table-scroll, which lives in a sheet the legal pages never load. */
  .legal-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; }
  .legal-table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 14px; }
  .legal-table th { text-align: left; padding: 8px 10px 8px 0; color: #64748b; font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--color-border); }
  .legal-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid #f1f5f9;
    color: #334155; vertical-align: top; }
  .legal-table td strong { font-weight: 650; }

  footer { border-top: 1px solid var(--color-border); margin-top: 48px; padding-top: 22px;
    color: #64748b; font-size: 14px; }
  footer a { text-decoration: none; }
  footer a:hover { text-decoration: underline; }

  @media (max-width: 860px) {
    .legal-layout { grid-template-columns: 1fr; gap: 24px; }
    /* On a phone a sticky rail would eat the screen, so the contents become a
       plain wrapped list at the top and the document reads full width. */
    .legal-toc { position: static; max-height: none; overflow: visible; padding: 14px 16px;
      background: #fff; border: 1px solid var(--color-border); border-radius: 12px; }
    .legal-toc ol { display: flex; flex-wrap: wrap; gap: 2px 14px; }
    .legal-toc a { padding: 3px 0 3px 24px; }
    .legal-body { max-width: none; }
  }

  /* Phone tier. An 80px bottom gutter is a desktop reading margin; on a 320px
     screen it is a fifth of the viewport spent on nothing. */
  @media (max-width: 560px) {
    .wrap { padding-bottom: 48px; }
    .legal-nav { padding: 14px 0; }
    .legal-head { margin-bottom: 24px; }
    h2 { font-size: 19px; }
    h3 { font-size: 15.5px; margin: 22px 0 5px; }
    .legal-section { margin-bottom: 28px; }
    .legal-toc { padding: 12px 14px; }
    footer { margin-top: 34px; }
  }
