/* VELTRAIL legal site. System fonts only; no external requests. Colours follow the game's palette
   (game/src/client/ui/theme/ui_palette.gd: ceramic, graphite, azure, amber, seam). */
:root {
  color-scheme: light dark;
  --background: #fbf7f1;
  --surface: #ffffff;
  --text: #26262b;
  --text-secondary: #55535a;
  --accent: #185ba2;
  --brand: #e08a1e;
  --divider: #d7cbbb;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #17171a;
    --surface: #222226;
    --text: #fbf7f1;
    --text-secondary: #c4beb5;
    --accent: #7db8f2;
    --brand: #f29a2e;
    --divider: #3a3a40;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern";
  overflow-wrap: break-word;
  hyphens: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 8px;
}

.skip:focus {
  top: 1rem;
}

header.site,
main,
footer.site {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem 0.5rem;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand span {
  color: var(--brand);
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.languages li + li {
  margin-top: 0;
}

.languages [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 600;
}

main {
  padding-block: 1rem 3rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw + 1rem, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.5rem;
}

h1 + p {
  color: var(--text-secondary);
  margin-top: 0;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--divider);
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.25rem;
  scroll-margin-top: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

strong {
  font-weight: 650;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.toc {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  font-size: 0.9375rem;
}

.toc-title {
  margin: 0 0 0.5rem;
  font-weight: 650;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li + li {
  margin-top: 0.2rem;
}

.documents {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.documents li + li {
  margin-top: 0;
}

.documents a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}

.documents a span {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.documents a:hover {
  border-color: var(--accent);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--divider);
  font-size: 0.9375rem;
}

@media print {
  header.site nav,
  footer.site,
  .skip,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
