/* Phantom Shop: Research Hub, Molecules and Research Trials pages. */

.ps-rx-page .entry-header,
.ps-rx-page .ast-archive-description { display: none; }
.ps-rx-page #secondary { display: none; }
.ps-rx-page #primary { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; }
.ps-rx-page .site-content > .ast-container { display: block; max-width: none; padding: 0; }
.ps-rx-page .entry-content > * { margin-block: 0; }

.ps-rx {
	--rx-navy: #08234a;
	--rx-navy-2: #0d3d78;
	--rx-deep: #061b3a;
	--rx-ink: #0b1f3a;
	--rx-text: #334155;
	--rx-muted: #64748b;
	--rx-blue: #2d6fb7;
	--rx-blue-2: #1d5797;
	--rx-soft: #eef4fb;
	--rx-line: #e3e8ef;
	--rx-font: "DM Sans", "Spartan MB", system-ui, -apple-system, "Segoe UI", sans-serif;
	--rx-display: "Trade Gothic Bold", "Phantom Display", var(--rx-font);
	--rx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 64px;
	color: var(--rx-text);
	font-family: var(--rx-font);
	-webkit-font-smoothing: antialiased;
}
.ps-rx *, .ps-rx *::before, .ps-rx *::after { box-sizing: border-box; }
.ps-rx h1, .ps-rx h2, .ps-rx h3, .ps-rx p, .ps-rx ul, .ps-rx ol, .ps-rx dl, .ps-rx dd { margin: 0; }
.ps-rx ul, .ps-rx ol { padding: 0; list-style: none; }
.ps-rx button, .ps-rx input, .ps-rx select { font-family: inherit; }
.ps-rx a { text-decoration: none; }
.ps-rx sub { font-size: .72em; line-height: 0; vertical-align: -.25em; }

