/* SnapLingo legal pages — neubrutalist web system, tokens mirrored from the
   landing page (paper/ink/coral/mint, 3px ink borders, hard offset shadows).
   Fonts are the same self-hosted brand files the landing and admin ship. */

@font-face {
  font-family: "Satoshi";
  src: url("assets/fonts/satoshi_regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("assets/fonts/satoshi_bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lilita One";
  src: url("assets/fonts/lilita_one_regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: #F7EAE6;
  --paper: #FFF9F5;
  --ink: #1A1512;
  --muted: #6B5B51;
  --coral: #FB7559;
  --coral-deep: #EC5A3D;
  --mint-100: #D4F5EC;
  --sun-100: #FFF3CC;
  --hairline: #D9C8BF;
  --border: 3px solid var(--ink);
  --border-thin: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --font-display: "Lilita One", ui-rounded, system-ui, sans-serif;
  --font-body: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--coral-deep);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--ink); }

/* ── Top nav ─────────────────────────────────────────────────────────── */
/* Centered sticky pill bar (PoseStudio legal-nav pattern, SnapLingo skin):
   brand + divider + doc links live inside one bordered pill. */
.legal-nav {
  position: sticky;
  top: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin: 26px auto 8px;
  padding: 10px 18px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.legal-brand, .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand { font-size: 26px; }
.legal-brand:hover, .brand:hover { color: var(--coral-deep); }
.brand-glyph {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border: var(--border-thin);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
  flex: 0 0 auto;
}
.brand-glyph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.links, .legal-nav div { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nav-divider {
  width: 2px;
  height: 30px;
  border-radius: 2px;
  background: var(--hairline);
  flex: 0 0 auto;
}
.legal-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: var(--border-thin);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .12s ease;
}
.legal-link:hover { color: var(--ink); background: var(--sun-100); }
.legal-link[aria-current="page"] { background: var(--sun-100); }

/* ── Shell + hero ────────────────────────────────────────────────────── */
.legal-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 20px 90px;
}
.legal-hero { margin: 26px 0 22px; }
.legal-hero h1,
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.1;
  margin: 0 0 10px;
  letter-spacing: .3px;
}
.legal-hero p { color: var(--muted); margin: 0; font-size: 15px; }
.effective { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* ── Document card ───────────────────────────────────────────────────── */
.legal-card {
  background: var(--paper);
  border: var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
  margin-bottom: 24px;
}

.legal-document h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 38px 0 12px;
  padding-bottom: 8px;
  border-bottom: var(--border-thin);
}
.legal-document .legal-card h2:first-child, .legal-card h2:first-child { margin-top: 0; }
.legal-document h3 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.legal-document p { margin: 12px 0; }
.legal-document ul, .legal-document ol { padding-left: 24px; margin: 12px 0; }
.legal-document li { margin: 6px 0; }
.legal-document li::marker { color: var(--coral-deep); font-weight: 700; }

.legal-document table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14.5px;
}
.legal-document th, .legal-document td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.legal-document th { background: var(--sun-100); border-bottom: var(--border-thin); font-weight: 700; }
.legal-document tr:last-child td { border-bottom: none; }

.legal-document blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  background: var(--mint-100);
  border: var(--border-thin);
  border-radius: 14px;
}

.legal-document code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 1px 6px;
}

.legal-document hr { border: none; border-top: var(--border-thin); margin: 30px 0; }

/* ── Footer ──────────────────────────────────────────────────────────── */
footer, .legal-footer {
  max-width: 860px;
  margin: 26px auto 0;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ── Index hub ───────────────────────────────────────────────────────── */
.legal-home {
  max-width: 660px;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 24px;
}
.legal-home .brand { margin-bottom: 22px; font-size: 30px; }
.legal-home .legal-card h1 { font-size: clamp(28px, 5vw, 38px); margin-top: 0; }
.legal-home .links { margin-top: 18px; }
.legal-home .links a {
  display: inline-flex;
  padding: 9px 18px;
  border: var(--border-thin);
  border-radius: 999px;
  background: var(--sun-100);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.legal-home .links a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.legal-hub { display: grid; gap: 20px; margin-top: 24px; }
a.legal-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
a.legal-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
  color: var(--ink);
}

@media (max-width: 640px) {
  /* Compact centered pill: links only (PoseStudio pattern). */
  .legal-brand, .nav-divider { display: none; }
  .legal-nav { gap: 8px; padding: 8px 10px; margin-top: 16px; }
  .legal-link { min-height: 40px; }
  .legal-card { padding: 24px 18px 28px; }
  h1, .legal-hero h1 { font-size: 32px; }
}
