/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  background-color: #f5f5f5;
}


/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */

body > .container {
  padding: 60px 15px 0;
}
.container .text-muted {
  margin: 20px 0;
}

.footer > .container {
  padding-right: 15px;
  padding-left: 15px;
}

code {
  font-size: 80%;
}

/* comments fixup */
.comment {
    border: none;
    padding: 1em;
    margin: 1em;
    background: #f3f3f3;
}
.mastodon-comment {
    display: flex;
}
/* mastodon posts have a span to hide the scheme and post id, use it */
.mastodon-comment-content span.invisible {
    display: none;
}
.mastodon-comment .avatar img {
    margin-right: 1rem;
}
.mastodon-comment span.disabled {
    display: none;
}
.mastodon-comment .author  {
    display: flex;
    justify-content: space-between;
}
.mastodon-comment .author time {
    font-size: small;
}
.actions ul {
    margin: inherit;
    padding: inherit;
    height: inherit;
    /* list-style-type: none; */
}

/* limit main content to ~90 chars per line */
/* update: practical typography recommends 2-3 alphabets */
#content {
  max-width: 35em;              /* this is 2.5 alphabets with Charter */
}

/* limit header as well otherwise logo is out of whack without sidebar */
.navbar-fixed-top .container {
  max-width: 55em;
}

/* some hacking at typefaces to get some fresh zest in here
 * fallbacks from:
 * https://en.wikipedia.org/wiki/List_of_typefaces_included_with_Microsoft_Windows
 * https://en.wikipedia.org/wiki/List_of_typefaces_included_with_macOS
 *
 * Font stacks from:
 * https://modernfontstacks.com/#font-stacks
 */
.navbar, .footer {
    /* according to modern font stacks, the following actually falls back to:
     * San Francisco: MacOS 10.8+, iOS 3+
     * Segoe UI: Windows 7+
     * Roboto: Android
     * Ubuntu: Linux
     * Cantarell: Linux using GNOME
     * Noto Sans: Linux using KDE
     *
     * So instead of letting "Linux" guess (because that's pretty
     * chaotic), actually hardcode those two first, so we have a
     * little better control over this. Noto sans is actually what I
     * would fallback on in Firefox on my workstation before the
     * change.
     */
    font-family: Ubuntu, "Noto sans", system-ui, sans-serif;
}
h1, h2, h3, h4, h5, body {
    /* this is the "transitional" stack from modern stack fonts. it was
     * picked because it sticks with the "Charter" font we were
     * previously using. it runs the risk of falling back on bitmap
     * fonts which look horrible on Linux, but in my tests it worked
     * okay.
     *
     * Charter: MacOS 10.9+, iOS 9.3+
     * Bitstream Charter: Linux
     * Sitka Text: Windows 8.1+
     * Cambreia: Windows 7+
     * Noto Serif: Android
     * Serif: fallback
     */
    font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, "Noto serif", serif;
    /* Charter is Butterick's favorite, freely available, found on
     * https://practicaltypography.com/free-fonts.html and available
     * from https://practicaltypography.com/charter.html under the
     * liberal Bitstream license. It used to be shipped alongside this
     * site as a web font, but was disabled for the sake of simplicity
     * and bandwidth saving. Now it is assumed that 'Bitstream
     * Charter' will "just work" on Linux.
     */
}
h1, h2, h3, h4, h5 {
    font-style: italic;
}
/* for charter, we should inline this: */
/*  <link rel="stylesheet" href="https://paste.anarc.at/publish/charter/stylesheet.css" type="text/css" charset="utf-8" /> */
/* we won't ship fira because it is too big and will hope some other font will kick in for headings, preferably Open sans */

/* no idea why bootstrap makes quotes bigger, not what i want */
blockquote {
    font-size: 14px;
    /* make blockquotes interesting */
    font-style: italic;
}

/* enlarge body point size for charter for larger displays */
@media (min-device-width: 750px) {
    body {
        font-size: 20px;
        line-height: 1.3; /* default in FF is ~1.48, try seems a bit to sparse */
    }
    /* to match the other bootstrap workaround, below */
    blockquote {
        font-size: 20px;
    }
    /* UI elements should be a little less intrusive */
    .navbar, .footer {
        font-size: 16px;
    }
}

pre, code {
    font-family: "Fira Mono", Menlo, Monaco, Consolas, "Courier New", "Liberation mono", monospace;
}

