EACompanion/book.css
Simon d6e9337a5a
All checks were successful
Build and deploy the book / book (push) Successful in 5s
Build and deploy the book / book (pull_request) Successful in 5s
increase font size and code contrast
2026-08-21 11:37:41 +01:00

312 lines
7.2 KiB
CSS

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,750&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");
:root {
--paper: #f7f1e5;
--paper-deep: #ece1cf;
--ink: #202c2a;
--muted: #66706b;
--teal: #0d6661;
--teal-dark: #084b48;
--terracotta: #bd573b;
--ochre: #d6a53a;
--line: #d8cbb8;
}
body,
.book.font-family-1 {
color: var(--ink);
font-family: "IBM Plex Sans", sans-serif;
background:
radial-gradient(circle at 85% 8%, rgba(214, 165, 58, 0.12), transparent 24rem),
var(--paper);
}
.book .book-summary {
background:
linear-gradient(160deg, rgba(13, 102, 97, 0.98), rgba(8, 75, 72, 0.99)),
var(--teal-dark);
border-right: 0;
color: #f8f2e7;
}
.book .book-summary ul.summary {
padding: 0 0 2rem;
}
.book .book-summary ul.summary li a,
.book .book-summary ul.summary li span {
color: rgba(255, 255, 255, 0.78);
padding: 0.62rem 1.25rem;
}
.book .book-summary ul.summary li a:hover {
color: #fff;
background: rgba(255, 255, 255, 0.08);
}
.book .book-summary ul.summary li.active > a {
color: #fff;
background: rgba(255, 255, 255, 0.12);
border-left: 4px solid var(--ochre);
font-weight: 600;
}
.book .book-summary ul.summary li.divider {
background: rgba(255, 255, 255, 0.16);
}
.ea-brand {
margin: 0 0 1rem !important;
padding: 2.25rem 1.25rem 1.6rem !important;
border-bottom: 1px solid rgba(255, 255, 255, 0.18);
background: rgba(0, 0, 0, 0.08);
}
.ea-brand a {
padding: 0 !important;
color: #fff !important;
font-family: "Fraunces", serif;
font-size: 1.65rem;
font-weight: 750;
letter-spacing: -0.025em;
}
.ea-brand span {
display: block;
padding: 0.35rem 0 0 !important;
color: rgba(255, 255, 255, 0.62) !important;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.book .book-body,
.book .book-body .page-wrapper .page-inner section.normal {
background: transparent;
}
.book .book-body .page-wrapper .page-inner {
max-width: 900px;
padding: 3rem 4rem 6rem;
}
.book .book-body .page-wrapper .page-inner section.normal {
color: var(--ink);
font-size: 1.5rem;
line-height: 1.75;
}
.book .book-body .page-wrapper .page-inner section.normal h1,
.book .book-body .page-wrapper .page-inner section.normal h2,
.book .book-body .page-wrapper .page-inner section.normal h3 {
color: var(--teal-dark);
font-family: "Fraunces", serif;
font-weight: 700;
letter-spacing: -0.025em;
}
.book .book-body .page-wrapper .page-inner section.normal h1 {
position: relative;
margin: 0 0 2.5rem;
padding: 0 0 1rem;
font-size: clamp(2.5rem, 7vw, 4.6rem);
line-height: 1.02;
}
.book .book-body .page-wrapper .page-inner section.normal h1::after {
position: absolute;
bottom: 0;
left: 0;
width: 5rem;
height: 5px;
content: "";
background: linear-gradient(90deg, var(--terracotta) 0 60%, var(--ochre) 60%);
}
.book .book-body .page-wrapper .page-inner section.normal h2 {
margin-top: 2.6rem;
font-size: 2rem;
}
.book .book-body .page-wrapper .page-inner section.normal a {
color: var(--teal);
text-decoration-color: rgba(189, 87, 59, 0.55);
text-decoration-thickness: 2px;
text-underline-offset: 0.16em;
}
.book .book-body .page-wrapper .page-inner section.normal blockquote {
margin: 2rem 0;
padding: 1rem 1.5rem;
color: var(--teal-dark);
background: rgba(13, 102, 97, 0.07);
border-left: 5px solid var(--terracotta);
}
.book .book-body .page-wrapper .page-inner section.normal code,
.book .book-body .page-wrapper .page-inner section.normal pre {
font-family: "IBM Plex Mono", monospace;
}
.book .book-body .page-wrapper .page-inner section.normal pre {
padding: 1.25rem;
background: #192523;
border: 0;
border-radius: 3px;
}
.book .book-body .page-wrapper .page-inner section.normal pre code {
color: #f7f3e8;
background: transparent;
}
.book .book-body .page-wrapper .page-inner section.normal :not(pre) > code {
padding: 0.12em 0.35em;
color: #7a3526;
background: #f1e5d2;
border: 1px solid #dfcdb2;
border-radius: 3px;
}
/* High-contrast syntax colours for Pandoc and highlight.js output. */
.book section.normal pre code .kw,
.book section.normal pre code .cf,
.book section.normal pre code .hljs-keyword,
.book section.normal pre code .hljs-selector-tag {
color: #ffd166;
font-weight: 600;
}
.book section.normal pre code .fu,
.book section.normal pre code .bu,
.book section.normal pre code .hljs-title,
.book section.normal pre code .hljs-built_in {
color: #73daca;
}
.book section.normal pre code .st,
.book section.normal pre code .ch,
.book section.normal pre code .vs,
.book section.normal pre code .ss,
.book section.normal pre code .hljs-string {
color: #b8e986;
}
.book section.normal pre code .dv,
.book section.normal pre code .bn,
.book section.normal pre code .fl,
.book section.normal pre code .cn,
.book section.normal pre code .hljs-number,
.book section.normal pre code .hljs-literal {
color: #ffad7d;
}
.book section.normal pre code .co,
.book section.normal pre code .do,
.book section.normal pre code .an,
.book section.normal pre code .cv,
.book section.normal pre code .hljs-comment {
color: #b7c4c1;
font-style: italic;
}
.book section.normal pre code .op,
.book section.normal pre code .sc,
.book section.normal pre code .hljs-operator,
.book section.normal pre code .hljs-punctuation {
color: #f4d6a0;
}
.book section.normal pre code .va,
.book section.normal pre code .at,
.book section.normal pre code .dt,
.book section.normal pre code .hljs-variable,
.book section.normal pre code .hljs-attr {
color: #9ecbff;
}
.book .book-body .page-wrapper .page-inner section.normal table {
display: table;
width: 100%;
border: 1px solid var(--line);
}
.book .book-body .page-wrapper .page-inner section.normal table th {
color: #fff;
background: var(--teal);
}
.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
background: rgba(216, 203, 184, 0.28);
}
.book .book-body .page-wrapper .page-inner section.normal img {
border-radius: 3px;
box-shadow: 0 1rem 2.5rem rgba(32, 44, 42, 0.12);
}
.pottery-gallery {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1rem;
align-items: end;
margin: 2rem 0 0.75rem;
}
.pottery-gallery figure {
margin: 0;
text-align: center;
}
.pottery-gallery img {
width: 100%;
height: 180px;
object-fit: contain;
background: transparent;
box-shadow: none !important;
}
.pottery-gallery figcaption {
margin-top: 0.65rem;
color: var(--teal-dark);
font-family: "Fraunces", serif;
font-size: 1.1rem;
font-weight: 700;
}
.pottery-credit {
margin: 0 0 2rem;
color: var(--muted);
font-size: 0.72rem;
line-height: 1.5;
text-align: center;
}
.book .book-header.fixed {
background: rgba(247, 241, 229, 0.92);
border-bottom: 1px solid rgba(216, 203, 184, 0.7);
backdrop-filter: blur(10px);
}
@media (max-width: 700px) {
.book .book-body .page-wrapper .page-inner {
padding: 2rem 1.35rem 4rem;
}
.book .book-body .page-wrapper .page-inner section.normal h1 {
font-size: 2.6rem;
}
.pottery-gallery {
gap: 0.4rem;
}
.pottery-gallery img {
height: 105px;
}
.pottery-gallery figcaption {
font-size: 0.82rem;
}
}