/* The paper pages: the journal (index and articles), the glossary, the
   integration guide and the API reference, on the white ground and in the
   ink, signal and hairlines of the evidence paper (/benchmarks, paper.css).
   Loaded last, and only by pages whose body carries .ax-paper; the older
   layers those pages still load (studio-palette, page-quality, aura-site and
   friends) are shared with other pages, so they are overridden here, not
   edited. No cream, no ring field, no gradients, no shadows. The root colour
   and the bar and footer belong to navigation.css. */

body.editorial-site.ax-paper {
  /* The paper's tokens (paper.css), under the names the older layers read. */
  --px-ink: #101218;
  --px-ink-2: #383d47;
  --px-ink-3: #5b616c;
  --px-rule: #e3e5ea;
  --px-rule-2: #eef0f3;
  --px-hover: #f6f7f9;
  --px-signal: #3045b5;
  --px-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --px-sans: 'Inter', Arial, sans-serif;
  --px-top: calc(var(--site-nav-height, 76px) + 32px);
  --ax-ink: var(--px-ink);
  --ax-soft: var(--px-ink-2);
  --ax-faint: var(--px-ink-3);
  --ax-signal: var(--px-signal);
  --ax-paper: #ffffff;
  --ax-rule: var(--px-rule);
  --studio-paper: #ffffff;
  --studio-ink: var(--px-ink);
  --studio-muted: var(--px-ink-3);
  --bg: #ffffff;
  --panel: var(--px-hover);
  --panel-strong: #ffffff;
  --ink: var(--px-ink);
  --ink-soft: var(--px-ink-2);
  --muted: var(--px-ink-3);
  --line: var(--px-rule);
  min-height: 100vh;
  background: #ffffff !important;
  background-image: none !important;
  color: var(--px-ink);
}

