/* The terms of service page (terms.js): a title, a contents list and the text, set for reading like the help page: one column of about 44 rem, generous leading.
   The text itself is a fragment of plain HTML (headings, paragraphs, lists, a table), styled here by element, so the same fragment can go into an email unchanged. */

.terms { --gutter: clamp(1rem, 1.7vw, 2.75rem); }
.tm-head { display: grid; gap: 0.9rem; padding: clamp(1.2rem, 3vw, 2.4rem) var(--gutter) 0.4rem; max-width: 72rem; margin-inline: auto; }
.tm-title { display: flex; align-items: flex-start; gap: clamp(0.6rem, 1.4vw, 1rem); font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.tm-title .mk { width: 0.34em; height: 0.34em; margin-top: 0.34em; --mk: var(--state); filter: drop-shadow(0 0 0.18em color-mix(in srgb, var(--mk) 70%, transparent)); }
.tm-lead { max-width: 40rem; color: var(--ink-2); font-size: 1.125rem; line-height: 1.45; text-wrap: pretty; }

.tm-acts { margin-top: 0.3rem; }
.tm-print { min-height: 2.75rem; padding: 0 1.3rem; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font: inherit; font-weight: 560; }
@media (hover: hover) and (pointer: fine) { .tm-print:hover { background: var(--sheet-hi); } }

.tm-wrap { display: grid; gap: 1.2rem 4.5rem; align-items: start; max-width: 72rem; margin-inline: auto; padding: 1.5rem var(--gutter) 5rem; }
.tm-toc[hidden] { display: none; }
.tm-toc ol { display: flex; flex-direction: column; }
.tm-toc a { display: block; padding: 0.42rem 0.9rem; border-left: 2px solid var(--line); color: var(--ink-2); font-size: 0.9375rem; line-height: 1.3; text-decoration: none; }
.tm-toc a:hover { color: var(--ink); border-left-color: var(--line-2); }
.tm-toc-btn { display: none; align-items: center; justify-content: space-between; gap: 0.8rem; width: 100%; min-height: 2.9rem; padding: 0 1.1rem; background: transparent; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font: inherit; font-weight: 560; }
.tm-chev { width: 0.5em; height: 0.5em; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-0.15em) rotate(45deg); transition: transform 0.12s ease; }
.tm-toc-btn[aria-expanded="true"] .tm-chev { transform: translateY(0.1em) rotate(-135deg); }
@media (max-width: 999px) {
  .tm-toc-btn { display: flex; }
  .tm-toc ol { display: none; margin-top: 0.5rem; padding: 0.3rem 0; }
  .tm-toc[data-open="1"] ol { display: flex; }
  .tm-toc a { min-height: 2.75rem; display: flex; align-items: center; }
}
@media (min-width: 1000px) {
  .tm-wrap { grid-template-columns: 17rem minmax(0, 48rem); }
  .tm-toc { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
}

.tm-wrap > * { min-width: 0; }
.tm-main:focus { outline: none; }
.tm-loading { color: var(--ink-2); }
.tm-loading[hidden], .tm-failed[hidden] { display: none; }
.tm-failed { max-width: 40rem; color: var(--ember); font-weight: 600; }

.tm-body { max-width: 44rem; font-size: 1.0625rem; line-height: 1.62; }
.tm-body h2 { margin: 2.6rem 0 0.7rem; padding-top: 1.6rem; border-top: 1px solid var(--line-3); font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.8rem); font-weight: 560; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; scroll-margin-top: 1rem; }
.tm-body > :first-child { margin-top: 0; }
.tm-body > h2:first-child { padding-top: 0; border-top: 0; }
.tm-body h3 { margin: 1.8rem 0 0.4rem; font-size: 1.1875rem; font-weight: 620; line-height: 1.3; scroll-margin-top: 1rem; }
.tm-body h2:target, .tm-body h3:target { box-shadow: -1rem 0 0 -0.7rem var(--state, var(--lamp)); }
.tm-body p { margin-top: 0.9rem; text-wrap: pretty; }
.tm-body h2 + p, .tm-body h3 + p { margin-top: 0; }
.tm-body ol, .tm-body ul { display: grid; gap: 0.55rem; margin-top: 0.9rem; padding-left: 1.5rem; }
.tm-body ol { list-style: decimal; }
.tm-body ul { list-style: disc; }
.tm-body li { padding-left: 0.2rem; text-wrap: pretty; }
.tm-body li::marker { color: var(--ink-3); }
.tm-body a { color: var(--ink); text-decoration-color: var(--ink-3); text-underline-offset: 0.2em; }
.tm-body a:hover { text-decoration-color: var(--ink); }
.tm-body strong, .tm-body b { font-weight: 650; }
.tm-doc-title { margin: 0.4rem 0 0.2rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
.tm-body .terms-edition { color: var(--ink-3); font-size: 0.9375rem; }
.tm-body hr { margin: 1.8rem 0; border: 0; border-top: 1px solid var(--line-3); }
.tm-tbl { margin-top: 1rem; overflow-x: auto; max-width: 100%; }
.tm-tbl:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tm-tbl table { margin-top: 0; }
@media (max-width: 640px) {
  .tm-tbl--stack table, .tm-tbl--stack tbody, .tm-tbl--stack tr, .tm-tbl--stack td { display: block; }
  .tm-tbl--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tm-tbl--stack tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .tm-tbl--stack td { padding: 0; border: 0; }
  .tm-tbl--stack td:first-child { font-weight: 620; }
  .tm-tbl--stack td + td { margin-top: 0.15rem; color: var(--ink-2); }
}
.tm-body table { margin-top: 1rem; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.tm-body th, .tm-body td { padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.tm-body th { color: var(--ink-2); font-weight: 560; }
.tm-body blockquote { margin: 1rem 0 0; padding: 0.2rem 0 0.2rem 1rem; border-left: 2px solid var(--line-2); color: var(--ink-2); }

/* the draft note that the text carries until it is approved */
.tm-body .tm-draft { margin: 0 0 1.8rem; padding: 0.9rem 1.1rem; background: var(--amber-wash); border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); border-radius: 0.9rem; }
.tm-body .tm-draft b { color: var(--amber); }

.tm-back { max-width: 44rem; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.tm-back a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-weight: 600; text-underline-offset: 0.2em; }

@media print {
  .top, .tm-toc, .tm-back, .tm-acts, .skip { display: none; }
  .tm-wrap { display: block; padding: 0; }
}

/* a clause reached by its anchor stays clear of the top edge and is marked */
.tm-body [id] { scroll-margin-top: 1rem; }
.tm-body p:target { box-shadow: -1rem 0 0 -0.7rem var(--state, var(--lamp)); }