/* ---------- Hero ---------- */
.ps-rx__hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 56px); border-radius: 28px; background: radial-gradient(120% 140% at 100% 0%, rgba(124, 192, 255, .22) 0%, rgba(124, 192, 255, 0) 55%), linear-gradient(135deg, var(--rx-navy) 0%, var(--rx-deep) 100%); color: #c9dbf2; }
.ps-rx__hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); pointer-events: none; }
.ps-rx__hero > * { position: relative; z-index: 1; }
.ps-rx__eyebrow { margin-bottom: 12px !important; color: #7cc0ff; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ps-rx__hero h1 { color: #fff; font-family: var(--rx-display); font-size: clamp(34px, 5vw, 56px); font-weight: 700; line-height: 1.02; letter-spacing: -.01em; }
.ps-rx__lead { max-width: 640px; margin-top: 14px !important; color: #c9dbf2; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.6; }
.ps-rx__hero--slim { padding-block: clamp(28px, 4vw, 44px); }

.ps-rx__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.ps-rx .ps-rx__tile { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(255, 255, 255, .06); color: #c9dbf2; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.ps-rx .ps-rx__tile:hover { border-color: rgba(124, 192, 255, .5); background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.ps-rx__tileicon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(124, 192, 255, .16); color: #7cc0ff; }
.ps-rx__tile b { display: block; color: #fff; font-size: 16px; }
.ps-rx__tile small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; }

.ps-rx__subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ps-rx .ps-rx__subnav a { padding: 8px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: #dbe7f5; font-size: 14px; font-weight: 600; transition: background .2s ease; }
.ps-rx .ps-rx__subnav a:hover { background: rgba(255, 255, 255, .1); }
.ps-rx .ps-rx__subnav a[aria-current="page"] { border-color: #fff; background: #fff; color: var(--rx-navy); }

/* ---------- Hub: filters and cards ---------- */
.ps-rx__bar { position: sticky; top: 106px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 20px; padding: 10px; border: 1px solid var(--rx-line); border-radius: 18px; background: rgba(255, 255, 255, .94); box-shadow: 0 14px 30px -24px rgba(8, 35, 74, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ps-rx__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-rx__chips button { padding: 8px 15px; border: 1px solid var(--rx-line); border-radius: 999px; background: #fff; color: var(--rx-ink); font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.ps-rx__chips button:hover { border-color: var(--rx-blue); color: var(--rx-blue); }
.ps-rx__chips button[aria-pressed="true"] { border-color: var(--rx-navy); background: var(--rx-navy); color: #fff; }
.ps-rx__find { display: flex; flex: 0 1 280px; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--rx-line); border-radius: 999px; background: #f8fafc; color: var(--rx-muted); }
.ps-rx__find:focus-within { border-color: var(--rx-blue); box-shadow: 0 0 0 3px rgba(45, 111, 183, .15); }
.ps-rx__find input { width: 100%; min-width: 0; height: 40px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--rx-ink); font-size: 15px; outline: none; }

.ps-rx__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ps-rx__card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--rx-line); border-radius: 22px; background: #fff; box-shadow: 0 18px 40px -34px rgba(8, 35, 74, .55); scroll-margin-top: 170px; transition: border-color .2s ease, box-shadow .2s ease; }
.ps-rx__card:hover { border-color: #c9dbf2; box-shadow: 0 22px 46px -30px rgba(8, 35, 74, .5); }
.ps-rx__card:target { border-color: var(--rx-blue); box-shadow: 0 0 0 3px rgba(45, 111, 183, .18); }
.ps-rx__card[hidden] { display: none; }
.ps-rx__kind { display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: var(--rx-soft); color: var(--rx-blue-2); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ps-rx__card--code .ps-rx__kind { background: var(--rx-navy); color: #dbe7f5; }
.ps-rx__card--blend .ps-rx__kind { background: #f1f5f9; color: var(--rx-ink); }
.ps-rx__card h2 { color: var(--rx-ink); font-family: var(--rx-display); font-size: 24px; font-weight: 700; line-height: 1.15; }
.ps-rx__aka { margin-top: 4px !important; color: var(--rx-muted); font-size: 14px; }
.ps-rx__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-rx__facts > div { flex: 1 1 auto; padding: 10px 12px; border-radius: 12px; background: #f8fafc; }
.ps-rx__facts dt { color: var(--rx-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ps-rx__facts dd { margin-top: 3px; white-space: nowrap; color: var(--rx-ink); font-family: var(--rx-mono); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.ps-rx__facts dd small { color: var(--rx-muted); font-family: var(--rx-font); font-size: 11px; font-weight: 500; }
.ps-rx .ps-rx__facts a { color: var(--rx-blue); }
.ps-rx__seq { display: flex; flex-wrap: wrap; gap: 4px; counter-reset: rx; }
.ps-rx__seq li { position: relative; padding: 5px 8px; border: 1px solid #d6e3f3; border-radius: 8px; background: #f5f9fe; color: var(--rx-navy); font-family: var(--rx-mono); font-size: 12px; font-weight: 600; }
.ps-rx__parts { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-rx .ps-rx__parts a { padding: 6px 12px; border-radius: 999px; background: var(--rx-soft); color: var(--rx-navy); font-size: 13.5px; font-weight: 700; }
.ps-rx .ps-rx__parts a:hover { background: #dbe8f7; }
.ps-rx__about { flex: 1; color: var(--rx-text); font-size: 14.5px; line-height: 1.6; }
.ps-rx__actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rx-line); }
.ps-rx .ps-rx__actions a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--rx-ink); font-size: 13.5px; font-weight: 700; transition: background .15s ease, color .15s ease; }
.ps-rx__actions svg { width: 16px; height: 16px; color: var(--rx-blue); }
.ps-rx .ps-rx__actions a:hover { background: var(--rx-soft); color: var(--rx-blue-2); }
.ps-rx .ps-rx__actions .ps-rx__shop { margin-left: auto; background: var(--rx-navy); color: #fff; }
.ps-rx .ps-rx__actions .ps-rx__shop svg { color: #7cc0ff; }
.ps-rx .ps-rx__actions .ps-rx__shop:hover { background: var(--rx-navy-2); color: #fff; }
.ps-rx__none { padding: 40px 0; color: var(--rx-muted); text-align: center; }
.ps-rx__none[hidden] { display: none; }

.ps-rx__source { margin-top: 28px !important; color: var(--rx-muted); font-size: 13px; line-height: 1.6; }
.ps-rx__disclaimer { margin-top: 10px !important; padding: 14px 16px; border-radius: 14px; background: #f8fafc; color: var(--rx-muted); font-size: 12.5px; line-height: 1.6; }
.ps-rx__disclaimer b { color: var(--rx-ink); }
.ps-rx__notice { margin: 20px 0 !important; padding: 14px 18px; border-left: 3px solid var(--rx-blue); border-radius: 0 14px 14px 0; background: var(--rx-soft); color: var(--rx-ink); font-size: 14.5px; line-height: 1.6; }

/* ---------- Molecules ---------- */
.ps-mol { margin-top: 24px; }
.ps-mol__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ps-mol__pick { display: flex; flex-direction: column; gap: 6px; min-width: min(320px, 100%); }
.ps-mol__pick span { color: var(--rx-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ps-mol__pick select { height: 46px; padding: 0 40px 0 16px; border: 1px solid var(--rx-line); border-radius: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1f3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; color: var(--rx-ink); font-size: 16px; font-weight: 700; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ps-mol__pick select:focus { border-color: var(--rx-blue); outline: none; box-shadow: 0 0 0 3px rgba(45, 111, 183, .15); }
.ps-mol__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ps-mol__seg { display: inline-flex; padding: 3px; border: 1px solid var(--rx-line); border-radius: 12px; background: #f1f5f9; }
.ps-mol__seg button { padding: 8px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--rx-text); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ps-mol__seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(8, 35, 74, .15); color: var(--rx-navy); }
.ps-mol__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--rx-line); border-radius: 12px; background: #fff; color: var(--rx-ink); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.ps-mol__btn:hover { border-color: var(--rx-blue); }
.ps-mol__btn[aria-pressed="true"] { border-color: var(--rx-navy); background: var(--rx-navy); color: #fff; }
.ps-mol__btn--icon { width: 40px; padding: 0; font-size: 20px; line-height: 1; }
.ps-mol__btn:disabled,
.ps-mol__seg button:disabled { opacity: .4; cursor: default; }

.ps-mol__stage { position: relative; overflow: hidden; height: clamp(420px, 62vh, 620px); border-radius: 26px; background: radial-gradient(90% 90% at 70% 40%, #12407a 0%, #08234a 45%, #04142b 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -40px rgba(8, 35, 74, .8); }
.ps-mol__view { position: absolute; inset: 0; }
.ps-mol__view canvas { outline: none; }
.ps-mol__seqview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 140px 32px 90px; overflow-y: auto; }
.ps-mol__seqview[hidden] { display: none; }
.ps-mol__seqview ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 0; max-width: 820px; margin: 0; padding: 0; list-style: none; }
.ps-mol__seqview li { position: relative; display: flex; align-items: center; }
.ps-mol__seqview li span { display: grid; place-items: center; min-width: 54px; height: 54px; padding: 0 8px; border: 2px solid rgba(124, 192, 255, .55); border-radius: 50%; background: rgba(124, 192, 255, .12); color: #fff; font-family: var(--rx-mono); font-size: 13px; font-weight: 700; }
.ps-mol__seqview li:not(:last-child)::after { content: ""; width: 14px; height: 2px; background: rgba(124, 192, 255, .55); }
.ps-mol__seqview li small { position: absolute; top: -16px; left: 0; width: 54px; color: rgba(201, 219, 242, .6); font-size: 10px; text-align: center; }
.ps-mol__info { position: absolute; top: 22px; left: 22px; z-index: 2; max-width: min(360px, calc(100% - 44px)); padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; background: rgba(4, 20, 43, .55); color: #c9dbf2; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); pointer-events: none; }
.ps-mol__badge { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(124, 192, 255, .18); color: #7cc0ff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ps-mol__badge:empty { display: none; }
.ps-mol__info h2 { color: #fff; font-family: var(--rx-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.1; }
.ps-mol__aka { margin-top: 3px !important; font-size: 13.5px; }
.ps-mol__aka:empty { display: none; }
.ps-mol__info dl { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.ps-mol__info dl div[hidden] { display: none; }
.ps-mol__info dt { color: rgba(201, 219, 242, .65); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ps-mol__info dd { color: #fff; font-family: var(--rx-mono); font-size: 14px; font-weight: 600; }
.ps-mol__status { position: absolute; top: 50%; left: 50%; z-index: 2; margin: 0; color: #c9dbf2; font-size: 15px; text-align: center; transform: translate(-50%, -50%); pointer-events: none; }
.ps-mol__status:empty { display: none; }
.ps-mol__foot { position: absolute; right: 18px; bottom: 18px; left: 18px; z-index: 2; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; pointer-events: none; }
.ps-mol__atom { margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(4, 20, 43, .6); color: #c9dbf2; font-size: 13px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ps-mol__atom:empty { display: none; }
.ps-mol__atom b { color: #fff; }
.ps-mol__links { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; pointer-events: all; }
.ps-rx .ps-mol__links a { padding: 9px 15px; border-radius: 999px; background: #fff; color: var(--rx-navy); font-size: 13.5px; font-weight: 700; }
.ps-rx .ps-mol__links a[hidden] { display: none; }
.ps-rx .ps-mol__links a[data-mol-pubchem] { border: 1px solid rgba(255, 255, 255, .25); background: rgba(4, 20, 43, .5); color: #fff; }
.ps-rx .ps-mol__links a:hover { filter: brightness(1.08); }
.ps-mol__note { margin-top: 10px !important; color: var(--rx-muted); font-size: 13px; }
.ps-mol__note:empty { display: none; }

.ps-mol__collection { margin-top: 36px; }
.ps-mol__collection h2 { margin-bottom: 14px !important; color: var(--rx-ink); font-family: var(--rx-display); font-size: 26px; font-weight: 700; }
.ps-mol__collection ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.ps-mol__collection button { display: flex; flex-direction: column; gap: 3px; width: 100%; height: 100%; padding: 14px 16px; border: 1px solid var(--rx-line); border-radius: 16px; background: #fff; color: var(--rx-ink); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ps-mol__collection button:hover { border-color: var(--rx-blue); }
.ps-mol__collection button[aria-current="true"] { border-color: var(--rx-navy); background: var(--rx-navy); color: #fff; }
.ps-mol__collection b { font-size: 15.5px; }
.ps-mol__collection small { color: var(--rx-muted); font-size: 12.5px; }
.ps-mol__collection button[aria-current="true"] small { color: #c9dbf2; }
.ps-mol__formula { margin-top: 4px; color: var(--rx-blue-2); font-family: var(--rx-mono); font-size: 12.5px; font-weight: 600; }
.ps-mol__collection button[aria-current="true"] .ps-mol__formula { color: #7cc0ff; }

/* ---------- Research Trials ---------- */
.ps-tr { display: grid; gap: 12px; margin-top: 8px; }
.ps-tr__row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 12px; padding: 18px; border: 1px solid var(--rx-line); border-radius: 22px; background: #fff; scroll-margin-top: 140px; }
.ps-tr__row:target { border-color: var(--rx-blue); box-shadow: 0 0 0 3px rgba(45, 111, 183, .18); }
.ps-tr__name { padding: 4px 6px; }
.ps-tr__name h2 { color: var(--rx-ink); font-family: var(--rx-display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.ps-rx .ps-tr__name a { display: inline-block; margin-top: 8px; color: var(--rx-blue); font-size: 13.5px; font-weight: 700; }
.ps-rx .ps-tr__stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: #f8fafc; color: var(--rx-text); transition: background .15s ease; }
.ps-rx .ps-tr__stat:hover { background: var(--rx-soft); }
.ps-tr__label { display: flex; align-items: center; gap: 6px; color: var(--rx-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ps-tr__label svg { width: 15px; height: 15px; color: var(--rx-blue); }
.ps-tr__stat b { color: var(--rx-ink); font-family: var(--rx-display); font-size: 30px; line-height: 1.15; }
.ps-tr__stat small { color: var(--rx-muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.ps-tr__go { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--rx-blue); font-size: 13px; font-weight: 700; }
.ps-tr__go svg { width: 13px; height: 13px; }
.ps-tr__papers { grid-column: 1 / -1; display: grid; gap: 6px; padding: 12px 6px 0; border-top: 1px solid var(--rx-line); }
.ps-tr__papers li { font-size: 13.5px; line-height: 1.5; }
.ps-rx .ps-tr__papers a { color: var(--rx-ink); font-weight: 600; }
.ps-rx .ps-tr__papers a:hover { color: var(--rx-blue); }
.ps-tr__papers small { color: var(--rx-muted); }

/* ---------- Smaller screens ---------- */
@media (max-width: 900px) {
	.ps-rx__tiles { grid-template-columns: 1fr; }
	.ps-tr__row { grid-template-columns: 1fr 1fr; }
	.ps-tr__name { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.ps-rx { padding: 24px 16px 48px; }
	.ps-rx__hero { border-radius: 22px; padding: 28px 22px; }
	.ps-rx__bar { position: static; }
	.ps-rx__find { flex: 1 1 100%; }
	.ps-rx__chips { flex-wrap: nowrap; overflow-x: auto; margin: -2px; padding: 2px; scrollbar-width: none; }
	.ps-rx__chips::-webkit-scrollbar { display: none; }
	.ps-rx__chips button { flex: none; }
	.ps-rx__grid { grid-template-columns: 1fr; }
	.ps-rx__card { padding: 18px; }
	.ps-mol__top { flex-direction: column; align-items: stretch; }
	.ps-mol__tools { justify-content: space-between; }
	.ps-mol__seg { flex: 1 1 100%; }
	.ps-mol__seg button { flex: 1; }
	.ps-mol__btn { flex: 1; }
	.ps-mol__btn--icon { flex: none; }
	.ps-mol__stage { height: 72svh; min-height: 440px; border-radius: 22px; }
	.ps-mol__info { top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 12px 14px; }
	.ps-mol__foot { right: 12px; bottom: 12px; left: 12px; }
	.ps-mol__links { width: 100%; }
	.ps-rx .ps-mol__links a { flex: 1; white-space: nowrap; text-align: center; }
	.ps-mol__long { display: none; }
	.ps-mol__seqview { padding: 150px 16px 110px; }
	.ps-mol__seqview li span { min-width: 44px; height: 44px; font-size: 11.5px; }
	.ps-mol__seqview li small { width: 44px; }
	.ps-mol__collection ul { grid-template-columns: 1fr 1fr; }
	.ps-tr__row { grid-template-columns: 1fr; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.ps-rx * { transition: none !important; }
}
