/* =========================================================
   Peptós.LIFE, Peptide cards + detail drawer
   Used on the FDA Peptide Tracker page and Knowledge Hub.
   Class prefix: pep-
   ========================================================= */

/* ---------- Compact card on the tracker grid ---------- */
.pep-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 24px 22px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  text-align: left;
  transition: border-color 220ms, transform 220ms, background-color 220ms;
  outline: none;
  min-height: 280px;
}
.pep-card:hover, .pep-card:focus-visible {
  border-color: rgba(127,183,255,0.5);
  background: rgba(46,114,255,0.05);
  transform: translateY(-2px);
}
.pep-card:focus-visible { box-shadow: 0 0 0 3px rgba(46,114,255,0.4); }

.pep-card--legal     { box-shadow: inset 3px 0 0 var(--status-legal); }
.pep-card--pcac      { box-shadow: inset 3px 0 0 var(--accent); }
.pep-card--not-legal { box-shadow: inset 3px 0 0 var(--status-not-legal); }
.pep-card--legal:hover, .pep-card--legal:focus-visible         { box-shadow: inset 3px 0 0 var(--status-legal), 0 0 0 3px rgba(46,114,255,0.0); }

.pep-card__top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px;
}
.pep-card__grade {
  display: inline-flex; align-items: baseline; gap: 6px;
  flex-shrink: 0;
}
.pep-card__grade-letter {
  font-family: var(--font-heading); font-weight: 200;
  font-size: 30px; line-height: 1;
  color: var(--n-glow-100);
  text-shadow: 0 0 12px rgba(46,114,255,0.5);
  letter-spacing: -0.025em;
}
.pep-card__grade-lbl {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(220,238,255,0.5);
}
.pep-card__name {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 22px; line-height: 1.15;
  letter-spacing: -0.012em;
  color: #fff;
  margin: 0 0 4px;
}
.pep-card__class {
  font-family: var(--font-body); font-weight: 300;
  font-size: 12px;
  color: rgba(220,238,255,0.55);
  margin-bottom: 14px;
}
.pep-card__summary {
  font-family: var(--font-body); font-weight: 300;
  font-size: 14px; line-height: 1.6;
  color: rgba(220,238,255,0.78);
  margin: 0 0 16px;
  flex: 1;
}
.pep-card__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}
.pep-card__verdict {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}
.pep-card__verdict-dot {
  width: 8px; height: 8px; border-radius: 999px;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}
