/* ============================================================
 * components-layout.css
 *
 * Part of the brandolini year-site stylesheet, split out from
 * the original monolithic components.css on 2026-05-04 V2.0
 * when the file crossed the 600-line hard threshold.
 *
 * Loaded by the <page-head> directive — see ~/brandolini-build/inject.py.
 * Adding new rules: add them here if they fit the existing section,
 * or split off a new components-<thing>.css file if a coherent new
 * concern emerges.
 * ============================================================ */

/* 2025-2026.msbrandolini.com — components.css
 *
 * Component-level styling. Design tokens and global preferences are defined
 * in site.css and must be loaded FIRST; this file only consumes them.
 *
 * Sections: page header + breadcrumb, page shell, sections, terms (tooltip +
 * short + long), embedded reading, embedded diagram, prose links, site
 * footer, skip-to-content link, toggle widget, translate menu.
 */

/* --- page header + breadcrumb --- */

.page-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 28px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.mark {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  color: var(--accent-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mark:hover { color: var(--accent); }

.breadcrumb {
  font-size: 13px;
  color: var(--ink-quiet);
  letter-spacing: 0.02em;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb .sep { color: var(--ink-quiet); opacity: 0.5; }
.breadcrumb .current { color: var(--ink); }

/* --- site-nav (persistent top-level sections) --- */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 14px;
  letter-spacing: 0.01em;
  align-items: baseline;
}
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent-deep);
}

/* --- site-search (Pagefind UI in the page-header chrome) --- */
/* The container; pagefind-ui injects its own markup inside #search. We size
 * the container compactly so it sits next to the nav, and use the Pagefind UI
 * CSS variable hooks (--pagefind-ui-*) to align typography + color with the
 * site chrome (Atkinson Hyperlegible body, var(--accent) etc.). */

.site-search {
  flex: 1 1 220px;
  max-width: 320px;
  min-width: 200px;
  font-family: 'Atkinson Hyperlegible', sans-serif;
}
.site-search #search {
  --pagefind-ui-scale: 0.75;
  --pagefind-ui-primary: var(--accent-deep);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--bg, #fff);
  --pagefind-ui-border: var(--rule);
  --pagefind-ui-tag: var(--ink-quiet);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 6px;
  --pagefind-ui-image-border-radius: 0;
  --pagefind-ui-image-box-ratio: 3 / 2;
  --pagefind-ui-font: 'Atkinson Hyperlegible', sans-serif;
}
/* Results panel: pagefind renders results inline beneath the input. Pin it
 * over the page so it doesn't push the header layout around when active. */
.site-search .pagefind-ui__drawer {
  position: absolute;
  right: 28px;
  left: auto;
  width: min(480px, calc(100vw - 56px));
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg, #fff);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 50;
  max-height: 70vh;
  overflow-y: auto;
}
.site-search .pagefind-ui__drawer:empty,
.site-search .pagefind-ui__drawer.pagefind-ui__hidden {
  display: none;
}
.site-search .pagefind-ui__result-title {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-weight: 450;
}



/* --- page shell --- */

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 28px 16px;
}

.page-title { margin-bottom: 56px; }
.page-title .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 16px;
}
.page-title h1 {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-weight: 380;
  font-size: clamp(40px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  color: var(--ink);
}
.page-title .lede {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-weight: 350;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--reading-width);
}



/* --- sections --- */

.page-section {
  max-width: var(--reading-width);
  margin: 0 0 56px;
}
.page-section h2 {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-weight: 420;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.page-section p { margin-bottom: 16px; }
.page-section p:last-child { margin-bottom: 0; }

.term-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.term-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.term-list li:last-child { border-bottom: none; }



