:root {
  --ink: #141815;
  --ink-2: #20261f;
  --paper: #f5f0e6;
  --paper-2: #ede4d4;
  --panel: #fffaf0;
  --line: #d5c8b6;
  --muted: #687167;
  --soft: #898174;
  --green: #2c7a67;
  --green-soft: #dcebe4;
  --blue: #315d7b;
  --blue-soft: #dbe6ee;
  --rust: #9f5639;
  --rust-soft: #edddd4;
  --amber: #92701d;
  --amber-soft: #efe3bd;
  --max: 1040px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html[data-active-lang="es"] [data-lang="en"],
html[data-active-lang="en"] [data-lang="es"] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(20, 24, 21, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 24, 21, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.64;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(44, 122, 103, 0.34);
  outline-offset: 3px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 240, 230, 0.92);
  backdrop-filter: blur(12px);
}

.top-inner {
  width: min(100% - 36px, var(--max));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 820;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.nav a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.lang-switch button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

html[data-active-lang="es"] button[data-set-lang="es"],
html[data-active-lang="en"] button[data-set-lang="en"] {
  background: var(--ink);
  color: var(--paper);
}

main {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 54px 0 82px;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 820;
}

.back-link:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.kicker {
  color: var(--rust);
  font-size: 13px;
  font-weight: 860;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin: 12px 0 18px;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: #3b433d;
  font-size: 20px;
  line-height: 1.55;
}

.hero-aside {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

.hero-aside b {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-aside span {
  color: rgba(245, 240, 230, 0.68);
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.meta-card {
  min-height: 112px;
  padding: 16px;
  background: var(--panel);
}

.meta-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.meta-card strong {
  display: block;
  color: var(--ink);
  line-height: 1.28;
}

.article {
  display: grid;
  gap: 18px;
}

.panel,
.callout,
.note-box {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel.dark {
  background: var(--ink);
  color: var(--paper);
}

.panel.dark p,
.panel.dark li,
.panel.dark .body-copy {
  color: rgba(245, 240, 230, 0.72);
}

.callout {
  background: var(--green-soft);
}

.callout.amber {
  background: var(--amber-soft);
}

.note-box {
  background: var(--blue-soft);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.section-stack h2 {
  margin-bottom: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 27px;
  line-height: 1.14;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

p {
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

.body-copy {
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

li + li {
  margin-top: 8px;
}

.plain-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.plain-list li {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.62);
}

.checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.checklist li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  color: var(--muted);
}

.checklist li::before {
  content: "";
  width: 17px;
  height: 17px;
  margin-top: 5px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: rgba(44, 122, 103, 0.08);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
  list-style: none;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 16px;
  background: var(--panel);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--rust);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 860;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--rust);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag-row span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 760;
}

.source-list a {
  color: var(--green);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

footer {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 14px;
}

@media (max-width: 860px) {
  .hero,
  .grid.two,
  .grid.three,
  .meta-strip {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 44px;
  }
}

@media (max-width: 620px) {
  .top-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 0;
  }

  main {
    width: min(100% - 28px, var(--max));
    padding-top: 34px;
  }

  h1 {
    font-size: 36px;
  }

  .lead {
    font-size: 18px;
  }

  .step {
    grid-template-columns: 1fr;
  }
}
