/* U1: the "Open-source licences" page (licences.html, generated by
   scripts/licences_page.mjs). The site's colours (app.css tokens), light or
   dark from the system setting (the page runs no script). */
:root {
  --page: #f6f1e7;
  --card: #ffffff;
  --card-alt: #f4eee3;
  --text: #2b2118;
  --muted: #74675a;
  --border: #e5dccd;
  --accent: #b7832f;
  --accent-strong: #946620;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 8px 24px rgb(60 40 20 / 8%);
  color-scheme: light dark;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--page);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #121418;
    --card: #1f2329;
    --card-alt: #272c33;
    --text: #ece7df;
    --muted: #a29b91;
    --border: #30353d;
    --accent: #d9a650;
    --accent-strong: #ebbd6f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 28%);
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.55;
}
.licences {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 22px 40px;
}
.licences-head,
.licences-body {
  padding: 22px 24px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.licences-brand img {
  display: block;
  height: 36px;
  width: auto;
}
h1 {
  margin: 14px 0 8px;
  font-size: 1.6rem;
}
h2 {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h3 {
  margin: 30px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
}
a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}
p,
li {
  overflow-wrap: anywhere;
}
.licences-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.table-wrap {
  overflow-x: auto;
  margin: 10px 0 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--card-alt);
}
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.licence-text {
  max-height: 32rem;
  overflow: auto;
  margin: 10px 0 16px;
  padding: 14px 16px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.licences-foot {
  color: var(--muted);
  text-align: center;
}
@media (max-width: 600px) {
  .licences {
    padding: 16px 12px 28px;
  }
  .licences-head,
  .licences-body {
    padding: 16px;
  }
}
