/*
Base CSS from https://github.com/hcarvalhoalves/org-mode-site-template/
Inspired by https://edwardtufte.github.io/tufte-css/
*/

html { font-size: 15px; }
body { background-color: #fffff8; color: #111; }

@media (prefers-color-scheme: dark) {
    body { background-color: #151515; color: #ddd; }}

/* Typography */
body { font-family: Palatino, Georgia, serif; }
pre,code,tt { font-family: "Consolas", ui-monospace, monospace; font-size: 0.9em; }
pre {
    white-space: pre-wrap;
}
pre.src {
    padding: 10pt;
    border-radius: 5px;
    border: 1px solid silver;
    outline: 1px solid black;
}

a:visited { color: LinkText; }
h1,h2,h3,h4,h5,h6 { font-weight: 400; }
h2,h3,h4,h5,h6 { font-style: italic; }
p,figure,ul,ol,dl,table { font-size: 1.3rem; line-height: 2rem; margin: 0 0 2rem; }
figcaption { font-size: 1.1rem; }

/* Base layout */
figure { text-align: center; }
p,figure,ul,ol,dl,table { margin: 0 0 2rem; }
p,figcaption { text-align: justify; }
li > ul, li > ol { margin: 0; }
img { max-width: 100%; }

/* Book layout on big screen */
@media (min-width: 1024px) {
    body { margin-left: 12.5%; width: 87.5%; }
    ul,ol,dl,table,nav { width: 87.5%; }
    p,figure { width: 87.5%; }
    figure:has(.note),
    figure:has(.full) { clear: both; }
    figure:has(.note) figcaption { float: right; clear: right; width: 50%; margin-right: -60%; position: relative; }
    figure:has(.aside) { float: right; clear: right; width: 27.5%; margin-right: 12.5%; position: relative; }
    figure:has(.full) { width: 87.5%; }
    figure:has(.triptych),
    figure:has(.diptych) { display: inline-block; vertical-align: top; }
    figure:has(.triptych) figcaption,
    figure:has(.diptych) figcaption { margin: 0 1rem 0 0; }
    figure:has(.triptych) { width: 29%; }
    figure:has(.diptych) { width: 43.75%; }
	       
}

/* Org-mode specific selectors */
#preamble,
.content { margin-top: 4rem; }
#preamble + .content { margin: 0; }
#postamble { margin-bottom: 4rem; clear: both; }
.title { font-size: 2.4rem; line-height: 1; }
.subtitle { font-size: 1.5rem; font-style: italic; }
