/* ARCSTEP — legal pages. Standalone: works even if main.css is not loaded yet. */
:root {
  --c-black: #0B0B0B; --c-white: #FAFAF8; --c-ink: #111111;
  --c-graphite: #2A2A2A; --c-stone: #6B6B67; --c-line: #E4E4E0; --c-sand: #EDEBE6;
  --f-display: "Roboto Flex", "Inter", "Arial Black", system-ui, sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.legal-page {
  margin: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.legal-skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--c-black); color: var(--c-white);
  padding: 8px 16px; z-index: 10;
}
.legal-skip:focus { top: 8px; }

/* Header */
.legal-header { border-bottom: 1px solid var(--c-line); background: var(--c-white); }
.legal-header__inner {
  max-width: 1440px; margin: 0 auto; padding: 16px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.legal-logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-ink); text-decoration: none; }
.legal-logo img { display: block; height: 20px; width: auto; }
@keyframes logo-in { from { clip-path: inset(0 100% 0 0); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.legal-logo img { animation: logo-in .9s cubic-bezier(.2,.7,.2,1) .12s both; }
@media (prefers-reduced-motion: reduce) { .legal-logo img { animation: none; } }
.legal-back { display: flex; gap: 16px; margin-right: auto; }
.legal-back a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--c-graphite); text-decoration: none; font-size: 14px; font-weight: 500;
}
.legal-back a:hover { color: var(--c-black); text-decoration: underline; text-underline-offset: 4px; }

.legal-lang { display: inline-flex; border: 1px solid var(--c-ink); }
.legal-lang button {
  font: 600 12px/1 var(--f-text); letter-spacing: 0.08em;
  padding: 8px 12px; min-width: 44px; min-height: 44px; border: 0; border-radius: 0; cursor: pointer;
  background: transparent; color: var(--c-ink);
  transition: background-color 200ms ease, color 200ms ease;
}
.legal-lang button[aria-pressed="true"] { background: var(--c-black); color: var(--c-white); }

/* Body */
.legal {
  max-width: 72ch;
  margin: 0 auto;
  padding: 48px 16px 96px;
}
.legal-draft {
  margin: 0 0 32px;
  padding: 12px 16px;
  background: var(--c-sand);
  border-left: 3px solid var(--c-black);
  font-size: 13px; line-height: 1.5; color: var(--c-graphite);
}

.legal-doc h1, .legal-doc h2, .legal-doc h3 {
  font-family: var(--f-display); font-stretch: 151%;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--c-black);
  overflow-wrap: break-word;
  line-height: 1.15;
}
.legal-doc h1 { font-size: clamp(22px, 4.4vw, 40px); font-weight: 700; margin: 0 0 12px; }
.legal-doc h2 {
  font-size: clamp(15px, 2vw, 19px); font-weight: 600;
  margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--c-line);
}
.legal-doc h3 { font-size: 15px; font-weight: 700; margin: 32px 0 12px; }
.legal-meta { color: var(--c-stone); font-size: 14px; margin: 0 0 32px; }

.legal-doc p { margin: 0 0 16px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 16px; padding-left: 24px; }
.legal-doc li { margin: 0 0 8px; }
.legal-doc li::marker { color: var(--c-stone); }
.legal-doc strong { font-weight: 600; }
.legal-doc a { color: var(--c-black); text-decoration: underline; text-underline-offset: 3px; }
.legal-doc a:hover { text-decoration-thickness: 2px; }
.legal-doc code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em; background: var(--c-sand); padding: 2px 4px;
}

.legal-req {
  display: grid; grid-template-columns: minmax(0, 14ch) minmax(0, 1fr);
  gap: 8px 24px; margin: 0 0 24px; padding: 16px;
  border: 1px solid var(--c-line); font-size: 15px;
}
.legal-req dt { color: var(--c-stone); }
.legal-req dd { margin: 0; overflow-wrap: anywhere; }

.legal-table {
  width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px;
  display: block; overflow-x: auto;
}
.legal-table th, .legal-table td {
  text-align: left; vertical-align: top; padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--c-line);
}
.legal-table th {
  font-weight: 600; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-stone);
}

/* Footer */
.legal-footer { border-top: 1px solid var(--c-line); background: var(--c-white); }
.legal-footer__inner { max-width: 1440px; margin: 0 auto; padding: 32px 16px; }
.legal-footer__links {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
}
.legal-footer__links a { color: var(--c-graphite); text-decoration: none; font-size: 14px; }
.legal-footer__links a:hover, .legal-footer__links a[aria-current="page"] {
  color: var(--c-black); text-decoration: underline; text-underline-offset: 4px;
}
.legal-footer__copy { margin: 0; font-size: 13px; color: var(--c-stone); }
.legal-footer__copy a { color: inherit; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--c-black); outline-offset: 2px; }

@media (min-width: 768px) {
  .legal-header__inner, .legal-footer__inner { padding-left: 40px; padding-right: 40px; }
  .legal { padding-top: 64px; }
}

@media (max-width: 480px) {
  .legal-req { grid-template-columns: 1fr; gap: 2px; }
  .legal-req dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-lang button { transition: none; }
}

@media print {
  .legal-header, .legal-footer, .legal-draft, .legal-skip { display: none; }
  .legal { max-width: none; padding: 0; }
  .legal-page { background: #fff; }
}

.legal-todo { font-style: normal; opacity: .6; }
