/* ==========================================================================
   Moonsail Software — legal pages.
   The night chart printed on paper: same typography, daylight palette, so
   long documents stay readable (and so third-party policy markup that forces
   dark text on a transparent background still works).

   Note: css/policy.css is a different, older stylesheet still used by the
   GhostCode and Enviya legal pages. Do not merge them.
   ========================================================================== */

:root {
  --paper-bg:  #f1eee5;
  --sheet:     #fbf9f4;
  --ink-text:  #17202a;
  --ink-muted: #5c6a76;
  --rule:      rgba(23, 32, 42, 0.14);
  --accent:    #1c7a67;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink-text);
  background-color: var(--paper-bg);
  background-image:
    linear-gradient(to right,  rgba(23, 32, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 32, 42, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  padding: 0 1.25rem 4rem;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 0;
  box-shadow: 0 30px 60px -50px rgba(23, 32, 42, 0.6);
}

/* Masthead rule across the top of the sheet */
main::before {
  content: "";
  display: block;
  height: 3px;
  margin: calc(clamp(2rem, 5vw, 3.5rem) * -1) calc(clamp(1.25rem, 4vw, 3rem) * -1) clamp(1.75rem, 4vw, 2.5rem);
  background: var(--ink-text);
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.back-link a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.back-link a:hover { color: var(--accent); border-bottom-color: var(--accent); }

h1 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 120;
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h2, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 0.65rem;
}

h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

/* Older policy pages set these sizes inline; keep the rhythm consistent. */
main h2[style] {
  font-size: 1.3rem !important;
  margin: 2.6rem 0 0.65rem !important;
}

p { margin-bottom: 1rem; }

ul, ol { margin: 0 0 1rem 1.25rem; }
li { margin-bottom: 0.4rem; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(28, 122, 103, 0.35);
  transition: border-color 0.2s;
}

a:hover { border-bottom-color: var(--accent); }

strong { font-weight: 600; }

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

footer {
  max-width: 760px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-align: center;
}

@media print {
  body { background: #fff; padding: 0; }
  main { border: 0; box-shadow: none; }
}
