:root {
  --rexe-coral: #ff5547;
  --rexe-coral-dark: #d94239;
  --rexe-blush: #ffe5e1;
  --rexe-ink: #202020;
  --rexe-muted: #606060;
  --rexe-rule: #dadada;
  --rexe-green: #75bd45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--rexe-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.58;
}
.rexe-article { min-height: 100vh; }
a { color: var(--rexe-coral-dark); text-decoration: none; border-bottom: 1px dotted currentColor; }
a:hover, a:focus { color: #a92520; border-bottom-style: solid; }

.article-header {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 32px;
  border-bottom: 1px solid var(--rexe-rule);
}
.journal-brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--rexe-coral);
}
.journal-name {
  max-width: 520px;
  color: var(--rexe-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}
.journal-name::before {
  content: "rexe";
  display: inline-block;
  margin-right: 12px;
  color: var(--rexe-coral);
  font-size: 52px;
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.07em;
  text-transform: lowercase;
  vertical-align: middle;
}
.journal-meta { color: var(--rexe-coral); font-size: 13px; text-align: right; }
.article-type {
  margin: 32px 0 26px;
  padding: 6px 12px;
  background: linear-gradient(90deg, var(--rexe-blush), transparent 76%);
  color: var(--rexe-coral);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.article-type::before { content: "Tipo de publicación | "; }
.article-header h1 {
  max-width: 940px;
  margin: 0 0 10px;
  color: var(--rexe-coral);
  font-size: clamp(30px, 4.3vw, 47px);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.translated-title {
  max-width: 940px;
  margin: 0 0 24px;
  color: var(--rexe-coral);
  font-size: clamp(21px, 2.7vw, 29px);
  font-weight: 700;
  line-height: 1.2;
}
.dates { display: flex; flex-wrap: wrap; gap: 5px 24px; margin: 18px 0; color: var(--rexe-muted); font-size: 14px; }
.authors { margin: 22px 0 8px; font-size: 21px; font-weight: 700; }
.authors::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 4px; background: var(--rexe-green); border-radius: 50%; }
.orcid { font-size: 10px; letter-spacing: .04em; }
.affiliations { color: #444; font-size: 14px; }
.affiliations p { margin: 4px 0; }
.correspondence { padding-left: 12px; border-left: 7px solid var(--rexe-blush); }
.doi { margin: 18px 0 0; font-size: 14px; }

.article-main, .article-footer { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.article-main { padding: 36px 0 72px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 44px; }
.abstract { padding: 20px 22px; border-left: 10px solid var(--rexe-coral); background: #fffafa; }
.abstract-en { border-left-color: #ff8b80; background: #fff; }
.abstract h2 { margin: 0 0 10px; color: var(--rexe-coral); font-size: 17px; letter-spacing: .035em; }
.abstract p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; text-align: justify; }
.abstract .keywords { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid #333; font-size: 13px; line-height: 1.35; }

.sec { scroll-margin-top: 20px; }
.sec.level-2 { margin-top: 44px; }
.sec.level-2 > h2, .references > h2, .notes > h2, .appendices h2 {
  margin: 0 0 18px;
  padding-bottom: 8px;
  color: var(--rexe-coral);
  border-bottom: 2px solid var(--rexe-coral);
  font-size: 30px;
  line-height: 1.16;
}
.sec.level-3 { margin-top: 30px; }
.sec.level-3 > h3 { margin: 0 0 12px; color: var(--rexe-coral-dark); font-size: 22px; line-height: 1.25; }
.sec.level-4 > h4 { margin: 24px 0 10px; color: #8f302a; font-size: 19px; }
.sec p { margin: 0 0 18px; text-align: justify; }

.article-figure { margin: 34px auto 40px; padding: 18px; background: #fffafa; border: 1px solid #f0cbc7; }
.article-figure figcaption { margin-bottom: 15px; line-height: 1.4; }
.figure-label { display: block; color: var(--rexe-coral); font-size: 15px; font-weight: 700; text-transform: uppercase; }
.figure-title { display: block; margin-top: 3px; color: #333; font-size: 16px; font-style: italic; }
.article-figure img { display: block; width: auto; max-width: 100%; max-height: 820px; margin: 0 auto; }
.article-table { overflow-x: auto; background: #fff; }
.article-table img { min-width: min(650px, 100%); }
.figure-note { margin-top: 12px; color: var(--rexe-muted); font-size: 13px; }
.equation { position: relative; display: flex; align-items: center; justify-content: center; margin: 22px 0; padding: 12px 60px; }
.equation-image { max-width: 100%; }
.equation-label { position: absolute; right: 12px; }

.references, .notes, .appendices { margin-top: 56px; }
.references ol, .notes ol { padding-left: 27px; }
.references li, .notes li { margin-bottom: 13px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.declaration { margin: 0 0 12px; padding: 14px 16px; background: #fffafa; border-left: 5px solid var(--rexe-blush); font-size: 14px; }
.declaration p { margin: 0; }
.article-footer { padding: 24px 0 46px; color: var(--rexe-muted); border-top: 4px solid var(--rexe-coral); font-size: 13px; }
.article-footer p { margin: 4px 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .article-header, .article-main, .article-footer { width: min(100% - 28px, 1080px); }
  .journal-brand { display: block; }
  .journal-meta { margin-top: 12px; text-align: left; }
  .journal-name::before { font-size: 42px; }
  .summary-grid { grid-template-columns: 1fr; }
  .sec p, .abstract p { text-align: left; }
  .sec.level-2 > h2, .references > h2, .notes > h2, .appendices h2 { font-size: 26px; }
  .article-figure { margin-right: -3px; margin-left: -3px; padding: 13px; }
}

@media print {
  body { font-size: 11pt; }
  .article-header, .article-main, .article-footer { width: 100%; }
  .summary-grid { display: block; }
  .abstract { margin-bottom: 14px; }
  .article-figure, .equation { break-inside: avoid; }
  a { color: inherit; border-bottom: 0; }
}
