/* The Zcash Arboretum — site stylesheet.
   EB Garamond prose, Pagella mathematics, and quiet monospace metadata. */

/* ---------- faces ---------- */
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Italic.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Pagella Math";
  src: url("fonts/texgyrepagella-math.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --desk: #fff;
  --paper: #fff;
  --ink: #1f2328;
  --muted: #59636e;
  --conifer: #0969da;
  --leafline: #d1d9e0;
  --plate: #f6f8fa;
  --edge: #d1d9e0;
  --plaque-ink: #59636e;
  --tierin-mix: 6%;
  --tierfull-mix: 7%;
  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --display: var(--serif);
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, monospace;
}
:root[data-theme="warm"] {
  --desk: #fbfaf5;
  --paper: #fbfaf5;
  --ink: #20261e;
  --muted: #5d6656;
  --conifer: #2f5138;
  --leafline: #b9c2ae;
  --plate: #f1f1e8;
  --edge: #d9dcc9;
  --plaque-ink: #4e5a45;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --desk: #0d1117;
  --paper: #0d1117;
  --ink: #f0f6fc;
  --muted: #9198a1;
  --conifer: #4493f8;
  --leafline: #3d444d;
  --plate: #151b23;
  --edge: #3d444db3;
  --plaque-ink: #9198a1;
  --tierin-mix: 12%;
  --tierfull-mix: 10%;
}
:root[data-theme="midnight"] {
  color-scheme: dark;
  --desk: #171411;
  --paper: #171411;
  --ink: #eee8df;
  --muted: #aaa096;
  --conifer: #d6ad72;
  --leafline: #3d352d;
  --plate: #211d19;
  --edge: #473d33;
  --plaque-ink: #b7aa9e;
  --tierin-mix: 12%;
  --tierfull-mix: 10%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --desk: #0d1117;
    --paper: #0d1117;
    --ink: #f0f6fc;
    --muted: #9198a1;
    --conifer: #4493f8;
    --leafline: #3d444d;
    --plate: #151b23;
    --edge: #3d444db3;
    --plaque-ink: #9198a1;
    --tierin-mix: 12%;
    --tierfull-mix: 10%;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
}
a { color: var(--conifer); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible {
  outline: 2px solid var(--conifer);
  outline-offset: 2px;
  border-radius: 2px;
}
::selection { background: var(--conifer); color: var(--paper); }
code, kbd, pre { font-family: var(--mono); }

/* ---------- status metadata ---------- */
.plaque {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--plaque-ink);
  white-space: nowrap;
}

/* ---------- site bar (injected on every volume page) ---------- */
.arb-bar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .65rem 1.2rem;
  border-bottom: 1px solid var(--edge);
  background: color-mix(in srgb, var(--paper) 92%, var(--plate));
  position: sticky; top: 0; z-index: 50;
}
.arb-bar .wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}
.arb-bar .wordmark:hover { text-decoration: none; color: var(--conifer); }
.arb-bar .volname {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.arb-bar details.arb-search { position: relative; }
.arb-bar .arb-pdf,
.arb-bar details.arb-search summary {
  list-style: none; cursor: pointer;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .1em; color: var(--muted);
}
.arb-bar .arb-pdf:hover { color: var(--conifer); text-decoration: none; }
.arb-bar details.arb-search summary::-webkit-details-marker { display: none; }
.arb-bar details.arb-search[open] summary { color: var(--conifer); }
.arb-theme {
  max-width: 7rem;
  border: 1px solid var(--edge); border-radius: 3px;
  padding: .18rem .35rem;
  background: var(--paper); color: var(--muted);
  font-family: var(--mono); font-size: .7rem;
}
.arb-bar .arb-search-panel {
  position: absolute; right: 0; top: 1.8rem;
  width: min(38rem, calc(100vw - 2.4rem));
  /* The sticky bar cannot scroll an unbounded popup into view. */
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--plate);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: .8rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / .12);
}

