:root, :root[data-theme="light"] {
  color-scheme: light; --bg: #faf7f0; --surface: #f2eee4; --text: #2b2620;
  --muted: rgba(43, 38, 32, .7); --gold: #86671f; --line: rgba(43, 38, 32, .14);
}
:root[data-theme="sepia"] {
  color-scheme: light; --bg: #f3e9d2; --surface: #ece0c4; --text: #43351f;
  --muted: rgba(67, 53, 31, .74); --gold: #7e6022; --line: rgba(67, 53, 31, .16);
}
:root[data-theme="dark"] {
  color-scheme: dark; --bg: #16181d; --surface: #1e2128; --text: #d8d4cc;
  --muted: rgba(216, 212, 204, .68); --gold: #c9a24b; --line: rgba(216, 212, 204, .14);
}
:root[data-theme="amoled"] {
  color-scheme: dark; --bg: #000; --surface: #0d0d0d; --text: #c9c6bf;
  --muted: rgba(201, 198, 191, .68); --gold: #c9a24b; --line: rgba(201, 198, 191, .14);
}

* { box-sizing: border-box; }

@font-face { font-family: Literata; src: url(/fonts/literata.woff2) format("woff2"); font-display: swap; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 Literata, Georgia, serif; overflow-wrap: anywhere; }

main {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
}

.brand {
  color: var(--text);
  font-weight: 900;
  letter-spacing: .16em;
  text-decoration: none;
}

.back, a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1 {
  margin: 0 0 12px;
  font: 750 clamp(2.2rem, 7vw, 4rem)/1.05 Literata, Georgia, serif;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

h2 { margin-top: 40px; line-height: 1.2; }
p, li { color: var(--muted); }
.updated { color: var(--gold); font-size: .9rem; }
.lead { max-width: 58ch; font-size: 1.08rem; color: var(--text); }
.card {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.locale { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -30px 0 30px; color: var(--muted); font-size: .82rem; }
.locale div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.locale a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; }
.locale a.on { color: var(--text); border-color: var(--gold); background: var(--surface); font-weight: 700; }
.contact { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }

footer {
  margin-top: 64px;
  color: var(--muted);
  font-size: .9rem;
}
footer p { margin-bottom: 0; }
@media (max-width: 480px) {
  main { width: min(100% - 28px, 760px); padding: 28px 0 64px; }
  .top { margin-bottom: 36px; }
  .back { text-align: right; }
  .locale { align-items: flex-start; margin-top: -18px; }
  .locale > span { max-width: 9ch; }
  .card { padding: 18px; border-radius: 18px; }
  h2 { margin-top: 32px; }
}
