:root {
  color-scheme: light dark;
  --bg: #faf7f1;
  --surface: #ffffff;
  --surface-2: #f3eae0;
  --text: #382d2c;
  --text-2: #6a5e5b;
  --primary: #713b4b;
  --primary-strong: #552535;
  --accent: #bea16b;
  --border: #e6dcd3;
  --focus: #713b4b;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211b1d;
    --surface: #30272a;
    --surface-2: #403438;
    --text: #f8f1eb;
    --text-2: #d1c1bc;
    --primary: #d7a9b6;
    --primary-strong: #f0d3db;
    --accent: #d2b47d;
    --border: #514248;
    --focus: #d2b47d;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a:hover {
  color: var(--primary-strong);
}

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

code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--primary);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.langs {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-2);
}

.langs a[aria-current='page'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

main {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.5rem 1rem 3rem;
}

h1,
h2 {
  font-family: var(--serif);
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 1rem 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

.meta {
  color: var(--text-2);
  margin-top: 0;
}

.doc li + li {
  margin-top: 0.5rem;
}

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

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
  columns: 2 14rem;
}

.toc li + li {
  margin-top: 0.15rem;
}

.note {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.steps li::marker {
  color: var(--primary);
  font-weight: 700;
}

.hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.hero img {
  display: block;
  margin: 0 auto;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 38rem;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.features {
  padding-left: 1.25rem;
}

.features li + li {
  margin-top: 0.4rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.cards a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
}

.cards a:hover {
  border-color: var(--primary);
}

.cards strong {
  color: var(--primary);
}

.cards span {
  color: var(--text-2);
  font-size: 0.95rem;
}

.foot {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--text-2);
  font-size: 0.95rem;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.foot p {
  margin: 0;
  overflow-wrap: anywhere;
}
