/* =========================================================
   Peptide Data Hub — newspaper digest
   Direction: broadsheet clarity. Navy serif headlines on white
   wells over a grey page, square corners, feature images at 3:2.
   ========================================================= */

:root {
  color-scheme: light;

  /* ---- color: 1 accent + neutrals ---- */
  --navy:       #152E4D;
  --ink:        #10151C;
  --muted:      #5A6473;
  --link:       #1A4B8C;
  --link-hover: #0E3160;
  --sky:        #7FA8D8;

  --page:       #E9EAEC;
  --well:       #FFFFFF;
  --wash:       #F4F5F7;
  --rule:       #D6D9DE;

  /* ---- type ---- */
  --font-head: "PT Serif", Georgia, "Times New Roman", serif;
  --font-text: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --fs-100: 0.75rem;
  --fs-200: 0.8125rem;
  --fs-300: 1rem;
  --fs-400: 1.125rem;
  --fs-500: 1.5rem;
  --fs-600: 2.25rem;
  --fs-700: clamp(1.875rem, 3.6vw, 2.75rem);
  --fs-800: clamp(2rem, 4.4vw, 3rem);

  --lh-head: 1.12;
  --lh-body: 1.62;

  /* ---- space: 8px grid ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4rem;
  --s-8: 6rem;

  /* ---- structure ---- */
  --well-w:  72rem;      /* 1152px */
  --measure: 40rem;
  --gutter:  var(--s-3);
  --hair:    1px;

  --dur:  200ms;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
}

@media (min-width: 48rem) { :root { --gutter: var(--s-5); } }

/* =========================================================
   base
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-300);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: var(--lh-head);
  letter-spacing: -0.025em;
  font-weight: 700;
}
p { margin: 0; }
img { max-width: 100%; display: block; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
::selection { background: var(--sky); color: var(--navy); }

.skip {
  position: absolute; left: var(--s-3); top: -6rem;
  background: var(--navy); color: #fff; padding: var(--s-2) var(--s-3);
  z-index: 100; transition: top var(--dur) var(--ease);
}
.skip:focus { top: var(--s-3); color: #fff; }

/* =========================================================
   shell
   ========================================================= */

.well {
  width: 100%;
  max-width: var(--well-w);
  margin-inline: auto;
  background: var(--well);
}
.well--gap { margin-block: var(--s-4); }

.pad { padding-inline: var(--gutter); }

.rule { border: 0; border-top: var(--hair) solid var(--rule); margin: 0; }
.rule--dark { border-top: 2px solid var(--navy); }

/* the small tracked furniture voice */
.kicker {
  display: inline-block;
  font-size: var(--fs-100);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
  text-decoration: none;
}
a.kicker:hover { color: var(--link-hover); text-decoration: underline; }

.meta {
  font-size: var(--fs-200);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  align-items: baseline;
}
.meta__sep { color: var(--rule); }

.excerpt { color: #33393F; font-size: var(--fs-300); }

/* =========================================================
   masthead
   ========================================================= */

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); padding-block: var(--s-4);
}

.wordmark { text-decoration: none; display: block; }
.wordmark__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.wordmark__name span { color: var(--link); }
.wordmark__tag {
  font-size: var(--fs-200);
  color: var(--muted);
  margin-top: var(--s-1);
}

.masthead__actions { display: none; align-items: center; gap: var(--s-3); }
@media (min-width: 48rem) { .masthead__actions { display: flex; } }
/* =========================================================
   category bar
   ========================================================= */

