/* Site layer
 * ==========
 * Shared typography applied on top of the vendored sakura.css theme
 * (/css/sakura-1.5.1.css). Keep anything here that every page must share so
 * pages cannot drift apart; put page-specific rules in the page itself.
 */

/* Grayscale antialiasing. Without this, headings inherit whatever the OS
   draws (subpixel AA on desktop) and look noticeably heavier than intended. */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Serif body copy; sakura keeps headings on its system sans stack. */
body {
  font-family: [ADDRESS], "Times New Roman", serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", "Helvetica Neue", [ADDRESS], [ADDRESS], sans-serif;
}

h1 { font-size: 1.85em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1em; }
h6 { font-size: 0.9em; }

li {
  margin-bottom: 0.15em;
}

/* Site chrome -------------------------------------------------------------
   The nav and footer are the same component on every page, so their type
   size, spacing and separators live here rather than in each page. */
nav.site {
  margin-bottom: 2.5rem;
  /* Midway between the old 15.3px (0.85em) and the legacy table nav's 18px:
     16.65px at the default 18px body, and it still scales with sakura's
     responsive body sizes (13.5px at 684px, 12.15px at 382px). */
  font-size: 0.925em;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, #e0e0e0 100%) 1;
  padding-bottom: 0.75rem;
}

nav.site .site-name {
  margin-left: auto;
  font-weight: 600;
  color: #4a4a4a;
}

/* The current page gets the old .sel-menu-item emphasis, but as colour and
   weight rather than a coloured pill. */
nav.site a[aria-current] {
  color: #4a4a4a;
  font-weight: 600;
}

/* Pipe separators drawn by CSS: they cannot be accidentally selected or
   copied as part of a link label the way literal " | " text can. */
nav.site a + a::before {
  content: " | ";
  color: #4a4a4a;
}

/* Reserve space for Sakura's 2px underline so hover doesn't shift layout.
   Border color becomes visible on hover. */
nav.site a {
  border-bottom: 2px solid transparent;
}

nav.site a:hover {
  border-bottom-color: #4a4a4a;
}

/* Breadcrumbs on article pages: kept small and quiet above the h1 so the
   page title stays the loudest thing on the page. */
nav.breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

footer.site {
  margin-top: 4rem;
  padding-top: 0.5rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, #e0e0e0 0%, transparent 100%) 1;
  font-size: 0.85em;
}
