/* Pet Peptide Science: shared layer (tokens, type, masthead, crumbs, colophon).
   Page-specific blocks live in their own file under /assets/css/.
   Typeface: Fraunces variable, SIL Open Font License 1.1, served from /assets/fonts/. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2-variations"),
       url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --onyx: #08090c;
  --panel: #101318;
  --panel-raised: #161a21;
  --line: #262c36;
  --ink: #eef1f2;
  --ink-soft: #c5cdd2;
  --slate: #7e8a93;
  --slate-text: #a4afb6;
  --teal: #18e0d0;
  --teal-dim: #12a89c;
  --measure: 40rem;
  --wide: 72rem;
  --gap: clamp(1rem, 3vw, 2rem);
  --face: "Fraunces", "Iowan Old Style", Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--onyx);
  color: var(--ink);
  font-family: var(--face);
  font-size: 1.125rem;
  font-weight: 380;
  line-height: 1.7;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-weight: 560; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a:hover { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  a, button { transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease; }
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--teal);
  color: var(--onyx);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
}
.skip:focus { top: 0; color: var(--onyx); }

/* ---- masthead: split links either side of the name ---- */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--onyx);
}
.masthead__nav {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem var(--gap);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.masthead__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.masthead__links--left { justify-content: flex-end; order: 1; }
.masthead__brand { order: 2; }
.masthead__links--right { justify-content: flex-start; order: 3; }
.masthead__item { margin: 0; }
.masthead__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0 0.7rem;
  font-size: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.masthead__link:hover { color: var(--ink); border-bottom-color: var(--teal-dim); }
.masthead__link--current { color: var(--ink); border-bottom-color: var(--teal); }
.masthead__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.25rem 1.25rem;
  text-align: center;
  text-decoration: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.masthead__name { font-size: 1.3rem; font-weight: 640; letter-spacing: 0.01em; color: var(--ink); }
.masthead__tagline { font-size: 1rem; font-style: italic; color: var(--slate-text); }
.masthead__brand:hover .masthead__name { color: var(--teal); }

@media (max-width: 860px) {
  .masthead__nav { grid-template-columns: 1fr; gap: 0.35rem; padding-top: 0.9rem; padding-bottom: 0.5rem; }
  .masthead__brand { order: 1; border: 0; padding-bottom: 0.5rem; }
  .masthead__links--left, .masthead__links--right { justify-content: center; }
  .masthead__links--left { order: 2; }
  .masthead__links--right { order: 3; }
}

/* ---- breadcrumb ---- */
.crumbs { max-width: var(--wide); margin: 0 auto; padding: 0.5rem var(--gap) 0; }
.crumbs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.crumbs__item { display: inline-flex; align-items: center; font-size: 1rem; color: var(--slate-text); }
.crumbs__item + .crumbs__item::before { content: "/"; margin: 0 0.6rem; color: var(--slate); }
.crumbs__link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--ink-soft); }

/* ---- page frame ---- */
.page { max-width: var(--wide); margin: 0 auto; padding: 1.5rem var(--gap) 4rem; }
.page > section, .page > nav, .page > header { margin-bottom: clamp(3rem, 6vw, 5rem); }

.intro { max-width: 48rem; padding-top: 1.5rem; }
.intro__kicker {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.intro__title { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); font-weight: 520; }
.intro__lede { font-size: 1.25rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---- a quiet aside used on several pages ---- */
.gentle {
  max-width: 48rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 6px;
}
.gentle__title { font-size: 1.6rem; }
.gentle__text, .gentle__list { max-width: var(--measure); }
.gentle__text:last-child { margin-bottom: 0; }
.gentle__list { margin: 0 0 1.1em; padding-left: 1.2rem; }
.gentle__item { margin-bottom: 0.5em; }
.gentle__item::marker { color: var(--teal); }
.gentle__link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- colophon ---- */
.colophon { border-top: 1px solid var(--line); background: #0b0d11; }
.colophon__inner { max-width: var(--wide); margin: 0 auto; padding: 2.5rem var(--gap) 3rem; }
.colophon__urgent {
  max-width: 48rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--teal-dim);
  border-radius: 6px;
  color: var(--ink);
}
.colophon__line { max-width: 48rem; font-size: 1.05rem; color: var(--ink-soft); font-style: italic; }
.colophon__links { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.colophon__item { margin: 0; }
.colophon__link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: 1rem; color: var(--ink-soft); }
