/*
 * The pages that are not the game.
 *
 * These live outside the bundle on purpose. A policy reviewer, a search
 * crawler and a person who has had JavaScript switched off all need to reach
 * the privacy policy, and none of them should have to boot a 3D physics engine
 * to read it. So each page is one static file with one stylesheet, no script,
 * and a real URL that can be pasted into an application form.
 *
 * The look is the lobby's: chalk-and-paper. Headings in the game's own hand,
 * body copy in a serif, because eight hundred words of legal text set in a
 * marker font is a policy nobody finishes.
 */

@font-face {
  font-family: "Patrick Hand";
  src: url("/assets/fonts/patrick-hand.woff2") format("woff2");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  --paper: #e9e2cf;
  --ink: #24428f;
  --body: #2f2a22;
  --muted: #6a6152;
  --rule: rgba(36, 66, 143, 0.18);
  --desk: #a89d89;
}

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

body {
  margin: 0;
  min-height: 100%;
  padding: 24px 16px calc(48px + env(safe-area-inset-bottom));
  background: var(--desk);
  color: var(--body);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}

.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 44px) 40px;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

/* The way back to the desk, and the wordmark that says whose policy this is. */
.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--rule);
}

.legal-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.legal-brand a {
  color: var(--ink);
  font-family: "Patrick Hand", "Segoe Print", cursive;
  font-size: 26px;
  line-height: 1.1;
  text-decoration: none;
}

.legal-brand a:hover {
  text-decoration: underline;
}

.legal-brand span {
  display: block;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 28px 0 6px;
  color: var(--ink);
  font-family: "Patrick Hand", "Segoe Print", cursive;
  font-size: clamp(32px, 6vw, 42px);
  font-weight: 400;
  line-height: 1.15;
}

h2 {
  margin: 34px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-family: "Patrick Hand", "Segoe Print", cursive;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
}

h3 {
  margin: 22px 0 6px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

p,
li {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li::marker {
  color: var(--ink);
}

a {
  color: var(--ink);
}

strong {
  color: #1c3574;
}

/* Effective date, and the "read this one first" note under a heading. */
.stamp {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.stamp b {
  color: var(--body);
}

.lede {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: rgba(36, 66, 143, 0.06);
  border-left: 4px solid var(--ink);
  border-radius: 0 6px 6px 0;
  font-size: 16px;
}

/*
 * The blanks.
 *
 * Everything the operator has to supply before this goes live is marked, so it
 * is impossible to publish a policy with a placeholder still in it by accident.
 */
.fill {
  padding: 1px 6px;
  background: #ffe9a8;
  border: 1px dashed #b3892a;
  border-radius: 4px;
  color: #6b4e08;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
  white-space: nowrap;
}

/* What we collect, why, and for how long — a table reads faster than prose. */
.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14.5px;
}

th,
td {
  padding: 9px 11px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(36, 66, 143, 0.09);
  color: var(--ink);
  font-weight: 700;
}

dt {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 700;
}

dd {
  margin: 0 0 8px;
}

/* The shared legal and support navigation on every document. */
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 2px solid var(--rule);
}

.legal-nav a {
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  text-decoration: none;
}

.legal-nav a:hover {
  background: #fff;
}

.legal-nav a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.legal-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 560px) {
  body {
    padding: 12px 10px 40px;
    font-size: 16px;
  }

  .legal {
    padding: 24px 18px 30px;
    border-radius: 8px;
  }
}
