/* Page styles for chemprocesseng.com pages (DESIGN.md): nav, page header, reading sections, tables, equations, footer.
   If the tool goes into an existing page of the site, use the site's own copy of these styles instead. */
:root {
  --primary: #a6d7f0; --secondary: #8f5a39; --ink: #000; --ink-muted: #4d5459; --ink-subtle: #5f646a;
  --interactive: #12647e; --brand-deep: #3a2206; --canvas: #f5f7f8; --surface: #fff; --border: #e5e7eb; --rule: #000;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page-max: 1200px; --margin: 40px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 16px/1.65 var(--sans); letter-spacing: -.01em; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--interactive); outline-offset: 2px; }
.wrap { max-width: calc(var(--page-max) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* navigation: white bar, 72 px, wordmark + five text links */
.site-nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-nav .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font: 400 22px/1 var(--serif); text-decoration: none; letter-spacing: 0; white-space: nowrap; }
.site-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; font-size: 15px; padding: 25px 0 23px; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { border-bottom-color: var(--border); }
.site-nav ul a[aria-current="page"] { border-bottom-color: var(--ink); }

/* page header */
.page-head { padding: 40px 0 32px; }
.crumbs { font-size: 14px; color: var(--ink-subtle); margin: 0 0 18px; letter-spacing: 0; }
.crumbs a { color: var(--ink-subtle); }
.crumbs span { margin: 0 6px; }
h1.display { font: 300 64px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 16px; max-width: 980px; }
.standfirst { font: 300 19px/1.6 var(--sans); color: var(--ink-muted); margin: 0 0 18px; max-width: 680px; }
.byline { font-size: 14px; color: var(--ink-subtle); margin: 0; letter-spacing: 0; }
.byline span + span::before { content: "·"; margin: 0 8px; }
.byline .author { color: var(--ink); font-weight: 600; }

/* the tool itself is a self-contained module, so it gets the one card on the page */
.tool { margin-bottom: 84px; }
.tool .idg { --idg-height: min(860px, calc(100vh - 32px)); }

/* reading sections: 1 px black rule above the heading, 680 px text + 240 px sidenotes */
.section { padding-top: 14px; border-top: 1px solid var(--rule); margin-bottom: 84px; }
.marker { font: 400 15px/1.3 var(--serif); letter-spacing: .02em; color: var(--secondary); margin: 0 0 6px; }
h2.headline { font: 400 30px/1.25 var(--serif); margin: 0 0 24px; }
.split { display: grid; grid-template-columns: minmax(0, 680px) 240px; gap: 24px 64px; }
.prose p, .prose li { max-width: 680px; }
.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.sidenotes { font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.sidenotes p { margin: 0 0 16px; }
.sidenotes b { color: var(--ink); }
sub, sup { font-size: .72em; line-height: 0; }

/* equations: Plex Mono on a white block, 4 px radius, numbered */
.eq { display: flex; align-items: baseline; gap: 16px; background: var(--surface); border-radius: 4px; padding: 14px 18px; margin: 0 0 16px; overflow-x: auto; font: 400 14px/1.7 var(--mono); letter-spacing: 0; }
.eq code { font: inherit; white-space: pre; flex: 1; }
.eq .n { color: var(--ink-subtle); font-family: var(--sans); }

/* tables */
figure { margin: 0; }
.figtitle { font: 600 19px/1.35 var(--sans); letter-spacing: 0; margin: 28px 0 12px; }
table.data { width: 100%; max-width: 680px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0; background: transparent; }
table.data th { font: 600 13px/1.4 var(--sans); letter-spacing: .01em; color: var(--ink-subtle); text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
table.data td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); }
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 0; }
figcaption { font-size: 13px; line-height: 1.5; color: var(--ink-subtle); margin-top: 10px; max-width: 680px; letter-spacing: 0; }

/* footer: the one dark band */
.site-foot { background: var(--brand-deep); color: #fff; padding: 48px 0 40px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.site-foot .wordmark { color: #fff; font-size: 22px; text-decoration: none; }
.site-foot p { margin: 10px 0 0; font-size: 14px; color: #e9dfd6; max-width: 520px; }
.site-foot ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-foot a { color: #fff; font-size: 14px; }

@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .sidenotes { border-left: 2px solid var(--secondary); padding-left: 14px; max-width: 680px; }
}
@media (max-width: 860px) { .site-nav ul { gap: 18px; } .tool .idg { --idg-height: auto; } }
@media (max-width: 700px) {
  :root { --margin: 20px; }
  h1.display { font-size: 45px; }
  .section, .tool { margin-bottom: 46px; }
  .site-nav .wrap { height: auto; padding-top: 14px; padding-bottom: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-nav ul { gap: 16px; overflow-x: auto; max-width: 100%; }
  .site-nav ul a { padding: 10px 0 12px; display: inline-block; font-size: 14px; }
  .page-head { padding: 24px 0 24px; }
}
