/*
 * Digital Compass — privacy policy site.
 * Same palette as the app: "Paper & Ink" (light) and "Night Field" (dark).
 * Red is kept for the north marker in the logo and for links; everything else stays neutral.
 */

:root {
  --background: #f4f1ea;
  --surface: #ffffff;
  --surface-variant: #e8e3d8;
  --ink: #1c1b18;
  --ink-soft: #5e5a52;
  --accent: #c2412d;
  --brass: #9a7438;
  --success: #3e7a4f;
  --outline: #cfc8ba;
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.08), 0 2px 8px rgba(28, 27, 24, 0.04);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121210;
    --surface: #1c1b18;
    --surface-variant: #2a2824;
    --ink: #ece7dc;
    --ink-soft: #a49e92;
    --accent: #e05a43;
    --brass: #c8a267;
    --success: #6faf80;
    --outline: #3a3732;
    --shadow: none;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* Header */

.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--brass);
  margin-bottom: 24px;
}

.masthead img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
}

.masthead h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.masthead p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Cards */

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--outline);
}

.summary {
  background: var(--surface-variant);
  border: none;
}

.summary h2 {
  margin-top: 0;
}

.summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.summary li {
  margin: 6px 0;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

h3 {
  font-size: 1rem;
  margin: 16px 0 4px;
}

p {
  margin: 8px 0;
}

ul {
  padding-left: 1.2em;
}

.muted {
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-variant);
  color: var(--ink);
  vertical-align: middle;
}

.tag.ok::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
  vertical-align: 1px;
}

/* Table of contents */

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin: 4px 0;
  break-inside: avoid;
}

/* Permissions table */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--outline);
}

th {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-variant);
  padding: 1px 6px;
  border-radius: 6px;
  word-break: break-word;
}

/* Contact */

.contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 8px 0 0;
}

.contact dt {
  color: var(--ink-soft);
}

.contact dd {
  margin: 0;
  font-weight: 600;
}

footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--outline);
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 560px) {
  .page {
    padding-top: 20px;
  }

  .masthead h1 {
    font-size: 1.4rem;
  }

  .card {
    padding: 16px;
  }

  .toc ol {
    columns: 1;
  }

  .contact dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact dd {
    margin-bottom: 8px;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #cccccc;
  }
}
