/*
 * Standalone document pages — the App Store privacy and support URLs under
 * /pile-of-cats/. These are plain HTML in public/, deliberately outside the
 * React app: App Review and crawlers must get the content from the markup with
 * no JavaScript, and the URLs are typed into App Store Connect so they can
 * never move.
 *
 * Token values are copied from src/styles/tokens.css rather than imported,
 * because the bundler never sees this file. Keep the two in step.
 */

:root {
  --paper: #edeeec;
  --paper-recessed: #e4e5e2;
  --ink: #14161a;
  --cobalt: #1b4fd8;
  --body-grey: #4a4f56;
  --muted-grey: #767b82;
  --hairline-strong: rgba(20, 22, 26, 0.16);
  --hairline-weak: rgba(20, 22, 26, 0.1);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 28px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  /* A shade larger and looser than the site's 14/1.6 — these are read, not
     scanned. */
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--cobalt);
  overflow-wrap: anywhere;
}

::selection {
  background: var(--cobalt);
  color: var(--paper);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--cobalt);
  outline-offset: 3px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Masthead -------------------------------------------------------- */

.masthead {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--cobalt);
}

.masthead .where {
  color: var(--muted-grey);
}

/* ---- Document -------------------------------------------------------- */

.doc {
  padding: 56px 0 0;
}

.doc h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

/*
 * Deliberately not the site's uppercase micro-label: this line is a sentence
 * containing a bundle ID, and a bundle ID is case-significant. Use .eyebrow
 * where an actual label is wanted.
 */
.meta {
  margin: 18px 0 0;
  color: var(--muted-grey);
  font-size: 13px;
  line-height: 1.6;
}

.meta strong {
  font-weight: 500;
  color: var(--ink);
}

.eyebrow {
  margin: 16px 0 0;
  color: var(--muted-grey);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.doc h2 {
  margin: 52px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-strong);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.doc p {
  margin: 0 0 16px;
  color: var(--body-grey);
}

.doc .lede {
  color: inherit;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
  color: var(--body-grey);
}

.doc li {
  margin: 0 0 8px;
}

.doc strong {
  font-weight: 500;
  color: var(--ink);
}

.doc code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--paper-recessed);
  border: 1px solid var(--hairline-weak);
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

/* ---- Support page bits ----------------------------------------------- */

.panel {
  margin: 30px 0 0;
  padding: 22px 24px;
  background: var(--paper-recessed);
  border: 1px solid var(--hairline-weak);
}

.panel p:last-child {
  margin-bottom: 0;
}

.doc dl {
  margin: 0;
}

.doc dt {
  margin: 26px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline-weak);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
}

/* The h2 above already carries a rule; a second one boxes the heading in. */
.doc dt:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}

.doc dd {
  margin: 0;
  color: var(--body-grey);
}

/* ---- Footer ---------------------------------------------------------- */

.docfoot {
  margin: 64px 0 0;
  padding: 24px 0 40px;
  border-top: 1px solid var(--hairline-strong);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted-grey);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docfoot a {
  color: var(--muted-grey);
}

.docfoot a:hover {
  color: var(--cobalt);
}

.docfoot p {
  margin: 0;
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }

  body {
    font-size: 14px;
  }

  .doc {
    padding-top: 40px;
  }

  .doc h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .lede {
    font-size: 20px;
  }
}
