/* VPN Guard — shared stylesheet.
   Self-contained: system fonts only, no external resources, no scripts. */

:root {
  --bg: #ffffff;
  --fg: #1b1b1f;
  --muted: #63636b;
  --rule: #e2e2e7;
  --link: #0b5ed7;
  --link-hover: #08419a;
  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111114;
    --fg: #ececf0;
    --muted: #9a9aa4;
    --rule: #2a2a30;
    --link: #83b0ff;
    --link-hover: #a8c8ff;
  }
}

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

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

body {
  margin: 0;
  padding: 0 1.375rem;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* ---------- masthead ---------- */

.masthead {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.masthead a.wordmark {
  display: inline-block;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.masthead a.wordmark:hover {
  color: var(--link);
}

/* ---------- type ---------- */

h1 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.22;
  font-weight: 660;
  letter-spacing: -0.021em;
}

h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 640;
  letter-spacing: -0.006em;
  scroll-margin-top: 1.5rem;
}

h2 + p {
  margin-top: 0;
}

p {
  margin: 0 0 1.05rem;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.005em;
  margin-bottom: 0;
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

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

/* ---------- lists ---------- */

ul {
  margin: 0 0 1.05rem;
  padding: 0;
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0.05rem;
  top: 0.72em;
  width: 0.375rem;
  height: 1px;
  background: var(--muted);
}

/* ---------- document sections ---------- */

.doc {
  padding-bottom: 1rem;
}

.doc + .doc {
  margin-top: 3.5rem;
  padding-top: 3.25rem;
  border-top: 1px solid var(--rule);
}

.doc h1 {
  scroll-margin-top: 1.5rem;
}

/* Legal headings are reproduced verbatim from the bundled documents, which use
   capitals for section titles. Set them small and letterspaced so the capitals
   read as labels rather than shouting. */
.doc h2 {
  margin-top: 2.4rem;
  font-size: 0.8125rem;
  font-weight: 640;
  letter-spacing: 0.085em;
}

.doc h2 + p {
  margin-top: 0.4rem;
}

.toc {
  margin: 2rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.toc a {
  margin-right: 0.2rem;
}

.toc a:first-of-type {
  margin: 0 0.2rem 0 0;
}

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding: 1.75rem 0 3.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.125rem;
}

footer nav a {
  white-space: nowrap;
}

footer p {
  margin: 0.85rem 0 0;
}

/* ---------- small screens ---------- */

@media (max-width: 30rem) {
  body {
    font-size: 16px;
    padding: 0 1.125rem;
  }

  h1 {
    font-size: 1.625rem;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .masthead {
    padding-top: 2rem;
  }
}
