/* Shared monochrome presentation. Orange is reserved for small accents. */
html { --control-size: 40px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-size: 1rem; line-height: 1.65; }
.entry p, .entry figcaption, .prose p, .prose li { text-wrap: pretty; }
.prose :is(h2, h3, h4) { text-wrap: balance; }
[data-main-status] { font-variant-numeric: tabular-nums; }
.masthead { padding: .9rem max(var(--gutter), calc((100vw - 1160px) / 2)); border: 0; background: var(--paper); backdrop-filter: none; }
.brand .icon { width: 28px; height: 28px; }
.brand .wordmark { font-size: 1rem; }
.topnav { font: 400 .95rem/1.4 var(--sans); gap: 1.75rem; }
.topnav a { color: var(--muted); }
.topnav a:hover, .topnav a[aria-current] { color: var(--ink); }
.topnav a[aria-current] { box-shadow: none; }
.theme-toggle { width: var(--control-size); height: var(--control-size); flex: 0 0 var(--control-size); border: 0; color: var(--muted); }
:focus-visible { outline-color: var(--ink); outline-offset: 4px; }
.entry { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.entry-hero { text-align: center; padding: 5.5rem 0 4.25rem; }
.entry h1 { font: 400 clamp(2.5rem, 4.8vw, 4.3rem)/1.08 var(--serif); letter-spacing: -.045em; margin: 0; text-wrap: balance; }
.entry-hero > p { color: var(--muted); font-size: 1.14rem; line-height: 1.6; margin: 1.6rem auto 2rem; max-width: 68ch; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1.5rem; }
.hero-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: .95rem; }
.hero-start { padding: .65rem 1.25rem; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 500; text-decoration: none; }
.hero-start:hover { background: var(--muted); border-color: var(--muted); }
.hero-details { color: var(--muted); text-decoration-color: var(--rule); }
.hero-details:hover { color: var(--ink); text-decoration-color: var(--ink); }
.entry-body { display: grid; grid-template-columns: 150px minmax(0, 640px); gap: 3rem; align-items: start; padding-bottom: 2rem; }
.entry-nav { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: .7rem; padding-top: .25rem; }
.entry-nav a { font-size: .85rem; color: var(--muted); text-decoration: none; }
.entry-nav a:hover { color: var(--ink); }
.entry-prose { min-width: 0; }
.entry-prose section { scroll-margin-top: 6rem; margin-bottom: 4.5rem; }
.entry h2 { font: 400 1.8rem/1.3 var(--sans); letter-spacing: -.025em; margin: 0 0 1.3rem; text-wrap: balance; }
.entry-prose p { color: var(--muted); margin: 0 0 1.2rem; font-size: 1.05rem; line-height: 1.75; }
.entry-prose a { color: var(--ink); text-decoration-color: var(--rule); }
.entry-prose a:hover { text-decoration-color: var(--ink); }
.entry-prose .reference-link { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; font-size: .95rem; }
.colophon { background: var(--paper); }
.colophon-inner { max-width: 1160px; padding-top: 2rem; padding-bottom: 2rem; font-family: var(--sans); font-size: .85rem; }
/* Apply the same palette and quieter type hierarchy to documentation. */
.prose h1 { font: 400 clamp(2.2rem, 3.8vw, 3.1rem)/1.15 var(--serif); letter-spacing: -.035em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--sans); letter-spacing: -.015em; font-weight: 500; }
.prose h2 { font-size: 1.5rem; border-top: 0; padding-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--ink); text-decoration-color: var(--rule); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose :not(pre) > code { color: var(--ink); }
.prose .chain-self > code {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--accent);
}
.docnav h2, .toc h2 { font-family: var(--sans); font-size: .8rem; font-weight: 500; }
.docnav a { font-family: var(--sans); font-size: .9rem; }
.docnav a[aria-current] { border-left-color: var(--accent); font-weight: 400; }
.prose .callout::before { color: var(--ink); }
.prose .callout { border-left-color: var(--accent); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .nv, .highlight .na, .highlight .nt { color: var(--muted); }
@media (max-width: 820px) {
  .entry-hero { padding: 4rem 0 3rem; }
  .entry-body { grid-template-columns: 110px minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 560px) {
  .masthead { padding: .8rem var(--gutter); }
  .topnav { gap: 1rem; font-size: .85rem; }
  .entry-hero { padding: 3rem 0 2.5rem; }
  .entry-hero > p { font-size: 1rem; }
  .desktop-break { display: none; }
  .entry-body { display: block; }
  .entry-nav { position: static; flex-direction: row; gap: 1.5rem; padding: 0 0 2.5rem; }
  .entry h2 { font-size: 1.55rem; }
  .entry-prose p { font-size: 1rem; }
  .entry-prose section { margin-bottom: 3rem; }
}
/* Common questions stay collapsed until the reader needs an answer. */
.entry-faq { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; border-top: 1px solid var(--rule); padding: 4rem 0 5rem; margin-top: 1rem; scroll-margin-top: 6rem; }
.entry-faq h2 { font: 400 2.25rem/1.15 var(--serif); letter-spacing: -.025em; margin: 0 0 1.25rem; }
.entry-faq-heading > a { font-size: .85rem; color: var(--muted); text-decoration-color: var(--rule); }
.entry-faq details { border-bottom: 1px solid var(--rule); }
.entry-faq details:first-child { border-top: 1px solid var(--rule); }
.entry-faq summary { list-style: none; position: relative; padding: 1.1rem 2rem 1.1rem 0; font-size: 1rem; cursor: pointer; line-height: 1.45; }
.entry-faq summary::-webkit-details-marker { display: none; }
.entry-faq summary::before, .entry-faq summary::after { content: ""; position: absolute; right: .25rem; top: 1.75rem; width: 10px; height: 1px; background: var(--muted); }
.entry-faq summary::after { transform: rotate(90deg); }
.entry-faq details[open] summary::after { transform: rotate(0); }
.entry-faq summary:hover { color: var(--muted); }
.entry-faq p { margin: 0 0 1.3rem; color: var(--muted); font-size: .95rem; line-height: 1.75; }
.entry-faq p a { color: var(--ink); text-decoration-color: var(--rule); }
.docnav-skills a { font-size: .85rem; }
@media (max-width: 820px) {
  .entry-faq { grid-template-columns: 180px minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 560px) {
  .entry-nav { gap: 1.2rem; flex-wrap: wrap; }
  .entry-faq { display: block; padding: 2.5rem 0 3.5rem; }
  .entry-faq-heading { margin-bottom: 2rem; }
  .entry-faq h2 { font-size: 2rem; }
  .entry-faq summary { font-size: .95rem; }
}
.install-entry { max-width: 760px; margin: 2.2rem auto 0; scroll-margin-top: 6rem; text-align: left; }
.install-prompt { border: 1px solid var(--rule); border-radius: 8px; background: var(--paper-2); padding: 1rem 1.2rem 1.1rem; }
.install-prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; }
.install-prompt-heading button { flex-shrink: 0; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; padding: .35rem .6rem; font: 400 .75rem/1.4 var(--sans); cursor: pointer; }
.install-prompt-heading button:hover { border-color: var(--muted); }
.install-prompt pre { margin: .9rem 0 0; padding: 0; border: 0; background: none; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.install-prompt code { display: block; font-size: .8rem; line-height: 1.8; background: none; padding: 0; border: 0; user-select: all; }
.install-copy-status:not(:empty) { display: block; margin-top: .65rem; font-size: .75rem; color: var(--muted); }
.install-alternatives { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .9rem 0 0; font-size: .8rem; line-height: 1.6; }
.install-alternatives > span { color: var(--muted); }
.install-alternatives a { color: var(--muted); text-decoration-color: var(--rule); }
.install-alternatives a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.entry-prose .install-next { margin: .75rem 0 0; font-size: .8rem; color: var(--muted); }
.install-next a { color: var(--ink); text-decoration-color: var(--rule); }
@media (max-width: 560px) {
  .install-prompt { padding: .85rem 1rem; }
  .install-prompt-heading { font-size: .75rem; gap: .7rem; }
  .install-prompt code { font-size: .72rem; }
  .install-alternatives { gap: .4rem .8rem; }
}

.footer-brand { display: flex; align-items: center; gap: .65rem; }
.footer-brand .icon { width: 26px; height: 26px; flex: 0 0 26px; }
.entry-works { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; border-top: 1px solid var(--rule); padding: 3.5rem 0 2rem; margin-top: 1rem; }
.entry-works h2 { font: 400 2.25rem/1.15 var(--serif); letter-spacing: -.025em; margin: 0; }
.compatibility { margin: 0; }
.compatibility > div { padding: 0 0 1.6rem; }
.compatibility > div + div { border-top: 1px solid var(--rule); padding-top: 1.3rem; }
.compatibility dt { font-size: .78rem; color: var(--muted); margin-bottom: .8rem; }
.compatibility dd { margin: 0; }
.compat-list { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; margin: 0; padding: 0; list-style: none; }
.compat-list li { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; }
.compat-list svg { width: 21px; height: 21px; flex: 0 0 21px; fill: currentColor; }
.compatibility p { font-size: .75rem; color: var(--muted); margin: .7rem 0 0; }
@media (max-width: 820px) {
  .entry-works { grid-template-columns: 180px minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 560px) {
  .entry-works { display: block; padding: 2.5rem 0 1.5rem; }
  .entry-works h2 { font-size: 2rem; margin-bottom: 2rem; }
  .compat-list { gap: .9rem 1.3rem; }
  .compat-list li { font-size: .85rem; }
}

/* The page and footer slide over a stationary wordmark at the viewport bottom. */
.is-landing {
  --ascii-base-size: clamp(9px, 2.75vw, 44px);
  --ascii-font-size: calc(var(--ascii-base-size) * 1.5);
  --ascii-reveal-height: calc(var(--ascii-font-size) * 4.6);
  isolation: isolate;
}
.landing-surface { position: relative; z-index: 1; background: var(--paper); }
.ascii-reveal { height: var(--ascii-reveal-height); pointer-events: none; user-select: none; }
.closing-ascii { position: fixed; inset: auto 0 0; z-index: 0; height: var(--ascii-reveal-height); display: grid; justify-items: center; align-items: start; overflow: hidden; padding: 0 var(--gutter); pointer-events: none; user-select: none; }
.closing-ascii pre { transform: translateY(-.5em); width: max-content; max-width: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--accent); opacity: .16; font: 600 var(--ascii-font-size)/1.1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 0; text-align: left; white-space: pre; overflow: visible; }
.closing-ascii[data-enhanced] pre { opacity: 1; }
.ascii-piece { opacity: .16; transition: opacity 800ms ease-in-out, text-shadow 800ms ease-in-out; }
.ascii-piece.is-glowing { opacity: .75; text-shadow: 0 0 12px #f0883e, 0 0 30px rgb(240 136 62 / 45%); }
:root[data-theme="light"] .ascii-piece, :root[data-theme="light"] .closing-ascii:not([data-enhanced]) pre { opacity: .2; }
:root[data-theme="light"] .ascii-piece.is-glowing { opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  .ascii-piece { transition: none; }
  .ascii-piece.is-glowing { opacity: .16; text-shadow: none; }
}

/* Comfortable standalone controls without enlarging the surrounding text. */
.topnav a, .brand { min-height: var(--control-size); display: inline-flex; align-items: center; }
.topnav a { justify-content: center; min-width: var(--control-size); }
.docnav a, .toc a { min-height: var(--control-size); padding-block: .65rem; }
.entry-nav { gap: .25rem; }
.entry-nav a, .install-alternatives a, .colophon p + p a { display: inline-flex; align-items: center; min-height: var(--control-size); }
.install-alternatives { align-items: center; gap: 0 1rem; }
.install-prompt-heading button, .copy, .term-replay, .nav-toggle { min-height: var(--control-size); }
.install-prompt-heading button { min-width: 6.5rem; }
.copy { min-width: 7rem; font-family: var(--sans); opacity: 1; }
pre.has-copy { padding-top: calc(var(--control-size) + 1rem); }
.copy:focus-visible { opacity: 1; }
.copy-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.term-replay { min-width: 4.5rem; flex-shrink: 0; }
@media (max-width: 820px), (pointer: coarse) {
  html { --control-size: 44px; }
}
@media (max-width: 560px) {
  .topnav { gap: .25rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-start, .theme-toggle, .install-prompt-heading button, .copy, .term-replay { transition: scale 150ms ease-out; }
  .hero-start:active, .theme-toggle:active, .install-prompt-heading button:active, .copy:active, .term-replay:active { scale: .96; }
}
/* Mermaid embeds fixed SVG colors; keep its diagram paints on the live theme. */
.mermaid .node :is(rect, circle, ellipse, polygon, path) { fill: var(--paper-2) !important; stroke: var(--muted) !important; }
.mermaid .label, .mermaid .nodeLabel, .mermaid .edgeLabel, .prose .mermaid p { color: var(--ink) !important; }
.mermaid .edgeLabel, .mermaid .edgeLabel p, .mermaid .labelBkg { background-color: var(--paper) !important; }
.mermaid .edgeLabel rect { fill: var(--paper) !important; }
.mermaid .flowchart-link { stroke: var(--muted) !important; }
.mermaid marker path { fill: var(--muted) !important; stroke: var(--muted) !important; }
