/* Novapep — Long-form guide layout
   Built on top of colors_and_type.css */

@import url("../colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--np-paper); color: var(--fg-1); }
body { font-family: var(--font-display); -webkit-font-smoothing: antialiased; }

/* ---------- Layout ---------- */
.g-shell { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.g-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  padding: 80px 0 120px;
}
@media (max-width: 960px) {
  .g-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 80px; }
}

/* ---------- Hero ---------- */
.g-hero {
  background: var(--np-deep);
  color: var(--np-bone);
  padding: 96px 0 88px;
  margin-bottom: 0;
}
.g-hero__inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.g-hero__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 80px;
}
.g-hero__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; color: var(--np-bone); }
.g-hero__brand img { height: 22px; width: auto; }
.g-hero__brandwrap { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.g-hero__motto { font-size: 9.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--np-volt); white-space: nowrap; }
.g-hero__lang { font-size: 12px; color: rgba(244,241,234,0.55); letter-spacing: 0.02em; }
.g-hero__lang a { color: var(--np-bone); margin-left: 14px; }
.g-hero__lang a:hover { opacity: 0.7; }

.g-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--np-volt); font-weight: 500; letter-spacing: 0.01em;
}
.g-hero__eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--np-volt); }

/* Part badge — sequencing across the 2-document set */
.g-hero__part {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: rgba(244,241,234,0.08);
  border: 1px solid rgba(244,241,234,0.16);
  font-size: 12px; letter-spacing: 0.02em; color: rgba(244,241,234,0.8);
}
.g-hero__part b { color: var(--np-bone); font-weight: 500; }
.g-hero__part .pill {
  display: inline-flex; align-items: center;
  background: var(--np-volt); color: var(--np-deep);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em;
}

/* Read next — companion document handoff before footer */
.g-readnext {
  display: block;
  margin: 80px 0 0;
  padding: 28px 32px;
  border-radius: 20px;
  background: var(--np-deep);
  color: var(--np-bone);
  text-decoration: none;
  border: 1px solid rgba(244,241,234,0.14);
  transition: background var(--t-base) var(--ease-out);
}
.g-readnext:hover { background: var(--np-deep-700); opacity: 1; }
.g-readnext__kicker { font-size: 12px; letter-spacing: 0.02em; color: var(--np-volt); margin-bottom: 8px; }
.g-readnext__row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.g-readnext__title { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.g-readnext__arrow { font-size: 26px; color: var(--np-volt); flex-shrink: 0; }
.g-readnext__sub { font-size: 14px; line-height: 1.5; color: rgba(244,241,234,0.7); margin: 8px 0 0; max-width: 560px; }
@media (max-width: 600px) { .g-readnext__title { font-size: 20px; } }

.g-hero__title {
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 28px 0 0;
  text-wrap: balance;
  color: var(--np-bone);
}
.g-hero__title em { font-style: normal; color: var(--np-volt); }

.g-hero__tagline {
  margin-top: 36px;
  font-size: 16px;
  color: var(--np-volt);
  display: flex; gap: 8px 14px; flex-wrap: wrap;
}
.g-hero__tagline span { opacity: 0.85; }
.g-hero__tagline .sep { opacity: 0.3; }

.g-hero__lede {
  max-width: 720px;
  margin: 56px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(244,241,234,0.82);
}

/* ---------- Table of contents (left sidebar) ---------- */
.g-toc {
  position: sticky;
  top: 32px;
  align-self: start;
  font-size: 13px;
  border-top: 1px solid var(--line-1);
  padding-top: 20px;
}
.g-toc__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.g-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.g-toc li {
  counter-increment: toc;
  padding: 6px 0;
  display: flex; gap: 10px;
}
.g-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  flex-shrink: 0;
  padding-top: 2px;
}
.g-toc a {
  color: var(--fg-1);
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
}
.g-toc a:hover { opacity: 0.65; }
@media (max-width: 960px) {
  .g-toc { position: static; }
}

/* ---------- Article ---------- */
.g-article { max-width: 760px; min-width: 0; }

.g-section { padding: 72px 0 0; scroll-margin-top: 24px; }
.g-section:first-child { padding-top: 0; }

.g-num {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--np-volt);
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 16px;
  background: var(--np-deep);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.g-h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 0 0 28px;
  padding-bottom: 18px;
  color: var(--np-deep);
  text-wrap: balance;
  position: relative;
}
.g-h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 140px;
  height: 4px;
  border-radius: 999px;
  background: var(--np-deep);
}

.g-h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 36px 0 12px;
  color: var(--np-deep);
}

.g-p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 18px;
  color: var(--fg-1);
  text-wrap: pretty;
}
.g-p strong { font-weight: 600; }

