/* FitR legal pages — same design system as the main site (round 3):
   near-black canvas, Plus Jakarta Sans 400/600/800, hairline rules,
   printed running heads, ledger-style contents, emerald links.
   Tokens mirror src/styles.css. */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --card: #121212;
  --fg: #f2f2f2;
  --fg-body: rgba(242, 242, 242, 0.84);
  --fg-64: rgba(242, 242, 242, 0.64);
  --fg-58: rgba(242, 242, 242, 0.58);
  --line: rgba(242, 242, 242, 0.09);
  --line-soft: rgba(242, 242, 242, 0.055);
  --emerald: #10b77f;
  --emerald-hi: #3ee6ae;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Top bar — same anatomy as the site's. */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap; /* at large text sizes the back link wraps under the brand, never off-screen */
  align-items: center;
  gap: 4px 10px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px clamp(20px, 4vw, 48px);
  margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
}
header.top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}
header.top .brand img { height: 24px; width: auto; display: block; }
header.top a.back {
  margin-left: auto;
  color: var(--fg-64);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
header.top a.back:hover { color: var(--fg); }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 96px;
}

/* Running head above the title — the site's kicker. */
.kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 48px 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-58);
}
.kicker .idx { color: var(--emerald); }

h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 10px;
}
.updated { color: var(--fg-58); font-size: 14px; font-weight: 600; margin: 0 0 36px; }

a { color: var(--emerald-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Contents as ledger rows — the site's motif. */
.toc { margin: 0 0 44px; }
.toc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-58);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0 0 6px;
  text-transform: none;
  letter-spacing: 0;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}
.toc li { counter-increment: toc; margin: 0; }
.toc li a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--fg-64);
  font-weight: 600;
  font-size: 15px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.toc li a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
  min-width: 22px;
}
.toc li a::after {
  content: '';
  flex: 1;
  order: 2;
}
.toc li a:hover { color: var(--fg); text-decoration: none; }

h2 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 44px 0 12px;
  scroll-margin-top: 84px;
}
/* Section number pulled from the heading's leading "N." via ::first-line
   isn't possible in CSS — numbers stay inline in the text, styled bold
   white like the rest of the heading. */
h3 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; scroll-margin-top: 84px; }

p, li { color: var(--fg-body); }
p { margin: 0 0 14px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 8px; }
strong { color: var(--fg); font-weight: 700; }
.lead { font-size: 17px; color: var(--fg-64); margin-bottom: 28px; }

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin: 20px 0;
}

footer.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--fg-58);
  font-size: 14px;
  font-weight: 600;
}
