/* The privacy policy (privacy.html). */
body { line-height: 1.65; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
code {
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 0.35rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

/* Header: back link on the left, logo centred (the empty third column balances the first). */
.site-header {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.site-header .back { justify-self: start; white-space: nowrap; }
/* On narrow phones the link reads "← Home"; screen readers still hear "Back to home". */
.back-short { display: none; }
@media (max-width: 30rem) {
  .back-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .back-short { display: inline; }
}
.home { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; text-decoration: none; }
.home:hover { color: var(--text); }
.home svg { width: 2.25rem; height: 2.25rem; }
.back { color: var(--muted); font-size: 0.95rem; text-decoration: none; padding: 0.4rem 0.2rem; }
.back:hover { color: var(--accent); text-decoration: underline; }

/* Hero. */
.hero {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 3rem 1rem 2.5rem;
}
.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.12; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 38rem; margin: 0 0 1.25rem; }
.updated {
  display: inline-block;
  margin: 0;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}

/* Contents beside the policy on wide screens, above it on narrow ones. */
.layout {
  flex: 1;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  display: grid;
  gap: 2rem;
}
main { min-width: 0; max-width: 44rem; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
}
.toc h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2 13rem; column-gap: 1.5rem; counter-reset: toc; }
.toc li { break-inside: avoid; counter-increment: toc; }
.toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.3rem 0;
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.4;
  text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
  padding-top: 0.08em;
}
.toc a:hover { color: var(--accent); }

@media (min-width: 60rem) {
  .layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; }
  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    background: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
  }
  .toc ol { columns: auto; }
}

/* Sections. */
section + section { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--border); }
section h2 { font-size: 1.4rem; line-height: 1.3; margin: 0 0 0.85rem; scroll-margin-top: 1.5rem; }
p { margin: 0 0 1rem; }
section > :last-child { margin-bottom: 0; }

/* "In short": the whole policy at a glance. */
.summary {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem 1.6rem;
}
section.summary + section { border-top: 0; padding-top: 0; }

/* Lists. A check mark for what we do, a cross for what we never do. */
.items, .checks, .crosses, .steps { list-style: none; margin: 0 0 1rem; padding: 0; }
.items > li, .checks > li, .crosses > li { position: relative; padding-left: 1.9rem; }
.items > li + li, .checks > li + li, .crosses > li + li, .steps > li + li { margin-top: 0.85rem; }

.items > li::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.checks > li::before,
.crosses > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--accent);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
/* A filled circle with the check cut out of it. */
.checks > li::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cmask id='m'%3E%3Crect width='20' height='20' fill='%23fff'/%3E%3Cpath d='M6 10.5l2.7 2.7L14.2 7.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='10' cy='10' r='10' mask='url(%23m)'/%3E%3C/svg%3E");
}
.crosses > li::before {
  background: var(--danger);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 5.5l9 9M14.5 5.5l-9 9' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.crosses {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.25rem 1.4rem;
}

/* The three ways the extension talks to the registry, numbered. */
.steps { counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.25rem 1rem 3.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: 700;
}
.steps ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.steps ul li + li { margin-top: 0.25rem; }

.callout {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.75rem 0.75rem 0;
  background: var(--surface-alt);
}

/* Permissions: name on the left, reason on the right. */
.perms { margin: 0; border: 1px solid var(--border); border-radius: 0.9rem; overflow: hidden; background: var(--surface); }
.perms > div { padding: 0.85rem 1.25rem; display: grid; gap: 0.15rem; }
.perms > div + div { border-top: 1px solid var(--border); }
.perms dt { font-weight: 600; }
.perms dd { margin: 0; color: var(--muted); }
@media (min-width: 40rem) {
  .perms > div { grid-template-columns: 15rem 1fr; gap: 1.25rem; }
}
