/* Set like a short mathematics paper. STIX Two Text is SIL OFL 1.1, see /fonts/OFL.txt.
   Both files are variable fonts, so one file covers every weight. */
@font-face {
  font-family: "STIX Two Text";
  src: url("/fonts/stix-two-text.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIX Two Text";
  src: url("/fonts/stix-two-text-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffffd;
  --ink: #141414;
  --muted: #4d4d4d;
  --rule: #141414;
  --link: #1c3f8f;
  --moat: #e3e8f3;
  --code-bg: #f4f4f0;
  --code-str: #7a3d0c;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131416;
    --ink: #e8e6e1;
    --muted: #a9a7a1;
    --rule: #8d8b86;
    --link: #9db6ff;
    --moat: #232a3b;
    --code-bg: #1b1c1f;
    --code-str: #e0b284;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem/1.6 "STIX Two Text", "Times New Roman", Times, serif;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

main {
  max-width: 35rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 4rem;
}

p { margin: 0 0 0.9rem; text-align: justify; hyphens: auto; }

a { color: var(--link); text-decoration-thickness: 0.06em; text-underline-offset: 0.16em; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 1px; }

/* title block */
.title { text-align: center; margin-bottom: 2.25rem; }
.title img {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 2px;
  margin: 0 auto 1.1rem;
}
h1 {
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  letter-spacing: -0.005em;
}
.title p { text-align: center; margin: 0 0 0.3rem; }
.byline { font-variant: small-caps; letter-spacing: 0.05em; }
.tagline { font-style: italic; }
.date { color: var(--muted); font-size: 0.95rem; }

/* abstract, as a LaTeX article sets it */
.abstract { margin: 0 1.75rem 2rem; font-size: 0.97rem; }
.abstract h2 {
  font-size: 0.97rem;
  text-align: center;
  margin: 0 0 0.4rem;
}

/* numbered sections */
h2 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 2.4rem 0 0.6rem; }
.num { display: inline-block; min-width: 1.6em; }
.num::after { content: "."; }

/* the profiles, set as a reference list */
.refs { list-style: none; counter-reset: ref; margin: 0.4rem 0 0; padding: 0; }
.refs li {
  counter-increment: ref;
  position: relative;
  padding-left: 2.4em;
  margin: 0 0 0.35rem;
}
.refs li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: 0;
}
sup { font-size: 0.68em; line-height: 0; }
sup a { text-decoration: none; }

/* footnotes under a short rule, then the disclaimer */
.notes { margin-top: 2.4rem; font-size: 0.9rem; }
.notes::before {
  content: "";
  display: block;
  width: 30%;
  border-top: 1px solid var(--rule);
  margin-bottom: 0.5rem;
}
.notes ol { margin: 0 0 0.6rem; padding-left: 1.2em; }
.notes p { text-align: left; color: var(--muted); }

/* subsections, display maths and figures */
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin: 1.7rem 0 0.5rem; }
h3 .num { min-width: 2.2em; }

/* STIX Two Math (also SIL OFL 1.1), subset to the symbols this page uses, MATH table kept */
@font-face {
  font-family: "STIX Two Math";
  src: url("/fonts/stix-two-math.woff2") format("woff2");
  font-display: swap;
}
math { font-family: "STIX Two Math", math; }
math[display="block"] { margin: 1rem 0; overflow-x: auto; overflow-y: hidden; }

figure { margin: 1.2rem 0 1rem; }
figcaption { font-size: 0.9rem; line-height: 1.45; margin-top: 0.45rem; }
.breaks { font-size: 0.97rem; }

.fig { display: block; width: 100%; height: auto; }
.fig text { font-size: 13px; fill: var(--muted); }
.fig .lab { font-style: italic; }
.fig .ax { fill: none; stroke: var(--muted); stroke-width: 1; }
.fig .path { fill: none; stroke: var(--muted); stroke-width: 0.8; stroke-opacity: 0.5; }
.fig .hi { fill: none; stroke: var(--link); stroke-width: 1.7; stroke-linejoin: round; }
.fig .stick { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.fig .rug { fill: none; stroke: var(--ink); stroke-width: 1; }
.fig .dash { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.fig .bar { fill: var(--muted); fill-opacity: 0.55; }
.fig .shade { fill: var(--link); fill-opacity: 0.1; }
/* the surface: every quad filled with paper so nearer ones hide farther ones */
.fig .hat path { fill: var(--paper); stroke: var(--muted); stroke-width: 0.45; stroke-linejoin: round; }
.fig .hat .m { fill: var(--moat); }
.fig .lead { fill: none; stroke: var(--muted); stroke-width: 0.8; }
.fig .halo { paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }

/* the riddle */
.riddle { list-style: none; margin: 0.4rem 0 0.9rem; padding: 0; }
.riddle li { padding-left: 2.2em; margin: 0 0 0.45rem; }
.riddle li > math:first-child { display: inline-block; width: 2.2em; margin-left: -2.2em; }

details { margin: 0.2rem 0 1rem; }
summary { cursor: pointer; font-style: italic; color: var(--link); width: fit-content; }
summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
details[open] > summary { margin-bottom: 0.5rem; }

/* the program and what it prints */
.code-name { margin: 0.9rem 0 0.25rem; font-size: 0.85rem; color: var(--muted); font-style: italic; }
pre {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  background: var(--code-bg);
  border-left: 2px solid var(--rule);
  font: 0.8rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  tab-size: 4;
}
pre code { font: inherit; }
.tok-kw { font-weight: 700; }
.tok-fn { color: var(--link); }
.tok-str { color: var(--code-str); }
.tok-num { color: var(--code-str); }
.tok-com { color: var(--muted); font-style: italic; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 30rem) {
  main { padding-top: 3rem; }
  p { text-align: left; }
  .abstract { margin-inline: 0; }
}
