/* Tilt Labyrinth website. System fonts only: no external requests. */
:root {
  --bg: #f6efe3;
  --surface: #fffaf2;
  --text: #2b1d12;
  --muted: #5c4a3a;
  --accent: #8a4b12;
  --accent-text: #fffaf2;
  --border: #d9c7ad;
  --focus: #1a5fb4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c140e;
    --surface: #271c14;
    --text: #f3e9dc;
    --muted: #cbb9a4;
    --accent: #f0b46a;
    --accent-text: #1c140e;
    --border: #4a3828;
    --focus: #8ab4ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.skip:focus {
  left: 1rem;
  z-index: 1;
}

header,
main,
footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 600;
}

header nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

main {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.25rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  font-size: 1.15rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

details {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

details:last-of-type {
  border-bottom: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details > :not(summary) {
  margin-top: 0.5rem;
}

.defs dt {
  margin-top: 0.75rem;
  font-weight: 600;
}

.defs dt + dt {
  margin-top: 0.25rem;
}

code {
  font-size: 0.9em;
}

.defs dt code {
  overflow-wrap: anywhere;
}

.defs dd {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
}

footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

footer p {
  margin: 0 0 0.5rem;
}
