/* ============================================================
   PEPTIDE PIGEON — "Carrier Dispatch" design system
   Palette: slate ink on cool paper, pigeon-neck iridescence accent
   ============================================================ */
:root {
  --paper: #f6f7f5;
  --paper-raised: #ffffff;
  --ink: #20262e;
  --ink-soft: #545e6a;
  --line: #d8dcd9;
  --iris-teal: #0e7c6b;
  --iris-violet: #5b4fc7;
  --iris-grad: linear-gradient(100deg, #0e7c6b 0%, #3b6fae 55%, #5b4fc7 100%);
  --stamp-bg: #eef1ee;
  --radius: 10px;
  --w: 1080px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }

a { color: var(--iris-teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--iris-violet); }
:focus-visible { outline: 2px solid var(--iris-violet); outline-offset: 3px; border-radius: 2px; }

/* ---------- top ribbon ---------- */
.ribbon {
  background: var(--ink);
  color: #eef1ee;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 0;
}
.ribbon .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ribbon b { color: #9ee8d6; font-weight: 600; }
.ribbon a { color: #cfd6d1; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--iris-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
}
nav.main { display: flex; gap: 26px; font-size: 15px; }
nav.main a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { nav.main { gap: 16px; font-size: 14px; } }

/* ---------- eyebrow / headings ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--iris-teal); font-weight: 500;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.06; letter-spacing: -0.02em; font-weight: 700;
  margin: 14px 0 18px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 33px);
  line-height: 1.15; letter-spacing: -0.015em; font-weight: 650;
  margin: 0 0 16px;
}
h3 { font-family: var(--font-display); font-size: 20px; font-weight: 650; margin-bottom: 8px; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 62ch; }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
p + p { margin-top: 14px; }
.prose { max-width: 70ch; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 14px 22px; }
.prose li { margin-bottom: 6px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- THE STAMP (signature element) ---------- */
.stamp {
  position: relative;
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  box-shadow: 0 1px 2px rgba(32,38,46,0.06), 0 12px 32px rgba(32,38,46,0.09);
  /* perforated edge */
  --perf: radial-gradient(circle 5px at 5px 50%, var(--paper) 98%, transparent) ;
}
.stamp::before, .stamp::after {
  content: ""; position: absolute; top: 10px; bottom: 10px; width: 10px;
}
.stamp::before {
  left: -5px;
  background-image: radial-gradient(circle 5px at 5px 12px, var(--paper) 98%, transparent);
  background-size: 10px 24px; background-repeat: repeat-y;
}
.stamp::after {
  right: -5px;
  background-image: radial-gradient(circle 5px at 5px 12px, var(--paper) 98%, transparent);
  background-size: 10px 24px; background-repeat: repeat-y;
}
.stamp .postmark {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px;
}
.stamp .postmark b { color: var(--iris-teal); }
.stamp .code-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--stamp-bg); border: 1px dashed #b9c1ba; border-radius: 8px;
  padding: 16px 18px;
}
.stamp .code {
  font-family: var(--font-mono); font-size: clamp(30px, 5vw, 42px);
  font-weight: 600; letter-spacing: 0.08em;
  background: var(--iris-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.copy-btn {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  padding: 12px 20px; border-radius: 7px;
  transition: background 0.18s ease, transform 0.12s ease;
}
.copy-btn:hover { background: #10151b; transform: translateY(-1px); }
.copy-btn.copied { background: var(--iris-teal); }
.stamp .fine {
  margin-top: 14px; font-size: 13.5px; color: var(--ink-soft);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.stamp .fine .live { color: var(--iris-teal); font-weight: 600; }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 13px 26px; border-radius: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { color: #fff; box-shadow: 0 6px 18px rgba(32,38,46,0.22); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--paper-raised); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.card .k {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--iris-violet); display: block; margin-bottom: 10px;
}
.card p { font-size: 15.5px; color: var(--ink-soft); }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step {
  counter-increment: step;
  background: var(--paper-raised); padding: 24px 26px 24px 78px; position: relative;
}
.step + .step { border-top: 1px solid var(--line); }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 26px; top: 26px;
  font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--iris-teal);
}
.step p { font-size: 15.5px; color: var(--ink-soft); }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15.5px; }
.tbl th, .tbl td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); background: var(--stamp-bg); }
.tbl tr:last-child td { border-bottom: none; }
.tbl td b { font-family: var(--font-mono); }
.tbl-scroll { overflow-x: auto; border-radius: var(--radius); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16.5px;
  font-family: var(--font-display); list-style: none; position: relative; padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 14px;
  font-family: var(--font-mono); font-size: 22px; color: var(--iris-teal);
}
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 22px 20px; color: var(--ink-soft); font-size: 15.5px; }
.faq .a p { margin-bottom: 10px; }

