:root {
  color-scheme: light dark;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: #fff;
  color: #222;
  --muted: #696969;
  --hairline: #e4e4e4;
  --link: #333;
  --page: 44rem;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: #222;
  font-size: 1.125rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .35rem .7rem;
  background: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  display: flex;
  width: min(var(--page), calc(100% - 3rem));
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 5.25rem;
  border-bottom: 1px solid var(--hairline);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .84rem;
}

.site-navigation,
.site-navigation__links {
  display: inline-flex;
  align-items: center;
}

.site-navigation { gap: 1.1rem; }
.site-navigation__links { gap: .85rem; }
.site-navigation__links a {
  color: inherit;
  text-decoration: none;
}
.site-navigation__links a:hover,
.site-navigation__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: .28em; }

.wordmark {
  color: inherit;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -.045em;
  text-decoration: none;
}

.mhjaso-mark {
  display: block;
  width: 2.45rem;
  height: 1.55rem;
  object-fit: contain;
}

.language-toggle {
  display: inline-flex;
  gap: .15rem;
  padding: .15rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.language-toggle a {
  min-width: 2.35rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  color: inherit;
  opacity: .62;
  text-align: center;
  text-decoration: none;
  transition: opacity 180ms ease, background-color 180ms ease;
}
.language-toggle a:hover { opacity: 1; }
.language-toggle a[aria-current="page"] { background: rgba(0, 0, 0, .07); opacity: 1; }
.language-toggle a:focus-visible { outline-offset: 1px; }
.preview-notice {
  width: min(var(--page), calc(100% - 3rem));
  margin: 1rem auto 0;
  padding: .55rem .75rem;
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .82rem;
}

main { width: min(var(--page), calc(100% - 3rem)); margin: 0 auto; }
.article, .index { padding: clamp(4.5rem, 12vw, 8rem) 0 5rem; }
.eyebrow, .article-meta, .article-list time, .card-language, .site-footer {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .82rem;
}
.eyebrow { margin: 0 0 .85rem; letter-spacing: .035em; }

h1, h2, p { overflow-wrap: anywhere; }
h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.08;
}
.article-meta { margin: 1.35rem 0 3.75rem; }
.prose { max-width: 39rem; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3 {
  margin: 2.6em 0 .65em;
  font-weight: 550;
  letter-spacing: -.025em;
  line-height: 1.25;
}
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.3rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.35em; }
.prose p { text-align: justify; hyphens: auto; }
.prose li { padding-left: .25em; margin-block: .35em; }
.prose blockquote {
  margin-inline: 0;
  padding: .15rem 0 .15rem 1.2rem;
  border-left: 2px solid var(--hairline);
  color: var(--muted);
  font-style: italic;
}
.prose blockquote p { text-align: start; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite {
  display: block;
  margin-top: .65rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .82em;
  font-style: normal;
}
.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 2.1rem 0 2.4rem;
  overflow-x: auto;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: .9em;
  line-height: 1.5;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  min-width: 8rem;
  padding: .65rem .85rem .65rem 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .76em;
  font-weight: 650;
  letter-spacing: .035em;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose cite {
  color: var(--muted);
  font-size: .9em;
}
.prose .article-pending {
  border-bottom: 1px dotted currentColor;
  color: var(--muted);
}
.prose .article-pending small {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .72em;
  font-style: normal;
}
.prose code, .prose pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.prose code { padding: .1em .25em; background: color-mix(in srgb, currentColor 7%, transparent); border-radius: 3px; }
.prose pre { overflow-x: auto; padding: 1rem 1.2rem; border: 1px solid var(--hairline); border-radius: 4px; }
.prose pre code { padding: 0; background: transparent; }
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.4rem auto;
  border: 1px solid color-mix(in srgb, currentColor 9%, transparent);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1.1rem 2.4rem -1.2rem rgba(0, 0, 0, .38), 0 .2rem .55rem rgba(0, 0, 0, .08);
}
.prose img[src$="/assets/header-kit/logo-spaceship-purple.png"] {
  float: right;
  width: min(7rem, 35vw);
  margin: .15rem 0 1.1rem 1.4rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.prose img[src$="/estructura-del-trabajo-light.png"] {
  float: right;
  width: min(18rem, 46%);
  margin: .35rem 0 1rem 1.4rem;
}
.prose hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--hairline); }

