:root {
  color-scheme: light dark;
  --bg: #faf8f3;
  --surface: #f1ece1;
  --text: #1f1c17;
  --muted: #6b645a;
  --rule: #e3ddd0;
  --accent: #8a6516;
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100e0b;
    --surface: #1b1813;
    --text: #ece6da;
    --muted: #a69d8e;
    --rule: #2d2821;
    --accent: #d9b45a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

.site {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.lang { font-size: 15px; color: var(--muted); }
.lang a { color: var(--muted); }
.lang a[aria-current] { color: var(--text); font-weight: 600; text-decoration: none; }

h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.2;
  margin: 40px 0 8px;
}

h2 { font-size: 22px; line-height: 1.3; margin: 44px 0 12px; }
h3 { font-size: 18px; line-height: 1.35; margin: 28px 0 8px; }

p, ul { margin: 0 0 16px; }
ul { padding-left: 22px; }
li { margin-bottom: 8px; }

a { color: var(--accent); text-underline-offset: 2px; overflow-wrap: anywhere; }

.meta { color: var(--muted); font-size: 15px; margin-bottom: 32px; }

.summary {
  background: var(--surface);
  border-radius: 14px;
  padding: 4px 22px 6px;
  margin-bottom: 8px;
}
.summary h2 { font-size: 18px; margin-top: 18px; }

.docs { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; }
.docs a {
  display: block;
  background: var(--surface);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.docs span { display: block; color: var(--muted); font-size: 15px; font-weight: 400; }

/* `hidden` wins over the display of the rules below. */
[hidden] { display: none !important; }

/* /r/<code>: a room invite for someone without the app. */
.room-code {
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 20px 20px;
  text-align: center;
  margin-bottom: 24px;
}
.room-code .label { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.room-code .code {
  font-family: var(--serif);
  font-size: clamp(36px, 11vw, 48px);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.actions { display: grid; gap: 12px; margin-bottom: 8px; }
.button {
  display: block;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.room-code .button { display: inline-block; padding: 8px 18px; font-size: 15px; }

footer {
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}
footer p { margin-bottom: 8px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site, main, footer { padding-left: 16px; padding-right: 16px; }
  .summary { padding-left: 18px; padding-right: 18px; }
}
