/* Trainly legal pages. Colors follow the app's TrainlyColors (trainly_uikit). */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --primary: #4d4d89;
  --primary-50: #f5f2f9;
  --secondary: #8da025;
  --text: #202327;
  --text-muted: #616161;
  --bg: #ffffff;
  --surface: #fafafa;
  --border: #e8e9eb;
  --link: #4d4d89;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e9eb;
    --text-muted: #bcbcc4;
    --bg: #17181b;
    --surface: #202327;
    --border: #33363c;
    --link: #b3b3e0;
    --primary-50: #26263f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
}
.site-header .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-header .brand img { display: block; height: 32px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 999px;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.14); }
.site-nav a[aria-current="page"] { background: #fff; color: var(--primary); }

/* Content */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

h1 {
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  margin: 40px 0 12px;
  scroll-margin-top: 16px;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 8px;
}
p, ul { margin: 0 0 14px; }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }
li > ul { margin-top: 6px; list-style: circle; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}
.meta a { font-weight: 600; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 8px;
}
.toc strong { display: block; margin-bottom: 6px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 32px; font-size: 15px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.contact {
  background: var(--primary-50);
  border-radius: 12px;
  padding: 16px 20px;
}
.contact p { margin: 0 0 4px; }

/* Index cards */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 28px; }
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}
.card:hover { border-color: var(--primary); }
.card strong { display: block; font-size: 18px; margin-bottom: 4px; color: var(--link); }
.card span { color: var(--text-muted); font-size: 15px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer a { color: var(--text-muted); }

@media print {
  .site-header, .site-footer, .toc, .meta a, .skip-link { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
  main { padding: 0; }
}
