/* Shared stylesheet for the N85 legal pages (/privacy/, /cookies/).
   Same tokens and voice as direction A, tuned for long-form reading: a single
   measured column, generous leading, and a sticky contents rail on wide screens.

   Inter is loaded from the about release rather than duplicating a 345kB font
   file. That coupling is deliberate and noted in the README. */

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

@font-face {
  font-family: "JetBrains Mono";
  src: url("/about/assets/fonts/JetBrainsMono-Variable.ttf")
    format("truetype-variations");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bone: #f4f1ea;
  --bone-deep: #e9e4d9;
  --ink: #14110f;
  --ink-soft: #56504a;
  --rule: #d4cec1;

  --shell: 1100px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    "Book Antiqua", Georgia, serif;
  --font-sans: "Inter Variable", -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Focus rings are coloured against the page, not the control, for the same
   reason as direction A: a currentColor ring on a filled control disappears. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.footer :focus-visible {
  outline-color: var(--bone);
}

.shell {
  width: min(calc(100% - (2 * var(--gutter))), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Masthead, matching the about release */
.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark__mark {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.masthead__nav {
  display: flex;
  gap: clamp(0.9rem, 2.2vw, 1.9rem);
  margin-right: auto;
  font-size: 0.85rem;
}

.masthead__nav a {
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: border-color 200ms var(--ease);
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* Title block */
.title {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.title h1 {
  max-width: 24ch;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.title__lede {
  max-width: 58ch;
  margin-top: 1.2rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
}

.title__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Body: contents rail plus a measured reading column */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.contents {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.contents h2 {
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contents ol {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  list-style: none;
}

.contents li {
  counter-increment: toc;
}

.contents a {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.35rem;
  padding-block: 0.3rem;
  font-size: 0.86rem;
  text-decoration: none;
}

.contents a::before {
  color: var(--ink-soft);
  content: counter(toc) ".";
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.contents a:hover {
  text-decoration: underline;
}

.prose {
  max-width: 68ch;
}

.prose > section + section {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

.prose h2 {
  margin-bottom: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  scroll-margin-top: 1.5rem;
}

.prose h3 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.prose p + p,
.prose ul + p,
.prose p + ul,
.prose dl + p {
  margin-top: 0.9rem;
}

.prose ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.1rem;
}

.prose li::marker {
  color: var(--ink-soft);
}

.prose strong {
  font-weight: 700;
}

/* Definition table for "what we collect" style content */
.pairs {
  display: grid;
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
}

.pairs > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.36fr) minmax(0, 1fr);
  gap: 0.5rem clamp(1rem, 3vw, 2rem);
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.pairs dt {
  font-weight: 700;
}

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

/* A callout for the things a reader most needs to notice */
.note {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--bone-deep);
  border-left: 2px solid var(--ink);
}

.note p {
  font-size: 0.92rem;
}

.note p + p {
  margin-top: 0.6rem;
}

/* Footer, matching the about release */
.footer {
  padding-block: 2rem;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.85rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__mark {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--bone);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .contents {
    position: static;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
  }

  .pairs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
