/* Legal documents layout styling (terms.html, privacy.html, cookies.html) */

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: 1.25rem;
  background: #0d1838;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 6vw, 4rem);
  flex: 1;
}

/* Document Metadata Subtitles */
.terms-meta,
.policy-meta,
.notice-meta {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Document Introductions */
.terms-intro,
.policy-intro,
.notice-intro {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.05rem);
  line-height: 1.75;
  color: var(--muted);
  text-align: left;
}

.terms-intro a,
.policy-intro a,
.notice-intro a {
  color: var(--color-secondary);
  text-decoration: none;
}

.terms-intro a:hover,
.policy-intro a:hover,
.notice-intro a:hover {
  color: var(--gold-hover);
  text-decoration: none;
}

/* Table of Contents */
.terms-toc,
.policy-toc {
  margin: 2rem 0;
  padding: 1.15rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(8, 16, 36, 0.35);
}

.terms-toc-title,
.policy-toc-title {
  margin: 0 0 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.terms-toc ol,
.policy-toc ol {
  margin: 0;
  padding: 0 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 2;
  color: var(--muted);
}

.terms-toc a,
.policy-toc a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s;
}

.terms-toc a:hover,
.policy-toc a:hover {
  color: var(--white);
}

/* Prose Sections & Typography */
.prose section {
  scroll-margin-top: 1.25rem;
}

.prose h2 {
  margin: 2.75rem 0 1rem;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.prose h2:first-of-type {
  margin-top: 2rem;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  font-weight: bold;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

.prose p:not(.pull-quote) {
  margin: 0 0 1.2em;
  font-size: clamp(1rem, 2.2vw, 1.0625rem);
  line-height: 1.75;
  color: var(--muted);
  text-align: left;
}

.prose strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: bold;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding: 0 0 0 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.0625rem);
  line-height: 1.75;
  color: var(--muted);
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.35em;
}

.prose a {
  color: var(--color-secondary);
  text-decoration: none;
}

.prose a:hover {
  color: var(--gold-hover);
  text-decoration: none;
}

.contact-block {
  margin: 0 0 1.2em;
  font-size: clamp(1rem, 2.2vw, 1.0625rem);
  line-height: 1.95;
  color: var(--muted);
}

/* Legal Tables (Cookies, Subprocessors, Summary) */
.cookie-table,
.subprocessor-table {
  margin: 1.25rem 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  background: rgba(8, 16, 36, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-table table,
.subprocessor-table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: var(--muted);
}

.cookie-table th,
.cookie-table td,
.subprocessor-table th,
.subprocessor-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-table th,
.subprocessor-table th {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.55);
}

.cookie-table tr:last-child td,
.subprocessor-table tr:last-child td {
  border-bottom: none;
}

.cookie-table code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.subprocessor-table em {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