/* One white sheet: every wrapper the older layers tinted. */
body.editorial-site.ax-paper :is(main, .shell, .article, .article-body, .atelier, .journal-library, .docwrap, .docmain, .px-head, .skip-link) {
  background-color: #ffffff !important;
  background-image: none !important;
}
body.editorial-site.ax-paper .skip-link { color: var(--px-ink) !important; }
body.editorial-site.ax-paper :is(.docmain, .docwrap) { --panel: var(--px-hover); --panel-strong: #ffffff; --line: var(--px-rule); --ink-soft: var(--px-ink-2); }

/* ------------------------------------------------------------ page head
   Where the ring field was: plain paper, the page's own type, a hairline. */
body.editorial-site.ax-paper .px-head { position: relative; border-bottom: 1px solid var(--px-rule); }
body.editorial-site.ax-paper .px-head > header { padding-top: clamp(56px, 6.5vw, 96px) !important; }
body.editorial-site.ax-paper.journal-index .px-head > header { padding-bottom: clamp(40px, 4.5vw, 60px) !important; }
body.editorial-site.ax-paper.journal-index .journal-library-layout { padding-top: clamp(40px, 4.5vw, 64px); }
body.editorial-site.ax-paper .px-head .at-section { padding-bottom: clamp(40px, 4.5vw, 64px) !important; }
body.editorial-site.ax-paper main h1, body.editorial-site.ax-paper .px-head h1 { color: var(--px-ink) !important; }
body.editorial-site.ax-paper :is(main, .px-head) :is(h1, h2) em,
body.editorial-site.ax-paper .px-head h1 .grad { color: var(--px-signal) !important; -webkit-text-fill-color: currentColor; background: none !important; }
body.editorial-site.ax-paper .journal-library-total { color: var(--px-ink-3) !important; }
body.editorial-site.ax-paper :is(.at-intro, .lede, .journal-library-lede) { color: var(--px-ink-2) !important; }

/* ------------------------------------------------------------ links, focus, buttons */
body.editorial-site.ax-paper :is(.article-body, .docmain, .at-dictionary, .px-head) :is(p, li, td, dd) a:not(.btn):not(.doc-link):not(.has-ui-icon) {
  color: var(--px-signal) !important;
  font-weight: 500;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: .22em !important;
  text-decoration-color: rgba(48, 69, 181, .45) !important;
  transition: text-decoration-color .15s ease, color .15s ease;
}
body.editorial-site.ax-paper :is(.article-body, .docmain, .at-dictionary, .px-head) :is(p, li, td, dd) a:not(.btn):not(.doc-link):not(.has-ui-icon):hover {
  color: var(--px-ink) !important;
  text-decoration-color: currentColor !important;
}
body.editorial-site.ax-paper :where(a, button, summary, input, select, textarea, [tabindex]):not(.site-nav *, .site-footer-refined *):focus-visible {
  outline: 2px solid var(--px-signal) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}
/* The paper's button (pp-btn): ink, 3 px corners, signal on hover. */
body.editorial-site.ax-paper :is(.btn-primary, .atelier .at-primary, .article .cta-inline > a) {
  background: var(--px-ink) !important;
  border-color: var(--px-ink) !important;
  border-radius: 3px !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
body.editorial-site.ax-paper :is(.btn-primary, .atelier .at-primary, .article .cta-inline > a):hover { background: var(--px-signal) !important; border-color: var(--px-signal) !important; }
body.editorial-site.ax-paper .doc-link { color: var(--px-ink) !important; border-bottom-color: var(--px-ink-3) !important; }
body.editorial-site.ax-paper .doc-link:hover { color: var(--px-signal) !important; border-bottom-color: var(--px-signal) !important; }

/* No shadows, no tints: printed panels are hairlines on white. */
body.editorial-site.ax-paper main :is(.figure, .callout, .cta-inline, .code, pre, .dtable, .term, .at-stage, .q-flow) { box-shadow: none !important; }

/* ------------------------------------------------------------ articles
   A 66-character measure at 18 px, the paper's rhythm and ink. */
body.editorial-site.ax-paper.journal-article .shell { padding-top: clamp(24px, 3vw, 48px) !important; }
body.editorial-site.ax-paper.journal-article .article { max-width: 700px !important; margin-inline: auto !important; }
body.editorial-site.ax-paper.journal-article .article h1 {
  font: 400 clamp(34px, 3.8vw, 50px)/1.08 var(--px-sans) !important;
  letter-spacing: -.045em !important;
}
body.editorial-site.ax-paper.journal-article .article .reform-article-breadcrumb a { color: var(--px-signal) !important; }
body.editorial-site.ax-paper.journal-article .article > .lede { max-width: 36em; font: 400 clamp(18px, 1.4vw, 19.5px)/1.62 var(--px-sans) !important; color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper.journal-article .article-body :is(p, li) {
  font-size: 18px !important;
  line-height: 1.7 !important;
  color: var(--px-ink-2) !important;
}
body.editorial-site.ax-paper.journal-article .article-body > p,
body.editorial-site.ax-paper.journal-article .article-body > :is(ul, ol),
body.editorial-site.ax-paper.journal-article .article-body .takeaways :is(p, ul, ol) { max-width: 36em; }
body.editorial-site.ax-paper.journal-article .article-body :is(p, li) :is(strong, b) { color: var(--px-ink); font-weight: 600; }
body.editorial-site.ax-paper.journal-article .article-body > h2 {
  font: 400 clamp(24px, 2.3vw, 30px)/1.2 var(--px-sans) !important;
  letter-spacing: -.03em !important;
  color: var(--px-ink) !important;
}
body.editorial-site.ax-paper.journal-article .article-body h3 { color: var(--px-ink) !important; }
body.editorial-site.ax-paper.journal-article .article .article-meta .sep { border-radius: 0; background: var(--px-ink-3); }
/* Figures are free on the page: a rule above, no box around them. */
body.editorial-site.ax-paper.journal-article .article .article-body .figure {
  padding: 16px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--px-ink) !important;
  border-radius: 0 !important;
  background: none !important;
}
body.editorial-site.ax-paper.journal-article .article .article-body .callout {
  padding: 4px 0 4px 18px !important;
  border: 0 !important;
  border-left: 2px solid var(--px-signal) !important;
  border-radius: 0 !important;
  background: none !important;
  color: var(--px-ink-2) !important;
}
body.editorial-site.ax-paper.journal-article .article .cta-inline {
  padding: 20px 0 !important;
  border: 0 !important;
  border-block: 1px solid var(--px-rule) !important;
  border-top-color: var(--px-ink) !important;
  border-radius: 0 !important;
  background: none !important;
}
body.editorial-site.ax-paper.journal-article .article .matrix { border-radius: 0 !important; }
body.editorial-site.ax-paper.journal-article .article :is(.fignote, .bar-row, .matrix span, .flow-step span) { color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper.journal-article .article :is(.post-sources, .post-sources p) { color: var(--px-ink-3) !important; }
@media (max-width: 760px) {
  body.editorial-site.ax-paper.journal-article .shell { padding-top: 16px !important; }
  body.editorial-site.ax-paper.journal-article .article-body :is(p, li) { font-size: 17px !important; }
}

/* ------------------------------------------------------------ journal index */
body.editorial-site.ax-paper.journal-index .journal-topics a:hover { background: var(--px-hover) !important; }
body.editorial-site.ax-paper.journal-index .journal-topics a[aria-current="true"] { background: var(--px-rule-2) !important; color: var(--px-ink) !important; }
body.editorial-site.ax-paper.journal-index .journal-search-field input { background: #ffffff !important; border-color: var(--px-rule) !important; border-radius: 3px; color: var(--px-ink) !important; }
body.editorial-site.ax-paper.journal-index .journal-search-field input:focus { border-color: var(--px-signal) !important; }
body.editorial-site.ax-paper.journal-index :is(.journal-entry-summary, .journal-lead-summary, .journal-topic-group > p) { color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper.journal-index :is(.journal-entry-date, .journal-entry-category, .journal-tools-label) { color: var(--px-ink-3) !important; }

/* ------------------------------------------------------------ glossary */
body.editorial-site.ax-paper .px-head + .at-dictionary { padding-top: clamp(40px, 4.5vw, 64px) !important; }
body.editorial-site.ax-paper .at-dictionary .term p { font-size: 16px !important; line-height: 1.65 !important; max-width: 37em; color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper .at-dictionary .term h3 { color: var(--px-ink) !important; }
body.editorial-site.ax-paper .at-dictionary .term .why span { color: var(--px-signal) !important; }

/* ------------------------------------------------------------ docs and API reference */
body.editorial-site.ax-paper .docmain p, body.editorial-site.ax-paper .docmain .doc-flow { max-width: 37em; }
body.editorial-site.ax-paper .docmain :is(p, li) { color: var(--px-ink-2); }
body.editorial-site.ax-paper .docmain :is(h2, h3) { color: var(--px-ink) !important; }
/* Code: the paper's mono on a cool neutral, framed by one hairline. */
body.editorial-site.ax-paper .docmain :is(.code, .code pre, pre) {
  background: var(--px-hover) !important;
  border-color: var(--px-rule) !important;
  border-radius: 0 !important;
}
body.editorial-site.ax-paper .docmain .code { border: 1px solid var(--px-rule) !important; }
body.editorial-site.ax-paper .docmain .code pre { border: 0 !important; }
body.editorial-site.ax-paper .docmain .code .ch { background: #ffffff !important; border-bottom: 1px solid var(--px-rule) !important; color: var(--px-ink-3) !important; }
body.editorial-site.ax-paper .docmain pre, body.editorial-site.ax-paper .docmain pre code { font-family: var(--px-mono) !important; color: var(--px-ink) !important; }
body.editorial-site.ax-paper .docmain :is(p, li, td) code { background: var(--px-rule-2) !important; color: var(--px-ink) !important; border-radius: 2px; }
body.editorial-site.ax-paper .docmain .callout { background: none !important; border: 0 !important; border-left: 2px solid var(--px-signal) !important; padding: 4px 0 4px 18px !important; color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper .docmain .mth { background: var(--px-rule-2) !important; color: var(--px-ink) !important; border-radius: 2px; }
body.editorial-site.ax-paper .docmain .mth.put { background: var(--px-rule-2) !important; color: #8a3b28 !important; }
body.editorial-site.ax-paper .docmain :is(pre, .dtable) { scrollbar-color: #868b95 var(--px-rule-2); }
/* Tables: mono heads, hairline rows. */
body.editorial-site.ax-paper .docmain table { border-collapse: collapse; }
body.editorial-site.ax-paper .docmain th {
  background: #ffffff !important;
  border-bottom: 1px solid var(--px-ink) !important;
  font: 500 11px/1.5 var(--px-mono) !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  color: var(--px-ink-3) !important;
}
body.editorial-site.ax-paper .docmain td { background: #ffffff !important; border-bottom: 1px solid var(--px-rule) !important; color: var(--px-ink-2) !important; }
body.editorial-site.ax-paper .docmain .dtable { border-color: var(--px-rule) !important; border-radius: 0 !important; }
body.editorial-site.ax-paper #tf-err { background: none !important; }

/* ------------------------------------------------------------ under the bar
   Sticky indexes sit one step under the bar; anchors already clear it
   (navigation.css gives every [id] a scroll margin from --site-nav-height). */
body.editorial-site.ax-paper :is(.docnav, .journal-library-tools, .at-dictionary-index) { top: var(--px-top) !important; }
body.editorial-site.ax-paper .docmain :is(section, h3)[id] { scroll-margin-top: calc(var(--site-nav-height, 76px) + 16px) !important; }

@media (prefers-reduced-motion: reduce) {
  body.editorial-site.ax-paper *, body.editorial-site.ax-paper *::before, body.editorial-site.ax-paper *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
