/* Peptico side menu, tier 6 — the Code Snippets off-canvas menu restyled.
   Layers over the snippet's markup (never edited); menu-v6.js adds the card, groups,
   icons, chips, foot and physics. Every rule sits under body.pp-menu-v6 so it outranks
   the snippet's single-class rules; !important only where the snippet uses it (colours). */

body.pp-menu-v6 .peptico-mobile-side-menu {
  --ink: #111111; --ink-2: #2b2b2b; --muted: #5f5f58; --faint: #8a8a83;
  --paper: #f7f6f2; --white: #ffffff; --line: rgba(17, 17, 17, 0.08); --line-strong: rgba(17, 17, 17, 0.16);
  --green: #004f42;
  --sage: #dfe7d9; --mint: #e6f0ed; --rose: #f0dfdb; --tan: #eee6d8; --lavender: #e3e4f4; --olive: #e7ebc9;
  --font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sheet: rgba(247, 246, 242, 0.9);
  background: transparent;                   /* the snippet paints the whole viewport white */
  transition: none;
}
body.pp-menu-v6 .peptico-mobile-side-menu,
body.pp-menu-v6 .peptico-mobile-side-menu * { font-family: var(--font); }
body.pp-menu-v6 .peptico-mobile-side-menu [hidden] { display: none !important; }

/* Open and closing: the script keeps the root visible while the panel springs out. */
body.pp-menu-v6 .peptico-mobile-side-menu.is-open,
body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing { opacity: 1; visibility: visible; }
body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing { pointer-events: none; }