/* ---------- callout ---------- */
.callout {
  border-left: 3px solid; border-image: var(--iris-grad) 1;
  background: var(--paper-raised); padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 15.5px; color: var(--ink-soft);
}

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line); padding: 48px 0 40px;
  font-size: 14px; color: var(--ink-soft);
}
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
@media (max-width: 720px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; color: var(--ink); }
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 8px; }
footer.site a { color: var(--ink-soft); }
.disclaimer { font-size: 13px; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- sticky mobile code bar ---------- */
.code-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 14px;
}
.code-bar b { color: #9ee8d6; letter-spacing: 0.08em; }
.code-bar button {
  background: var(--iris-grad); border: none; color: #fff; font-family: var(--font-mono);
  font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 6px; cursor: pointer;
}
@media (max-width: 720px) { .code-bar { display: flex; } body { padding-bottom: 58px; } }

/* ---------- misc ---------- */
.toc { font-size: 15px; }
.toc a { display: block; padding: 6px 0; color: var(--ink-soft); text-decoration: none; border-bottom: 1px dashed var(--line); }
.toc a:hover { color: var(--iris-teal); }
.updated { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  color: var(--ink-soft); margin: 0 6px 8px 0; background: var(--paper-raised);
}

/* ============================================================
   ADDITIONS: calculator, catalog, comparison
   ============================================================ */

/* ---------- calculator ---------- */
.calc {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: 0 12px 32px rgba(32,38,46,0.07);
}
.calc .seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 22px;
}
.calc .seg button {
  border: none; background: var(--paper); color: var(--ink-soft); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; padding: 9px 16px;
}
.calc .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field .inp { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); overflow: hidden; }
.field .inp span { padding: 0 12px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 14px; background: var(--stamp-bg); align-self: stretch; display: flex; align-items: center; border-right: 1px solid var(--line); }
.field .inp input, .field .inp select { border: none; outline: none; background: transparent; padding: 12px 14px; font-size: 16px; font-family: var(--font-body); width: 100%; color: var(--ink); }
.calc-out {
  margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 20px;
}
.calc-out .row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.calc-out .row .lab { color: var(--ink-soft); font-size: 15px; }
.calc-out .row .val { font-family: var(--font-mono); font-weight: 600; font-size: 18px; }
.calc-out .big { font-size: 15px; }
.calc-out .big .val { font-size: 30px; background: var(--iris-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc-note { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }

/* ---------- catalog ---------- */
.cat-controls { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 28px; align-items: center; }
.cat-search { flex: 1; min-width: 220px; }
.cat-search input {
  width: 100%; padding: 13px 16px; font-size: 15px; font-family: var(--font-body);
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper-raised); color: var(--ink);
}
.cat-count { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.cat-group { margin-bottom: 40px; }
.cat-group h3 {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--iris-violet); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px;
}
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 880px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-item {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.cat-item:hover { border-color: var(--iris-teal); transform: translateY(-1px); color: inherit; }
.cat-item .nm { font-family: var(--font-display); font-weight: 650; font-size: 16px; }
.cat-item .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.02em; }
.cat-item .price { font-family: var(--font-mono); font-size: 12.5px; color: var(--iris-teal); font-weight: 600; }
.cat-item.soon { opacity: 0.55; }
.cat-item.soon .price { color: var(--ink-soft); }
.cat-empty { display: none; color: var(--ink-soft); font-style: italic; padding: 20px 0; }

/* ---------- comparison emphasis ---------- */
.cmp td.yes { color: var(--iris-teal); font-weight: 600; }
.cmp td.no { color: #b1483f; }
.cmp .col-hi { background: rgba(14,124,107,0.05); }
.cmp th.col-hi { background: rgba(14,124,107,0.12); }

/* ---------- newsletter ---------- */
.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 460px; margin-top: 18px; }
.signup input {
  flex: 1; min-width: 200px; padding: 13px 16px; font-size: 15px; font-family: var(--font-body);
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper-raised); color: var(--ink);
}

/* ---------- research library ---------- */
.lib-note {
  border-left: 3px solid; border-image: var(--iris-grad) 1;
  background: var(--paper-raised); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px; color: var(--ink-soft); margin-bottom: 8px;
}
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 820px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-card {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.lib-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.lib-head h3 { margin: 0; font-size: 21px; }
.lib-aka { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.lib-class {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--iris-violet); margin-bottom: 12px;
}
.lib-summary { font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.lib-reg { font-size: 13.5px; color: var(--ink-soft); background: var(--stamp-bg); border-radius: 8px; padding: 12px 14px; margin: 0; }
.lib-reg-label {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--iris-teal); margin-bottom: 4px;
}

/* ---------- handbook cross-sell module ---------- */
.handbook-cta {
  background: var(--ink); color: #eef1ee; border-radius: var(--radius);
  padding: 34px 34px; display: grid; grid-template-columns: 150px 1fr; gap: 30px; align-items: center;
  box-shadow: 0 16px 40px rgba(32,38,46,0.16);
}
@media (max-width: 680px) { .handbook-cta { grid-template-columns: 1fr; gap: 22px; text-align: center; } }
.handbook-cta .cover {
  aspect-ratio: 3 / 4; border-radius: 6px; background: #0c0f13; border: 1px solid #2a323c;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; text-align: center; margin: 0 auto; width: 100%; max-width: 150px;
}
.handbook-cta .cover .kick { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.18em; color: #c9a94e; }
.handbook-cta .cover .ttl { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1; color: #d8b45a; }
.handbook-cta .cover .rule { width: 40px; height: 1px; background: #6b5a2e; }
.handbook-cta .cover .ed { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.14em; color: #8b93a0; }
.handbook-cta h2 { color: #fff; margin-bottom: 8px; }
.handbook-cta .eyebrow { color: #9ee8d6; }
.handbook-cta p { color: #c1c8cf; font-size: 15.5px; margin-bottom: 8px; }
.handbook-cta .feat { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 14px 0 18px; }
@media (max-width: 680px) { .handbook-cta .feat { justify-content: center; } }
.handbook-cta .feat span {
  font-family: var(--font-mono); font-size: 11.5px; color: #cfd6d1;
  border: 1px solid #2f3742; border-radius: 999px; padding: 4px 11px;
}
.handbook-cta .btn-etsy {
  display: inline-block; background: var(--iris-grad); color: #fff; font-weight: 650; font-size: 16px;
  text-decoration: none; padding: 13px 26px; border-radius: 8px; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.handbook-cta .btn-etsy:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(91,79,199,0.3); color: #fff; }
.handbook-cta .microcopy { font-size: 12.5px; color: #8b93a0; margin: 10px 0 0; }
.handbook-cta a.plain { color: #9ee8d6; }