.catbar { background: transparent; }
.catbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); min-height: 3rem;
  border-top: var(--hair) solid var(--rule);
  border-bottom: 2px solid var(--navy);
}
.cats { display: none; align-items: center; gap: var(--s-4); }
@media (min-width: 60rem) { .cats { display: flex; } }
.cats a {
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  text-decoration: none;
  padding-block: var(--s-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cats a:hover, .cats a[aria-current="page"] { color: var(--link); border-color: var(--link); }

.catbar__mark {
  width: 1.75rem; height: 1.75rem; flex: none;
  background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-200);
  text-decoration: none;
}
.catbar__mark:hover { background: var(--link); color: #fff; }

.searchlink {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-200); font-weight: 600; color: var(--navy); text-decoration: none;
}
.searchlink:hover { color: var(--link); }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 2.5rem; height: 2.25rem; padding: 0 0.5rem;
  background: transparent; border: var(--hair) solid var(--rule); cursor: pointer;
}
@media (min-width: 60rem) { .burger { display: none; } }
.burger span { height: 2px; width: 100%; background: var(--navy); transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobilenav { display: none; background: transparent; }
.mobilenav > .well { border-bottom: var(--hair) solid var(--rule); }
.mobilenav.is-open { display: block; }
@media (min-width: 60rem) { .mobilenav { display: none !important; } }
.mobilenav a {
  display: block; padding: var(--s-3) 0;
  border-bottom: var(--hair) solid var(--rule);
  color: var(--navy); text-decoration: none; font-weight: 600;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.mobilenav a:hover { color: var(--link); padding-left: var(--s-2); }
.mobilenav a:last-child { border-bottom: 0; }

/* =========================================================
   media — the feature image system
   3:2 crop everywhere. Swap the <img src> and nothing shifts.
   ========================================================= */

.media {
  display: block;
  margin: 0;
  background: var(--wash);
  overflow: hidden;
  position: relative;
}
.media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 300ms var(--ease), opacity var(--dur) var(--ease);
}
a.media:hover img, .card:hover .media img { transform: scale(1.03); }

.media--wide img { aspect-ratio: 2 / 1; }
.media--square img { aspect-ratio: 1 / 1; }

.media__credit {
  font-size: var(--fs-100);
  color: var(--muted);
  padding-top: var(--s-2);
  line-height: 1.5;
}

/* =========================================================
   lead story
   ========================================================= */

.lead { padding-block: var(--s-5); display: grid; gap: var(--s-4); }
@media (min-width: 56rem) {
  .lead { grid-template-columns: 1.05fr 1fr; gap: var(--s-6); align-items: start; }
}
.lead h2 {
  font-size: var(--fs-700);
  font-weight: 700;
  margin-block: var(--s-3);
}
.lead h2 a { color: inherit; text-decoration: none; }
.lead h2 a:hover { color: var(--link); }
.lead .excerpt { font-size: var(--fs-400); }
.lead .meta { margin-top: var(--s-3); }

/* =========================================================
   story cards
   ========================================================= */

.cardgrid { display: grid; gap: var(--s-5); }
@media (min-width: 40rem) { .cardgrid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 40rem) { .cardgrid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cardgrid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { display: flex; flex-direction: column; gap: var(--s-3); position: relative; }
.card .media { margin-bottom: var(--s-1); }
.card h3 { font-size: var(--fs-500); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--link); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card .excerpt { font-size: var(--fs-200); color: #3B424A; }
.card--sm h3 { font-size: var(--fs-400); }

/* horizontal variant used in the secondary row */
@media (min-width: 40rem) {
  .card--row { display: grid; grid-template-columns: 12rem 1fr; gap: var(--s-4); align-items: start; }
  .card--row .media { margin-bottom: 0; }
}

/* =========================================================
   section headers
   ========================================================= */

.secthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4);
  border-bottom: 2px solid var(--navy);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-5);
}
.secthead h2 { font-size: var(--fs-600); }
.secthead a {
  font-size: var(--fs-100); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.secthead a:hover { text-decoration: underline; }

/* =========================================================
   main / rail split
   ========================================================= */

.layout { display: grid; gap: var(--s-6); padding-block: var(--s-5); }
@media (min-width: 64rem) {
  .layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--s-7); align-items: start; }
}

.railbox + .railbox { margin-top: var(--s-6); }
.railbox h4 {
  font-size: var(--fs-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--navy);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-3);
}

.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li {
  counter-increment: rank;
  display: grid; grid-template-columns: 2rem 1fr; gap: var(--s-3);
  padding-block: var(--s-3);
  border-bottom: var(--hair) solid var(--rule);
}
.ranked li::before {
  content: counter(rank);
  font-family: var(--font-head);
  font-size: var(--fs-500);
  font-weight: 700;
  color: var(--sky);
  line-height: 1;
}
.ranked a { font-family: var(--font-head); font-weight: 700; color: var(--navy); text-decoration: none; font-size: var(--fs-300); line-height: 1.25; display: block; }
.ranked a:hover { color: var(--link); }
.ranked .kicker { margin-top: var(--s-1); font-size: 0.6875rem; }

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { padding-block: var(--s-3); border-bottom: var(--hair) solid var(--rule); }
.linklist a { font-family: var(--font-head); font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.25; display: block; }
.linklist a:hover { color: var(--link); }
.linklist .kicker { margin-top: var(--s-1); font-size: 0.6875rem; }

