/* ============================================================
   PRI - Reflowable HTML package — journal article stylesheet
   Source: Economic Affairs, Vol. 71(02), pp. 175-182, June 2026
   ============================================================ */

:root {
  --text: #1a1a1a;
  --rule: #1a1a1a;
  --muted: #4d4d4d;
  --box-bg: #eef0f1;
  --box-border: #b9bfc2;
  --accent: #7a1f2b;
  --serif: Georgia, "Times New Roman", Cambria, "Noto Serif", serif;
  --max-width: 46rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--serif);
  color: var(--text);
  background: #fff;
  line-height: 1.62;
  font-size: 1.0625rem;
  margin: 0;
  padding: 0 1.25rem 4rem;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
}

p { margin: 0 0 1.05em; text-align: justify; hyphens: auto; }

a { color: var(--accent); }

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 2rem;
  border-bottom: 2.5pt solid var(--rule);
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
}

.masthead-meta { font-size: 0.92rem; line-height: 1.5; }
.masthead-meta .journal-line { font-weight: 700; }
.masthead-meta .doi-line { margin-top: 0.15em; }

.masthead img.logo { height: 2.6rem; width: auto; display: block; margin-top: 0.1rem; }

.article-type {
  display: inline-block;
  background: var(--box-bg);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  padding: 0.32em 0.7em;
  margin-bottom: 1.15rem;
}

h1.title {
  font-size: 1.72rem;
  line-height: 1.28;
  font-weight: 700;
  margin: 0 0 0.85rem;
}

.byline { font-size: 1.12rem; margin: 0 0 0.3rem; }

.affiliation { font-size: 0.96rem; color: var(--muted); margin: 0 0 0.15rem; }
.corresponding { font-size: 0.96rem; color: var(--muted); margin: 0 0 1rem; }

.date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  border-top: 1px solid var(--box-border);
  border-bottom: 1px solid var(--box-border);
  padding: 0.55rem 0;
  margin-bottom: 1.3rem;
  font-size: 0.92rem;
}
.date-row strong { font-weight: 700; }

/* ---------- Abstract / highlights ---------- */

.abstract-block {
  margin-bottom: 1.3rem;
}
.abstract-block h2.label,
.highlights h2.label,
.keywords h2.label {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}
.abstract-block p { font-size: 0.98rem; }

.highlights { margin-bottom: 1.3rem; }
.highlights ul { margin: 0; padding-left: 0; list-style: none; }
.highlights li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.5em;
  font-size: 0.98rem;
  text-align: justify;
}
.highlights li::before {
  content: "○";
  position: absolute;
  left: 0;
  top: 0.02em;
  font-size: 0.85em;
  color: var(--text);
}

.keywords { font-size: 0.94rem; margin-bottom: 1.4rem; }
.keywords .label-inline { font-weight: 700; }

.citation-box {
  background: var(--box-bg);
  border: 1px solid var(--box-border);
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 2rem;
}
.citation-box p { margin: 0 0 0.55em; text-align: left; }
.citation-box p:last-child { margin-bottom: 0; }
.citation-box .cbi { font-style: italic; }

/* ---------- Section headings ---------- */

h2.section {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 2.2rem 0 0.9rem;
}

h3.subsection {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.7rem 0 0.75rem;
}

h4.subsubsection {
  font-size: 1.0rem;
  font-weight: 700;
  font-style: italic;
  margin: 1.5rem 0 0.6rem;
}

/* ---------- Definition lists (equation glosses) ---------- */

.gloss {
  margin: 0 0 1.05em;
  padding: 0;
  list-style: none;
}
.gloss li { margin-bottom: 0.15em; text-align: left; }
.gloss .term { font-style: italic; }
.gloss .dash { margin: 0 0.35em; }

/* ---------- Equations ---------- */

.equation {
  display: grid;
  grid-template-columns: 2.4rem 1fr 2.4rem;
  align-items: center;
  margin: 1.3rem 0;
  overflow-x: auto;
}
.equation .eq-body { grid-column: 2; justify-self: center; font-size: 1.08rem; }
.equation .eq-num { grid-column: 3; justify-self: end; font-variant-numeric: tabular-nums; }

