/* Pame — legal and support pages. Plain document style: system font, one column, no colours
   beyond text, links and thin separators. Follows the device's light or dark appearance; prints
   white with dark text. Sizes are in rem so browser zoom and text-size settings scale everything. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1a1a1a;
  --link: #0645ad;
  --link-visited: #5a2a8c;
  --focus: #1a1a1a;
  --rule: #b3b3b3;
  --rule-strong: #767676;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --text: #e6e6e6;
    --link: #8ab4f8;
    --link-visited: #c58af9;
    --focus: #e6e6e6;
    --rule: #555555;
    --rule-strong: #8a8a8a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page {
  max-width: 45rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:visited {
  color: var(--link-visited);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -100vw;
}

.skip-link:focus {
  position: static;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Navigation: Privacy Policy · Terms · Support · FAQ */

.site-nav {
  margin: 0 0 1.5rem;
}

.site-nav a[aria-current="page"] {
  color: inherit;
  font-weight: 600;
}

/* Draft note */

.draft-note {
  margin: 0 0 1.5rem;
}

/* Text */

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 1.625rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.5rem;
}

li {
  margin: 0.25rem 0;
}

li > ul {
  margin: 0.25rem 0 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* Tables: ordinary document tables. The wrapper only scrolls if a table can't fit (for example at
   high zoom); otherwise columns wrap to the text width. */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.375rem 0.75rem 0.375rem 0;
  border-bottom: 1px solid var(--rule);
}

th:last-child,
td:last-child {
  padding-right: 0;
}

thead th {
  font-weight: 600;
  border-bottom-color: var(--rule-strong);
}

/* FAQ: native <details>/<summary>; the whole summary row is the click target. The browser's
   triangle is hidden and replaced by a thin CSS chevron drawn in currentColor. */

.faq {
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: block; /* no list-item, so no native ::marker */
  list-style: none;
  position: relative;
  cursor: pointer;
  /* Fixed 1.25rem column for the chevron; every line of the question starts after it. */
  padding: 0.625rem 0 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none; /* Safari */
}

.faq summary::marker {
  content: "";
}

/* Chevron: two borders of a small square, rotated. Its box is centred on the first line
   (padding-top + half of the 1.4 line height), so wrapped questions keep it on line one. */
.faq summary::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: calc(0.625rem + 0.7em - 0.2em);
  width: 0.4em;
  height: 0.4em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateX(-0.1em) rotate(-45deg); /* points right */
}

.faq details[open] > summary::before {
  transform: translateY(-0.1em) rotate(45deg); /* points down */
}

.faq .answer {
  padding: 0 0 0.5rem 1.25rem;
}

/* Print: always white with dark text, regardless of the screen theme. */

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --text: #000000;
    --link: #000000;
    --link-visited: #000000;
    --rule: #bbbbbb;
    --rule-strong: #666666;
  }

  .site-nav,
  .skip-link {
    display: none;
  }
}
