/* Same palette as the app: white or black background, the logo's black glass for buttons, its lilac as the one accent. */
:root {
  --bg: #ffffff;
  --text: #1c1f23;
  --muted: #5f6670;
  --line: #e4e6ea;
  --card: #f5f6f8;
  --button: #1c1f23;
  --button-text: #ffffff;
  --accent: #7a55f0;
  --radius: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f2f3f5;
    --muted: #a0a6ae;
    --line: #26292e;
    --card: #16181b;
    --button: #f2f3f5;
    --button-text: #1c1f23;
    --accent: #9d7bff;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Language switch: the inactive language is hidden. */
html[lang="en"] [lang="es"], html[lang="es"] [lang="en"] { display: none; }
html[lang="en"] [data-l="en"], html[lang="es"] [data-l="es"] { font-weight: 700; color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.bar {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, calc((100% - 880px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--text); font-size: 15px; }
.lang {
  border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer;
  padding: 4px 10px; font: inherit; font-size: 13px; color: var(--muted); display: flex; gap: 6px;
}

main { max-width: 880px; margin: 0 auto; padding: 0 16px; }
section { padding: 40px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }
h1 { font-size: 52px; line-height: 1.1; margin: 8px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 26px; margin: 0 0 16px; letter-spacing: -0.01em; }

.hero { text-align: center; padding: 56px 0 48px; }
.logo { display: block; margin: 0 auto; }
.lead { font-size: 21px; max-width: 600px; margin: 0 auto; }
.note, .muted { color: var(--muted); font-size: 15px; }
.note { margin-top: 20px; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius);
  background: var(--button); color: var(--button-text); font-weight: 600;
}
.button:hover { text-decoration: none; opacity: 0.9; }
.button.ghost { background: none; color: var(--text); border: 1px solid var(--line); }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grid li { background: var(--card); border-radius: var(--radius); padding: 18px; }
.grid strong { display: block; margin-bottom: 4px; }

.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: 10px; }
.steps li::marker { color: var(--accent); font-weight: 700; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; width: 38%; padding-right: 12px; }

.links { padding-left: 1.1em; margin: 0; }
.links li { margin-bottom: 8px; }

.support { text-align: center; }
.support p { max-width: 560px; margin: 0 auto 20px; }

footer { max-width: 880px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 520px) {
  h1 { font-size: 40px; }
  .lead { font-size: 19px; }
  nav { gap: 12px; }
  .actions .button { width: 100%; }
}

/* Manual pages, generated by tools/build-site.py. */
.lang:hover { text-decoration: none; }
.lang .on { font-weight: 700; color: var(--text); }
.doc-layout {
  max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px;
}
.chapters summary { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; margin-bottom: 8px; }
.chapters ul { list-style: none; padding: 0; margin: 0; position: sticky; top: 72px; }
.chapters a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--text); font-size: 15px; line-height: 1.35; }
.chapters a:hover { background: var(--card); text-decoration: none; }
.chapters a[aria-current] { background: var(--card); font-weight: 600; }
article { max-width: 720px; }
article h1 { font-size: 36px; margin: 0 0 20px; }
article h2 { font-size: 24px; margin: 36px 0 12px; }
article h3 { font-size: 19px; margin: 28px 0 8px; }
article p, article li { margin: 0 0 12px; }
article ul, article ol { padding-left: 1.3em; margin: 0 0 16px; }
article .lead-in { margin: 24px 0 4px; }
article code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--card); padding: 1px 5px; border-radius: 6px; }
article pre { background: var(--card); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
article pre code { background: none; padding: 0; }
article blockquote { margin: 16px 0; padding: 12px 16px; background: var(--card); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; }
article blockquote p { margin: 0; }
article .table { overflow-x: auto; margin: 0 0 16px; }
article th { width: auto; font-weight: 600; color: var(--text); }
article td, article th { padding: 8px 12px 8px 0; }
.toc { background: var(--card); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 24px; font-size: 15px; }
.toc p { margin: 0 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.toc ul { margin: 0; }
.toc li { margin: 2px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); max-width: 48%; }
.pager a:hover { text-decoration: none; border-color: var(--accent); }
.pager span { color: var(--muted); font-size: 13px; }
.pager .next { margin-left: auto; text-align: right; }
.edit { margin-top: 24px; font-size: 14px; }

@media (max-width: 820px) {
  .doc-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .chapters ul { position: static; }
  .chapters details:not([open]) summary { margin-bottom: 0; }
  article h1 { font-size: 30px; }
}