/* ---- Scrim and panel ------------------------------------------------------------------ */
body.pp-menu-v6 .peptico-mobile-menu-overlay { background: rgba(17, 17, 17, 0.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; }
body.pp-menu-v6 .peptico-mobile-menu-panel {
  width: min(90vw, 400px); height: 100vh; height: 100dvh; max-height: none;
  background: var(--sheet); color: var(--ink);
  -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  border: 0; border-right: 1px solid rgba(255, 255, 255, 0.75); border-radius: 0 28px 28px 0;
  box-shadow: 24px 0 60px rgba(17, 17, 17, 0.16), inset -1px 0 0 rgba(255, 255, 255, 0.85);
  transition: none !important; will-change: transform; touch-action: pan-y;
  transform: translate3d(-100%, 0, 0);       /* until the script takes over */
}

/* ---- Top ------------------------------------------------------------------------------ */
body.pp-menu-v6 .peptico-mobile-menu-top { min-height: 0; padding: 22px 18px 6px 22px; border: 0; background: transparent; }
body.pp-menu-v6 .peptico-mobile-menu-kicker { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }
body.pp-menu-v6 .peptico-mobile-menu-title { font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
body.pp-menu-v6 .peptico-mobile-menu-close {
  width: 36px; height: 36px; min-width: 36px; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 50%;
  background: rgba(255, 255, 255, 0.62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink); font-size: 24px; font-weight: 300; line-height: 1; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 6px 16px rgba(17, 17, 17, 0.06);
  transition: transform 120ms var(--ease), background-color 160ms var(--ease);
}
body.pp-menu-v6 .peptico-mobile-menu-close:hover { background: #fff; color: var(--ink); }
body.pp-menu-v6 .peptico-mobile-menu-close.is-pressed { transform: scale(0.92); }

/* ---- Content ---------------------------------------------------------------------------- */
body.pp-menu-v6 .peptico-mobile-menu-content { padding: 6px 12px 12px; background: transparent; scrollbar-width: thin; }
body.pp-menu-v6 .peptico-mobile-menu-content::-webkit-scrollbar-thumb { background: rgba(17, 17, 17, 0.18); }
body.pp-menu-v6 .peptico-mobile-menu-nav { background: transparent; }
body.pp-menu-v6 .peptico-mobile-menu-group { padding: 0; }

/* The researcher card */
body.pp-menu-v6 .pp-mcard {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; padding: 12px 12px 12px 12px;
  border-radius: 20px; background: var(--mint); color: var(--ink) !important; text-decoration: none;
  transition: transform 120ms var(--ease), background-color 160ms var(--ease);
}
body.pp-menu-v6 .pp-mcard.is-pressed { transform: scale(0.985); }
body.pp-menu-v6 .pp-mcard__disc { flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--green); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; display: inline-flex; align-items: center; justify-content: center; }
body.pp-menu-v6 .pp-mcard__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
body.pp-menu-v6 .pp-mcard__name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pp-menu-v6 .pp-mcard__line { font-size: 13px; line-height: 1.35; color: var(--muted); text-wrap: pretty; }
body.pp-menu-v6 .pp-mcard__go { flex: none; width: 18px; height: 18px; color: var(--muted); }
body.pp-menu-v6 .pp-mcard__go svg { width: 100%; height: 100%; }
body.pp-menu-v6 .pp-mcard--out { background: var(--paper); border: 1px solid var(--line); }
body.pp-menu-v6 .pp-mcard__pill { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
body.pp-menu-v6 .pp-mcard__pill svg { width: 14px; height: 14px; }

/* Groups */
body.pp-menu-v6 .pp-mg { padding: 4px 0 2px; }
body.pp-menu-v6 .pp-mg__label { margin: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* Rows: the snippet's bordered pills become quiet rows with an icon disc */
body.pp-menu-v6 .peptico-mobile-menu-link,
body.pp-menu-v6 .peptico-mobile-menu-account-links a,
body.pp-menu-v6 .pp-row {
  width: 100%; min-height: 48px; margin: 0 0 2px; padding: 7px 10px 7px 8px; gap: 12px;
  border: 0; border-radius: 16px; background: transparent; color: var(--ink) !important;
  font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left; line-height: 1.2;
  display: flex; align-items: center; justify-content: flex-start; cursor: pointer;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
body.pp-menu-v6 .pp-row > span:not(.pp-row__icon):not(.pp-row__chev):not(.peptico-mobile-menu-plus) { flex: 1; min-width: 0; }
body.pp-menu-v6 .pp-row:hover, body.pp-menu-v6 .peptico-mobile-menu-link:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink) !important; }
body.pp-menu-v6 .pp-row.is-pressed { transform: scale(0.985); background: rgba(255, 255, 255, 0.9); }
body.pp-menu-v6 .pp-row.is-current { background: rgba(255, 255, 255, 0.85); }
body.pp-menu-v6 .pp-row.is-current > span:not(.pp-row__icon):not(.pp-row__chev)::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--green); vertical-align: middle; }
body.pp-menu-v6 .pp-row__icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
body.pp-menu-v6 .pp-row__icon svg { width: 17px; height: 17px; }
body.pp-menu-v6 .pp-row__chev { flex: none; width: 16px; height: 16px; color: var(--faint); transition: transform 200ms var(--ease); }
body.pp-menu-v6 .pp-row__chev svg { width: 100%; height: 100%; }
body.pp-menu-v6 .pp-row:hover .pp-row__chev { transform: translateX(2px); }
body.pp-menu-v6 .pp-tint--sage { background: var(--sage); } body.pp-menu-v6 .pp-tint--mint { background: var(--mint); } body.pp-menu-v6 .pp-tint--rose { background: var(--rose); }
body.pp-menu-v6 .pp-tint--tan { background: var(--tan); } body.pp-menu-v6 .pp-tint--lavender { background: var(--lavender); } body.pp-menu-v6 .pp-tint--olive { background: var(--olive); }
/* the discs sit on frosted paper, so they take the deeper tints the homepage uses for its accents */
body.pp-menu-v6 .pp-row__icon.pp-tint--sage { background: #c9d6c0; } body.pp-menu-v6 .pp-row__icon.pp-tint--mint { background: #cfe2dc; } body.pp-menu-v6 .pp-row__icon.pp-tint--rose { background: #e6c9c2; }
body.pp-menu-v6 .pp-row__icon.pp-tint--tan { background: #e2d5bd; } body.pp-menu-v6 .pp-row__icon.pp-tint--lavender { background: #cfd1ea; } body.pp-menu-v6 .pp-row__icon.pp-tint--olive { background: #d9dfae; }

/* The Products disclosure: the plus becomes a chevron that turns; open state stays quiet */
body.pp-menu-v6 .peptico-mobile-menu-link.is-open, body.pp-menu-v6 .peptico-mobile-menu-dropdown-toggle.is-open { background: rgba(255, 255, 255, 0.85); color: var(--ink) !important; }
body.pp-menu-v6 .peptico-mobile-menu-plus { font-size: 0; width: 16px; height: 16px; flex: none; color: var(--faint); background: none; transition: transform 260ms var(--ease); }
body.pp-menu-v6 .peptico-mobile-menu-plus::before { content: ""; display: block; width: 100%; height: 100%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
body.pp-menu-v6 .peptico-mobile-menu-dropdown-toggle.is-open .peptico-mobile-menu-plus { transform: rotate(180deg); }

/* Chips: research areas in the vial tints, growing from the current size */
body.pp-menu-v6 .peptico-mobile-menu-dropdown, body.pp-menu-v6 .peptico-mobile-menu-dropdown.is-open {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start;
  width: auto; height: 0; margin: 0 0 4px 0; padding: 0 0 0 44px; border: 0; background: transparent; overflow: hidden;
  transition: height 380ms var(--ease);
}
body.pp-menu-v6 .peptico-mobile-menu-dropdown.is-open { padding-bottom: 6px; }
body.pp-menu-v6 .peptico-mobile-menu-dropdown a, body.pp-menu-v6 .pp-chip {
  min-height: 42px; padding: 9px 12px; border: 0; border-radius: 13px; background: var(--paper); color: var(--ink) !important;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2; text-transform: none; text-align: left; justify-content: flex-start;
  transition: transform 120ms var(--ease), filter 160ms var(--ease);
}
body.pp-menu-v6 .peptico-mobile-menu-dropdown a:first-child { margin-top: 2px; }
body.pp-menu-v6 .pp-chip.pp-tint--sage { background: var(--sage); } body.pp-menu-v6 .pp-chip.pp-tint--mint { background: var(--mint); } body.pp-menu-v6 .pp-chip.pp-tint--rose { background: var(--rose); }
body.pp-menu-v6 .pp-chip.pp-tint--tan { background: var(--tan); } body.pp-menu-v6 .pp-chip.pp-tint--lavender { background: var(--lavender); } body.pp-menu-v6 .pp-chip.pp-tint--olive { background: var(--olive); }
body.pp-menu-v6 .pp-chip--all { grid-column: 1 / -1; background: rgba(255, 255, 255, 0.9); }
body.pp-menu-v6 .peptico-mobile-menu-dropdown a:hover { color: var(--ink) !important; border-color: transparent; filter: brightness(0.97); }
body.pp-menu-v6 .pp-chip.is-pressed { transform: scale(0.97); }

/* Account block: rows moved into the "You" group; the block itself is hidden by the script */
body.pp-menu-v6 .peptico-mobile-menu-account-card { display: none; }

/* Foot strip */
body.pp-menu-v6 .pp-mfoot {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0;
  padding: 12px 22px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  font-family: var(--mono) !important; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
body.pp-menu-v6 .pp-mfoot__dot { color: var(--faint); }

/* Rows arrive a beat apart once the panel is open; they stay while it leaves */
body.pp-menu-v6 .pp-mcard, body.pp-menu-v6 .pp-mg__label, body.pp-menu-v6 .pp-row, body.pp-menu-v6 .pp-mfoot { opacity: 0; transform: translateX(-8px); transition: opacity 320ms var(--ease), transform 420ms var(--ease); }
body.pp-menu-v6 .pp-row { transition-delay: calc(60ms + var(--i, 0) * 22ms); }
body.pp-menu-v6 .pp-mcard { transition-delay: 40ms; }
body.pp-menu-v6 .pp-mfoot { transition-delay: 300ms; }
body.pp-menu-v6 .peptico-mobile-side-menu.is-open .pp-mcard, body.pp-menu-v6 .peptico-mobile-side-menu.is-open .pp-mg__label, body.pp-menu-v6 .peptico-mobile-side-menu.is-open .pp-row, body.pp-menu-v6 .peptico-mobile-side-menu.is-open .pp-mfoot,
body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-mcard, body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-mg__label, body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-row, body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-mfoot { opacity: 1; transform: none; }
body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-row, body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-mcard, body.pp-menu-v6 .peptico-mobile-side-menu.pp-closing .pp-mfoot { transition-delay: 0ms; }
body.pp-menu-v6 .pp-row.is-pressed { transition-delay: 0ms; }

/* ---- Preferences ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body.pp-menu-v6 .pp-mcard, body.pp-menu-v6 .pp-mg__label, body.pp-menu-v6 .pp-row, body.pp-menu-v6 .pp-mfoot { opacity: 1; transform: none; transition: none; }
  body.pp-menu-v6 .peptico-mobile-menu-dropdown { transition: none; }
  body.pp-menu-v6 .peptico-mobile-side-menu { transition: opacity 200ms ease, visibility 200ms ease; }
}
@media (prefers-reduced-transparency: reduce) {
  body.pp-menu-v6 .peptico-mobile-menu-panel { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.pp-menu-v6 .peptico-mobile-menu-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.pp-menu-v6 .peptico-mobile-menu-close { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  body.pp-menu-v6 .peptico-mobile-menu-panel { background: #fff; border-right: 1px solid var(--line-strong); }
  body.pp-menu-v6 .pp-row, body.pp-menu-v6 .pp-chip { outline: 1px solid var(--line); }
}

/* ---- Widths -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body.pp-menu-v6 .peptico-mobile-menu-panel { width: min(88vw, 360px); border-radius: 0 24px 24px 0; }
  body.pp-menu-v6 .peptico-mobile-menu-top { padding: 18px 14px 4px 18px; }
  body.pp-menu-v6 .peptico-mobile-menu-title { font-size: 26px; }
  body.pp-menu-v6 .peptico-mobile-menu-content { padding: 4px 10px 10px; }
  body.pp-menu-v6 .peptico-mobile-menu-dropdown, body.pp-menu-v6 .peptico-mobile-menu-dropdown.is-open { grid-template-columns: 1fr; padding-left: 42px; }
}
