/* Trackets pages: the app's paper canvas, ink-blue accent and serif titles. */
:root {
  --canvas: #f6f1e7;
  --surface: #fbf8f2;
  --ink: #1c1a16;
  --secondary: #5a544b;
  --accent: #3f5a85;
  --rule: rgba(28, 26, 22, 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #12171f;
    --surface: #1a2029;
    --ink: #f1ece2;
    --secondary: #a9a295;
    --accent: #8fa9d6;
    --rule: rgba(241, 236, 226, 0.14);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Only the chosen language is shown. */
[lang]:not(html) { display: none; }
html[data-lang="en"] [lang="en"],
html[data-lang="fr"] [lang="fr"],
html[data-lang="zh"] [lang="zh"] { display: revert; }

.bar, main, footer {
  max-width: 680px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 8px;
}

.brand {
  font-family: ui-serif, "New York", Georgia, "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}

.langs { display: flex; gap: 4px; }

.langs button {
  font: inherit;
  font-size: 14px;
  color: var(--secondary);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--surface);
  font-weight: 600;
}

main { padding-top: 24px; padding-bottom: 32px; }

h1, h2 {
  font-family: ui-serif, "New York", Georgia, "Noto Serif SC", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 { font-size: 34px; margin: 0 0 8px; }
h1.home { font-size: 44px; }
h2 { font-size: 21px; margin: 0 0 6px; }

section {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}

section:first-of-type { margin-top: 16px; }

p { margin: 0 0 10px; }

.meta, .lead { color: var(--secondary); }
.lead { font-size: 19px; }

a { color: var(--accent); }

b { font-weight: 600; }

.links { list-style: none; padding: 0; margin: 28px 0 0; }
.links li { border-top: 1px solid var(--rule); }
.links li:last-child { border-bottom: 1px solid var(--rule); }
.links a {
  display: block;
  padding: 16px 0;
  font-size: 19px;
  text-decoration: none;
}

footer {
  display: flex;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}

footer a { color: var(--secondary); }
