/* Screen and print styles for Cyril Monkewitz's reading edition. */
:root {
  color-scheme: light;
  --ink: #201d26;
  --muted: #57515c;
  --accent: #704410;
  --line: #d5cfc6;
  --paper: #fffdf8;
  --sans: "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, Cambria, "Times New Roman", serif;
  font: 100%/1.55 var(--sans);
}
* { box-sizing: border-box; }
body { margin: 0; background: #170f29; color: var(--ink); }
body:has(.mastbar) { padding-top: var(--bar-height, 3.375rem); }
a { color: #594071; text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { color: #883f06; }
a:focus-visible,summary:focus-visible { outline: 3px solid #b66411; outline-offset: .18rem; }
.skip { position: absolute; z-index: 10; top: -6rem; left: 1rem; padding: .55rem; background: white; }
.skip:focus { top: .4rem; }
.shell { position: relative; z-index: 1; width: min(62rem, calc(100% - 3rem)); margin-inline: auto; }
header { color: #fffaf3; background: linear-gradient(180deg, #130d229e, #18102582); }
header a { color: #fff4de; }
header a:hover { color: #ffd391; }
.mastbar { position: fixed; inset: 0 0 auto; z-index: 8; color: #fff3e6; background: rgb(25 17 34 / 88%); border-bottom: 1px solid #ffa500; box-shadow: 0 2px 8px #110d1b40; }
@supports ((backdrop-filter: blur(7px)) or (-webkit-backdrop-filter: blur(7px))) {
  .mastbar { background: rgb(25 17 34 / 74%); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
}
@media (prefers-reduced-transparency: reduce) { .mastbar { background: #20182a; -webkit-backdrop-filter: none; backdrop-filter: none; } }
.topbar { display: flex; align-items: center; min-height: 3.3125rem; gap: clamp(.5rem, 2vw, 1.6rem); padding: 0 .9rem 0 .5625rem; font: .93rem/1.4 var(--sans); }
.brand img { display: block; width: 100%; height: auto; }
.brand { width: 19.6333rem; max-width: 100%; min-width: 0; flex: 0 1 19.6333rem; border: 0; background: transparent; padding: 0; cursor: pointer; }
.brand:focus-visible { outline: 2px solid #ffd391; outline-offset: .18rem; }
[data-rmt-rail] { position: relative; pointer-events: none; }
.language { display: inline-flex; border: 1px solid #ffa500; border-radius: 1.2rem; padding: 2px; gap: 2px; }
.language a { display: grid; place-items: center; padding: .32em .7em; border-radius: 1rem; color: #fff4e7; font: 600 .81rem/1.3 var(--sans); letter-spacing: .04em; text-decoration: none; }
.language a[aria-current="page"] { color: #201421; background: #ffa500; font-weight: 800; box-shadow: inset 0 0 0 1px #ffa500; }
.language a:not([aria-current]):hover { background: #4b3b54; }
.mastbar a:focus-visible { outline: 2px solid #ffd391; outline-offset: 2px; }
.hero { padding-block: clamp(2.25rem, 4vw, 3.65rem) 2.55rem; text-shadow: 0 2px 7px #130e20; }
h1,h2,h3 { text-wrap: balance; }
h1 { margin: 0; max-width: 18ch; font: 500 clamp(2.95rem, 2.05rem + 3.6vw, 5.8rem)/.99 var(--serif); letter-spacing: -.045em; }
.subtitle { margin: 1rem 0 .95rem; font: italic clamp(1.13rem, 1rem + .5vw, 1.45rem)/1.4 var(--serif); }
.byline { margin: 0; font-size: .96rem; }
.bymeta { margin-inline-start: .65em; padding-inline-start: .8em; border-left: 1px solid #e3c8ba; }
.paper { background: var(--paper); border-top: .25rem solid #d3924d; margin-bottom: 3.5rem; box-shadow: 0 1rem 3rem #08041370; }
.tools { margin-inline-start: auto; font-size: .93rem; }
.read-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .2rem clamp(.55rem, 1.8vw, 1.5rem); }
.menu-toggle { display: none; cursor: pointer; color: #fff4e7; border: 1px solid #a698aa; border-radius: .45rem; padding: .33em .65em; background: transparent; font: inherit; }
.tools.compact .menu-toggle { display: block; }
.read-links[popover] { inset: calc(var(--bar-height, 3.375rem) + .35rem) .6rem auto auto; width: min(16rem, calc(100vw - 1.2rem)); margin: 0; padding: .45rem .85rem; border: 1px solid #94775f; border-radius: .45rem; background: #241b2e; box-shadow: 0 .4rem 1rem #140c2055; }
.read-links[popover]:not(:popover-open) { display: none; }
.read-links[popover]:popover-open { display: grid; gap: .15rem; justify-content: stretch; }
.tools a { color: #fff4e7; padding-block: .33rem; text-decoration: none; }
.tools a:hover { color: #ffe2a6; text-decoration: underline; }
.reading { width: min(100%, 53rem); margin: auto; padding: 1.8rem clamp(1.1rem, 4.5vw, 3.2rem) 3rem; font: 1.13rem/1.65 var(--serif); overflow-wrap: break-word; }
.reading p { max-width: 68ch; text-wrap: pretty; margin: .8em 0; }
.opening p:first-child { font-size: 1.35em; line-height: 1.46; }
.contents { margin: .8rem 0 1.2rem; padding-block: .5rem .65rem; border-bottom: 1px solid var(--line); font: .98rem/1.55 var(--sans); }
.contents summary { cursor: pointer; color: #50365b; font-weight: 650; }
.contents ul { padding-inline-start: 1.4rem; margin-block: .45rem; }
html { scroll-padding-top: calc(var(--bar-height, 4.5rem) + .75rem); }
.reading h2 { margin: 2.4rem 0 1.2rem; padding-top: 1.45rem; border-top: 1px solid var(--line); font: 500 clamp(1.85rem, 1.35rem + 1.45vw, 2.8rem)/1.12 var(--serif); letter-spacing: -.025em; }
h2 small { display: block; margin-bottom: .65rem; color: var(--accent); font: 650 .9rem/1.3 var(--sans); letter-spacing: .04em; }
.reading h3 { margin: 1.7em 0 .4em; font: 600 1.35rem/1.25 var(--serif); }
code,pre { font-family: Consolas, "Courier New", monospace; }
code { font-size: .9em; }
pre { margin: 1.25rem 0; padding: 1rem 1.3rem; border-left: 3px solid #ac763e; color: #32293d; background: #f0ede8; font-size: 1.04rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; margin: .8rem 0; width: 100%; font: .99rem/1.45 var(--sans); font-variant-numeric: tabular-nums; }
caption,figcaption { color: var(--muted); font: .93rem/1.45 var(--sans); text-align: start; }
caption { padding-bottom: .65rem; }
th,td { padding: .42em .32em; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child { text-align: start; }
thead th { border-top: 2px solid #766c7c; }
.demo { margin: 1.5rem 0; }
.demo iframe { width: 100%; height: 27rem; display: block; background: #fffaf1; border: 1px solid #ccbca7; border-radius: .3rem; }
.demo figcaption { margin-top: .4rem; }
.reading .references { padding-inline-start: 1.55rem; font-size: 1rem; }
.references li { padding-left: .2rem; margin: 0 0 .85rem; }
li:target { outline: 2px solid #b18449; outline-offset: .2rem; }
.credit { margin-top: 2.8rem; padding-block-start: 1rem; border-top: 1px solid var(--line); font-size: 1rem; }
.credit h2 { border: 0; padding: 0; }
.dedication { font-style: italic; }
.print-only { display: none; }
.print-intro { color: #514a57; font: .92rem/1.4 var(--sans); }
noscript p { font-size: .95rem; }
/* Wide screens: the text spans the paper, with about half the former white margin each side. */
@media screen and (min-width: 40.01rem) {
  .reading { width: auto; margin: 0; padding-inline: clamp(1.1rem, 5vw, 3.85rem); }
  .reading p { max-width: none; }
}
@media(max-width: 40rem) {
  .hero h1 { font-size: clamp(2.5rem, 1.75rem + 5vw, 3.5rem); overflow-wrap: anywhere; }
  .topbar { gap: .55rem; padding-inline: .5625rem; }
  .language { flex: none; }
  .tools { flex: none; font-size: .87rem; }
  .topbar:not(:has(.tools.compact)) { flex-wrap: wrap; }
  .topbar:not(:has(.tools.compact)) .brand { flex: 1 1 40%; }
  .topbar:not(:has(.tools.compact)) .tools { order: 3; width: 100%; }
  .topbar:not(:has(.tools.compact)) .read-links { justify-content: space-between; }
  .shell { width: 100%; }
  header .shell { padding-inline: 1.15rem; }
  .paper { margin-bottom: 0; }
  .reading { padding: 1.1rem 1.05rem 2rem; font-size: 1.08rem; }
  .bymeta { display: block; margin: .2rem 0 0; padding: 0; border: 0; }
  .opening p:first-child { font-size: 1.22em; }
  table { font-size: .85rem; }
}
@page { size: A4; margin: 16mm 20mm 21mm; }
@media print {
  :root,body { color: #1c1c20; background: white !important; }
  html,body { height: auto; }
  body:has(.mastbar) { padding-top: 0; }
  .tools,.mastbar,.contents,.screen-only,.demo,.skip,canvas[data-rmt-sky],noscript { display: none !important; }
  .print-only { display: block; }
  header,.paper,.shell { position: static; width: 100%; margin: 0; color: inherit; border: 0; background: transparent; box-shadow: none; text-shadow: none; }
  .hero { padding: 0 0 4mm; text-shadow: none; border-bottom: 1pt solid #594961; }
  h1 { max-width: none; font-size: 29pt; }
  .subtitle { font-size: 14pt; margin: 2mm 0; }
  .byline,.bymeta { display: inline; color: #443f48; font: 9pt/1.35 var(--sans); }
  .bymeta { padding-left: .7em; border-left: 1px solid #999; }
  .reading { width: auto; max-width: none; margin: 0; padding: 0; font-size: 10.75pt; line-height: 1.42; overflow-wrap: anywhere; }
  .reading p { max-width: none; orphans: 3; widows: 3; margin: 2.6mm 0; }
  .opening p:first-child { font-size: 12pt; line-height: 1.42; }
  .print-intro { font-size: 8.5pt; }
  .listening { padding-inline-start: 1.5rem; font-size: 9.75pt; }
  .reading h2 { margin: 5mm 0 2.2mm; padding-top: 2.7mm; border-top: .6pt solid #aeabb0; font-size: 19pt; }
  h2 small { display: inline; padding-right: .25em; font-size: 8.4pt; color: #4b3352; }
  .reading h3 { margin: 3.8mm 0 1.5mm; font-size: 13pt; }
  h1,h2,h3,caption { break-after: avoid; }
  pre,table,figure,li,blockquote { break-inside: avoid; }
  pre { margin: 3mm 0; padding: 2mm 3mm; font-size: 9pt; }
  table { margin: 2.5mm 0; font-size: 9.5pt; }
  caption,figcaption { font-size: 8.6pt; color: #3f3a42; }
  figure { margin: 3mm 0; }
  .print-diagram { color: #27212e; width: 100%; height: auto; display: block; }
  a { color: #41334d; }
  html:lang(fr) :is(.proof-appendix,.ref-appendix,#ref-trueman) { break-before: page; }
  .appendix-head { margin-top: 0 !important; }
  .proof-appendix section h2 { font-size: 14pt; }
  .reading .references { font-size: 11pt; line-height: 1.48; }
  .references li { margin-bottom: 3mm; }
  .credit { font-size: 9.5pt; margin-top: 5mm; }
}