.equation math { font-size: 1.08rem; }
.equation math mi { font-style: italic; }
.equation math mi[mathvariant="normal"] { font-style: normal; }

/* ---------- Tables ---------- */

.table-wrap { margin: 0.6rem 0 1.6rem; overflow-x: auto; }

caption.table-caption {
  caption-side: top;
  text-align: left;
  font-size: 0.94rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
caption.table-caption .t-label { font-weight: 700; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}

table.data-table thead tr.hyp-row th {
  border-top: 1.5pt solid var(--rule);
  border-bottom: 1.5pt solid var(--rule);
  text-align: left;
  font-weight: 700;
  padding: 0.4em 0.6em;
}
table.data-table thead tr.col-row th {
  border-bottom: 1.5pt solid var(--rule);
  text-align: left;
  font-weight: 700;
  padding: 0.35em 0.6em;
}
table.data-table td {
  padding: 0.35em 0.6em;
  text-align: left;
}
table.data-table tbody tr:last-child td {
  border-bottom: 1.5pt solid var(--rule);
}
table.data-table em.var { font-style: italic; }

.table-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.45;
}
.table-note p { margin: 0 0 0.25em; text-align: left; font-size: inherit; font-style: inherit; color: inherit; }
.table-note .src { font-style: italic; }

/* ---------- Figure ---------- */

figure.article-figure {
  margin: 1.4rem 0 1.8rem;
  text-align: center;
}
figure.article-figure img { max-width: 100%; height: auto; border: 1px solid var(--box-border); }
figure.article-figure .fig-source {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.4rem;
}
figcaption.fig-caption {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0.5rem;
  text-align: center;
}
figcaption.fig-caption .fig-num { font-weight: 700; }

/* ---------- References ---------- */

.references { margin-top: 0.5rem; }
.references ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: refs;
}
.references li {
  padding-left: 1.9em;
  text-indent: -1.9em;
  margin-bottom: 0.85em;
  font-size: 0.95rem;
  text-align: left;
}
.references .j { font-style: italic; }
.references .vol { font-weight: 700; }
.references .acc { color: var(--muted); }

/* ---------- Footer ---------- */

.doc-footer {
  margin-top: 3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--box-border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 30rem) {
  body { font-size: 1rem; padding: 0 0.9rem 3rem; }
  h1.title { font-size: 1.42rem; }
  .masthead { flex-direction: column; }
  .equation { grid-template-columns: 1.6rem 1fr 1.6rem; }
  .date-row { flex-direction: column; gap: 0.3rem; }
}

/* ---------- Print ---------- */

@media print {
  body { padding: 0; }
  .page { max-width: none; }
}

/* ---------- Dark mode (reader convenience) ---------- */

@media (prefers-color-scheme: dark) {
  body { background: #12100e; color: #ece6dd; }
  :root { --text: #ece6dd; --muted: #b9b0a3; --box-bg: #221f1c; --box-border: #423d37; --rule: #ece6dd; }
  figure.article-figure img { background: #fff; }
}

/* ---- generic additions (pdf2html v2) ---- */
main { display: block; }
.masthead-meta .journal-line + .journal-line { font-weight: 400; }
.body-list { margin: 0 0 1.05em; padding-left: 1.6em; }
.body-list li { margin: 0 0 0.35em; text-align: justify; }
ul.body-list { list-style: disc; }
table.data-table.grid { border-collapse: collapse; width: 100%; }
table.data-table.grid th,
table.data-table.grid td { border: 1px solid #9a9a9a; padding: 0.3em 0.45em; vertical-align: top; text-align: left; }
table.data-table.grid thead th {font-weight: 700; }
p.note { font-size: 0.9rem; }
.citation-box img.licence { height: 1.1rem; width: auto; vertical-align: middle; margin-left: 0.5em; }
.affiliation + .affiliation { margin-top: 0; }