.g-lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg-2);
  margin: 0 0 28px;
  font-weight: 400;
}

/* ---------- Lists ---------- */
.g-ul { list-style: none; padding: 0; margin: 0 0 18px; }
.g-ul li {
  position: relative;
  padding-left: 22px;
  padding-bottom: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-1);
}
.g-ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 10px; height: 1px;
  background: var(--np-deep);
  opacity: 0.4;
}
.g-ul li strong, .g-ul li b { font-weight: 600; color: var(--np-deep); }

/* ---------- Callout boxes ---------- */
.g-callout {
  border-radius: 16px;
  padding: 24px 26px;
  margin: 28px 0;
  font-size: 16px;
  line-height: 1.55;
}
.g-callout--bone { background: var(--np-bone); border: 1px solid var(--line-1); }
.g-callout--volt { background: var(--np-volt); color: var(--np-deep); }
.g-callout--deep { background: var(--np-deep); color: var(--np-bone); }
.g-callout__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: inherit;
  opacity: 0.6;
  margin-bottom: 6px;
}
.g-callout strong { font-weight: 600; }

/* ---------- Tables ---------- */
.g-table-wrap { margin: 22px 0 28px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--line-1); background: var(--np-paper); }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: var(--font-display); min-width: 560px; }
.g-table th, .g-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-1);
  vertical-align: top;
  line-height: 1.4;
}
.g-table th {
  font-weight: 500;
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.02em;
  background: var(--np-bone);
  border-bottom: 1px solid var(--line-2);
}
.g-table tbody tr:last-child td { border-bottom: 0; }
.g-table td.num { font-family: var(--font-mono); font-feature-settings: "tnum"; font-size: 13px; }
.g-table .ok { color: #2F7A4E; }
.g-table .warn { color: #B85A35; }
.g-table .trophy { color: var(--np-deep); font-weight: 600; }
.g-table tbody tr.deep td { background: var(--np-deep); color: var(--np-bone); }
.g-table tbody tr.deep + tr td { border-top: 1px solid var(--line-2); }

/* ---------- Compounds / tier cards ---------- */
.g-tier {
  border: 1px solid var(--line-1);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 14px 0;
  background: var(--np-paper);
}
.g-tier__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 6px;
}
.g-tier__name { font-size: 17px; font-weight: 500; letter-spacing: -0.005em; color: var(--np-deep); }
.g-tier__label { font-size: 12px; color: var(--fg-3); letter-spacing: 0.02em; }
.g-tier__lede { font-size: 14px; line-height: 1.5; color: var(--fg-2); margin: 0 0 12px; }
.g-tier__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 13px; color: var(--fg-1); }
.g-tier__list li { padding: 3px 0; }

/* ---------- FAQ ---------- */
.g-faq { display: grid; gap: 6px; margin-top: 22px; }
.g-faq__item {
  border-top: 1px solid var(--line-1);
  padding: 22px 0;
}
.g-faq__q { font-size: 18px; font-weight: 500; letter-spacing: -0.005em; margin: 0 0 10px; color: var(--np-deep); }
.g-faq__a { font-size: 15.5px; line-height: 1.55; color: var(--fg-1); margin: 0; }

/* ---------- Stats / month timeline ---------- */
.g-timeline { display: grid; gap: 0; margin: 8px 0 24px; }
.g-month {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line-1);
}
.g-month:last-child { border-bottom: 1px solid var(--line-1); }
.g-month__label { font-family: var(--font-mono); font-size: 12px; color: var(--np-deep-500); padding-top: 2px; letter-spacing: 0.02em; }
.g-month__copy { font-size: 15.5px; line-height: 1.55; color: var(--fg-1); }

