/* EJLS full-text pages: formatting comes from the article itself, as saved in the
   CKEditor of revistia.com/publish/ejls. This file only provides (1) the base for
   unformatted text, (2) the page frame, and (3) CKEditor 5's content rules, so a
   saved page looks the same as in the editor. Keep in sync with the editor's
   BASE_CSS in public/publish/ejls/index.php. Bump ?v= in the pages when changed. */

/* 1. base for text without explicit formatting */
.ck-content { font-family: Cambria, Caladea, Georgia, "Times New Roman", serif; font-size: 12pt; line-height: 1.15; color: #1a1a1a; overflow-wrap: break-word; }
.ck-content img { max-width: 100%; height: auto; }

/* 2. page frame (outside the article) */
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #1a1a1a; }
.masthead { font: 13px/1.4 -apple-system, "Segoe UI", Arial, sans-serif; color: #5b6670; border-bottom: 1px solid #d9dee3; }
.masthead .in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
footer { font: 12px/1.5 -apple-system, "Segoe UI", Arial, sans-serif; color: #5b6670; border-top: 1px solid #d9dee3; margin-top: 2.5em; padding-top: 1em; }
/* generated metadata lines: only keep their items from running together */
.ck-content .facts > * + *, .ck-content .actions > * + * { margin-left: 1em; }
/* section headings ("paragraph titles"): Cambria 11pt, bold; the article title (h1) keeps its own size */
.ck-content h2, .ck-content h3, .ck-content h4, .ck-content h5, .ck-content h6 { font-family: Cambria, Caladea, Georgia, "Times New Roman", serif; font-size: 11pt; line-height: 1.15; }
/* body text justified; left-aligned: references, footnotes, captions, table contents
   (header lines carry their own centre/right alignment; any alignment set in the editor wins) */
.ck-content p, .ck-content li, .ck-content blockquote { text-align: justify; hyphens: auto; }
.ck-content p.ref, .ck-content p.refnote, .ck-content p.caption, .ck-content figcaption,
.ck-content .notes, .ck-content .notes p, .ck-content .notes li,
.ck-content table, .ck-content td, .ck-content th, .ck-content td p, .ck-content th p { text-align: left; hyphens: manual; }
/* superscript/subscript as in Word (~65% size, small raise) and without widening the line
   (the browser default is ~83% and half a line up, which looks almost full-size) */
.ck-content sup, .ck-content sub { font-size: 65%; line-height: 0; position: relative; vertical-align: baseline; }
.ck-content sup { top: -.5em; }
/* author/affiliation markers: smaller and lower, as Word's superscript beside a name */
.ck-content p.authors sup, .ck-content p.affil sup { font-size: 55%; top: -.6em; }
.ck-content sub { bottom: -.25em; }
/* original-PDF page markers carry no content */
.pb { display: none; }
/* images/graphs/tables: no own vertical gap and no side indent, so a caption line
   (<p class="caption"> with margin-top:0 / margin-bottom:0) sits right against them;
   the normal gap to other text comes from the paragraphs' own margins */
.ck-content figure { margin-left: 0; margin-right: 0; }
.ck-content figure, .ck-content .image, .ck-content .table, .ck-content .table-wrap { margin-top: 0; margin-bottom: 0; }
.ck-content .image, .ck-content .table { margin-left: auto; margin-right: auto; }

/* 3. CKEditor 5 (v41) content styles */
.ck-content .image { display: table; clear: both; text-align: center; margin: .9em auto; min-width: 50px; }
.ck-content .image img { display: block; margin: 0 auto; max-width: 100%; min-width: 100%; height: auto; }
.ck-content .image-inline { display: inline-flex; max-width: 100%; align-items: flex-start; }
.ck-content .image-inline img { flex-grow: 1; flex-shrink: 1; max-width: 100%; }
.ck-content .image.image_resized { max-width: 100%; display: block; box-sizing: border-box; }
.ck-content .image.image_resized img { width: 100%; }
.ck-content .image.image_resized > figcaption { display: block; }
.ck-content .image > figcaption { display: table-caption; caption-side: bottom; word-break: break-word; color: #333; background-color: #f7f7f7; padding: .6em; font-size: .75em; }
.ck-content img.image_resized { height: auto; }
.ck-content .image-style-side { float: right; margin-left: 1.5em; max-width: 50%; }
.ck-content .image-style-align-left { float: left; margin-right: 1.5em; }
.ck-content .image-style-align-right { float: right; margin-left: 1.5em; }
.ck-content .image-style-align-center { margin-left: auto; margin-right: auto; }
.ck-content .image-style-block-align-left, .ck-content .image-style-block-align-right { max-width: calc(100% - 1.5em); }
.ck-content .image-style-block-align-left { margin-left: 0; margin-right: auto; }
.ck-content .image-style-block-align-right { margin-right: 0; margin-left: auto; }
.ck-content .image-style-align-left, .ck-content .image-style-align-right { clear: none; }
.ck-content .table { margin: .9em auto; display: table; }
.ck-content .table table { border-collapse: collapse; border-spacing: 0; width: 100%; height: 100%; border: 1px double #b3b3b3; }
.ck-content .table table td, .ck-content .table table th { min-width: 2em; padding: .4em; border: 1px solid #bfbfbf; }
.ck-content .table table th { font-weight: bold; background: rgba(0, 0, 0, .05); }
.ck-content .table > figcaption { display: table-caption; caption-side: top; word-break: break-word; text-align: center; color: #333; background-color: #f7f7f7; padding: .6em; font-size: .75em; }
.ck-content blockquote { overflow: hidden; padding-right: 1.5em; padding-left: 1.5em; margin-left: 0; margin-right: 0; font-style: italic; border-left: solid 5px #ccc; }
.ck-content .marker-yellow { background-color: #fdfd77; }
.ck-content .marker-green { background-color: #62f962; }
.ck-content .marker-pink { background-color: #fc7899; }
.ck-content .marker-blue { background-color: #72ccfd; }
.ck-content .pen-red { color: #e71313; background-color: transparent; }
.ck-content .pen-green { color: #128a00; background-color: transparent; }
.ck-content .text-tiny { font-size: .7em; }
.ck-content .text-small { font-size: .85em; }
.ck-content .text-big { font-size: 1.4em; }
.ck-content .text-huge { font-size: 1.8em; }
.ck-content hr { margin: 15px 0; height: 4px; background: #dedede; border: 0; }
.ck-content pre { padding: 1em; color: #353535; background: rgba(199, 199, 199, .3); border: 1px solid #c4c4c4; border-radius: 2px; text-align: left; direction: ltr; tab-size: 4; white-space: pre-wrap; font-style: normal; min-width: 200px; }
.ck-content pre code { background: unset; padding: 0; border-radius: 0; }
.ck-content code { background-color: rgba(199, 199, 199, .3); padding: .15em; border-radius: 2px; }
.ck-content .todo-list { list-style: none; }
.ck-content .todo-list li { position: relative; margin-bottom: 5px; }
.ck-content .todo-list li .todo-list { margin-top: 5px; }
.ck-content .todo-list .todo-list__label > input { margin-right: .5em; }
.ck-content .media { clear: both; margin: .9em 0; display: block; min-width: 15em; }
.ck-content .page-break { display: none; }
@media print { .masthead, .actions { display: none; } main { max-width: none; padding: 0; } }

/* ---- house spacing (last in the file so it wins over the CKEditor rules above) ----
   every paragraph/heading/list item/quote: 0pt before, 6pt after, single line spacing (1.15);
   images/tables have no gap of their own: a caption sits against them (its inline margin 0),
   ordinary text right after one gets the 6pt before instead */
.ck-content p, .ck-content h1, .ck-content h2, .ck-content h3, .ck-content h4, .ck-content h5, .ck-content h6,
.ck-content li, .ck-content blockquote { margin-top: 0; margin-bottom: 6pt; line-height: 1.15; }
.ck-content ul, .ck-content ol { margin-top: 0; margin-bottom: 0; }
.ck-content figure, .ck-content .image, .ck-content .table, .ck-content .table-wrap { margin-top: 0; margin-bottom: 0; }
.ck-content .image, .ck-content .table { margin-left: auto; margin-right: auto; }
.ck-content :is(figure, .table-wrap, table) + :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, figure, .table-wrap):not(.caption),
.ck-content :is(figure, .table-wrap, table) + .pb + :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, figure, .table-wrap):not(.caption) { margin-top: 6pt; }
/* header and keywords spacing (user spec): title 0/12pt, authors 0/6pt, affiliation / dates / DOI 0/8pt,
   keywords line 6pt + one empty line (single spacing, 12pt) after it */
/* journal masthead above the title: name; volume, issue, year, ISSNs; thin rule below */
.ck-content p.jname { margin-top: 0; margin-bottom: 2pt; }
.ck-content p.jissue { margin-top: 0; margin-bottom: 14pt; padding-bottom: 4pt; border-bottom: 0.5pt solid #999; }
.ck-content header h1 { margin-top: 0; margin-bottom: 12pt; }
.ck-content p.authors { margin-top: 0; margin-bottom: 6pt; }
.ck-content p.affil, .ck-content p.facts { margin-top: 0; margin-bottom: 8pt; }
.ck-content p.doi { margin-top: 0; margin-bottom: 20pt; }   /* 6pt + one empty line */
/* article type (article_type.php): small capitals on the left of the DOI line, same line, so no page grows */
.ck-content p.doi .atype { float: left; font-size: 8pt; line-height: 15pt; text-transform: uppercase; letter-spacing: 0.06em; color: #555; }
.ck-content p.abstract { margin-left: 36pt; margin-right: 36pt; }
/* licence note at the end: one empty line after references/notes, thin rule above */
.ck-content section.license { margin-top: 14pt; }
.ck-content section.license hr { border: 0; border-top: 0.5pt solid #999; height: 0; margin: 0 0 6pt; background: none; }
.ck-content p.kw { margin-bottom: 20pt; }

/* ---- type scale (user decisions 2026-09-29) ----
   Header lines (inline styles, same everywhere): title 14 bold · authors 12 · affiliations 10 ·
   dates 9 italic · DOI 10.  Licence note 9.
   PRINT / PDF (what the PDF generator uses; same as the Word export):
     body 11 · abstract + keywords 10 · references 10 · notes 9 · tables + captions 10
   SCREEN (website; one step larger, web body text = 16px = 12pt):
     body 12 · abstract + keywords 11 · references 11 · notes 10 · tables + captions 11
   Headings = body size (level 1 bold, level 2 bold italic, level 3+ italic). */
.ck-content h2 { font-weight: bold; font-style: normal; }
.ck-content h3 { font-weight: bold; font-style: italic; }
.ck-content h4, .ck-content h5, .ck-content h6 { font-weight: normal; font-style: italic; }
.ck-content p.doi { font-size: 10pt; }

@media print {
  .ck-content { font-size: 11pt; }
  .ck-content h2, .ck-content h3, .ck-content h4, .ck-content h5, .ck-content h6 { font-size: 11pt; }
  .ck-content p.abstract, .ck-content p.kw, .ck-content p.ref, .ck-content p.refnote { font-size: 10pt; }
  .ck-content .notes, .ck-content .notes p, .ck-content .notes li { font-size: 9pt; }
  .ck-content .table, .ck-content table, .ck-content td, .ck-content th, .ck-content td p, .ck-content th p,
  .ck-content p.caption, .ck-content figcaption, .ck-content .image > figcaption, .ck-content .table > figcaption { font-size: 10pt; }
}
@media screen {
  .ck-content { font-size: 12pt; }
  .ck-content h2, .ck-content h3, .ck-content h4, .ck-content h5, .ck-content h6 { font-size: 12pt; }
  .ck-content p.abstract, .ck-content p.kw, .ck-content p.ref, .ck-content p.refnote { font-size: 11pt; }
  .ck-content .notes, .ck-content .notes p, .ck-content .notes li { font-size: 10pt; }
  .ck-content .table, .ck-content table, .ck-content td, .ck-content th, .ck-content td p, .ck-content th p,
  .ck-content p.caption, .ck-content figcaption, .ck-content .image > figcaption, .ck-content .table > figcaption { font-size: 11pt; }
}

/* ---- printed / PDF page (user decision 2026-09-29): Revistia book format 170 x 240 mm,
   margins top 25 · sides 15 · bottom 20 mm; the running header (journal · vol/issue/year ·
   ISSNs, one line) and the page numbers are added by the PDF generator (ejls/ejls_pdf.py). */
@page { size: 170mm 240mm; margin: 25mm 15mm 20mm 15mm; }
@media print {
  html, body { background: #fff; }
  /* Word "single" line spacing for Cambria = its own line height (ascent + descent = 2401/2048 em
     = 1.1724), not 1.15: 12.90 pt at 11 pt, as measured in Revistia's Word PDFs (12.87 pt) */
  .ck-content p, .ck-content li, .ck-content blockquote, .ck-content h1, .ck-content h2, .ck-content h3,
  .ck-content h4, .ck-content h5, .ck-content h6, .ck-content td, .ck-content th { line-height: 1.1724; }
  main { max-width: none; margin: 0; padding: 0; }
  .ck-content { orphans: 2; widows: 2; }
  .ck-content h1, .ck-content h2, .ck-content h3, .ck-content h4, .ck-content h5, .ck-content h6 { break-after: avoid; page-break-after: avoid; }
  .ck-content figure, .ck-content .image, .ck-content img, .ck-content p.caption { break-inside: avoid; page-break-inside: avoid; }
  .ck-content tr { break-inside: avoid; page-break-inside: avoid; }
  .ck-content header { break-after: avoid; }
  .ck-content img { max-width: 100% !important; }
  .ck-content .table, .ck-content table { max-width: 100%; }
  .ck-content a { color: inherit; text-decoration: none; }
}

/* formulas pasted from Word as images (class "eq", EJLS editor paste handler): sit on the text line */
.ck-content img.eq { display: inline; vertical-align: middle; margin: 0 .1em; max-width: 100%; }