.pep-card__more {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--n-glow-300);
}
.pep-card:hover .pep-card__more,
.pep-card:focus-visible .pep-card__more { color: #fff; }

/* ---------- Drawer overlay ---------- */
.pep-drawer {
  position: fixed; inset: 0; z-index: 200;
  display: flex; justify-content: flex-end;
}
.pep-drawer__veil {
  position: absolute; inset: 0;
  background: rgba(1, 9, 29, 0.7);
  backdrop-filter: blur(6px);
  animation: pep-fade-in 220ms ease-out;
}
@keyframes pep-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pep-drawer__panel {
  position: relative; z-index: 1;
  width: min(720px, 100vw);
  height: 100vh;
  background: var(--n-cosmos);
  border-left: 1px solid rgba(255,255,255,0.12);
  overflow-y: auto;
  overflow-x: hidden;
  animation: pep-slide-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pep-slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.pep-drawer__panel::before {
  /* Vertical status accent strip */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  z-index: 2;
}
.pep-drawer__panel--legal::before     { background: var(--status-legal); box-shadow: 0 0 14px rgba(79,181,138,0.55); }
.pep-drawer__panel--pcac::before      { background: var(--accent); box-shadow: 0 0 14px rgba(46,114,255,0.55); }
.pep-drawer__panel--not-legal::before { background: var(--status-not-legal); box-shadow: 0 0 14px rgba(226,106,106,0.5); }

.pep-drawer__close {
  position: absolute; top: 22px; right: 22px;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(220,238,255,0.75);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 200ms;
  z-index: 10;
}
.pep-drawer__close:hover { color: #fff; background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.32); }

/* ----- Drawer hero ----- */
.pep-drawer__hero {
  padding: 48px 56px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pep-drawer__pills {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 24px;
}
.pep-drawer__chip {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(220,238,255,0.62);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 4px 10px;
  border-radius: 999px;
}
.pep-drawer__verdict {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
}
.pep-drawer__name {
  font-family: var(--font-heading); font-weight: 300;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.04; letter-spacing: -0.022em;
  color: #fff;
  margin: 0;
}
.pep-drawer__aliases {
  font-family: var(--font-body); font-weight: 300;
  font-size: 14px;
  color: rgba(220,238,255,0.55);
  margin-top: 6px;
}
.pep-drawer__verdict-line {
  font-family: var(--font-body); font-weight: 300;
  font-size: 16px; line-height: 1.55;
  color: rgba(220,238,255,0.78);
  margin-top: 18px;
  max-width: 540px;
}

/* ----- Drawer sections ----- */
.pep-drawer__sec {
  padding: 32px 56px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pep-eyebrow {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--n-glow-200);
  margin-bottom: 14px;
}
.pep-drawer__summary {
  font-family: var(--font-heading); font-weight: 300;
  font-size: 22px; line-height: 1.4;
  letter-spacing: -0.008em;
  color: #fff;
  margin: 0 0 32px;
  max-width: 580px;
}

/* Two-up: what it does / does NOT do */
.pep-twoup {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 28px;
}
.pep-twoup__col {
  padding: 20px 22px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.025);
}
.pep-twoup__col--pro { border-left: 2px solid var(--status-legal); }
.pep-twoup__col--con { border-left: 2px solid var(--status-not-legal); }
.pep-twoup__lbl {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 10px;
}
.pep-twoup__col--pro .pep-twoup__lbl { color: var(--status-legal); }
.pep-twoup__col--con .pep-twoup__lbl { color: var(--status-not-legal); }
.pep-twoup__col--con .pep-twoup__lbl em { font-style: italic; }
.pep-twoup__body {
  font-family: var(--font-body); font-weight: 300;
  font-size: 14px; line-height: 1.6;
  color: rgba(220,238,255,0.80);
}

/* Quick-facts grid */
.pep-quick {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}
.pep-qf {
  padding: 16px 18px 16px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pep-qf:nth-child(3n) { border-right: 0; }
.pep-qf:nth-last-child(-n+3) { border-bottom: 0; }
.pep-qf__lbl {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(220,238,255,0.5);
  margin-bottom: 4px;
}
.pep-qf__val {
  font-family: var(--font-body); font-weight: 400;
  font-size: 13.5px; line-height: 1.5;
  color: #fff;
}

/* ----- Reveal blocks (L3 / L4) ----- */
.pep-reveal {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.pep-reveal__head {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 56px;
  text-align: left;
  transition: background 200ms;
}
.pep-reveal__head:hover { background: rgba(46,114,255,0.04); }
.pep-reveal__t {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 16px; letter-spacing: -0.005em;
  color: #fff;
}
.pep-reveal__sub {
  font-family: var(--font-body); font-weight: 300;
  font-size: 13px; line-height: 1.5;
  color: rgba(220,238,255,0.55);
  margin-top: 4px;
}
.pep-reveal__caret {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--n-glow-200);
  transition: transform 240ms;
  flex-shrink: 0;
}
.pep-reveal.is-open .pep-reveal__caret { transform: rotate(180deg); }
.pep-reveal__body { padding: 0 56px 32px; }

.pep-prose p {
  font-family: var(--font-body); font-weight: 300;
  font-size: 15px; line-height: 1.7;
  color: rgba(220,238,255,0.78);
  margin: 0 0 16px;
}
.pep-unknown {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 6px;
  border: 1px solid rgba(127,183,255,0.32);
  background: rgba(46,114,255,0.08);
}
.pep-unknown__lbl {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--n-glow-200);
  margin-bottom: 8px;
}
.pep-unknown__body {
  font-family: var(--font-body); font-weight: 300;
  font-size: 14px; line-height: 1.6;
  color: rgba(220,238,255,0.85);
}

/* Clinician 24-row table */
.pep-clin {
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.pep-clin__row {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pep-clin__row dt {
  font-family: var(--font-heading); font-weight: 500;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(220,238,255,0.55);
}
.pep-clin__row dd {
  margin: 0;
  font-family: var(--font-body); font-weight: 300;
  font-size: 14px; line-height: 1.6;
  color: rgba(220,238,255,0.85);
}

/* Drawer foot */
.pep-drawer__foot {
  padding: 32px 56px 56px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.pep-drawer__sources-body {
  font-family: var(--font-body); font-weight: 300;
  font-size: 13px; line-height: 1.65;
  color: rgba(220,238,255,0.7);
  margin-bottom: 22px;
}
.pep-drawer__disclaimer {
  font-family: var(--font-body); font-weight: 300;
  font-size: 11px;
  color: rgba(220,238,255,0.42);
  font-style: italic;
}

/* ----- Responsive ----- */
@media (max-width: 720px) {
  .pep-drawer__panel { width: 100vw; }
  .pep-drawer__hero,
  .pep-drawer__sec,
  .pep-reveal__head,
  .pep-reveal__body,
  .pep-drawer__foot { padding-left: 24px; padding-right: 24px; }
  .pep-twoup { grid-template-columns: 1fr; }
  .pep-quick { grid-template-columns: 1fr 1fr; }
  .pep-qf:nth-child(3n) { border-right: 1px solid rgba(255,255,255,0.06); }
  .pep-qf:nth-child(2n) { border-right: 0; }
  .pep-clin__row { grid-template-columns: 1fr; gap: 6px; }
}