/* ---------- Footer ---------- */
.g-footer {
  background: var(--np-deep);
  color: var(--np-bone);
  padding: 80px 0 56px;
  margin-top: 80px;
}
.g-footer__inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.g-footer__mark { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.g-footer__mark img { height: 28px; width: auto; }
.g-footer__tagline { margin-top: 12px; opacity: 0.75; font-size: 16px; }
.g-footer__safety { font-size: 13px; line-height: 1.55; color: rgba(244,241,234,0.65); max-width: 440px; }
.g-footer__safety strong { color: var(--np-bone); font-weight: 500; }
.g-footer__bottom { max-width: 1280px; margin: 64px auto 0; padding: 24px 28px 0; border-top: 1px solid rgba(244,241,234,0.12); font-size: 12px; color: rgba(244,241,234,0.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 700px) {
  .g-footer__inner { grid-template-columns: 1fr; }
  .g-tier__list { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */
@media print {
  body { background: white; }
  .g-toc, .g-hero__lang { display: none; }
  .g-grid { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .g-hero, .g-footer { background: #0E343B !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .g-section { page-break-inside: avoid; padding-top: 40px; }
  .g-table-wrap { page-break-inside: avoid; }
  .c-pep { page-break-inside: avoid; break-inside: avoid; }
}

/* ============================================================
   CODEX — peptide reference cards
   ============================================================ */
.c-catnav {
  position: sticky;
  top: 32px;
  align-self: start;
  border-top: 1px solid var(--line-1);
  padding-top: 20px;
}
.c-catnav__label { font-size: 12px; letter-spacing: 0.04em; color: var(--fg-3); margin-bottom: 14px; }
.c-catnav ul { list-style: none; padding: 0; margin: 0; }
.c-catnav li { padding: 5px 0; }
.c-catnav a { color: var(--fg-1); font-size: 13px; line-height: 1.35; display: flex; justify-content: space-between; gap: 8px; }
.c-catnav a:hover { opacity: 0.65; }
.c-catnav .n { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
@media (max-width: 960px) { .c-catnav { position: static; } }

.c-catsection { padding: 64px 0 0; scroll-margin-top: 24px; }
.c-catsection:first-child { padding-top: 8px; }

.c-cathead { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--np-deep); }
.c-cathead__num {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  color: var(--np-volt); background: var(--np-deep);
  padding: 5px 12px; border-radius: 999px;
}
.c-cathead__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; color: var(--np-deep); margin: 0; }
.c-cathead__count { margin-left: auto; font-size: 13px; color: var(--fg-3); font-family: var(--font-mono); }

.c-peps { display: flex; flex-direction: column; gap: 14px; }

.c-pep {
  border: 1px solid var(--line-1);
  border-radius: 16px;
  background: var(--np-paper);
  overflow: hidden;
}
.c-pep__top { padding: 18px 22px 16px; }
.c-pep__name-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; row-gap: 6px; }
.c-pep__name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--np-deep); white-space: nowrap; }
.c-pep__tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--np-deep-700); background: var(--np-deep-100);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.c-pep__benefit { font-size: 14.5px; line-height: 1.5; color: var(--fg-2); margin: 8px 0 0; }
.c-pep__plain {
  font-size: 13px; line-height: 1.5; color: var(--np-deep);
  margin: 8px 0 0; padding: 9px 12px;
  background: rgba(233,254,83,0.16); border-radius: 8px;
  border-left: 2px solid var(--np-volt);
}
.c-pep__plain b { font-weight: 600; letter-spacing: 0.01em; text-transform: uppercase; font-size: 10px; color: #6b7a00; display: block; margin-bottom: 2px; }

.c-pep__specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-1);
  background: var(--np-bone);
}
.c-spec { padding: 12px 16px; border-right: 1px solid var(--line-1); }
.c-spec:last-child { border-right: 0; }
.c-spec__label { font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.c-spec__value { font-size: 13px; line-height: 1.4; color: var(--np-deep); font-family: var(--font-mono); }

.c-pep__plain {
  display: block;
  font-style: italic;
  font-size: 13.5px;
  color: var(--fg-3);
  margin-top: 5px;
  line-height: 1.5;
  font-weight: 400;
}
.c-pep__notes {
  padding: 12px 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
  border-top: 1px solid var(--line-1);
  display: flex;
  gap: 8px;
}
.c-pep__notes b { color: var(--np-deep); font-weight: 500; font-family: var(--font-display); flex-shrink: 0; }
.c-pep__notes.is-warn { background: rgba(199, 85, 61, 0.06); }
.c-pep__notes.is-warn b { color: #B23B22; }

@media (max-width: 700px) {
  .c-pep__specs { grid-template-columns: repeat(2, 1fr); }
  .c-spec:nth-child(2) { border-right: 0; }
  .c-spec:nth-child(1), .c-spec:nth-child(2) { border-bottom: 1px solid var(--line-1); }
}

/* Reference intro blocks shown above the catalog */
.c-refgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 28px; }
.c-refcard {
  border: 1px solid var(--line-1); border-radius: 16px; padding: 20px 22px; background: var(--np-paper);
}
.c-refcard h4 { font-size: 15px; font-weight: 600; color: var(--np-deep); margin: 0 0 10px; }
.c-refcard p, .c-refcard li { font-size: 13.5px; line-height: 1.55; color: var(--fg-2); margin: 0 0 8px; }
.c-refcard ul { padding-left: 18px; margin: 0; }
.c-refcard code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; color: var(--np-deep); }
@media (max-width: 700px) { .c-refgrid { grid-template-columns: 1fr; } }

.c-pillrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 28px; }
.c-pillrow .np-chip,
.c-pillrow span {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--np-bone); color: var(--np-deep);
  border: 1px solid var(--line-1);
}
