/* The privacy policy and terms: look B, with the designer's note on ae-apps#95. Tokens come from the design system.
   Desktop: a 170 px index, a 34 px gap and the 714 px reading column. Below 960 px: the "On this page" row. */
.legal {
  --header-h: 78px; /* the design system's sticky header, measured; the index and the jumps sit below it */
  --row-h: 48px; /* the phone's "On this page" row, measured */
}
img { max-width: 100%; } /* as on the home page: the mark gives way on a narrow phone, so the button stays on the page */
.legal .site-header .col, .legal .site-foot .col { max-width: 918px; }

.layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 714px);
  column-gap: var(--space-7);
  max-width: 918px;
  margin: 0 auto;
  padding: var(--space-8) 0 var(--space-11);
  align-items: start;
}
.legal .site-foot .col { padding-left: 204px; border-top: 0; position: relative; }
.legal .site-foot .col::before { content: ""; position: absolute; top: 0; left: 204px; right: 0; border-top: 1px solid var(--line); }

/* The index. The current section gets near-black text and a green bar; legal.js marks it. */
.index { position: sticky; top: calc(var(--header-h) + var(--space-5)); }
.index ul, .on-page ul { list-style: none; padding: 0; }
.index ul { border-left: 1px solid var(--line); }
.index a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px var(--space-3);
  border-left: 3px solid transparent;
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--text-3);
  text-decoration: none;
}
.index a:hover { color: var(--text); }
.index a[aria-current] { color: var(--text); border-left-color: var(--accent); }

/* The phone's row. Sits under the sticky header, and the list can scroll on a short screen. */
.on-page { display: none; }

/* The words. */
article { overflow-wrap: break-word; min-width: 0; }
article h1 { margin-bottom: var(--space-2); }
.updated { font-size: var(--size-small); color: var(--text-3); margin-bottom: var(--space-5); }
article section { margin-top: var(--space-8); }
article h2 { margin-bottom: var(--space-3); }
article h3 { margin-top: var(--space-6); margin-bottom: var(--space-2); }
article p + p, article ul + p, article .table + p { margin-top: var(--space-4); }
article p + ul, article h2 + ul { margin-top: var(--space-3); }
article p + .table { margin-top: var(--space-3); }
article ul { padding-left: var(--space-5); }
article li { font-size: var(--size-body); line-height: var(--leading-body); }
article li + li { margin-top: var(--space-2); }
article code { font-family: inherit; }
#short, article section { scroll-margin-top: calc(var(--header-h) + var(--space-5)); }

/* Tables: hairlines, small grey headers. */
.table table { width: 100%; border-collapse: collapse; font-size: var(--size-small); line-height: var(--leading-small); }
.table th, .table td { padding: var(--space-2) var(--space-4) var(--space-2) 0; text-align: left; vertical-align: top; font-weight: 400; border-bottom: 1px solid var(--line); }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table thead th { color: var(--text-3); }
.table td { color: var(--text-2); }
.table tbody th { color: var(--text); width: 24%; }

@media (max-width: 959px) {
  .legal .site-header .col, .legal .site-foot .col { padding-left: 26px !important; padding-right: 26px !important; }
  .legal .site-foot .col::before { left: 26px; right: 26px; }
  .layout { display: block; padding: var(--space-7) 26px var(--space-11); }
  .index { display: none; }

  .on-page {
    display: block;
    position: sticky;
    top: var(--header-h);
    z-index: 9;
    background: var(--page);
    border-bottom: 1px solid var(--line);
  }
  .on-page summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) 26px;
    font-size: var(--size-small);
    color: var(--text-3);
    cursor: pointer;
    list-style: none;
  }
  .on-page summary::-webkit-details-marker { display: none; }
  .on-page summary:focus-visible, .on-page a:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
  .on-page summary::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin: -3px 2px 0 0;
    border-right: 1.5px solid var(--accent);
    border-bottom: 1.5px solid var(--accent);
    transform: rotate(45deg);
  }
  .on-page[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
  .on-page .current { margin-left: auto; color: var(--text); white-space: nowrap; }
  .on-page ul { max-height: calc(100vh - var(--header-h) - var(--row-h)); overflow-y: auto; padding-bottom: var(--space-2); }
  .on-page a { display: block; padding: var(--space-2) 26px; font-size: var(--size-small); color: var(--text-3); text-decoration: none; }
  .on-page a[aria-current] { color: var(--text); }

  #short, article section { scroll-margin-top: calc(var(--header-h) + var(--row-h) + var(--space-4)); }

  /* Both tables: no labels, split by hairlines. The name, then the first detail below it. A one-word last column
     goes at the far right of the name's line; anything longer gets its own line below. */
  .table table, .table tbody { display: block; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { display: grid; grid-template-columns: 1fr auto; column-gap: var(--space-4); row-gap: var(--space-1); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .table tbody tr:first-child { border-top: 1px solid var(--line); }
  .table th, .table td { display: block; padding: 0; border: 0; }
  .table tbody th { width: auto; font-size: var(--size-body); line-height: var(--leading-ui); grid-column: 1; grid-row: 1; }
  .table td { grid-column: 1 / -1; font-size: var(--size-body); line-height: var(--leading-body); color: var(--text); }
  .table td:last-child { color: var(--text-3); font-size: var(--size-small); line-height: var(--leading-small); }
  .table td.short { grid-column: 2; grid-row: 1; align-self: baseline; }
}
