/* Tonari site. Fonts: Shippori Mincho B1 (headings) and Zen Kaku Gothic New (text),
   both SIL Open Font License 1.1, served by Google Fonts. */

:root {
  --paper: #f7f4ee;
  --ink: #1d1b18;
  --muted: #5f5a52;
  --rule: #ddd6ca;
  --accent: #b5452c;
  --font-text: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-head: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171614;
    --ink: #ece7de;
    --muted: #a59e92;
    --rule: #34312c;
    --accent: #e0805f;
  }
}

:root[data-theme="dark"] {
  --paper: #171614;
  --ink: #ece7de;
  --muted: #a59e92;
  --rule: #34312c;
  --accent: #e0805f;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 16px 4rem;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.wordmark .latin {
  font-size: 0.95rem;
  color: var(--muted);
  margin-left: 0.5rem;
  letter-spacing: 0.08em;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

nav.site a:first-child { margin-left: 0; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); }

h1, h2 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.4;
}

h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 2.25rem 0 0.5rem; }

p { margin: 0 0 1rem; }

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

.lede { font-size: 1.2rem; color: var(--ink); }
.meta { color: var(--muted); font-size: 0.95rem; }

section.lang + section.lang {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.langs { font-size: 0.95rem; color: var(--muted); }
.langs a { margin-right: 1rem; }

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site p { margin: 0; }
