/* Site additions. styles.css is an unchanged copy of the reference. */
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 30; }
.skip-link:focus { top: 0.5rem; padding: 0.5rem; background: #fcf9ee; }
:focus-visible { outline: 2px solid #805200; outline-offset: 4px; }
.paper-section-body li { line-height: 1.68; }
code, .code {
  font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
  font-size: 85%;
  hyphens: manual;
  padding: 0.12em 0.3em;
  border-radius: 0.2em;
  background: #3f330714;
  color: #161600c9;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.paper-section-body pre, .open-content pre {
  padding: 1rem;
  border-radius: 0.3rem;
  background: #242824;
  color: #fcf9ee;
  font-size: 85%;
}
pre code { padding: 0; border-radius: 0; background: transparent; color: inherit; font-size: inherit; }
.post-footer { margin: 4rem var(--paper-sheet-inset) 0; text-align: left; }
.mobile-nav-header nav { display: flex; gap: 1rem; font-size: 0.95rem; }
.mobile-nav-header nav a { text-decoration: none; }
.header-paper-menu > a:first-child { padding-left: 0; }
.header-scroll-column {
  grid-column: 2;
  display: grid;
  grid-template-columns: var(--paper-main-width) minmax(0, var(--paper-sidebar-width));
  gap: var(--paper-shell-gap);
  min-width: 0;
}
.header-paper-menu { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.paper-body .site-nav-desktop { column-gap: 0; }
.site-nav a.menu-icon, .mobile-nav-header a.menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  letter-spacing: 0;
}
.menu-icon img { display: block; }
.site-nav-desktop, .mobile-nav-header nav, .menu-contacts { align-items: center; }
.menu-contacts { display: flex; gap: 1rem; margin-left: auto; }
.menu-contacts a.menu-icon { line-height: 1; }
.menu-contacts a:last-child { padding-right: 0; }
@media (max-width: 600px) { .paper-body .site-nav-desktop { display: none; } }
.paper-sidebar-footnotes-label { display: none; margin: 0; }
.post-date { color: #706b5d; font-size: 0.9rem; line-height: 1.4; font-style: normal; }
.paper-hero > .post-date { margin: 1rem 0 0; text-align: center; }
.paper-teaser .post-date { margin: 0.4rem 0 0.7rem; font-size: 0.9rem; }
.paper-section-title, .paper-abstract-title { scroll-margin-top: calc(var(--paper-sticky-top) + 1rem); }
.open-content .post-footer { margin: 3rem 0 0; }

@media (min-width: 901px) {
  .paper-sidebar > .paper-sidebar-footnotes {
    transform: translateX(calc((var(--paper-shell-gap) + var(--paper-sidebar-inset)) * -0.4));
  }
}

/* Treat an H2 followed directly by an H3 as one compact heading group. */
.paper-section-title:has(+ .paper-section-body > h3:first-child),
.paper-section-body > h2:has(+ h3) {
  padding-bottom: 0.25rem;
  margin-bottom: 0;
}
.paper-section-title:has(+ .paper-section-body > h3:first-child)::after,
.paper-section-body > h2:has(+ h3)::after { content: none; }
.paper-section-title + .paper-section-body:has(> h3:first-child) { padding-top: 0; }
.paper-section-title + .paper-section-body > h3:first-child,
.paper-section-body > h2 + h3 {
  margin-top: 0;
  padding-top: 0.25rem;
}

/* Secondary layout: a single open page, without navigation or sidebars. */
.open-page {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(3rem, 8vw, 7rem) clamp(1.2rem, 6vw, 4rem);
  font-family: "Newsreader", serif;
  font-size: 1.14rem;
  line-height: 1.68;
  color: #1a1a1a;
}
.open-content { max-width: 42rem; margin: 0 auto; }
.open-content h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.65rem, 5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #071b0f;
  text-wrap: balance;
}
.open-content h2, .open-content h3 { line-height: 1.2; }
.open-intro { margin: 0 0 2.5rem; font-size: 1.6rem; line-height: 1.32; }

@media print {
  .site-nav, .mobile-nav-header, .paper-rail, .paper-sidebar, .skip-link, .post-footer { display: none; }
  .paper-page, .paper-scroll-column { display: block; }
  .paper-main { box-shadow: none; }
  .paper-section-title, .paper-abstract-title { position: static; }
}
