/* Mapa technical site. Calm editorial style (docs/DESIGN.md). Fonts are self-hosted (Onest, SIL OFL 1.1). */
@font-face {
  font-family: 'Onest';
  src: url('/assets/fonts/Onest-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('/assets/fonts/Onest-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f5f2;
  --text: #121212;
  --muted: #5c5c57;
  --line: #e3e2dd;
  --accent: #2f45d8;
  --surface: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --text: #ededea;
    --muted: #a8a8a1;
    --line: #2e2e2b;
    --accent: #9aa6ff;
    --surface: #1f1f1d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main, .site-header, .site-footer { max-width: 42rem; margin: 0 auto; padding: 0 1.25rem; }
main { padding-top: 1.5rem; padding-bottom: 3rem; }
main:focus { outline: none; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .store:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  padding-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; font-size: 1.125rem; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.langs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0; padding: 0; font-size: 0.9375rem; }
.langs a { display: inline-block; min-height: 44px; line-height: 44px; color: var(--muted); text-decoration: none; }
.langs a[aria-current='page'] { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 0.3em; }

h1 { font-size: 2rem; line-height: 1.2; font-weight: 600; margin: 1rem 0 0.75rem; letter-spacing: -0.01em; }
h1.hero { font-size: 3rem; margin-top: 2.5rem; }
h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin: 2.25rem 0 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.toc h2 { border-top: 0; padding-top: 0; font-size: 1rem; color: var(--muted); }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }
dt { font-weight: 600; }
dd { margin: 0 0 0.75rem; }
address { font-style: normal; }
strong { font-weight: 600; }

.lead { font-size: 1.375rem; line-height: 1.45; }
.lead-s { font-size: 1.125rem; }
.muted { color: var(--muted); font-size: 0.9375rem; }
.banner {
  border: 1px solid var(--text); background: var(--surface); padding: 0.875rem 1rem; font-weight: 600;
}
.note { border-left: 3px solid var(--accent); padding: 0.25rem 0 0.25rem 0.875rem; }
.template {
  white-space: pre-wrap; font: 0.9375rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface); border: 1px solid var(--line); padding: 0.875rem 1rem; overflow-x: auto;
}
.toc ol { padding-left: 1.25rem; }
ul.plain { list-style: none; padding: 0; }
ul.plain a { display: inline-block; min-height: 44px; line-height: 44px; }

ul.stores { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.25rem;
  border: 1px solid var(--text); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600;
}
.store:hover { background: var(--surface); }
.store.secondary { border-color: var(--line); font-weight: 400; }
.store[aria-disabled='true'] { color: var(--muted); border-color: var(--line); pointer-events: none; }

.code { font-size: 1.125rem; }
.code strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; }
.open .brand, .chooser .brand { display: block; margin-top: 2rem; }

.site-footer { border-top: 1px solid var(--line); padding-top: 1rem; padding-bottom: 2rem; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; }
.site-footer a { display: inline-block; min-height: 44px; line-height: 44px; }

@media (max-width: 30rem) {
  h1 { font-size: 1.625rem; }
  h1.hero { font-size: 2.5rem; }
}
@media print {
  .site-header nav, .site-footer nav, .skip { display: none; }
  body { background: #fff; color: #000; }
}