.article-end {
  display: flex;
  margin-top: 5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  justify-content: space-between;
  gap: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .9rem;
}
.index-intro { max-width: 36rem; margin: 1.2rem 0 4rem; color: var(--muted); }
.preview-status { margin: -2.5rem 0 2.25rem; color: var(--muted); font-size: .9rem; }
.article-list { padding: 0; margin: 0; list-style: none; }
.article-card { position: relative; padding: 1.45rem 0 1.5rem; border-top: 1px solid var(--hairline); }
.card-link { display: block; color: inherit; text-decoration: none; }
.article-list time { display: block; margin-bottom: .35rem; }
.card-status {
  display: inline-block;
  margin: .1rem 0 .35rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .035em;
}
.article-list h2 { margin: 0; font-size: 1.55rem; font-weight: 520; letter-spacing: -.035em; line-height: 1.25; }
.article-list p { max-width: 40rem; margin: .45rem 0 0; color: var(--muted); font-size: 1rem; }
.article-card:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.card-language { display: inline-block; margin-top: .6rem; text-decoration: none; }
.empty-state { padding-top: 1.3rem; border-top: 1px solid var(--hairline); color: var(--muted); }

.about { padding: clamp(4.5rem, 12vw, 8rem) 0 5rem; }
.about h1 { max-width: none; }
.about-lead { max-width: 42rem; margin: 1.35rem 0 0; font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.45; }
.about-grid { display: grid; gap: 2.5rem; margin-top: 4.5rem; }
.about-grid h2 { margin: 0 0 .7rem; font-size: 1.55rem; font-weight: 520; letter-spacing: -.035em; line-height: 1.25; }
.about-grid p { max-width: 34rem; margin: 0 0 1.15rem; }
.about-links { display: flex; flex-wrap: wrap; gap: .75rem 1.4rem; margin-top: 4rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .95rem; }

.site-footer { min-height: 5rem; border-top: 1px solid var(--hairline); justify-content: flex-start; gap: .6rem; }
.site-footer a { color: inherit; }

@media (prefers-color-scheme: dark) {
  :root { background: #171717; color: #e9e9e9; --muted: #aaa; --hairline: #383838; --link: #eee; }
  body { background: #171717; color: #e9e9e9; }
  .skip-link { background: #171717; color: #fff; }
  .language-toggle a[aria-current="page"] { background: rgba(255, 255, 255, .14); }
  .mhjaso-mark { filter: invert(1); }
  .prose img { box-shadow: 0 1.1rem 2.5rem -1.1rem rgba(0, 0, 0, .9), 0 .2rem .55rem rgba(0, 0, 0, .45); }
  .prose img[src$="/assets/header-kit/logo-spaceship-purple.png"] { filter: brightness(0) invert(1); }
}

@media (max-width: 540px) {
  body { font-size: 1.05rem; }
  .site-header, .site-footer, main { width: calc(100% - 2rem); }
  .preview-notice { width: calc(100% - 2rem); }
  .site-header { min-height: 4.5rem; }
  .site-navigation { gap: .65rem; }
  .site-navigation__links { gap: .45rem; font-size: .74rem; }
  .language-toggle a { min-width: 2.15rem; padding-inline: .5rem; }
  .prose img[src$="/assets/header-kit/logo-spaceship-purple.png"] { width: min(5.5rem, 28vw); margin-left: 1rem; }
  .prose img[src$="/estructura-del-trabajo-light.png"] { width: min(9.5rem, 43%); margin: .2rem 0 .8rem 1rem; }
  .article, .index { padding-top: 4.5rem; }
  .article-meta { margin-bottom: 2.8rem; }
  .article-end { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
