:root {
  --qrf-blue: #5d99d1;
  --qrf-blue-dark: #3f7bb3;
  --ink: #1b1f24;
  --muted: #5b6572;
  --border: #e4e7eb;
  --bg: #ffffff;
  --bg-subtle: #f7f9fb;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--qrf-blue-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Shared header / footer ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  z-index: 10;
}

.site-header .wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--qrf-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.header-links {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

.header-links a {
  color: var(--muted);
}

.header-links a.active {
  color: var(--qrf-blue-dark);
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.site-footer .wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

.site-footer a {
  color: var(--muted);
}

/* ---------- Page shell ---------- */

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.page-narrow {
  max-width: 680px;
}

h1 {
  font-size: 30px;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.updated-badge {
  display: inline-block;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 28px;
}

.intro {
  color: var(--muted);
  font-size: 16px;
  max-width: 620px;
}

/* ---------- Highlights box ---------- */

.highlights {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0 40px;
}

.highlights h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

.highlights ul {
  margin: 0;
  padding-left: 20px;
}

.highlights li {
  margin-bottom: 6px;
  font-size: 15px;
}

.highlights li:last-child {
  margin-bottom: 0;
}

/* ---------- Two-column layout with sticky TOC ---------- */

.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc-desktop {
  position: sticky;
  top: 84px;
  font-size: 14px;
}

.toc-desktop nav {
  border-left: 2px solid var(--border);
  padding-left: 14px;
}

.toc-desktop a {
  display: block;
  color: var(--muted);
  padding: 5px 0;
}

.toc-desktop a.active {
  color: var(--qrf-blue-dark);
  font-weight: 600;
}

.toc-mobile {
  display: none;
}

.content section {
  scroll-margin-top: 84px;
  margin-bottom: 40px;
}

.content h2 {
  font-size: 19px;
  margin: 0 0 10px;
}

.content p,
.content ul {
  font-size: 15.5px;
}

/* ---------- Emphasized callout (used for data-control / rights section) ---------- */

.callout {
  border: 1px solid var(--qrf-blue);
  background: #f2f8fc;
  border-radius: var(--radius);
  padding: 18px 22px;
}

.callout h2 {
  margin-top: 0;
}

/* ---------- Link cards (index page) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink);
}

.card:hover {
  border-color: var(--qrf-blue);
  text-decoration: none;
}

.card .card-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.card .card-desc {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- Signup example mock ---------- */

.form-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 20px;
  background: var(--bg-subtle);
}

.form-mock label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

.form-mock input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--muted);
}

.consent-text {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.5;
}

.create-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 20px;
  background: var(--qrf-blue);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc-desktop {
    display: none;
  }

  .toc-mobile {
    display: block;
    margin-bottom: 32px;
  }

  .toc-mobile summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--ink);
  }

  .toc-mobile nav {
    padding: 10px 4px 4px 16px;
  }

  .toc-mobile a {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    color: var(--muted);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 25px;
  }
}