/* don't word-wrap PRE blocks so they are scrolled*/
pre {
    -ms-word-wrap: normal;
    word-wrap: normal;
}
pre code {
      white-space: pre;
}

/* workaround multimarkdown bug:
 * https://github.com/bobtfish/text-multimarkdown/issues/30 */
a.footnote { vertical-align: super; font-size: xx-small; }
div.footnotes { font-size: small; }

/* scale down images so they are centered like the rest of the text */
#content img { max-width: 100%; }
/* except in the mastodon avatar, it squeezes them weirdly and messes with borders */
#content .mastodon-comment .avatar img { max-width: inherit; }

/* format HTML5 captions like ikiwiki's table-based captions
 *
 * those work, but basically need to be entered by hand.
 *
 * https://ikiwiki.info/todo/html5_image_captions/
 */
figure {
    text-align: center;
}
figcaption {
    text-align: center;
    font-size: smaller;
    color: #777;
}

/* right-aligned figures
 *
 * those need a "table" display so that the caption shows up alongside the
 * figured. we also limit the size of the image so that it does not squeeze the
 * text too mucha nd had judicious padding.
 */
figure.align-right {
  float: right;
  padding: 0em 1em;
  display: table;
  max-width: 60%;
}
figure.align-right figcaption {
  display: table-caption;
  caption-side: bottom;
  padding: 0.5em 1em;
}

/* wrap long URLs so that we don't overflow layout
 * this could apply to any element, but we often have to deal with long
 * links so limit to that to avoid unexpected damage */
#content a {
    word-wrap: break-word;
}

/* transparent on top because links disappear behind otherwise */
.navbar-fixed-top { background: none; }
/* .in gets added by bootstrap on pop-up */
.navbar-fixed-top .in { background-color: #f8f8f8; }
/* align drop-down menus to the right */
.navbar-right { text-align: right; }

/* make table scale out to avoid ugly word-wrapping
 * bootstrap should deal with this, but ikiwiki doesn't assign the
 * right style and anyways our width is smaller than necessary
 *
 * pages with tables that should be checked when this is changed:
 *
 * https://anarc.at/blog/2017-10-26-comparison-cryptographic-keycards/
 * https://anarc.at/blog/2018-01-28-large-disk-price-review/
 * https://anarc.at/services/backup/
 * https://anarc.at/services/
 * https://anarc.at/services/dns/registrars/
 * https://anarc.at/services/welcome/
 */
table, table.table { width: 100%; }
table { font-size: inherit; } /* why the heck does chrome override font-size for tables?! */

/* this belongs in ikiwiki's style.css, but that needs the admonition
 * patch to be merged: https://ikiwiki.info/todo/admonitions/ */

/* admonition start */
#content div.caution,
#content div.important,
#content div.note,
#content div.tip,
#content div.warning {
    border: 1pt solid #aaa;
    margin: 1em 3em 1em 3em;
    background-repeat: no-repeat;
    background-position: 8px 8px;
    min-height: 48px; /*48=32+8+8 but doesn't work with IE*/
    padding: 1em 1em 1em 48px;
}
#content div.tip { background-image: url("smileys/admon-tip.png"); }
#content div.note { background-image: url("smileys/admon-note.png"); }
#content div.important { background-image: url("smileys/admon-important.png"); }
#content div.caution { background-image: url("smileys/admon-caution.png"); }
#content div.warning { background-image: url("smileys/admon-warning.png"); }
/* admonition end */

.breadcrumb {
    padding: 1px 0 0 0;
    border-bottom: none;
    padding-inline-start: 0px;
}
.breadcrumb li {
    padding: 8px 0 8px 8px;
}
.breadcrumb li::before {
    padding: 0 5px 0 0;
}
.page-header {
    border-bottom: none;
    margin: 40px 0 0;
}

/* more things to hide in printouts */
@media print {
    .page-header { margin: 0 0 0 0; }
    .footer { position: relative; font-size: 50%; }
    .pagedate { font-size: 50%; }
    .footer .powered-by { display: none; }
    .breadcrumb { display: none; }
    /* https://ikiwiki.info/todo/hide_add_comment_button_in_print/ */
    .addcomment { display: none; }
    /* remove link explosion in footer */
    .pagedate a[href]::after { content: normal; }
    .footer a[href]::after { content: normal; }
    /* reset size constraints, paper takes care of that */
    #content {
        width: auto;
        max-width: inherit;
        padding: 0;
        margin: 0;
    }
    body {
        margin: 0;
    }
}
