/* Privacy policy — a long-form prose route. Mirrors the support page's section
   rhythm, but constrains measure for readability since this is dense reading
   rather than scannable cards. */

body.privacy-page .privacy-main {
  gap: 1rem;
}

body.privacy-page .privacy-hero {
  gap: 0.65rem;
}

body.privacy-page .privacy-hero .hero-copy {
  max-width: 58rem;
  line-height: 1.55;
}

body.privacy-page .privacy-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

body.privacy-page .privacy-section {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  max-width: 68rem;
}

body.privacy-page .privacy-section p {
  margin: 0;
  max-width: 62rem;
  color: var(--text-soft);
  line-height: 1.68;
}

body.privacy-page .privacy-section h3 {
  margin: 0.5rem 0 0;
  font-size: 1.02rem;
  color: var(--text);
}

body.privacy-page .privacy-list {
  display: grid;
  gap: 0.46rem;
  margin: 0;
  padding-left: 1.15rem;
  max-width: 62rem;
  color: var(--text-soft);
  line-height: 1.62;
}

body.privacy-page .privacy-list li::marker {
  color: rgba(191, 239, 255, 0.62);
}

body.privacy-page .privacy-note {
  padding: 0.7rem 0.85rem;
  border-left: 2px solid rgba(191, 239, 255, 0.42);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(142, 122, 196, 0.11);
  font-size: 0.92rem;
}

body.privacy-page .privacy-section code {
  padding: 0.08em 0.36em;
  border-radius: 0.32em;
  background: rgba(10, 7, 18, 0.55);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  color: #d9ecff;
  overflow-wrap: anywhere;
}

body.privacy-page .privacy-code {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(142, 122, 196, 0.4);
  border-radius: 0.6rem;
  background: rgba(10, 7, 18, 0.62);
  overflow-x: auto;
}

body.privacy-page .privacy-code code {
  padding: 0;
  background: none;
  white-space: pre;
}

body.privacy-page kbd {
  padding: 0.1em 0.42em;
  border: 1px solid rgba(142, 122, 196, 0.55);
  border-bottom-width: 2px;
  border-radius: 0.34em;
  background: rgba(34, 24, 56, 0.75);
  font-family: inherit;
  font-size: 0.86em;
}

/* Four columns will not fit a phone; the table scrolls inside its own box so
   the page body never picks up a horizontal scrollbar. */
body.privacy-page .privacy-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(142, 122, 196, 0.34);
  border-radius: 0.65rem;
}

body.privacy-page .privacy-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

body.privacy-page .privacy-table th,
body.privacy-page .privacy-table td {
  padding: 0.6rem 0.72rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(142, 122, 196, 0.22);
  color: var(--text-soft);
  line-height: 1.5;
}

body.privacy-page .privacy-table thead th {
  background: rgba(34, 24, 56, 0.6);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

body.privacy-page .privacy-table tbody tr:last-child th,
body.privacy-page .privacy-table tbody tr:last-child td {
  border-bottom: none;
}

body.privacy-page .privacy-section a {
  color: #bfefff;
  text-decoration-color: rgba(191, 239, 255, 0.5);
  text-underline-offset: 0.16em;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

body.privacy-page .privacy-section a:hover,
body.privacy-page .privacy-section a:focus-visible {
  color: #ffe3af;
  text-decoration-color: rgba(255, 227, 175, 0.72);
}

/* ---- the analytics opt-out switch --------------------------------------
   A real switch rather than the console snippet this section used to offer,
   because consent is one of the lawful bases the policy leans on and a
   developer-console instruction is not a control an ordinary visitor has.

   Built on a <button aria-pressed>, not a checkbox: it performs an action
   (stop collecting, clear cookies) rather than editing a form value, and
   aria-pressed is what tells a screen reader which way it is set. */
body.privacy-page .privacy-optout {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

body.privacy-page .privacy-optout-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.5rem 0.9rem 0.5rem 0.55rem;
  border: 1px solid rgba(142, 122, 196, 0.55);
  border-radius: 999px;
  background: rgba(34, 24, 56, 0.75);
  color: inherit;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

body.privacy-page .privacy-optout-button:hover,
body.privacy-page .privacy-optout-button:focus-visible {
  border-color: rgba(255, 227, 175, 0.7);
  background: rgba(48, 34, 78, 0.85);
}

body.privacy-page .privacy-optout-track {
  position: relative;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.45rem;
  border-radius: 999px;
  /* Green while collecting, muted once off. The label says which state it is
     in as well — colour is never the only signal. */
  background: rgba(96, 200, 140, 0.85);
  transition: background-color 160ms ease;
}

body.privacy-page .privacy-optout-thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.13rem;
  height: 1.13rem;
  border-radius: 50%;
  background: #f7f2ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  /* Right and green while analytics are ON, left and grey once off — the way
     round every OS switch is. The button's own state is the inverse (pressed
     means opted OUT), which is correct for aria-pressed and would be wrong
     here. */
  transform: translateX(1.15rem);
  transition: transform 160ms ease;
}

body.privacy-page .privacy-optout.is-off .privacy-optout-track {
  background: rgba(120, 106, 158, 0.7);
}

body.privacy-page .privacy-optout.is-off .privacy-optout-thumb {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  body.privacy-page .privacy-optout-track,
  body.privacy-page .privacy-optout-thumb,
  body.privacy-page .privacy-optout-button {
    transition: none;
  }
}

body.privacy-page .privacy-optout-status {
  margin: 0;
  color: rgba(214, 203, 240, 0.9);
  font-size: 0.88rem;
}

body.privacy-page .privacy-details {
  margin: 0;
  color: rgba(214, 203, 240, 0.9);
  font-size: 0.92rem;
}

body.privacy-page .privacy-details > summary {
  cursor: pointer;
  color: #ffd9a0;
}

body.privacy-page .privacy-details > * + * {
  margin-top: 0.55rem;
}

@media (max-width: 860px) {
  body.privacy-page .privacy-section {
    gap: 0.7rem;
  }

  body.privacy-page .privacy-section p,
  body.privacy-page .privacy-list {
    font-size: 0.94rem;
  }
}