/* ---------- landing ---------- */
main.arb-landing {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 2.6rem 3.5rem;
  background: var(--paper);
}
@media (max-width: 700px) {
  main.arb-landing { margin: 0; border: 0; box-shadow: none;
    padding: 2.2rem 1.2rem 3rem; }
}
.arb-landing .eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .6rem;
}
.arb-landing h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 3.1rem);
  letter-spacing: -.015em;
  line-height: 1.08;
  margin: 0 0 .9rem;
}
.arb-heading { display: flex; align-items: flex-start; gap: 1rem; }
.arb-heading h1 { flex: 1; min-width: 0; }
.arb-heading .arb-theme { margin-top: .35rem; flex: none; }
.arb-landing .stem {
  border: 0; height: 1px;
  background: var(--leafline);
  margin: 0 0 1.1rem;
  position: relative;
  overflow: visible;
}
.arb-landing .tag { color: var(--muted); margin: 0 0 1.6rem; max-width: 38rem; }
.arb-landing h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.35rem; margin: 2.6rem 0 .3rem;
}
.arb-landing h3.grp {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 .6rem;
  display: flex; align-items: center; gap: .7rem;
}
.arb-landing h3.grp::after {
  content: ""; flex: 1; height: 1px; background: var(--leafline);
}

/* volume list */
ol.plates { list-style: none; margin: 0; padding: 0; }
ol.plates li.plate {
  padding: .9rem 0 .85rem;
  margin: 0;
}
ol.plates li.plate + li.plate { border-top: 1px solid var(--edge); }
.plate .label {
  display: flex; align-items: baseline; gap: .7rem;
  margin-bottom: .28rem;
}
.plate .acc {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--muted);
  flex: 1;
}
.plate a.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--ink);
  display: block;
}
.plate a.title:hover { color: var(--conifer); text-decoration: none; }
.plate .sub {
  color: var(--muted);
  font-size: 1.0625rem;
  margin: .15rem 0 .5rem;
}
.plate .links {
  display: flex; gap: 1rem;
  font-family: var(--mono); font-size: .78rem;
  letter-spacing: .08em; text-transform: uppercase;
}
.arb-landing .foot {
  border-top: 1px solid var(--edge); margin-top: 3rem; padding-top: 1rem;
  font-size: .88rem; color: var(--muted); text-align: center;
}
.arb-landing .foot p { margin: .2rem 0; }

/* pagefind widget tuning — scoped to the element so these beat the
   plugin stylesheet's :root defaults regardless of load order */
.pagefind-ui, #search, #arb-search-ui {
  --pagefind-ui-scale: .9;
  --pagefind-ui-primary: var(--conifer);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--paper);
  --pagefind-ui-border: var(--edge);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-tag: var(--plate);
  --pagefind-ui-font: var(--serif);
}

