/*
  Harris Manchester College Journal stylesheet
  Derived from the uploaded style guide.
*/

:root {
  --journal-font: "Times New Roman", Times, serif;
  --journal-body-size: 11pt;
  --journal-line-height: 12pt;
  --journal-page-width: 210mm;
  --journal-page-height: 297mm;
  --journal-margin: 2.5cm;
  --journal-paragraph-gap: 12pt;
  --journal-caption-size: 10pt;
  --journal-footer-size: 10pt;
}

/* Page setup */
@page {
  size: A4;
  margin: var(--journal-margin);
}

@page :left {
  margin-left: var(--journal-margin);
  margin-right: var(--journal-margin);
}

@page :right {
  margin-left: var(--journal-margin);
  margin-right: var(--journal-margin);
}

@page {
  @bottom-center {
    content: counter(page);
    font-family: var(--journal-font);
    font-size: var(--journal-footer-size);
    text-align: center;
  }
}

html, body {
  font-family: var(--journal-font);
  font-size: var(--journal-body-size);
  line-height: var(--journal-line-height);
  text-align: justify;
  color: #000;
  background: #fff;
  margin: 0;
  padding: 0;
}

/*body {
  width: var(--journal-page-width);
  min-height: var(--journal-page-height);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}*/

/* Core text flow */
p {
  margin: 0 0 var(--journal-paragraph-gap) 0;
}

p + p {
  margin-top: var(--journal-paragraph-gap);
}

/* First-line paragraphs should not be overly indented in this house style */
p,
li {
  widows: 2;
  orphans: 2;
}

/* Headings */
h1, .heading-1 {
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
  margin: 18pt 0 6pt;
  page-break-after: avoid;
}

h2, .heading-2 {
  font-size: 11pt;
  font-weight: 700;
  margin: 14pt 0 6pt;
  page-break-after: avoid;
}

h3, .heading-3 {
  font-size: 11pt;
  font-style: italic;
  font-weight: 400;
  margin: 12pt 0 6pt;
  page-break-after: avoid;
}

h4, h5, h6 {
  font: inherit;
  margin: 12pt 0 6pt;
}

/* Title page */
.title-page {
  page-break-after: always;
}

.title-page .paper-title {
  font-size: 14pt;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 18pt;
}

.title-page .journal-name,
.title-page .institution {
  text-align: center;
  margin: 0;
}

.authors,
.author-list {
  margin: 12pt 0 18pt;
}

.author {
  margin: 0 0 6pt;
}

.author .surname {
  text-transform: uppercase;
}

.abstract,
.keywords,
.abbreviations,
.figure-list,
.table-list,
.map-list {
  margin: 12pt 0;
}

.abstract-title,
.keywords-title,
.abbreviations-title,
.list-title {
  font-weight: 700;
  margin: 0 0 6pt;
}

/* Lists */
ul, ol {
  margin: 0 0 var(--journal-paragraph-gap) 1.5em;
  padding: 0;
}

li {
  margin: 0 0 3pt 0;
}

/* Inline emphasis */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

u {
  text-decoration: none;
}

/* Quotations */
blockquote {
  margin: 0 0 var(--journal-paragraph-gap) 1.5em;
  padding: 0;
}

q {
  quotes: 'â€˜' 'â€™' 'â€œ' 'â€';
}

q:before { content: open-quote; }
q:after  { content: close-quote; }
q q:before { content: open-quote; }
q q:after  { content: close-quote; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12pt 0 var(--journal-paragraph-gap);
  font-size: 10pt;
}

caption {
  caption-side: top;
  font-size: var(--journal-caption-size);
  text-align: left;
  margin-bottom: 6pt;
}

table th,
table td {
  border: 0.5pt solid #000;
  padding: 4pt 6pt;
  vertical-align: top;
}

table thead th {
  font-weight: 700;
  text-align: left;
}

/* Figures and captions */
figure {
  margin: 12pt 0 var(--journal-paragraph-gap);
  break-inside: avoid;
  page-break-inside: avoid;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
}

figcaption,
.caption {
  font-size: var(--journal-caption-size);
  text-align: left;
  margin-top: 6pt;
}

/* Reference / bibliography */
.references,
.bibliography {
  margin-top: 18pt;
}

.references h2,
.bibliography h2 {
  text-transform: uppercase;
}

.references p,
.bibliography p {
  text-indent: -1.5em;
  padding-left: 1.5em;
  margin-bottom: 6pt;
}

/* Page-number footer helpers for browser previews */
.page-number,
footer.page-footer {
  font-family: var(--journal-font);
  font-size: var(--journal-footer-size);
  text-align: center;
}

/* Optional utility classes */
.justify { text-align: justify; }
.center { text-align: center; }
.right { text-align: right; }
.uppercase { text-transform: uppercase; }
.no-break { break-inside: avoid; page-break-inside: avoid; }
.small { font-size: 10pt; }

/* Keep major blocks together when possible */
h1, h2, h3,
.table-block,
.figure-block,
.abstract,
.keywords,
.abbreviations {
  break-after: avoid;
}

/* Footnotes / endnotes */
.footnotes,
.endnotes {
  font-size: 10pt;
  margin-top: 18pt;
}

/* Screen preview fallback */
/*@media screen {
  body {
    max-width: 170mm;
    margin: 24px auto;
    padding: 0;
    box-shadow: 0 0 0 1px #ddd;
  }
}*/