/* Shared styles for the Simplytrack legal, terms and support pages.
   Tokens mirror index.html so the pages read as one site. */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --ink: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --soft: #f4f4f5;
  --primary: #0a0a0a;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Anchor jumps (the table-of-contents links) stop clear of the sticky header. */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px; padding: 10px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--fg); text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: #fefefe;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid rgba(10, 10, 10, .08);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.back {
  font-size: 14px; font-weight: 600; white-space: nowrap;
  color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.back:hover { color: var(--fg); }

/* Document body */
.doc { padding: 64px 0 96px; }
.doc h1 {
  font-size: clamp(32px, 5vw, 44px); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.1; color: var(--fg);
}
.updated {
  display: inline-block; margin-top: 18px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--soft);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.lede { margin-top: 22px; font-size: 17px; }
.doc h2 {
  font-size: 24px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.02em; line-height: 1.3;
  margin: 44px 0 16px;
}
.doc h3 { font-size: 17px; font-weight: 700; color: var(--fg); margin: 26px 0 8px; }
.doc p { margin-bottom: 16px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 10px; }
.doc li::marker { color: var(--muted); }
.doc strong { color: var(--fg); font-weight: 700; }
.doc a:not(.back):not(.pill) {
  color: var(--fg); text-decoration: underline; text-underline-offset: 2px;
}
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* Table of contents */
.toc {
  margin: 36px 0 8px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--soft);
}
.toc-label {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 15px; }

/* Emphasised legal callout */
.callout {
  margin: 24px 0; padding: 22px 24px;
  border: 1px solid var(--line); border-left: 3px solid var(--fg);
  border-radius: 12px; background: var(--soft);
}
.callout p:last-child { margin-bottom: 0; }

/* Cards, buttons */
.card {
  border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; font-weight: 600;
  border-radius: 999px; padding: 12px 24px; font-size: 15px;
  text-decoration: none; transition: opacity .2s;
}
.pill:hover { opacity: .9; }
.support-mark {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; margin-bottom: 24px;
}
.mail {
  font-size: 18px; font-weight: 700; color: var(--fg);
  text-decoration: none; word-break: break-all;
}
.mail:hover { text-decoration: underline; }
.meta { font-size: 14px; color: var(--muted); }

.contact-card { margin: 40px 0 8px; }
.contact-card h2 { margin: 0 0 8px; font-size: 20px; }
.contact-card .mail-line { margin-bottom: 20px; }
.contact-card .meta { margin: 20px 0 0; }

/* FAQ (no JS needed) */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 0; font-size: 16px; font-weight: 600; color: var(--fg);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 22px; font-weight: 400; color: var(--muted);
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-bottom: 20px; }
.faq .answer > :last-child { margin-bottom: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--line); padding: 24px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--fg); }
/* Underlined because it is an inline link inside a sentence, unlike the
   standalone nav links beside it. */
footer .credit { text-decoration: underline; text-underline-offset: 2px; }

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