/* Pagefind's generated selectors and reset load after this stylesheet. */
:is(#search, #arb-search-ui) .pagefind-ui__results-area { margin-top: .5rem; }
:is(#search, #arb-search-ui) .pagefind-ui__message {
  height: auto;
  padding: .65rem 0;
  font-size: .875rem;
  font-weight: 400;
  color: var(--muted);
}
:is(#search, #arb-search-ui) .pagefind-ui__results { margin: 0; }
:is(#search, #arb-search-ui) .pagefind-ui__result {
  position: relative;
  isolation: isolate;
  display: block;
  margin: 0 0 .6rem;
  padding: .85rem 1rem;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-inner {
  min-width: 0;
  margin-top: 0;
  align-items: stretch;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-tags {
  order: -1;
  margin: 0 0 .35rem;
  gap: .4rem;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-tag {
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .025em;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-excerpt {
  min-width: 0;
  margin-top: .3rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--muted);
}
/* Stretch real links, preserving native keyboard and open-in-new-tab actions.
   Nested matches sit above the parent link and keep their own destinations. */
:is(#search, #arb-search-ui) .pagefind-ui__result-link { position: static; }
:is(#search, #arb-search-ui) .pagefind-ui__result-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-nested {
  position: relative;
  z-index: 2;
  min-height: 44px;
  justify-content: center;
  margin-top: .4rem;
  padding: .5rem .8rem;
  border-left: 2px solid var(--edge);
  background: var(--plate);
}
:is(#search, #arb-search-ui) .pagefind-ui__result-nested .pagefind-ui__result-excerpt {
  display: none;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-nested .pagefind-ui__result-link {
  font-size: 1rem;
}
:is(#search, #arb-search-ui) .pagefind-ui__result-link::before { content: none; }
:is(#search, #arb-search-ui) .pagefind-ui__result-link:hover::after {
  box-shadow: inset 0 0 0 1px var(--conifer);
}
:is(#search, #arb-search-ui) .pagefind-ui__result-link:focus-visible { outline: none; }
:is(#search, #arb-search-ui) .pagefind-ui__result-link:focus-visible::after {
  outline: 2px solid var(--conifer);
  outline-offset: -2px;
}
:is(#search, #arb-search-ui) mark {
  color: var(--ink);
  background: color-mix(in srgb, var(--conifer) 20%, var(--paper));
  border-radius: 2px;
  font-weight: 600;
}
:is(#search, #arb-search-ui) .pagefind-ui__button {
  min-height: 44px;
  margin-top: .3rem;
  font-size: 1rem;
  font-weight: 600;
}
:is(#search, #arb-search-ui) :is(input, button):focus-visible {
  outline: 2px solid var(--conifer);
  outline-offset: 2px;
}
:is(#search, #arb-search-ui) .pagefind-ui__search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* ---------- volume pages: re-dress LaTeXML ---------- */
.ltx_page_main {
  max-width: 49rem;
  margin: 2.4rem auto 3.5rem;
  padding: 1rem 3rem 3.2rem;
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  /* long words (URLs, DOIs) break at the column edge on narrow screens
     rather than pushing the page wider than the viewport */
  overflow-wrap: break-word;
}
.ltx_page_content { background: transparent; color: var(--ink); }
@media (max-width: 1099px) {
  .ltx_page_main { margin: 0 auto; border: 0; box-shadow: none;
    padding: .5rem 1.2rem 3rem; }
}
.ltx_document { line-height: 1.5; }

/* LaTeXML wraps list-item paragraphs in an inline-block .ltx_para, which
   shrink-wraps to content and lets a wide child (a display equation) jut
   past the list item and the sheet, or drift a few px past the column on
   mobile. Force it back to block so it fills its container and its child's
   own overflow-scroll can engage. LaTeXML's list-item rule outranks this on
   specificity, so !important is required to win. */
.ltx_page_main .ltx_para { display: block !important; max-width: 100%; }

/* …but inside a list item that block display shoves the body under its
   label (LaTeXML pairs li > .ltx_tag with an inline-block .ltx_para).
   Re-pair them as a flex row — every item site-wide is tag + single para
   with list-style-type:none inline, so no native markers are lost.
   LaTeXML's hanging-label margins on the tag still apply; min-width: 0
   lets wide children overflow-scroll instead of bursting the row. */
.ltx_page_main li.ltx_item { display: flex; align-items: baseline; gap: .4em; }
.ltx_page_main li.ltx_item > .ltx_tag { flex: none; }
.ltx_page_main li.ltx_item > .ltx_para { flex: 1 1 0; min-width: 0; }

/* Book typography: match the PDF's justified, hyphenated, indented
   paragraph blocks instead of ragged blog paragraphs. Indent marks every
   paragraph that continues another (LaTeXML wraps each in .ltx_para), and
   the inter-paragraph gap shrinks to a book-like sliver. The wrapper also
   needs alignment because LaTeXML makes run-in and list paragraphs inline. */
.ltx_page_main .ltx_para,
.ltx_page_main .ltx_para > .ltx_p,
.ltx_page_main .ltx_abstract > .ltx_p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.ltx_page_main .ltx_para { margin-bottom: .45em; }
.ltx_page_main .ltx_abstract > .ltx_p { text-indent: 0; }
.ltx_page_main .ltx_para + .ltx_para > .ltx_p:first-child {
  text-indent: 1.4em;
}
.ltx_title_document {
  font-family: var(--display); font-weight: 600;
  font-size: 2rem; line-height: 1.15;
  margin: 2.2rem 0 1rem;
}
h2.ltx_title_section, .ltx_title_section {
  font-family: var(--display); font-weight: 600;
  font-size: 1.5rem; margin-top: 2.4rem;
}
h3.ltx_title_subsection, .ltx_title_subsection {
  font-family: var(--display); font-weight: 600;
  font-size: 1.3rem; margin-top: 1.8rem;
}
.ltx_tag_section, .ltx_tag_subsection { color: var(--muted); }
.ltx_title > .arb-heading-link { color: inherit; }

/* theorem plates: same family as the specimen cards */
.ltx_theorem {
  background: var(--plate);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--conifer);
  border-radius: 2px;
  padding: .7rem 1rem;
  margin: 1.1rem 0;
}
.ltx_theorem .ltx_title { font-family: inherit; }
.ltx_theorem .arb-permalink {
  margin-left: .35em;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78em;
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
}
.ltx_theorem .arb-permalink:hover {
  color: var(--conifer);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .ltx_theorem .arb-permalink { opacity: 0; }
  .ltx_theorem:hover .arb-permalink,
  .ltx_theorem .arb-permalink:focus-visible { opacity: 1; }
}
.ltx_proof { display: flow-root; margin: 1rem 0 1rem .2rem; padding-left: .9rem;
             border-left: 1px solid var(--leafline); }
.arb-proof-end { white-space: nowrap; }
.arb-qed { float: right; margin-left: .35em; }

/* math + tables breathe, never overflow the page */
.ltx_eqn_table {
  display: block; width: 100%; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; padding: .2rem 0;
}
/* keep the inner rows a real (auto-sizing) table so centring works;
   the block wrapper above provides the scroll when they are too wide.
   Drop LaTeXML's 50%-wide pad cells, which force every row full-width. */
.ltx_eqn_table > tbody { display: table; margin-inline: auto; }
.ltx_eqn_cell.ltx_eqn_center_padleft,
.ltx_eqn_cell.ltx_eqn_center_padright { display: none; }
.ltx_eqn_cell.ltx_eqn_eqno { min-width: 2.5rem; padding-left: .75rem; }
.ltx_p math[display="block"] { display: block; max-width: 100%; overflow-x: auto; }
.ltx_page_main math[display="inline"] {
  display: inline-block; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
  vertical-align: middle;
}
/* MathJax handles normal TeX line breaks. Only expressions with no legal
   breakpoint get a local scroll box instead of widening the page. */
mjx-container.arb-math-scroll {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
}

.ltx_tabular { font-size: 1.125rem; }
.ltx_tabular .ltx_td, .ltx_tabular .ltx_th { padding: .25rem .6rem; }
/* a table wider than the column scrolls inside its own box instead of
   pushing the page. Floated tables sit in a figure.ltx_table wrapper (scroll
   that); a bare tabular has none, so make the table itself the scroll box. */
figure.ltx_table { overflow-x: auto; max-width: 100%; }
:not(.ltx_table) > table.ltx_tabular {
  display: block; overflow-x: auto; max-width: 100%; width: max-content;
}
.ltx_graphics { max-width: 100%; height: auto; }
/* a figure wider than the column scrolls inside its box rather than pushing
   the page. This catches scaled diagrams, whose ltx_transformed_outer wrapper
   carries a hard pt width baked in from the desktop layout that max-width on
   the inner image cannot reach. */
figure.ltx_figure { margin: 1.6rem 0; overflow-x: auto; max-width: 100%; }
.ltx_transformed_outer { max-width: 100%; }
/* The PDF resizebox survives LaTeXML around some pre-rendered diagrams.
   Its negative translation clips the image against the figure's scroll box.
   Size image-only wrappers normally; retain transforms on mathematical boxes. */
figure.ltx_figure > .ltx_transformed_outer:has(> .ltx_transformed_inner > img:only-child) {
  height: auto !important;
}
figure.ltx_figure > .ltx_transformed_outer > .ltx_transformed_inner:has(> img:only-child) {
  position: static;
  transform: none !important;
}
figure.ltx_figure > .ltx_transformed_outer > .ltx_transformed_inner > img:only-child {
  display: block;
  width: 100%;
}
figure.ltx_table figcaption,
figure.ltx_figure figcaption {
  margin: .75rem 0 0;
  color: var(--muted); font-size: 1rem; line-height: 1.45;
  text-align: left !important;
}
figcaption .ltx_tag { color: var(--ink); font-weight: 600; }

/* TOC + navigation */
.ltx_TOC { background: var(--plate); border: 1px solid var(--edge);
           border-radius: 2px; padding: .9rem 1.1rem; }
.ltx_TOC .ltx_toclist { margin: 0; padding-left: 1.1rem; }
.ltx_TOC a { color: var(--ink); }
.ltx_TOC a:hover { color: var(--conifer); }
.ltx_page_header, .ltx_page_footer {
  border: 0; background: transparent; color: var(--muted);
  font-size: .85rem;
}

/* ---------- volume layout: sticky specimen-index sidebar ---------- */
body[data-arb="vol"] {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
}
body[data-arb="vol"] .arb-bar { grid-column: 1 / -1; }
body[data-arb="vol"] .ltx_page_main { grid-column: 2; width: 100%; }
.ltx_page_navbar {
  grid-column: 1;
  position: sticky;
  top: 2.6rem;
  align-self: start;
  max-height: calc(100vh - 2.6rem);
  overflow-y: auto;
  padding: 1.1rem 1rem 2rem 1.2rem;
  font-size: 1rem;
  line-height: 1.45;
}
/* the site bar already names the volume; drop the navbar's giant title */
.ltx_page_navbar > a[rel="start"] { display: none; }
.ltx_page_navbar .ltx_TOC {
  background: transparent; border: 0; border-radius: 0; padding: 0;
}
.ltx_page_navbar .ltx_toclist { list-style: none; padding-left: 0; }
.ltx_page_navbar .ltx_toclist .ltx_toclist { padding-left: .85rem; }
.ltx_page_navbar .ltx_tocentry { margin: .18rem 0; }
.ltx_page_navbar a { color: var(--muted); }
.ltx_page_navbar a:hover { color: var(--conifer); text-decoration: none; }
.ltx_page_navbar .ltx_tag_ref {
  font-family: var(--mono); font-size: .68rem; color: var(--muted);
  margin-right: .15rem;
}
/* entries wrap; LaTeXML's nowrap would clip them at the column edge */
.ltx_page_navbar a, .ltx_page_navbar span {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
@media (max-width: 1099px) {
  body[data-arb="vol"] { display: block; }
  .ltx_page_navbar { display: none; }
}

/* content title block: ink, not link-green; subtitle quiet.
   The heading may sit inside the anchor or contain it — cover both. */
.ltx_page_main .ltx_title_document,
.ltx_page_main .ltx_title_document a,
.ltx_page_main a:has(.ltx_title_document),
.ltx_page_main a .ltx_title_document { color: var(--ink); }
.ltx_page_main a:has(.ltx_title_document):hover { text-decoration: none; }
.ltx_subtitle, .ltx_page_main .ltx_title_document .ltx_text {
  color: var(--muted);
}
.ltx_title_abstract {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Navigation lives in the footer; do not repeat it above every section. */
.ltx_page_main .ltx_page_header { display: none; }

/* footer navigation */
.ltx_page_footer {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .05em;
  border-top: 1px solid var(--edge);
  margin-top: 2.8rem; padding: 1rem 0 2.2rem;
}
.ltx_page_footer > .ltx_align_center {
  display: flex; justify-content: space-between; gap: 1.5rem;
  text-align: left;
}
.ltx_page_footer a { color: var(--muted); min-width: 0; }
.ltx_page_footer a:hover { color: var(--conifer); }
.ltx_page_footer a span { font-size: 1em !important; }
.ltx_page_footer a[rel="up"], .ltx_page_footer a[rel="start"] {
  display: none;
}
.ltx_page_footer a[rel="prev"]::before { content: "\2190  "; }
.ltx_page_footer a[rel="next"]::after { content: "  \2192"; }
.ltx_page_footer a[rel="next"] { margin-left: auto; }
.ltx_page_footer > .ltx_page_logo {
  display: block; float: none; width: 100%;
  margin-top: 1rem; text-align: center;
}
.ltx_page_footer > .arb-feedback { margin-top: .55rem; text-align: center; }
a[href="https://github.com/upbqdn/zcash-arboretum/issues/new"] {
  color: var(--conifer); text-decoration: underline; text-underline-offset: 3px;
}

/* mobile: stack the prev/next crumbs so long section titles never collide */
@media (max-width: 640px) {
  /* Narrow lines need natural word spacing, especially around inline math. */
  .ltx_page_main .ltx_para,
  .ltx_page_main .ltx_para > .ltx_p,
  .ltx_page_main .ltx_abstract > .ltx_p { text-align: left; }
  .arb-bar { gap: .75rem; }
  .arb-bar .volname { display: none; }
  .arb-bar .wordmark-prefix { display: none; }
  .arb-bar details.arb-search { margin-left: auto; }
  .arb-heading { flex-direction: column-reverse; gap: .75rem; }
  .arb-heading h1 { align-self: stretch; }
  .arb-heading .arb-theme { margin-top: 0; align-self: flex-end; }
  .ltx_abstract { margin-inline: 0; }
  .ltx_page_footer > .ltx_align_center { flex-direction: column; gap: .35rem; }
  .ltx_page_footer a[rel="next"] { margin-left: 0; align-self: flex-end; }
}
@media (max-width: 360px) {
  .arb-bar { gap: .5rem; padding-inline: .75rem; }
}

/* keyword/emph harmony */
.ltx_text.ltx_font_typewriter { font-family: var(--mono); font-size: .92em; }
/* long code identifiers and paths (e.g. v3_combine_hash_commits_to_ironwood_fields,
   src/rust/src/history.rs) break mid-token rather than overflow a phone column */
.ltx_page_main .ltx_font_typewriter,
.ltx_page_main .ltx_ref.ltx_url { overflow-wrap: anywhere; }
.ltx_note { color: var(--muted); }

/* ---------- reading-experience overhaul (volume pages) ---------- */

/* anchor jumps land below the sticky bar, not under it */
.ltx_page_main [id] { scroll-margin-top: 4.25rem; }

/* internal cross-references read as part of the text; only external
   links keep the conifer. LaTeXML marks refs with .ltx_ref. */
.ltx_page_main a.ltx_ref {
  color: var(--ink);
  text-decoration: underline solid color-mix(in srgb, var(--ink) 40%, transparent) 1px;
  text-underline-offset: 3px;
}
.ltx_page_main a.ltx_ref:hover { color: var(--conifer); text-decoration-color: var(--conifer); }

/* environment kind-coding: the volumes' own TikZ tier palette.
   proof-bearing (theorem family) = conifer; definitional = tierin;
   premises = tierfull; asides (remark/example) = hairline, no fill. */
.ltx_theorem_definition, .ltx_theorem_construction {
  border-left-color: var(--tierin, #3c82b4);
  background: color-mix(in srgb, #3c82b4 var(--tierin-mix), var(--plate));
}
.ltx_theorem_assumption {
  border-left-color: var(--tierfull, #d28c28);
  background: color-mix(in srgb, #d28c28 var(--tierfull-mix), var(--plate));
}
.ltx_theorem_remark, .ltx_theorem_example {
  background: transparent;
  border-color: transparent;
  border-left: 1px solid var(--leafline);
  border-radius: 0;
}

/* the specimen tag: at desktop width, section numbers detach into the
   left gutter as small mono accession tags; titles sit flush. */
@media (min-width: 1100px) {
  h1.ltx_title_section, h2.ltx_title_section,
  h2.ltx_title_subsection, h3.ltx_title_subsection { position: relative; }
  .ltx_title_section > .ltx_tag_section,
  .ltx_title_subsection > .ltx_tag_subsection,
  .ltx_title_section > .arb-heading-link > .ltx_tag_section,
  .ltx_title_subsection > .arb-heading-link > .ltx_tag_subsection {
    position: absolute;
    right: calc(100% + .55rem);
    top: .45em;
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .1em;
    color: var(--plaque-ink);
    border: 1px solid var(--leafline);
    border-radius: 2px;
    padding: .12rem .3rem .09rem;
    line-height: 1;
    background: var(--paper);
  }
}

/* tables: quiet booktabs manners */
.ltx_tabular { border-collapse: collapse; }
.ltx_tabular thead .ltx_th {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--plaque-ink);
  border-bottom: 1px solid var(--leafline);
}

/* Style the current page's label, not the list item whose children would
   otherwise inherit bold. Only the subsection being read is emphasised. */
.ltx_page_navbar .ltx_ref.ltx_ref_self {
  color: var(--conifer);
  font-weight: 600;
}
.ltx_page_navbar a[aria-current="location"] {
  color: var(--conifer);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* titles and paragraphs: small rhythm refinements */
.ltx_title_section { text-wrap: balance; }
.ltx_para p, .ltx_p { text-wrap: pretty; }
h2.ltx_title_section, .ltx_title_section { margin-top: 2.9rem; }

/* print: the sheet alone */
@media print {
  .arb-bar, .arb-permalink, .ltx_page_navbar, .ltx_page_footer {
    display: none !important;
  }
  body, .ltx_page_main {
    background: #fff; color: #000;
    box-shadow: none; border: 0; max-width: none; margin: 0;
  }
  .ltx_theorem { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* MathML: serve the matching math face. Without
   this, readers lacking a local Pagella Math get system-font glyph
   soup with broken script placement and stretchy delimiters. */
math {
  font-family: "TeX Gyre Pagella Math", "Cambria Math", math;
}