/* rail newsletter box */
.signup { background: var(--navy); color: #fff; padding: var(--s-4); }
.signup h4 { color: #fff; border-bottom-color: var(--sky); }
.signup p { font-size: var(--fs-200); color: #C6D3E2; }
.form { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.form input[type="email"] {
  font: inherit; font-size: var(--fs-200);
  padding: var(--s-2) var(--s-3);
  background: #fff; color: var(--ink);
  border: var(--hair) solid var(--navy);
}
.form input[type="email"]:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.form__note { margin-top: var(--s-3); font-size: var(--fs-100); color: #A9BBD0; }

/* =========================================================
   buttons
   ========================================================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-text);
  font-size: var(--fs-200); font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--s-3) var(--s-4);
  background: var(--link); color: #fff;
  border: var(--hair) solid var(--link);
  text-decoration: none; cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--rule); }
.btn--ghost:hover { background: var(--wash); border-color: var(--navy); color: var(--navy); }
.btn--sm { padding: var(--s-2) var(--s-3); }

/* =========================================================
   archive: filters + rows
   ========================================================= */

.pagehead { padding-block: var(--s-5) var(--s-4); border-bottom: 2px solid var(--navy); }
.pagehead h1 { font-size: var(--fs-700); max-width: 22ch; }
.pagehead .excerpt { margin-top: var(--s-3); max-width: 46rem; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.chip {
  font: inherit; font-size: var(--fs-200); font-weight: 600;
  padding: var(--s-2) var(--s-3);
  background: var(--well); color: var(--navy);
  border: var(--hair) solid var(--rule); cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip:hover { color: var(--link); border-color: var(--link); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.card[hidden] { display: none; }

/* =========================================================
   article
   ========================================================= */

.article { padding-block: var(--s-5) var(--s-7); }
.article h1 { font-size: var(--fs-800); max-width: 26ch; margin-block: var(--s-3); }
.standfirst {
  font-family: var(--font-head);
  font-style: italic;
  font-size: var(--fs-400);
  line-height: 1.45;
  color: #2C3540;
  max-width: 44rem;
}
.article .meta { margin-top: var(--s-4); padding-bottom: var(--s-4); border-bottom: var(--hair) solid var(--rule); }

.feature { margin-block: var(--s-5); }
.feature figcaption { font-size: var(--fs-200); color: var(--muted); padding-top: var(--s-2); line-height: 1.5; max-width: 44rem; }

.prose { max-width: var(--measure); font-size: 1.0625rem; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--fs-500); margin-top: var(--s-6); }
.prose h3 { font-size: var(--fs-400); margin-top: var(--s-5); }
.prose p { color: #23282F; }
.prose ul, .prose ol { padding-left: var(--s-4); color: #23282F; }
.prose li + li { margin-top: var(--s-2); }
.prose li::marker { color: var(--sky); }
.prose strong { font-weight: 700; }


.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9375rem;
  line-height: 1.7;
  background: var(--wash);
  border-left: 3px solid var(--sky);
  padding: var(--s-3) var(--s-4);
  margin: var(--s-4) 0;
  overflow-x: auto;
  white-space: pre;
  color: var(--navy);
}

.figure-inline { margin: var(--s-5) 0; }
.figure-inline img { width: 100%; height: auto; display: block; border: var(--hair) solid var(--rule); background: var(--wash); }
.figure-inline figcaption { font-size: var(--fs-200); color: var(--muted); padding-top: var(--s-2); line-height: 1.5; }

.pull {
  margin: var(--s-5) 0;
  padding: var(--s-4) 0;
  border-block: 2px solid var(--navy);
  font-family: var(--font-head);
  font-size: var(--fs-500);
  line-height: 1.3;
  color: var(--navy);
}

.callout {
  margin-block: var(--s-5);
  padding: var(--s-4);
  background: var(--wash);
  border-left: 4px solid var(--sky);
}
.callout p { font-size: var(--fs-200); color: #3B424A; }
.callout .kicker { display: block; margin-bottom: var(--s-2); }
.callout--correction { border-left-color: var(--navy); }

.datatable { width: 100%; border-collapse: collapse; margin-block: var(--s-4); font-size: var(--fs-200); }
.datatable caption { text-align: left; font-size: var(--fs-100); color: var(--muted); padding-bottom: var(--s-2); }
.datatable th, .datatable td { text-align: left; padding: var(--s-2) var(--s-3) var(--s-2) 0; border-bottom: var(--hair) solid var(--rule); }
.datatable thead th { border-bottom: 2px solid var(--navy); font-size: var(--fs-100); letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.datatable td { color: #23282F; }
.table-scroll { overflow-x: auto; }

.refs { margin-top: var(--s-6); padding-top: var(--s-3); border-top: 2px solid var(--navy); }
.refs h2 { font-size: var(--fs-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s-3); }
.refs ol { padding-left: var(--s-4); font-size: var(--fs-200); color: var(--muted); }
.refs li + li { margin-top: var(--s-2); }

.toc { border-top: 2px solid var(--navy); padding-top: var(--s-3); }
.toc ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.toc li { border-bottom: var(--hair) solid var(--rule); }
.toc a {
  display: block; font-size: var(--fs-200); font-weight: 600;
  color: var(--navy); text-decoration: none; padding: var(--s-2) 0;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.toc a:hover { color: var(--link); padding-left: var(--s-2); }

/* =========================================================
   about bits
   ========================================================= */

.stats { display: grid; gap: var(--hair); background: var(--rule); border: var(--hair) solid var(--rule); margin-top: var(--s-5); }
@media (min-width: 40rem) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--well); padding: var(--s-4); }
.stat__v { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-600); line-height: 1; color: var(--navy); }
.stat__k { margin-top: var(--s-2); font-size: var(--fs-100); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.cols { display: grid; gap: var(--s-5); }
@media (min-width: 52rem) { .cols { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.cols h3 { font-size: var(--fs-400); margin-block: var(--s-2); }
.cols p { font-size: var(--fs-200); color: #3B424A; }
.col__n { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-500); color: var(--sky); line-height: 1; }

/* =========================================================
   footer
   ========================================================= */

.foot { background: var(--navy); color: #D5DEE9; margin-top: var(--s-4); }
.foot__inner { padding-block: var(--s-6); }
.foot__grid { display: grid; gap: var(--s-5); }
@media (min-width: 52rem) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-6); } }
.foot h4 { color: #fff; font-size: var(--fs-100); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--s-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.foot a { color: #D5DEE9; text-decoration: none; font-size: var(--fs-200); }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .wordmark__name { color: #fff; font-size: 1.5rem; }
.foot .wordmark__name span { color: var(--sky); }
.foot__blurb { font-size: var(--fs-200); color: #B7C4D4; margin-top: var(--s-2); max-width: 32ch; }

.disclaimer {
  margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: var(--hair) solid #2C4463;
  font-size: var(--fs-100); color: #AFBDCE; line-height: 1.6;
}
.disclaimer strong { color: #fff; }
.colophon {
  margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  justify-content: space-between; font-size: var(--fs-100); color: #8FA1B7;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- buy block
   Commercial. Deliberately reads as a distinct object rather than as part of
   the article, so a reader can tell editorial from supplier at a glance. */
.prose .buybox{
  margin-block: var(--s-6) 0;
  padding: var(--s-5);
  border: var(--hair) solid var(--rule);
  border-top: 3px solid var(--navy);
  background: var(--wash);
}
.prose .buybox .kicker{ display:block; margin-bottom:.35rem; }
.prose .buybox h2{ font-size:1.35rem; border:0; padding:0; margin-top:0; }
.prose .buybox p{ margin-block:.7rem; }
.prose .buybox .buybox__note{
  font-family: var(--font-text);
  font-size: .84rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 0;
  padding-top: .8rem;
  border-top: var(--hair) solid var(--rule);
}
.railbox--buy p{ font-family:var(--font-text); font-size:.88rem; line-height:1.55; margin-block:.5rem; }
.railbox--buy p:last-child{ margin-bottom:0; }
.btn--buy{ background:var(--navy); border-color:var(--navy); color:#fff; }
.btn--buy:hover{ background:var(--link-hover); border-color:var(--link-hover); color:#fff; }
.btn--sm{ padding:.45rem .85rem; font-size:.84rem; }

/* ---------------------------------------------------------------- consent
   Analytics is denied until this is answered, so the banner has to be
   reachable and both choices carry equal weight. */
.consent{
  position:fixed; inset-inline:0; bottom:0; z-index:60;
  background:var(--well);
  border-top:2px solid var(--navy);
  box-shadow:0 -8px 24px rgb(16 21 28 / 12%);
}
.consent[hidden]{ display:none; }
.consent__inner{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:var(--s-3); padding-block:var(--s-3);
}
.consent__text{
  font-family:var(--font-text); font-size:.9rem; line-height:1.55;
  color:var(--ink); margin:0; max-width:58ch;
}
.consent__actions{ display:flex; gap:var(--s-2); flex:none; }
