/**
 * SPY — the legal pages: terms, privacy, guidelines, support, delete account.
 *
 * These used to be styled by style.css (the old app's system) and shown inside
 * a modal on the home page. They are ordinary pages now, on the SAME design
 * system as index.html: Fraunces for display, DM Sans for text, the cream and
 * neon palette, the self-hosted fonts.
 *
 * WHY THEY ARE PAGES AGAIN. A modal is the wrong container for a document
 * someone may need to read carefully, quote, print, link a friend to, or find
 * through a search engine. It cannot be bookmarked, the back button does not
 * close it, and its content is invisible to crawlers. Terms and a privacy
 * policy are the two documents on a site most likely to be needed at exactly
 * the moment the person is not in a mood to fight the interface.
 *
 * MEASURE, NOT WIDTH. The column is capped at 68ch rather than a pixel value,
 * so the line length stays readable — 65–75 characters is the range people
 * actually read comfortably — whatever the font size resolves to.
 */

@font-face {
  font-family: "Fraunces Variable";
  src: url("media/fraunces-var.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  /* Single value: pins the wght axis to 400 rather than letting this file's own
     900 default through. See the long note in home.css. */
  font-weight: 400;
}
@font-face {
  font-family: "DM Sans";
  src: url("media/dmsans-400.woff2") format("woff2");
  font-display: swap; font-style: normal; font-weight: 400;
}
@font-face {
  font-family: "DM Sans";
  src: url("media/dmsans-500.woff2") format("woff2");
  font-display: swap; font-style: normal; font-weight: 500;
}
@font-face {
  font-family: "DM Sans";
  src: url("media/dmsans-700.woff2") format("woff2");
  font-display: swap; font-style: normal; font-weight: 700;
}

:root {
  --paper: #f7f4ef;
  --paper-2: #f1efea;
  --ink: #211d18;
  --body: #383838;
  --yellow: #f5ff66;
  --muted: #6b6459;
  --line: #ddd8cf;
  --display: "Fraunces Variable", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

body {
  background: var(--paper);
  /* See the note in home.css: stops the iOS rubber-band showing a band of the
     browser's own background above the paper, which on a viewport-fit=cover
     page is the white gap that setting exists to remove. */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  color: var(--body);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── header ──────────────────────────────────────────────────────────*/

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  /* The header is the top of the page now that it runs under the status bar. */
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header.site .brand {
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "wght" 300;
  font-feature-settings: "blwf" on, "cv03" on, "cv04" on, "cv09" on, "cv11" on;
  font-synthesis-weight: none;
  font-size: 20px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  text-decoration: none;
}
header.site .back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
}
header.site .back:hover { border-color: var(--muted); }

/* ── the document ────────────────────────────────────────────────────*/

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 56px calc(24px + env(safe-area-inset-right, 0px))
           calc(96px + env(safe-area-inset-bottom, 0px))
           calc(24px + env(safe-area-inset-left, 0px));
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "wght" 300;
  font-feature-settings: "blwf" on, "cv03" on, "cv04" on, "cv09" on, "cv11" on;
  font-synthesis-weight: none;
  letter-spacing: -0.01em;
  line-height: 1.06;
  color: var(--ink);
  margin-bottom: 10px;
}

.updated {
  font-size: 14.5px;
  color: var(--muted);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

/**
 * The summary panel. Every policy should be readable in thirty seconds by
 * someone who will not read the whole thing — and most people will not. It is
 * a plain-language précis, and it says so, because a summary that reads like it
 * has legal force but does not is worse than no summary.
 */
.tldr {
  background: var(--paper-2);
  border-left: 3px solid var(--yellow);
  border-radius: 0 14px 14px 0;
  padding: 20px 22px;
  margin-bottom: 40px;
  font-size: 16px;
}
.tldr b { color: var(--ink); }
.tldr p + p { margin-top: 10px; }

h2 {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 300;
  font-variation-settings: "opsz" 60, "wght" 300;
  font-feature-settings: "blwf" on, "cv03" on, "cv04" on, "cv09" on, "cv11" on;
  font-synthesis-weight: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 44px 0 12px;
  /* So a linked section is not tucked under the sticky header. */
  scroll-margin-top: 84px;
}
h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 26px 0 8px;
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 8px; }

strong, b { color: var(--ink); font-weight: 700; }

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

/**
 * The all-caps blocks that disclaimers and liability limits are conventionally
 * set in. Capitals are genuinely harder to read, so they get more line-height
 * and a slightly smaller size — the convention is legal, the legibility cost
 * does not have to be paid in full.
 */
.legalese {
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/**
 * The one action button these pages have: "request deletion by email".
 *
 * Neon on ink rather than ink on neon. A deletion request is the one thing on
 * these pages someone arrives specifically to do, and it should not have to
 * compete with a yellow .notice block on the same screen for attention.
 */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 100px;
  margin: 4px 0 8px;
  /* 44px is the minimum comfortable touch target; 13px + 13px + the line box
     clears it without having to set an explicit height. */
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #000; text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* A callout for the things a reader must not miss. */
.notice {
  background: var(--yellow);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
  color: var(--ink);
  font-size: 16px;
}
.notice b { display: block; margin-bottom: 6px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 15.5px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--ink); font-weight: 700; }

/* ── footer ──────────────────────────────────────────────────────────*/

footer.site {
  border-top: 1px solid var(--line);
  padding: 30px 24px 60px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-bottom: 14px;
}
/* 44px minimum touch target — see the note in home.css. The negative margin
   cancels the padding so the row keeps its visual height. */
footer.site a {
  color: var(--body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  margin: -11px 0;
}
footer.site a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  main { padding: 36px 20px 72px; }
  header.site { padding: 14px 18px; }
  h2 { margin-top: 34px; }
}

/* Ink on paper, no sticky header, no navigation. */
@media print {
  header.site, footer.site nav { display: none; }
  body { background: #fff; font-size: 11pt; }
  main { max-width: none; padding: 0; }
  a { text-decoration: none; color: #000; }
  .tldr, .notice { border: 1px solid #999; background: none; }
}
