/* Serviced pages: the app's paper-and-ink logbook, set for reading. Colors match Theme.swift. */

@font-face { font-family: "Newsreader Display"; src: url("fonts/NewsreaderDisplay-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/PublicSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/PublicSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #edf0ea;
  --sheet: #f8f9f6;
  --rule: #c6cfc5;
  --rule-soft: #dae1d8;
  --ink: #1b2621;
  --ink-soft: #55635c;
  --violet: #4a3a9f;
  --green: #2b6a4c;
  --guilloche: #8faa9a;
  --grain-opacity: 0.05;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141916;
    --sheet: #1c221f;
    --rule: #343d38;
    --rule-soft: #29312c;
    --ink: #e4ece6;
    --ink-soft: #a7b3ac;
    --violet: #a99bff;
    --green: #6fd3a3;
    --guilloche: #4c6b5b;
    --grain-opacity: 0.08;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-wrap: break-word;
  background-color: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Public Sans", -apple-system, sans-serif;
  font-feature-settings: "tnum" 0;
}

/* Paper grain, as on the app's pages. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: color-mix(in srgb, var(--violet) 24%, transparent); }

a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 3px; }

.page {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px 72px;
}

@media (min-width: 720px) {
  .page { padding: 0 32px 96px; }
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 0;
}

.wordmark {
  font: 500 1.375rem/1 "Newsreader Display", Georgia, serif;
  color: var(--ink);
  text-decoration: none;
}

.masthead nav { display: flex; gap: 18px; }
.masthead nav a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 10px 0;
}
.masthead nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px var(--ink); }

/* Title with the seal beside it, like the Records tab. */
.title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
}

h1 {
  margin: 0;
  font: 500 clamp(2.6rem, 9vw, 4.25rem)/0.98 "Newsreader Display", Georgia, serif;
  letter-spacing: -0.015em;
}

.lede {
  margin: 14px 0 0;
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 30em;
}

.seal {
  position: relative;
  width: clamp(92px, 22vw, 136px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: stamp 520ms cubic-bezier(0.2, 0.9, 0.25, 1.2) 120ms both;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--guilloche);
  -webkit-mask: url("seal.svg") center / contain no-repeat;
  mask: url("seal.svg") center / contain no-repeat;
}
.seal span {
  position: relative;
  display: grid;
  place-items: center;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--guilloche);
  color: var(--green);
  font: 600 clamp(0.47rem, 1.5vw, 0.6875rem)/1.25 "Public Sans", sans-serif;
  letter-spacing: 0.04em;
  text-align: center;
}

@keyframes stamp {
  from { opacity: 0; transform: scale(1.18) rotate(-10deg); }
  to { opacity: 1; transform: none; }
}

/* The way to the App Store, drawn like the app's ink button. */
.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 30px 0 0;
}
.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease;
}
.store:hover { opacity: 0.9; }
.store:active { opacity: 0.85; transform: scale(0.98); }
.get span { color: var(--ink-soft); font-size: 0.9375rem; }
@media (max-width: 519px) {
  .store { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .seal { animation: none; }
  .store { transition: none; }
}

h2 {
  margin: 56px 0 12px;
  font: 500 1.75rem/1.15 "Newsreader Display", Georgia, serif;
  letter-spacing: -0.005em;
}

.group {
  margin: 44px 0 10px;
  font: 600 0.875rem/1.4 "Public Sans", sans-serif;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* A sheet of rows, like the app's safety box. */
.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.sheet > * + * { border-top: 1px solid var(--rule-soft); }

.row { padding: 18px 20px 20px; }
.row h3 {
  margin: 0 0 6px;
  font: 500 1.3125rem/1.25 "Newsreader Display", Georgia, serif;
}
.row p { margin: 0; }
.row p + p { margin-top: 10px; }

/* Three short facts at the top of the privacy policy. */
.fact {
  display: grid;
  gap: 4px;
  padding: 16px 20px;
}
.fact strong { font: 500 1.25rem/1.25 "Newsreader Display", Georgia, serif; }
.fact .detail { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; }

/* What you tap in the app, set apart from the sentence around it. */
.path { font-weight: 600; }

.prose p, .prose li { max-width: 38em; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }

.contact {
  margin-top: 56px;
  padding: 22px 20px;
  border-top: 1px solid var(--rule);
}
.contact h2 { margin-top: 0; }

footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
footer a { color: var(--ink-soft); }

.updated { font-family: "Newsreader", Georgia, serif; font-style: italic; color: var(--ink-soft); margin-top: 18px; }
