/******************************************************************************/
/*                                                                            */
/* default.css - Default document class for paged.js                          */
/* =================================================                          */
/*                                                                            */
/* This program is part of the Rexx Parser package                            */
/* [See https://rexx.epbcn.com/rexx-parser/]                                  */
/*                                                                            */
/* Copyright (c) 2024-2026 Josep Maria Blasco <josep.maria.blasco@epbcn.com>  */
/*                                                                            */
/* License: Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0)  */
/*                                                                            */
/* Load AFTER rexxpub-base.css.  Optional size variants:                      */
/*   default-<size>pt.css (load AFTER this file).                             */
/*                                                                            */
/* This is the fallback document class used by md2pdf when the source         */
/* filename does not match any of the named classes (article, book,           */
/* letter, slides).  It produces a clean, readable document suitable          */
/* for general-purpose Markdown files: technical documentation, README        */
/* files, tutorials, guides, and any document that does not need the          */
/* specific conventions of the other classes.                                  */
/*                                                                            */
/* Key characteristics:                                                       */
/*   - DIN A4 portrait, 3cm margins (same as article)                         */
/*   - Times New Roman at 12pt (parametric)                                   */
/*   - Left-aligned (ragged right), no auto-hyphenation                       */
/*   - Block style: no first-line indent, paragraphs separated by space       */
/*   - Title page support (same structure as article, when present)           */
/*   - Article-style heading hierarchy                                        */
/*   - Page numbers centred at bottom, suppressed on first page               */
/*                                                                            */
/* Compared to article.css:                                                   */
/*   - Block style instead of LaTeX first-line indent                         */
/*   - Left-aligned instead of justified                                      */
/*   - No automatic hyphenation                                               */
/*   - Slightly more generous line-height (1.30 vs 1.25)                      */
/*                                                                            */
/* Compared to letter.css:                                                    */
/*   - Full heading hierarchy (h1–h4)                                         */
/*   - Title page support                                                     */
/*   - No letter-specific structural elements (sender, recipient, etc.)       */
/*                                                                            */
/* Version history:                                                           */
/*                                                                            */
/* Date     Version Details                                                   */
/* -------- ------- --------------------------------------------------------- */
/* 20260307    0.5  First version                                             */
/*                                                                            */
/******************************************************************************/

/******************************************************************************/
/* CSS Custom Properties — override base for readability                      */
/******************************************************************************/

:root {
  --doc-line-height:      1.30;           /* Slightly more generous than       */
                                          /* article for comfortable reading   */
}

/******************************************************************************/
/******************************************************************************/
/* Content                                                                    */
/******************************************************************************/
/******************************************************************************/

div.content {
  font-family: "Times New Roman", Times, serif;
  font-size: var(--doc-font-size);
  line-height: var(--doc-line-height);
  text-align: left;                       /* Ragged right for readability      */
  text-align-last: left;
  hyphens: manual;                        /* No auto-hyphenation               */
  widows: 2;
  orphans: 2;
}

/******************************************************************************/
/* Paragraphs — block style: no indent, vertical separation                   */
/******************************************************************************/

div.content p {
  margin: 0;
  margin-bottom: 0.6em;                   /* Paragraph separation              */
  text-indent: 0;                         /* Block style: never indent         */
}

/******************************************************************************/
/* Headings                                                                   */
/*                                                                            */
/* Same hierarchy as article: h1 = section, h2 = subsection, etc.            */
/******************************************************************************/

/* h1 -> section */

h1 {
  font-size: 1.4em;
  font-weight: bold;
  margin-top: 2.0em;
  margin-bottom: 0.8em;
}

@media print {
  h1.newpage {
    margin-top: 0;
  }
}

/* h2 -> subsection */

h2 {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

@media print {
  h2.newpage {
    margin-top: 0;
  }
}

h1 + h2 {
  margin-top: 0;
}

/* h3 -> subsubsection */

h3 {
  font-size: 1em;
  font-weight: bold;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

@media print {
  h3.newpage {
    margin-top: 0;
  }
}

h2 + h3 {
  margin-top: 0;
}

/* h4 -> paragraph */

h4 {
  font-size: 1em;
  font-weight: bold;
  font-style: italic;
  margin-top: 1em;
  margin-bottom: 0.4em;
}

@media print {
  h4.newpage {
    margin-top: 0;
  }
}

h3 + h4 {
  margin-top: 0;
}

/******************************************************************************/
/* Title page                                                                 */
/*                                                                            */
/* Same structure as article.css: ::::: title-page with nested divs           */
/* for author, affiliation, address, email, phone, date.                      */
/* Documents that do not include a title page are unaffected.                  */
/******************************************************************************/

.title-page h1 {
  margin: 20px 0;
  font-size: 1.7em;
  text-align: center;
  font-weight: normal;
  text-align-last: center;
}

.title-page h1 small {
  display: block;
  font-size: 0.75em;
  margin-top: 0.2em;
  color: black;
  font-style: italic;
}

@media print {
  .title-page h1 {
    margin-top: 150px;
  }
}

.title-page .author {
  font-size: 1.2em;
  font-weight: normal;
  text-align: center;
  text-align-last: center;
  margin-top: 20px;
}

.title-page .affiliation,
.title-page .address,
.title-page .phone {
  font-size: 0.95em;
  font-weight: normal;
  font-style: italic;
  text-align: center;
  text-align-last: center;
  margin: 0;
}

.title-page .email {
  font-size: 13px;
  text-align: center;
  text-align-last: center;
  margin-top: 0;
  margin-bottom: 0;
  font-family: monospace, monospace;
}

.title-page .date {
  font-size: 1em;
  text-align: center;
  text-align-last: center;
  margin: 1.2em 0 2em 0;
}

/******************************************************************************/
/* Lists — override base: more bottom margin for block style                  */
/******************************************************************************/

div.content ul,
div.content ol {
  margin-bottom: 0.6em;
}

/******************************************************************************/
/* Blockquotes                                                                */
/******************************************************************************/

div.content blockquote {
  margin: 0.8em 1.5em;
  padding: 0;
  font-style: normal;
  font-size: inherit;
  border-left: none;
}

/******************************************************************************/
/* Footnotes — override base: left-aligned, no hyphenation                    */
/******************************************************************************/

.footnote {
  text-align: left;
  text-align-last: left;
  hyphens: manual;
}

/******************************************************************************/
/* Pagination                                                                 */
/*                                                                            */
/* DIN A4, 3cm margins (same as article at 12pt).                             */
/* Page number centred at bottom; suppressed on first and blank pages.         */
/*                                                                            */
/* NOTE: var() may not work inside @page rules in all paged.js versions.      */
/* The values here are the 12pt defaults.                                     */
/******************************************************************************/

@page {

  margin: 3cm;
  size: A4 portrait;

  @bottom-center {
    font-family: 'Times New Roman', Times, serif;
    content: counter(page);
    font-size: 12pt;
    font-style: normal;
    text-align: center;
    text-align-last: center;
  }

}

@page:first {
  @bottom-center {
    content: none;
  }
}

@page :blank {
  @bottom-center {
    content: none;
  }
}