/* ============================================================================
   PEPTIDE PIE — global styles
   Design language: clinical clarity + warm, human. Deep teal + amber accents.
   ==========================================================================*/

:root {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #eef2f2;
  --ink: #16302f;
  --ink-soft: #4a5f5e;
  --muted: #7d8f8e;
  --line: #dde5e4;
  --brand: #0f766e;         /* deep teal */
  --brand-dark: #0b5c55;
  --brand-soft: #d7ece9;
  --amber: #d97706;
  --amber-soft: #fdefdb;
  --danger: #b91c1c;
  --danger-soft: #fbe4e4;
  --good: #15803d;
  --good-soft: #dcefe0;
  --shadow: 0 1px 2px rgba(16,48,47,.06), 0 8px 24px rgba(16,48,47,.06);
  --shadow-lg: 0 20px 50px rgba(16,48,47,.14);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Georgia", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1717;
    --surface: #152121;
    --surface-2: #1c2b2a;
    --ink: #e8f0ef;
    --ink-soft: #b3c4c2;
    --muted: #7f9593;
    --line: #263736;
    --brand: #2dd4bf;
    --brand-dark: #14b8a6;
    --brand-soft: #123634;
    --amber: #fbbf24;
    --amber-soft: #33291140;
    --danger: #f87171;
    --danger-soft: #3a1a1a;
    --good: #4ade80;
    --good-soft: #14321f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .74rem;
  font-weight: 700; color: var(--brand); margin-bottom: .6rem;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 44ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: 999px; font-weight: 600;
  font-size: .96rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { filter: brightness(.95); color:#fff; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800;
  font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; color: #fff; font-weight: 900;
}
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .93rem;
  padding: .5rem .8rem; border-radius: 8px;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.5rem; color: var(--ink); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem; }
}

/* ---------- Disclaimer banner ---------- */
.disclaimer-bar {
  background: var(--amber-soft); color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: .82rem; text-align: center; padding: .5rem 20px;
}
.disclaimer-bar strong { color: var(--amber); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 60px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 80% 10%, var(--brand-soft), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, var(--amber-soft), transparent 55%);
  opacity: .8;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 span { color: var(--brand); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-lg);
}
.hero-card h3 { font-size: 1rem; }
.stat-row { display: flex; gap: 18px; margin-top: 1.4rem; flex-wrap: wrap; }
.stat { }
.stat b { display: block; font-size: 1.7rem; color: var(--brand); letter-spacing: -.02em; }
.stat span { font-size: .82rem; color: var(--muted); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3,.grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft); }
.card .icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; margin-bottom: .9rem;
}

/* ---------- Feature strip ---------- */
.feature-tiles { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
@media (max-width:900px){ .feature-tiles{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .feature-tiles{ grid-template-columns:1fr;} }

/* ---------- Story blocks ---------- */
.story {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  padding: 40px 0;
}
.story:nth-child(even) .story-text { order: 2; }
@media (max-width: 760px){ .story { grid-template-columns: 1fr; gap: 20px; }
  .story:nth-child(even) .story-text { order: 0; } }
.story-visual {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); min-height: 180px;
  display: grid; place-items: center; font-size: 3rem;
  background-image: radial-gradient(circle at 30% 20%, var(--brand-soft), transparent 60%);
}

/* ---------- Catalog ---------- */
.catalog-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 26px;
}
.search-input, .select {
  padding: .7rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: .95rem; font-family: inherit;
}
.search-input { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: .85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.pep-card { display: flex; flex-direction: column; height: 100%; cursor: pointer; }
.pep-card .cat-tag-row { margin-bottom: .7rem; }
.pep-card .cat-tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand); background: var(--brand-soft); padding: .25rem .6rem;
  border-radius: 6px;
}
.pep-card h3 { font-size: 1.22rem; margin-bottom: .3rem; }
.pep-card .aka { font-size: .8rem; color: var(--muted); margin-bottom: .7rem; }
.pep-card .tagline { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.pep-card .pep-foot { display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .84rem; }

/* ---------- Detail modal / page ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,20,20,.55); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow-y: auto; backdrop-filter: blur(3px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 18px; max-width: 820px; width: 100%;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 26px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface); border-radius: 18px 18px 0 0; z-index: 2;
}
.modal-head .close {
  position: absolute; top: 20px; right: 22px; background: var(--surface-2);
  border: 0; width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  font-size: 1.2rem; color: var(--ink); line-height: 1;
}
.modal-body { padding: 24px 28px 30px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 620px){ .detail-grid { grid-template-columns: 1fr; } }
.effects-box { border-radius: 12px; padding: 16px 18px; }
.effects-box.good { background: var(--good-soft); }
.effects-box.bad { background: var(--danger-soft); }
.effects-box h4 { display:flex; align-items:center; gap:.4rem; font-size:.95rem; }
.effects-box.good h4 { color: var(--good); }
.effects-box.bad h4 { color: var(--danger); }
.effects-box ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.effects-box li { margin-bottom: .35rem; font-size: .9rem; color: var(--ink-soft); }

.spec-table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.spec-table td { padding: .55rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
.spec-table td:first-child { color: var(--muted); width: 38%; font-weight: 600; }

.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--surface-2); color: var(--ink-soft); padding: .3rem .7rem;
  border-radius: 999px; font-size: .82rem; font-weight: 600; }
.res-link { display: flex; align-items:center; gap:.5rem; padding:.6rem .8rem; border:1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; font-size:.9rem; background: var(--surface-2); }
.res-link:hover { border-color: var(--brand); text-decoration: none; }

.mini-note {
  background: var(--amber-soft); border-left: 3px solid var(--amber);
  padding: .8rem 1rem; border-radius: 8px; font-size: .85rem; color: var(--ink-soft); margin-top: 10px;
}

/* ---------- Tables (pricing) ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 640px; }
table.data th, table.data td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.data th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--surface-2); }
.price { font-weight: 700; color: var(--ink); }
.badge { display:inline-block; padding:.2rem .55rem; border-radius:6px; font-size:.74rem; font-weight:700; }
.badge.in { background: var(--good-soft); color: var(--good); }
.badge.low { background: var(--amber-soft); color: var(--amber); }
.badge.out { background: var(--danger-soft); color: var(--danger); }
.badge.best { background: var(--brand-soft); color: var(--brand); }

/* ---------- Calculator ---------- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 780px){ .calc-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.input, .field input, .field select {
  width: 100%; padding: .75rem .9rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1rem; font-family: inherit;
}
.input:focus, .field input:focus, .field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.size-select { width: auto; padding: .4rem .6rem; font-size: .88rem; min-width: 130px; }
.result-panel { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg); }
.result-panel h3 { color:#fff; }
.result-big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; margin: .2rem 0; }
.result-panel .sub { opacity: .85; font-size: .9rem; }
.result-row { display:flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.18); font-size: .95rem; }
.result-row:last-child { border-bottom: 0; }
.syringe-wrap { margin-top: 18px; }
.syringe {
  height: 40px; border: 2px solid rgba(255,255,255,.6); border-radius: 8px;
  position: relative; overflow: hidden; background: rgba(255,255,255,.12);
}
.syringe .fill { position:absolute; left:0; top:0; bottom:0; background: rgba(255,255,255,.85); transition: width .3s ease; }
.syringe .ticks { position:absolute; inset:0; display:flex; }
.syringe .ticks span { flex:1; border-right: 1px solid rgba(255,255,255,.3); }

/* ---------- Tracker ---------- */
.tracker-layout { display: grid; grid-template-columns: 330px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px){ .tracker-layout { grid-template-columns: 1fr; } }
.protocol-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px;
  background: var(--surface);
}
.protocol-item h4 { font-size: 1rem; margin-bottom: .2rem; }
.protocol-item .meta { font-size: .82rem; color: var(--muted); }
.protocol-item .row { display:flex; justify-content: space-between; align-items:center; gap:8px; }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; }

