/* Formula Bro: an old-school page. System Times, whitesmoke paper, browser-blue
   links, 1px gray rules. No web fonts, no scripts. */

html {
  background: #f5f5f5; /* CSS "whitesmoke": the smoked white the site asked for */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 44em;
  padding: 0.75em 16px 2em;
  background: #f5f5f5;
  color: #111;
  font-family: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif;
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

a { color: #0000ee; }
a:visited { color: #551a8b; }
a:hover, a:focus { color: #cc0000; }
a:focus-visible { outline: 2px solid #0000ee; outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 0.25em 0.5em; border: 1px solid #111; }

header { text-align: center; }
.site-name { margin: 0.25em 0 0; font-size: 2rem; font-weight: bold; line-height: 1.2; }
.site-name a { color: #111; text-decoration: none; }
.site-name a:hover, .site-name a:focus { text-decoration: underline; }
.site-name img { vertical-align: -0.3em; margin-right: 0.35em; border: 1px solid #888; }
.tagline { margin: 0.25em 0 0.5em; font-style: italic; }

.menu ul { margin: 0.5em 0 0.25em; padding: 0; list-style: none; }
.menu li { display: inline; white-space: nowrap; }
/* "Item |" never splits, so a separator stays with the word before it. */
.menu li:not(:last-child)::after { content: "\00a0|"; color: #555; }
.menu a[aria-current="page"] { color: #111; font-weight: bold; text-decoration: none; }

hr { border: 0; border-top: 1px solid #999; margin: 1em 0; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 1.6em 0 0.4em; border-bottom: 1px solid #ccc; padding-bottom: 0.1em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 0.3em; }
main > h1:first-child { margin-top: 0.2em; }

p, ul, ol, dl { margin: 0.6em 0; }
li { margin: 0.25em 0; }

.crumbs { font-size: 0.95rem; margin: 0 0 0.5em; }

figure.cat { margin: 1.25em auto; text-align: center; }
figure.cat img { display: block; margin: 0 auto; max-width: 100%; height: auto; border: 1px solid #888; background: #fff; }
figure.cat figcaption { margin-top: 0.35em; font-style: italic; }
figure.cat-small img { width: 240px; }

.one-liner { font-size: 1.15rem; }

.formula {
  margin: 1em 0;
  padding: 0.6em 0.75em;
  background: #fff;
  border: 1px solid #999;
  overflow-x: auto;
  text-align: center;
  font-size: 1.3rem;
}
.formula p { margin: 0; }

math { font-family: "STIX Two Math", "Latin Modern Math", "Cambria Math", math, serif; }
math[display="block"] { margin: 0.4em 0; overflow-x: auto; overflow-y: hidden; padding: 0.1em 0; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #999; padding: 0.35em 0.55em; text-align: left; vertical-align: top; }
th { background: #e8e8e8; }
td:first-child { white-space: nowrap; text-align: center; }

.steps li { margin: 0.45em 0; }
.answer { padding: 0.4em 0.6em; background: #fff; border: 1px solid #999; }
.note, .meta, .updated { font-size: 0.95rem; color: #444; }

.formula-list dt { margin-top: 1em; font-size: 1.15rem; font-weight: bold; }
.formula-list dd { margin: 0.2em 0 0 1.5em; }
.formula-list dd math[display="block"] { text-align: left; }
.formula-list dd p { margin: 0.2em 0; }

.toc { columns: 2; column-gap: 2em; }
.toc li { break-inside: avoid; margin: 0 0 0.3em; }

.prevnext { text-align: center; margin-top: 1.5em; }

footer { text-align: center; font-size: 0.95rem; }
footer p { margin: 0.35em 0; }

@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.6rem; }
  .site-name { font-size: 1.7rem; }
  .formula { font-size: 1.1rem; padding: 0.5em; }
  .toc { columns: 1; }
  .formula-list dd { margin-left: 0.75em; }
  td:first-child { white-space: normal; }
}

@media print {
  .menu, .skip, .prevnext { display: none; }
  body { background: #fff; }
  a { color: #000; }
}
