/* Shared chrome for the homepage and blog: sticky top bar, theme toggle, mobile menu, and footer. */
.pe-find { font: inherit; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 1.5rem; padding: .3rem .7rem; cursor: pointer; }
.pe-find[hidden] { display: none; }
.pe-finder { box-sizing: border-box; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: clamp(16px, 4vw, 32px); border: 1px solid #b9c4b4; border-radius: 16px; background: #f8f4ea; color: #123526; font-family: var(--pe-sans); }
/* Only the results list scrolls, so the search box and Close stay in view. */
.pe-finder[open] { display: flex; flex-direction: column; overflow: hidden; }
.pe-finder[open] > * { flex: none; }
.pe-finder::backdrop { background: rgb(6 22 14 / .65); }
.pe-finder-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pe-finder h2 { margin: 0; font-size: clamp(22px, 3vw, 26px); line-height: 1.2; }
.pe-finder button, .pe-finder select, .pe-finder input { box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid #a2afa5; border-radius: 8px; color: #123526; background: white; }
.pe-finder button { cursor: pointer; }
.pe-finder label { display: block; margin: 12px 0 6px; }
.pe-finder input, .pe-finder select { width: 100%; }
@media (min-width: 600px) {
  .pe-finder-fields { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 12px; }
}
.pe-finder [data-finder-status] { margin: 12px 0 0; }
.pe-finder [data-finder-status]:empty { display: none; }
.pe-finder [data-finder-retry] { align-self: flex-start; margin-top: 8px; }
/* Shadows at the list's top and bottom edges show when more results sit above or below. */
.pe-finder ul {
  list-style: none; padding: 0; margin: 12px 0 0;
  overflow-y: auto; overscroll-behavior: contain;
  background:
    linear-gradient(#f8f4ea 30%, rgb(248 244 234 / 0)) center top / 100% 40px no-repeat local,
    linear-gradient(rgb(248 244 234 / 0), #f8f4ea 70%) center bottom / 100% 40px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgb(18 53 38 / .26), rgb(18 53 38 / 0)) center top / 100% 14px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgb(18 53 38 / .26), rgb(18 53 38 / 0)) center bottom / 100% 14px no-repeat scroll;
}
.pe-finder[open] ul { flex: 0 1 auto; min-height: 0; }
/* Short windows, such as a phone held sideways, leave the list too little height, so the whole dialog scrolls. */
@media (max-height: 520px) {
  .pe-finder[open] { display: block; overflow: auto; }
  .pe-finder[open] ul { overflow: visible; background: none; }
}
.pe-finder li { border-top: 1px solid #cbd3ca; }
.pe-finder li a { display: grid; gap: 5px; padding: 16px 4px; color: inherit; text-decoration: none; }
.pe-finder li a:hover strong { text-decoration: underline; }
.pe-finder li a:focus-visible { outline-offset: -3px; } /* inside the scrolling list, an outer ring would be clipped */
.pe-finder-kind { font: 11px var(--pe-mono); text-transform: uppercase; }
.pe-finder :focus-visible { outline: 3px solid #3f6b41; outline-offset: 3px; }
:root {
  --pe-forest: #123526;
  --pe-deep: #0D281C;
  --pe-cream: #EFE7D6;
  --pe-sand: #F1EADB;
  --pe-paper: #F8F4EA;
  --pe-accent: #A9CBA4;
  --pe-accent-ink: #3F6B41;
  --pe-on-dark: #D5DCCF;
  --pe-label-dark: #B9C4B4;
  --pe-label: #4B5F54;
  --pe-muted: #3C5247;
  --pe-ink-soft: #2E4A3C;
  --pe-line: rgba(18, 53, 38, 0.24);
  --pe-line-dark: rgba(239, 231, 214, 0.16);
  --pe-sans: 'Zilla Slab', Rockwell, Georgia, serif;
  --pe-serif: 'Newsreader', Georgia, serif;
  --pe-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pe-gutter: clamp(20px, 5vw, 64px);
  /* Height of the pinned top bar. chrome.js measures the real bar, which wraps to two rows at more widths once it
     shows the Find button; these fallbacks match the bar without JavaScript. Without it, the brand (170px), the gap
     (32px) and the buttons (102px) need 345px with the gutters, so the bar wraps at 344px and narrower; the last
     breakpoint allows a few pixels for other font rendering, since a taller value only adds space above an anchor. */
  --pe-topbar-h: 73px;
}
@media (max-width: 760px) { :root { --pe-topbar-h: 77px; } }
@media (max-width: 348px) { :root { --pe-topbar-h: 133px; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--pe-cream); color: var(--pe-forest);
  font-family: var(--pe-sans); font-weight: 600; border-radius: 22px; text-decoration: none;
}
.skip-link:focus { top: 16px; }
.pe-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pe-wrap { box-sizing: border-box; max-width: 1240px; margin: 0 auto; padding: 0 var(--pe-gutter); }

/* Same-site navigations cross-fade, and the top bar and chat dock hold their place, so moving
   between pages reads as one continuous page. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.pe-topbar { view-transition-name: pe-topbar; }

/* Top bar: stays pinned while the page scrolls. */
/* In-page links land below the pinned bar, and focused controls stay clear of the contact button in the
   bottom corner. */
html { scroll-padding-top: calc(var(--pe-topbar-h) + 16px); scroll-padding-bottom: 88px; }
/* No smooth scroll until load, so arriving at /page/#section lands exactly (chrome.js adds .pe-ready). */
html:not(.pe-ready) { scroll-behavior: auto !important; }
.pe-topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--pe-forest); color: var(--pe-cream); border-bottom: 1px solid var(--pe-line-dark);
  font-family: var(--pe-sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.pe-topbar *, .pe-topbar *::before, .pe-topbar *::after { box-sizing: border-box; }
body .pe-topbar a { color: inherit; } /* beats page-level link colors such as .pe-home a */
.pe-topbar :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pe-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 14px 0; }
.pe-brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.pe-brand img { display: block; }
.pe-brand span { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pe-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.pe-links a { display: flex; align-items: center; min-height: 44px; font-size: 15px; text-decoration: none; }
.pe-topbar .pe-links a:hover, .pe-topbar .pe-links a[aria-current] { color: #FFFFFF; }
.pe-topbar .pe-links a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.pe-links .pe-navcta { height: 44px; padding: 0 20px; font-weight: 500; border: 1px solid rgba(239, 231, 214, 0.6); border-radius: 22px; }
.pe-theme, .pe-menu {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  background: transparent; color: inherit; border: 1px solid rgba(239, 231, 214, 0.35); border-radius: 50%; cursor: pointer;
}
.pe-theme:hover { background: rgba(239, 231, 214, 0.1); }
.pe-theme[hidden] { display: none; }
.pe-theme .icon-moon { display: none; }
.pe-menu { display: none; width: 48px; height: 48px; border-color: rgba(239, 231, 214, 0.6); }
.pe-mobile-menu { display: flex; flex-direction: column; padding: 4px 0 20px; }
.pe-mobile-menu[hidden] { display: none; }
.pe-mobile-menu a {
  display: flex; align-items: center; min-height: 56px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em;
  text-decoration: none; border-bottom: 1px solid rgba(239, 231, 214, 0.12);
}
.pe-topbar .pe-mobile-menu a.pe-mobile-cta {
  justify-content: center; height: 52px; min-height: 0; margin-top: 16px; font-size: 16px; font-weight: 600;
  background: var(--pe-cream); color: var(--pe-forest); border: 1px solid var(--pe-cream); border-radius: 26px;
}
.pe-logo-cream { display: none !important; }

/* Footer */
.pe-footer {
  padding: 0; border: 0; background: var(--pe-deep); color: var(--pe-label-dark);
  font-family: var(--pe-sans); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.pe-footer-inner {
  padding-top: 72px; padding-bottom: 120px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; font-size: 14px;
}
.pe-wordmark {
  flex: 1 1 100%; padding-bottom: 40px; font-size: clamp(44px, 10.5vw, 148px); line-height: 0.95; font-weight: 500;
  letter-spacing: -0.045em; color: var(--pe-cream);
}
.pe-wordmark em { font-family: var(--pe-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--pe-accent); }
.pe-footer-brand { display: flex; align-items: center; gap: 12px; color: var(--pe-cream); }
.pe-footer-brand img { display: block; }
.pe-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.pe-footer-links a, .pe-footer-links button {
  display: flex; align-items: center; min-height: 44px; color: var(--pe-label-dark);
  font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.pe-footer-links button { padding: 0; background: none; border: 0; cursor: pointer; }
.pe-footer-links a:hover, .pe-footer-links button:hover { color: #FFFFFF; }
.pe-madewith {
  flex: 1 1 100%; display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 20px;
  border-top: 1px solid rgba(239, 231, 214, 0.14); font-size: 15px; color: var(--pe-cream);
}

/* Tighter spacing keeps every link on one row down to the menu breakpoint. */
@media (max-width: 900px) {
  .pe-links { gap: 4px 18px; }
}
@media (max-width: 760px) {
  .pe-links > a { display: none; }
  .pe-links { gap: 4px 10px; }
  .pe-menu { display: flex; }
}

/* Cream (light) theme */
[data-theme="cream"] .pe-topbar { background: var(--pe-paper); color: var(--pe-forest); border-bottom-color: var(--pe-line); }
[data-theme="cream"] .pe-topbar .pe-links a:hover, [data-theme="cream"] .pe-topbar .pe-links a[aria-current] { color: var(--pe-deep); }
[data-theme="cream"] .pe-links .pe-navcta { border-color: rgba(18, 53, 38, 0.5); }
[data-theme="cream"] .pe-theme { border-color: var(--pe-line); }
[data-theme="cream"] .pe-theme:hover { background: rgba(18, 53, 38, 0.06); }
[data-theme="cream"] .pe-theme .icon-sun { display: none; }
[data-theme="cream"] .pe-theme .icon-moon { display: block; }
[data-theme="cream"] .pe-menu { border-color: rgba(18, 53, 38, 0.5); }
[data-theme="cream"] .pe-mobile-menu a { border-bottom-color: var(--pe-line); }
[data-theme="cream"] .pe-topbar .pe-mobile-menu a.pe-mobile-cta { background: var(--pe-forest); color: var(--pe-cream); border-color: var(--pe-forest); }
[data-theme="cream"] .pe-logo-forest { display: none !important; }
[data-theme="cream"] .pe-logo-cream { display: block !important; }
[data-theme="cream"] .pe-footer { background: var(--pe-sand); color: var(--pe-muted); }
[data-theme="cream"] .pe-wordmark, [data-theme="cream"] .pe-footer-brand, [data-theme="cream"] .pe-madewith { color: var(--pe-forest); }
[data-theme="cream"] .pe-wordmark em { color: var(--pe-accent-ink); }
[data-theme="cream"] .pe-footer-links a, [data-theme="cream"] .pe-footer-links button { color: var(--pe-muted); }
[data-theme="cream"] .pe-footer-links a:hover, [data-theme="cream"] .pe-footer-links button:hover { color: var(--pe-deep); }
[data-theme="cream"] .pe-madewith { border-top-color: var(--pe-line); }
[data-theme="cream"] .pe-madewith svg { fill: var(--pe-accent-ink); }
