/* Ossintheus — the privacy notice (templates/privacy.html).

   The page loads tokens, fonts and login.css, so it shares the sign-in page's
   ground, brand mark, eyebrow and footer. What is here is only what a long
   document needs and a one-card entry does not: a readable measure, a table of
   contents, tables that fit a phone. Colours and radii come from tokens.css. */

.privacy-shell {
  position: relative;
  min-height: 100dvh;
  padding: 48px 20px calc(48px + env(safe-area-inset-bottom));
}

/* The same static wash the sign-in page lifts its card with, held to the top. */
.privacy-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 30% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(30% 50% at 75% 10%, color-mix(in oklab, var(--violet) 7%, transparent), transparent 72%);
}

/* The card, as on the sign-in page: one surface step, one hairline, the accent
   spent once on the top edge. */
.privacy-doc {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: min(46rem, 100%);
  margin: 0 auto;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.privacy-doc::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 35%, transparent) 62%, transparent);
  pointer-events: none;
}

.privacy-doc a { color: var(--accent); text-underline-offset: 3px; }
.privacy-doc a:hover { color: var(--text); }

/* The page does not load ui-kit.css, so its label face is set here the same way: eyebrows
   in Inter rather than the dotted mono, and the wordmark as the shell sets it (style.css:
   label face, tracked capitals), not the display face at 16px. */
:root { --label: var(--font); }
.privacy-doc .login-wordmark { font-family: var(--font); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; }

.privacy-doc .privacy-brand { width: max-content; color: var(--text); text-decoration: none; }
.privacy-doc .privacy-brand:hover { color: var(--text); }

.privacy-head { display: flex; flex-direction: column; gap: 12px; }
.privacy-head .login-eyebrow { margin: 10px 0 0; }

.privacy-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.privacy-lede { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--text-1); }

.privacy-updated {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.privacy-toc {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.privacy-toc h2 {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.privacy-toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 4px 20px;
  margin: 0;
  padding-left: 1.4em;
  font-size: 0.875rem;
}

/* Each entry is a 40px target: on a phone the links were 17px tall and 34px apart. */
.privacy-toc li { padding: 0; }
.privacy-toc a { display: inline-flex; align-items: center; min-height: 40px; }
.privacy-toc li::marker { color: var(--text-3); font-family: var(--font); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

.privacy-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  /* Clear of the sticky bar when a contents link jumps here. */
  scroll-margin-top: 64px;
}

.privacy-section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  /* The reading face: the display face is for 28px and up (style.css), and at 20px its
     pixel grid closed the counters. The page's h1 keeps it. */
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.privacy-section h2 span {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.privacy-section h3 { margin: 8px 0 0; font-size: 1rem; font-weight: 600; }

.privacy-section p { margin: 0; line-height: 1.65; color: var(--text-1); }
.privacy-section strong { color: var(--text); font-weight: 600; }
.privacy-section em { font-style: normal; color: var(--text-2); }

.privacy-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 1.2em; line-height: 1.6; color: var(--text-1); }
.privacy-list li::marker { color: var(--text-3); }

.privacy-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.875rem;
}

.privacy-section .privacy-placeholder {
  color: var(--warn);
  font-style: italic;
}

.privacy-facts { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.privacy-facts > div,
.privacy-rights > div {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr;
  gap: 4px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.privacy-facts dt,
.privacy-rights dt { font-weight: 600; color: var(--text); }
.privacy-facts dd,
.privacy-rights dd { margin: 0; line-height: 1.6; color: var(--text-1); overflow-wrap: anywhere; }
.privacy-rights { margin: 0; }

.privacy-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-chips li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.privacy-chips strong { font-size: 0.8125rem; }
.privacy-chips small { font-size: 0.75rem; line-height: 1.5; color: var(--text-2); }

/* A table scrolls inside its own box on a narrow screen, never the page. */
.privacy-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.privacy-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.privacy-table th,
.privacy-table td { padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.5; border-bottom: 1px solid var(--line); }
.privacy-table tbody tr:last-child > * { border-bottom: 0; }
.privacy-table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--surface-2);
}
.privacy-table tbody th { width: 46%; font-weight: 600; color: var(--text); }
.privacy-table td { color: var(--text-1); }
.privacy-table code { font-family: var(--mono); font-size: 0.8125rem; color: var(--text); white-space: nowrap; }

.privacy-footer { align-items: center; }
.privacy-footer a { display: inline-flex; align-items: center; min-height: 44px; letter-spacing: 0.06em; }

/* The bar that stays at the top: a way back to the app and to the contents from
   anywhere in a page that is six to twelve screens long. */
.privacy-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--base) 92%, transparent);
  backdrop-filter: blur(8px);
}

