/*** default.css  -*- CSS -*- */

/*** Ivan Shmakov, 2016, 2017, 2018, 2019 */

/** To the extent possible under law, the author(s) have dedicated
 ** all copyright and related and neighboring rights to this software
 ** to the public domain worldwide.  This software is distributed
 ** without any warranty.
 **
 ** You should have received a copy of the CC0 Public Domain Dedication
 ** along with this software.  If not, see
 ** <http://creativecommons.org/publicdomain/zero/1.0/>.
 */

/*** Data: */

@page {
  margin:   2cm;
}

@page :left {
  margin-right: 1cm;
}

@page :right {
  margin-left:  1cm;
}

@media screen {
  body {
    margin: 1em 0 0 2em;
    max-width:    72ex;
  }
}

@media print {
  body {
    /* line-height:    1.5; */
    max-width:      none;
  }
  footer {
    line-height:    1.0;
  }

  /** NB: color them the same, mainly for privacy reasons */
  :link,
  :visited {
    color:  #00e;
  }
}

/** html, body */

html {
  color:        black;
  background:   white;
}

body {
  margin:   1.5em auto;
  padding:      1.5em;
  /*
  background:   #ccc;
  color:    navy;
   */
}

/** article, section */

article,
section {
  /** BTW, these are apparent defaults for ol, ul; seem more applicable here */
  margin-top:   1em;
  margin-bottom:    1em;
}

/** p, ol, ul, li, etc. */

article p,
article li,
article dd,
section p,
section li,
section dd {
  text-align:   justify;
}

article p,
section p {
  margin:   0;
  text-indent:  3em;
}

article ol,
article ul,
section ol,
section ul {
  margin:   0;
}

li p,
dd p,
dt p {
  text-indent:  inherit;

  /** restore apparent defaults */
  margin-top:   1em;
  margin-bottom:    1em;
}

/** header, footer */

header,
article header,
section header {
  text-align:   center;
  page-break-after: avoid;
}

header *,
article header *,
section header *,
footer *,
article footer *,
section footer * {
  text-align:   inherit;
  text-indent:  inherit;
}

article section header,
section section header {
  text-align:   left;
}

header p,
footer p {
  /** restore apparent defaults */
  margin-top:   1em;
  margin-bottom:    1em;
}

header .author,
header .date,
header .subtitle {
  font-weight:  bold;
}

header h1 ~ .subtitle {
  /** Like h2 */
  margin-bottom:    0.83em;
  margin-top:       0.83em;
  font-size:    150%;
}

header h1 ~ .author {
  /** Like h3 */
  margin-top:       1.00em;
  margin-bottom:    1.00em;
  font-size:    117%;
}

article header {
  margin:   1em 0;
  /*
  border-top:       medium solid;
  border-bottom:    medium solid;
   */
}

article header h1 {
  font-size:    200%;
}

article header:first-child {
  margin-top:   0;
}

section header {
  margin:   .7em 0;
  /*
  border-color:     gray !important;
  border-top:       thin solid;
  border-bottom:    thin solid;
   */
}

section section header,
section section footer {
  border:   none;
}

article footer {
  border-top:       medium solid;
}

section footer {
  border-top:       thin solid;
}

/** Miscellaneous */

:lang(de) > q {
    quotes: '»' '«' '‹' '›'
}

:lang(fr) > q {
    quotes: '« ' ' »'
}

:lang(ru) > q {
    quotes: '«' '»' '„' '“'
}

:link {
  text-decoration:  none !important;
}

/** E. g.: … where <var class="angled" >output</var> is the output file name */
.angled:before  { content: "⟨"; }
.angled:after   { content: "⟩"; }

.extra {
  font-size:    small;
}

/** Not unlike http://mediawiki.org/wiki/Snippets/Horizontal_lists; my assumption is that the fragment below is /not/ copyrightable, as it follows technical necessity, and includes no creativity proper */
.hlist > dt,
.hlist > li {
  display: inline;
}

.hlist > dt::after,
.hlist > li::after {
  content: " · ";
}

.prompt {
  font-weight:  bold;
}

/** FIXME: workaround for these elements to get normal text size. */
code, kbd, pre, samp {
  font-family:      monospace, Courier !important;
}

.this-qr {
  float:    right;
}

/*** default.css ends here */
