/* Levra — legal pages (the privacy notices; terms, when they exist).
   Deliberately not the app's design system: these pages take the look of the
   writing pages on tarekwady.com (decided by Tarek, 2026-09-16) — one centred
   14px Inter column, an `Index` link pinned on the left, the title in 500 over
   a grey date. `scripts/build-public-site.mjs` ships this as /legal.css. The
   site CSP allows self-hosted fonts only, so Inter comes from /fonts, not from
   Google Fonts as on the blog. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
}

html, body { margin: 0; padding: 0; background: #ffffff; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
body {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  padding-top: 80px;
}
a { color: #0B1342; text-decoration: none; }
a:hover { color: #191919; }

#column { width: 100%; margin: 0 auto; max-width: 582px; padding: 0 16px 40px; }

#nav {
  position: fixed; left: 80px; top: 80px; z-index: 10;
  width: fit-content; max-width: 170px; white-space: nowrap; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 60px;
}
#back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 0; margin: 0; text-align: left;
  font-family: Inter, -apple-system, sans-serif; font-weight: 400; font-size: 14px; line-height: 20px;
  color: rgba(0, 0, 0, 0.4);
}
#back-btn:hover { color: #111111; }
.motion-icon { display: block; flex-shrink: 0; overflow: visible; }
.motion-icon g { transition: transform 300ms ease-in-out; }
#back-btn:hover .motion-icon g { transform: translateX(-3px); }
@media (prefers-reduced-motion: reduce) {
  .motion-icon g { transition: none; }
}

#header { display: flex; flex-direction: column; gap: 4px; max-width: 550px; padding-bottom: 8px; margin-top: 40px; }
.type-label { font-family: Inter, -apple-system, sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; color: #111111; margin: 0; }
.type-meta { font-family: Inter, -apple-system, sans-serif; font-weight: 400; font-size: 14px; line-height: 20px; color: rgba(0, 0, 0, 0.4); margin: 0; }

#post-body {
  max-width: 550px; display: flex; flex-direction: column; gap: 20px; padding-top: 16px;
  font-family: Inter, -apple-system, sans-serif; font-size: 14px; line-height: 20px; color: #111111;
}
#post-body p { margin: 0; text-wrap: pretty; }
#post-body a { border-bottom: 1px solid #d4d4d4; }
#post-body a:hover { border-bottom: 1px solid #191919; }
#post-body strong { font-weight: 500; }
#post-body address { font-style: normal; }
#post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.93em; }

/* The blog has no sections; a notice does. A heading sits closer to what it
   introduces than to what came before it. */
#post-body h2 { font: inherit; font-weight: 500; margin: 20px 0 -12px; }
#post-body h3 { font: inherit; color: rgba(0, 0, 0, 0.4); margin: 8px 0 -12px; }
#post-body > :is(h2, h3):first-child { margin-top: 0; }

#post-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
#post-body li::marker { color: rgba(0, 0, 0, 0.4); }

/* Tables use the hairline rows of the blog's index list and scroll sideways
   on their own when a phone is too narrow for them. */
.table { overflow-x: auto; }
.table table { border-collapse: collapse; width: 100%; min-width: 440px; }
.table th,
.table td {
  text-align: left; vertical-align: top;
  padding: 9px 16px 9px 0;
  border-bottom: 1px solid #ececec;
}
.table th:last-child,
.table td:last-child { padding-right: 0; }
.table th { font-weight: 400; color: rgba(0, 0, 0, 0.4); }

/* Below 1100px the pinned rail can't clear the centred column. */
@media (max-width: 1099px) {
  #nav { position: static; width: 100%; max-width: none; gap: 0; margin-bottom: 40px; }
}

/* Below 900px, full-width column and larger type for reading on a phone. */
@media (max-width: 899px) {
  body { padding-top: 0; }
  #column { max-width: none; padding: 32px 24px 40px; }
  #nav { margin-bottom: 32px; }
  #header { margin-top: 0; }
  .type-label, .type-meta, #post-body { font-size: 16px; line-height: 24px; }
}