.privacy-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.privacy-bar a:hover,
.privacy-bar a:focus-visible { color: var(--text); text-decoration: underline; }

/* The three answers most people come for, before the full table. */
.privacy-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.9375rem;
}

/* Something on this server is not as the notice describes; said in the amber the
   product uses for every uncertain state. */
.privacy-callout {
  padding: 12px 14px;
  border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--warn) 9%, transparent);
  font-size: 0.875rem;
}

.privacy-section .privacy-callout strong { color: var(--warn); }

@media (max-width: 760px) {
  .privacy-shell { padding: 16px 12px calc(24px + env(safe-area-inset-bottom)); }
  .privacy-doc { padding: 24px 18px; gap: 22px; }
  .privacy-head h1 { font-size: 1.5rem; }
  .privacy-facts > div,
  .privacy-rights > div { grid-template-columns: 1fr; }
  .privacy-table tbody th { width: auto; }
}

@media (forced-colors: active) {
  .privacy-shell::before,
  .privacy-doc::after { display: none; }
  .privacy-doc { border: 1px solid CanvasText; background: Canvas; }
}

@media print {
  .privacy-bar,
  .privacy-shell::before,
  .login-skip { display: none; }
  .privacy-doc { border: 0; padding: 0; }
}

/* Round 1b (shell-privacy lane). The contents heading cleared the sticky bar only for
   the numbered sections; "Contents" landed with "On this page" half under it. */
.privacy-toc,
#toc-title { scroll-margin-top: 64px; }

/* Inline links in the rights list and under How long were 17-19px tall. A taller hit
   area, without moving the text around them — at every width, not only on a phone
   (round 3: "How long", "Who is responsible" and "open Your data" measured 17-19px at
   1440). */
.privacy-rights dd a,
#how-long a,
.privacy-callout a,
.privacy-doc main p a,
.privacy-section p a,
.privacy-section li a {
  display: inline-block;
  padding-block: 10px;
  margin-block: -10px;
}

/* Round 2 (shell-privacy lane). "See or delete your data" one press from the top, beside
   the date, rather than four steps down the page. */
.privacy-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.privacy-yourdata {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.privacy-doc a.privacy-yourdata { color: var(--text); }
.privacy-yourdata:hover { border-color: var(--accent); }

/* The long reference lists fold under a line that says what is inside, so the short
   summary above them is what a phone reader meets first. */
.privacy-fold { margin: 14px 0 0; }
.privacy-fold > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-weight: 600;
  cursor: pointer;
}
.privacy-fold[open] > summary { margin-bottom: 12px; }

/* Round 3 (shell-privacy lane). `display: flex` on a summary removes the browser's
   disclosure arrow, so the folds looked like the plain note boxes under them. A chevron
   and a Show / Hide word say that they open. */
.privacy-fold > summary { list-style: none; gap: 12px; }
.privacy-fold > summary::-webkit-details-marker { display: none; }
.privacy-fold > summary::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}
.privacy-fold[open] > summary::before { transform: rotate(45deg); }
.privacy-fold > summary::after {
  content: "Show";
  margin-left: auto;
  padding-left: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9em;
}
.privacy-fold[open] > summary::after { content: "Hide"; }
.privacy-fold > summary:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .privacy-fold > summary::before { transition: none; }
}

/* Round 4. The administrator callout led with three environment variable names and
   "restart it", though Settings saves the same details at once. The form leads now;
   the variables are a quiet second line for whoever installs servers. */
.privacy-callout__alt { display: block; margin-top: 6px; color: var(--text-2); font-size: 0.8125rem; }

/* The brand mark was the one target under 40px on a phone (28px). */
@media (max-width: 760px) {
  .privacy-doc .privacy-brand { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Round 5. A detail the operator never gave is marked as missing, in the amber the
   page uses for every state that is not as described, so a placeholder does not read
   like an answer. */
.privacy-missing {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border: 1px solid color-mix(in oklab, var(--warn) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--warn) 12%, transparent);
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.privacy-callout > p { margin: 0; }
.privacy-steps { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding-left: 1.2em; }
/* The setting names, folded under the administrator callout. */
details.privacy-callout__alt { margin-top: 8px; }
details.privacy-callout__alt > summary { display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; color: var(--text-2); }
details.privacy-callout__alt > summary::before { content: "\25B8"; margin-right: 6px; }
details.privacy-callout__alt[open] > summary::before { content: "\25BE"; }
details.privacy-callout__alt > p { margin: 4px 0 0; }

/* The same three answers at the top of the page, one per line so each reads on its own. */
.privacy-summary--top { flex-direction: column; gap: 4px; margin-top: 16px; }
/* A link and the full stop after it stay on one line, so no line starts with a lone ". ". */
.privacy-nowrap { white-space: nowrap; }
