/* Slipio legal pages (static, no app shell). Tokens and layout follow frontendV3's tokens.css and
   the marketing site's legal template: one readable column, a white card on Ice, tables that scroll
   inside their own box on phones, never the page. */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/legal/assets/manrope-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/legal/assets/space-grotesk-latin-700-normal.woff2") format("woff2");
}

:root {
  --ink: #101114;
  --graphite: #1b1d22;
  --slate: #343840;
  --mist: #b8bec6;
  --ice: #e9f1f4;
  --white: #ffffff;
  --lime: #c7ff2f;
  --violet: #8b5cff;
  --text-muted: #5b6570;
  --border-subtle: #e4e6ea;
  --link: #3d2a9e;
  --radius: 14px;
  --font-display: "Space Grotesk", "Manrope Variable", system-ui, sans-serif;
  --font-ui: "Manrope Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.legal-container {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
  padding-inline: 16px;
}

.legal-header { background: var(--ink); color: var(--white); }
.legal-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}
.legal-header__logo { display: inline-flex; }
.legal-header__logo img { display: block; width: 104px; height: auto; }

.legal-nav,
.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-nav a,
.legal-footer__links a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.legal-nav a:hover,
.legal-footer__links a:hover { text-decoration: underline; }
.legal-nav a[aria-current="page"] { color: var(--lime); text-decoration: underline; }

.legal { padding-block: clamp(1.5rem, 6vw, 3rem); }

.legal h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
}

.legal__body {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 17, 20, 0.06), 0 8px 24px rgba(16, 17, 20, 0.06);
  overflow-wrap: anywhere;
}
.legal__body > :first-child { margin-top: 0; }
.legal__body h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.25;
  scroll-margin-top: 1rem;
}
.legal__body h3 { margin: 1.5rem 0 0.5rem; font-size: 1.1875rem; line-height: 1.3; }
.legal__body ul,
.legal__body ol { padding-left: 1.25rem; }
.legal__body li + li { margin-top: 0.35rem; }

.legal-meta { color: var(--text-muted); font-size: 0.9375rem; }

.legal-summary {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--lime);
  border-radius: var(--radius);
  background: var(--ice);
}
.legal-summary > :first-child { margin-top: 0; }
.legal-summary > :last-child { margin-bottom: 0; }

.legal-toc {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}
.legal-toc__title { margin: 0 0 0.5rem; font-weight: 700; }
.legal-toc ol { margin: 0; columns: 2 14rem; column-gap: 2rem; }

.legal-table { overflow-x: auto; margin: 1rem 0; }
.legal-table table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.9375rem; }
.legal-table caption { text-align: left; font-weight: 700; padding-bottom: 0.5rem; }
.legal-table th,
.legal-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--ice);
  text-align: left;
  vertical-align: top;
}
.legal-table th { background: var(--ice); }

.legal-steps { counter-reset: step; }

.legal-button {
  display: inline-block;
  margin: 0.25rem 0.5rem 0.25rem 0;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.legal-button:hover { text-decoration: underline; }
.legal-button--secondary { background: var(--ice); }

.legal-draft {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--violet);
  border-radius: var(--radius);
  background: var(--white);
}
.legal-missing { background: #fff2a8; color: var(--ink); padding: 0 0.2em; }

.legal-footer { background: var(--ink); color: var(--mist); padding-block: 2rem; font-size: 0.9375rem; }
.legal-footer__age { display: flex; gap: 0.6rem; align-items: flex-start; margin: 1.25rem 0 0.5rem; }
.age-badge {
  flex: none;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--mist);
  border-radius: 6px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.8125rem;
}
.legal-footer__copy { margin: 0; }

@media print {
  .legal-header nav,
  .legal-footer nav,
  .skip-link { display: none; }
  body { background: var(--white); }
  .legal__body { box-shadow: none; padding: 0; }
}
