/*
  Lighter's privacy and support pages (knowledge/concepts/lighter/site.md).
  Started from the old Lighter site's privacy.html (founder, 2026-10-16): its
  one column, header, summary card and footer. Colours are Theme.swift's, with
  two porcelain values darkened here only so reading text reaches 4.5:1
  (planning session, 2026-10-17). System fonts only: nothing is fetched.
*/

:root {
  color-scheme: dark light;
  /* Theme.night */
  --bg: #0B101B;
  --bg-deep: #070B13;
  --text: #EAE3D6;
  --sub: #939DB0;
  --sage: #A9C3A3;
  --card: rgba(234, 227, 214, 0.055);
  --line: rgba(234, 227, 214, 0.10);
  --shadow: none;
}

@media (prefers-color-scheme: light) {
  :root {
    /* Theme.morning (porcelain); sub and sage darkened for the web, see above */
    --bg: #F7F4EE;
    --bg-deep: #EFE8DB;
    --text: #272D3A;
    --sub: #5F6777;   /* Theme #6D7585: 4.22:1, here 4.67:1 at the darkest */
    --sage: #52714B;  /* Theme #5E7F57: 4.11:1, here 4.51:1 at the darkest */
    --card: #FFFFFF;
    --line: rgba(38, 44, 56, 0.07);
    --shadow: 0 1px 2px rgba(38, 44, 56, 0.05), 0 10px 28px rgba(38, 44, 56, 0.07);
  }
}

/* 16.5px, the old page's size; on iPhone and iPad the reader's own text size,
   so the page follows Dynamic Type as the app does. */
html { font-size: 103.125%; }
@supports (-webkit-touch-callout: none) {
  html { font: -apple-system-body; }
}

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

body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%) fixed;
  background-color: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, .serif {
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 400;
}

a { color: var(--sage); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible { outline: 1.5px solid var(--sage); outline-offset: 4px; border-radius: 4px; }
.email { overflow-wrap: anywhere; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 28px; }

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 22px;
  padding: 28px 0;
}
nav a { text-decoration: none; }
nav .brand { font-size: 0.91rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--sub); }
nav .links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
nav .links a { color: var(--sub); font-size: 0.85rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

header.page { padding: 66px 0 10px; }
/* Headings grow with the text, but never past what fits a narrow phone. */
header.page h1 { font-size: max(1rem, min(2.06rem, 10vw)); line-height: 1.25; }
header.page .date { color: var(--sub); font-size: 0.85rem; margin-top: 10px; }
header.page .lead { color: var(--sub); margin-top: 18px; }

.summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin: 26px 0 10px;
}
.summary h2 { font-size: max(1rem, min(1.27rem, 7vw)); margin-bottom: 8px; }
.summary p, .summary li { font-size: 1.03rem; }
.summary ul { margin: 0 0 0 1.2em; }
.summary li + li { margin-top: 8px; }

article { padding: 14px 0 60px; }
article h2 { font-size: max(1rem, min(1.27rem, 7vw)); line-height: 1.35; margin: 44px 0 12px; }
article p, article li { color: var(--sub); }
article p + p { margin-top: 12px; }
article ul { margin: 10px 0 10px 1.2em; }
article li { margin-bottom: 8px; }

.home { padding: 18vh 0 40px; }
.home h1 { font-size: max(1rem, min(2.4rem, 11vw)); line-height: 1.2; }
.home p { color: var(--sub); margin-top: 14px; }
.home ul { list-style: none; margin-top: 30px; }
.home li + li { margin-top: 10px; }

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  color: var(--sub);
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .wrap { padding: 0 22px; }
  header.page { padding-top: 40px; }
  .summary { padding: 22px 20px; }
}

/* At the accessibility text sizes the column is only a few words wide (em here
   is the text's own size): indents stop growing with the text, and long words
   hyphenate rather than break anywhere. Default sizes never reach this. */
.wrap { container-type: inline-size; }
@container (max-width: 12em) {
  nav, header, main, article, footer { line-height: 1.45; }
  .summary { padding: 16px 14px; border-radius: 16px; }
  .summary ul { list-style: none; margin-left: 0; }
  article ul { margin-left: 0.75em; }
  nav { gap: 0 0.6em; padding: 20px 0; }
  nav .links { gap: 0 0.6em; }
  nav .brand { letter-spacing: 0.08em; }
  header.page { padding-top: 24px; }
}
