/* base.css - design tokens, reset, layout primitives, typography, links.
   Modern Ink: editorial serif, single indigo accent, hairline rules. */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400..600;1,8..60,400..500&family=Inter:wght@400;500;600&display=swap");

:root {
  --paper: #ffffff;
  --card: #f7f8fa;
  --fg: #16181d;
  --ink: #16181d;
  --dim: #5b626e;
  --line: #e9ecf0;
  --rule: #e4e7ec;
  --accent: #2f43c4; /* ink indigo - the single UI accent */
  --accent-soft: #eef0fc;
  --hl: #dde2fb; /* highlight wash behind emphasised words */
  --link: #2f43c4;
  --warn: #c0392b; /* warm red - limitations / negative emphasis */

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 28px;
}
::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
a:hover {
  border-bottom-color: var(--accent);
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
a.ext::after {
  content: " \2197";
  font-family: var(--sans);
  font-size: 0.82em;
  color: var(--dim);
}
.gh,
.doc,
.artifact {
  white-space: nowrap;
}
.ghmark,
.docmark,
.artifactmark {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 7px;
}

p {
  margin: 0.85em 0;
}
.lead {
  font-size: 21px;
  line-height: 1.5;
}
.dim {
  color: var(--dim);
}
.small {
  font-size: 14.5px;
}
b,
strong {
  font-weight: 600;
}
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

img,
svg {
  max-width: 100%;
  height: auto;
}
.block,
.forms .inner {
  overflow-x: auto;
}
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}
.cap-mini {
  display: none;
}
