/* ============================================================
   Marketing and legal pages (legal/terms). Plain CSS on tokens.
   ============================================================ */

/* --- Terms of Service ---------------------------------------------------
   The legal text in templates/legal/terms.html.tera keeps its original
   markup (its SHA-256 is the stored terms_version_hash), so it is styled
   here through its existing .tos classes. */
.tos { max-width: 72ch; min-width: 0; }
.tos h1 {
  font-size: 1.875rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em;
  color: rgb(var(--fg-default)); margin-bottom: 0.5rem; text-wrap: balance;
}
.tos .tos-dates { color: rgb(var(--fg-subtle)); font-size: 0.8125rem; line-height: 1.7; margin-bottom: 2rem; }
.tos .tos-dates strong { color: rgb(var(--fg-muted)); font-weight: 500; }
.tos .tos-notice {
  background: rgb(var(--warn) / 0.08); border: 1px solid rgb(var(--warn) / 0.25);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
}
.tos .tos-notice p { color: rgb(var(--fg-default)); font-size: 0.8125rem; line-height: 1.6; margin-bottom: 0.75rem; font-weight: 600; }
.tos .tos-notice p:last-child { margin-bottom: 0; }
.tos section { scroll-margin-top: calc(var(--topbar-h) + 1rem); }
.tos h2 {
  font-size: 1.125rem; line-height: 1.35; font-weight: 600; color: rgb(var(--fg-default));
  margin-top: 2.5rem; margin-bottom: 1rem; padding-top: 1.5rem; border-top: 1px solid rgb(var(--line-default));
}
.tos section:first-of-type h2 { border-top: none; padding-top: 0; }
.tos h3 { font-size: 0.9375rem; font-weight: 600; color: rgb(var(--fg-default)); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.tos p { color: rgb(var(--fg-muted)); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1rem; }
.tos p.emphasis, .tos li.emphasis { color: rgb(var(--fg-default)); font-weight: 600; }
.tos ol.lettered { list-style-type: lower-alpha; padding-left: 1.5rem; margin-bottom: 1rem; }
.tos ul.plain { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.tos ol.lettered li, .tos ul.plain li { color: rgb(var(--fg-muted)); font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.5rem; }
.tos li::marker { color: rgb(var(--fg-subtle)); }
.tos a { color: rgb(var(--accent-400)); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgb(var(--accent-500) / 0.4); }
.tos blockquote {
  border-left: 2px solid rgb(var(--line-strong)); padding-left: 1rem; margin: 1rem 0;
  color: rgb(var(--fg-muted)); font-size: 0.8125rem; font-style: italic; line-height: 1.6;
}
.tos .tos-footer {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(var(--line-default));
  color: rgb(var(--fg-subtle)); font-size: 0.8125rem; line-height: 1.8; font-family: var(--font-mono);
}

/* Table of contents link (terms sidebar and mobile jump list) */
.toc-link {
  display: flex; gap: 0.5rem; align-items: baseline; padding: 0.375rem 0.5rem; border-radius: var(--radius-sm);
  color: rgb(var(--fg-muted)); line-height: 1.4;
  transition: color var(--duration-fast) var(--ease-out-expo), background-color var(--duration-fast) var(--ease-out-expo);
}
.toc-link:hover { color: rgb(var(--fg-default)); background: rgb(var(--bg-raised)); }
.toc-link[aria-current="true"] { color: rgb(var(--fg-default)); background: rgb(var(--bg-raised)); }
.toc-link[aria-current="true"] > span:first-child { color: rgb(var(--accent-500)); }