.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cal-head { display:flex; justify-content: space-between; align-items:center; margin-bottom: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align:center; font-size:.72rem; font-weight:700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-cell {
  aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 9px; padding: 5px;
  font-size: .8rem; position: relative; cursor: pointer; background: var(--surface);
  display: flex; flex-direction: column;
}
.cal-cell:hover { border-color: var(--brand); }
.cal-cell.empty { border: 0; background: transparent; cursor: default; }
.cal-cell.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cal-cell .daynum { font-weight: 600; color: var(--ink-soft); }
.cal-cell .marks { display:flex; flex-wrap: wrap; gap: 2px; margin-top: auto; }
.cal-cell .mk { width: 7px; height: 7px; border-radius: 50%; }
.mk.done { background: var(--good); }
.mk.due { background: var(--amber); }
.mk.missed { background: var(--danger); }

.day-panel { margin-top: 18px; }
.log-item { display:flex; align-items:center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border:1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.log-item.done { background: var(--good-soft); border-color: transparent; }
.check-btn { background: var(--surface-2); border:1px solid var(--line); border-radius: 8px; padding:.35rem .7rem;
  cursor:pointer; font-size:.82rem; font-weight:600; color: var(--ink); }
.check-btn.done { background: var(--good); color:#fff; border-color: transparent; }

/* ---------- Affiliate cards ---------- */
.aff-card { display:flex; flex-direction: column; height:100%; }
.aff-card .aff-head { display:flex; align-items:center; gap:12px; margin-bottom:.6rem; }
.aff-logo { width:46px; height:46px; border-radius:12px; background: linear-gradient(135deg,var(--brand-soft),var(--amber-soft));
  display:grid; place-items:center; font-weight:800; color: var(--brand); font-size:1.1rem; }
.aff-card ul { padding-left: 1.1rem; margin:.4rem 0 1rem; font-size:.9rem; color: var(--ink-soft); }
.aff-card li { margin-bottom: .3rem; }
.rating { color: var(--amber); font-size: .9rem; letter-spacing: 1px; }

/* ---------- Callout / disclaimer boxes ---------- */
.callout {
  border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow);
}
.callout.warn { background: var(--amber-soft); border-color: transparent; }
.callout.warn h3 { color: var(--amber); }
.callout h3 { display:flex; align-items:center; gap:.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 60px; padding: 46px 0 30px; }
.footer-grid { display:grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-grid a { display:block; color: var(--ink-soft); font-size: .9rem; padding: .2rem 0; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px;
  font-size: .8rem; color: var(--muted); }

/* ---------- Utility ---------- */
.tag-row { display:flex; gap:8px; flex-wrap:wrap; margin: 6px 0; }
.hr { height:1px; background: var(--line); border:0; margin: 22px 0; }
.hidden { display: none !important; }
.text-amber { color: var(--amber); }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.flex{display:flex}.between{justify-content:space-between}.items-center{align-items:center}.gap{gap:12px}.wrap-flex{flex-wrap:wrap}

/* ---- Accounts + watchlist ---- */
.account-box { margin-left: 8px; }
.account-btn { white-space: nowrap; }
.pep-card { position: relative; }
.pep-star {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: transparent; border: none; cursor: pointer;
  font-size: 1.15rem; line-height: 1; padding: 4px 6px;
  color: var(--line); transition: color .15s, transform .15s;
}
.pep-star:hover { color: var(--amber); transform: scale(1.2); }
.pep-star.on { color: var(--amber); }
