/* Privacy, Terms and Cookies pages. Uses the tokens, nav, buttons and footer from hero.css. */

.legal {
  width: min(1436px, calc(100% - 32px)); /* lines up with the header logo */
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px);
  color: var(--ink);
}

/* Title block */
.legal__head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.legal__eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #8a837e; }
.legal__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.2; letter-spacing: -0.01em; color: var(--ink-input); }
.legal__meta { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

/* Switch between the three documents */
.legal__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.legal__tab {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border: 1px solid #ece6e1; border-radius: 6px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 500; color: #393736;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.legal__tab:hover { background: #f6f1ed; }
.legal__tab[aria-current="page"] { background: var(--panel); border-color: var(--panel); }
.legal__tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Contents list beside the document on wide screens */
.legal__body { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.legal__toc { position: sticky; top: 24px; padding: 20px; border-radius: 12px; background: var(--panel); }
.legal__toc-title { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #8a837e; }
.legal__toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.legal__toc li { counter-increment: toc; }
.legal__toc a {
  display: flex; gap: 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px;
  font-size: 14px; line-height: 1.4; color: #5b5552; transition: background-color 150ms ease, color 150ms ease;
}
.legal__toc a::before { content: counter(toc) "."; flex: none; width: 18px; color: #a8a09a; }
.legal__toc a:hover { background: #e8e1db; color: var(--ink); }

/* Document text */
.legal__doc { font-size: 16px; line-height: 1.7; }
.legal__intro { margin: 0 0 8px; font-size: 18px; line-height: 1.65; color: var(--ink-input); }
.legal__doc section { padding-top: 40px; scroll-margin-top: 16px; }
.legal__doc h2 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 2.4vw, 26px); line-height: 1.3; color: var(--ink-input); }
.legal__doc h3 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; color: var(--ink-input); }
.legal__doc p { margin: 0 0 14px; }
.legal__doc ul { margin: 0 0 14px; padding-left: 20px; }
.legal__doc li { margin-bottom: 6px; }
.legal__doc li::marker { color: #a8a09a; }
.legal__doc a { color: var(--ink-input); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c4bcb5; }
.legal__doc a:hover { text-decoration-color: var(--ink-input); }
.legal__doc strong { font-weight: 600; color: var(--ink-input); }

/* Summary box at the top of each document */
.legal__summary { margin: 24px 0 0; padding: 20px 22px; border-radius: 12px; background: var(--panel); }
.legal__summary h2 { font-family: var(--font-body); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.legal__summary ul { margin: 0; }
.legal__summary li:last-child { margin-bottom: 0; }

/* Cookie table */
.legal__table-wrap { margin: 8px 0 18px; overflow-x: auto; border: 1px solid #ece6e1; border-radius: 12px; }
.legal__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal__table th, .legal__table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #ece6e1; }
.legal__table th { font-weight: 600; color: var(--ink-input); background: #faf6f3; }
.legal__table tr:last-child td { border-bottom: 0; }
.legal__table code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; }

@media (max-width: 860px) {
  .legal__body { grid-template-columns: minmax(0, 1fr); }
  .legal__toc { position: static; }
}
@media (max-width: 600px) {
  .legal { width: calc(100% - 40px); }
  .legal__doc section { padding-top: 32px; }
}
