@import url("tokens.css");

/* Shared styling for all app privacy policies.
   Supports both page shapes in use: a flat <header> + <main> document
   (CommitFit, Zonk!) and a .content-card wrapper (Pinbox). */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Top navigation ---------- */

.site-nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.nav-inner {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

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

body > header {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--space-8) var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}

body > header h1,
.content-card h1 {
  font-size: var(--step-3);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}

body > header p,
.last-updated {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.9;
  color: var(--text-faint);
}

body > header strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Prose ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-8);
}

.content-card {
  padding-top: var(--space-1);
}

.content-card h1 {
  margin-bottom: var(--space-3);
}

main h2 {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

main h3 {
  font-size: var(--step-1);
  font-weight: 550;
  color: var(--text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}

main p {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

main strong {
  color: var(--text);
  font-weight: 550;
}

main ul,
main ol {
  margin: 0 0 var(--space-5) var(--space-5);
  color: var(--text-muted);
}

main li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-2);
}

main li::marker {
  color: var(--text-faint);
}

main a {
  word-break: break-word;
}

main hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-7) 0;
}

/* Pinbox uses .section as a grouping wrapper */
.section {
  margin-bottom: var(--space-6);
}

/* Callout */
.highlight {
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  color: var(--text-muted);
}

.highlight strong {
  color: var(--text);
}

/* ---------- Tables ---------- */

.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

main table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

main th,
main td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

main th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-subtle);
  white-space: nowrap;
}

main td {
  color: var(--text-muted);
}

main tbody tr:last-child td {
  border-bottom: 0;
}

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

body > footer,
main > footer {
  border-top: 1px solid var(--line);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  font-size: var(--step--1);
  color: var(--text-faint);
}

body > footer p,
main > footer p {
  margin-bottom: var(--space-2);
  color: var(--text-faint);
}

@media (max-width: 640px) {
  body > header {
    padding-top: var(--space-6);
  }

  main {
    padding-block: var(--space-6) var(--space-7);
  }
}
