/* PharmYourPath landing page. Its own small stylesheet (no Tailwind) so it
   loads fast on phones. The hero is a look down the microscope: an H&E field
   comes into focus with question 1 on a glass slide beside it. */

:root {
  --glass: #EEF1F5;
  --sheet: #FFFFFF;
  --ink: #1E1B3A;
  --ink-soft: #55526E;
  --ink-faint: #8B88A0;
  --rule: #D8DCE5;
  --rule-strong: #B9BFCC;
  --haem: #3A2F94;
  --haem-dark: #2A2170;
  --haem-wash: #ECEAF8;
  --eosin: #E2557F;
  --eosin-dark: #B8335C;
  --eosin-wash: #FDE8EF;
  --mark: #FFD0DE;
  --correct: #16795A;
  --wrong: #B3261E;
  --frost: repeating-linear-gradient(115deg, #E4E7EE 0 2px, #DCE0E8 2px 3px);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --reading: "Atkinson Hyperlegible", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font: 17px/1.6 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--haem); text-underline-offset: 3px; }
a:hover { color: var(--haem-dark); }
:focus-visible { outline: 2px solid var(--haem); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

/* ---------- Buttons: capsules ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 16px/1.2 var(--display);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--haem); color: #fff; }
.btn-primary:hover { background: var(--haem-dark); color: #fff; }
.btn-quiet { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--rule-strong); color: var(--ink); }
.btn-small { padding: .5rem .95rem; font-size: 15px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(238, 241, 245, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }
.topbar .wrap { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.wordmark svg { flex: none; }
.wordmark span { font: 700 21px/1 var(--display); font-stretch: 82%; letter-spacing: -.02em; }
.wordmark:hover { color: var(--ink); }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; white-space: nowrap; }
@media (max-width: 419px) { .topbar .signin { display: none; } }
.topbar nav a:not(.btn) { color: var(--ink-soft); font-weight: 600; font-size: 15px; text-decoration: none; }
.topbar nav a:not(.btn):hover { color: var(--ink); }
.only-wide { display: none; }
@media (min-width: 760px) { .only-wide { display: inline; } }

/* ---------- Hero: down the microscope ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 var(--section); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 3.5rem; } }
.kicker { font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.hero h1 {
  margin-top: .6rem;
  font-size: clamp(3rem, 8.4vw, 5.6rem);
  line-height: .94;
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -.025em;
  max-width: 10ch;
}
.lead { margin-top: 1.4rem; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-soft); max-width: 34rem; }
.actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.small { margin-top: 1rem; font-size: 15px; color: var(--ink-soft); }

.scope { position: relative; }
@media (min-width: 960px) { .scope { padding-bottom: 8rem; } }
.eyepiece {
  position: relative;
  width: min(30rem, 78vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #F3C4D4;
  box-shadow:
    0 0 0 10px var(--ink),
    0 0 0 12px #3B3660,
    0 0 0 22px #2A2647,
    0 40px 70px -30px rgba(30, 27, 58, .65);
  isolation: isolate;
}
@media (min-width: 960px) { .eyepiece { margin: 0 0 0 auto; } }
.eyepiece .field { width: 100%; height: 100%; }
/* The dark edge of the field of view. */
.eyepiece::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(30, 27, 58, .18) 74%, rgba(30, 27, 58, .62) 100%);
}
/* The eyepiece pointer, a fine needle from the edge to the middle. */
.pointer {
  position: absolute; left: 0; top: 50%; width: 46%; height: 3px; margin-top: -1.5px; z-index: 1;
  background: linear-gradient(90deg, #121029 0 85%, transparent 100%);
  clip-path: polygon(0 0, 100% 45%, 100% 55%, 0 100%);
}
html.motion .eyepiece .field {
  filter: blur(11px) saturate(.6);
  transform: scale(1.14) rotate(-3deg);
  transition: filter 1.5s cubic-bezier(.2, .7, .2, 1), transform 1.5s cubic-bezier(.2, .7, .2, 1);
}
html.motion .scope.is-focused .eyepiece .field { filter: none; transform: none; }

/* A glass slide with its frosted label: the question card. */
.slide-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(30, 27, 58, .04), 0 24px 46px -28px rgba(30, 27, 58, .55);
  overflow: hidden;
}
.slide-card-label {
  display: flex; justify-content: space-between; gap: .75rem;
  padding: .6rem 1.1rem .5rem;
  background: var(--frost);
  border-bottom: 1px solid var(--rule);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.slide-card-body { padding: 1rem 1.1rem 1.1rem; }
.scope .slide-card {
  position: relative; z-index: 2;
  width: min(25rem, 100%);
  margin: -3.5rem auto 0;
}
@media (min-width: 960px) { .scope .slide-card { position: absolute; left: -9%; bottom: 0; margin: 0; width: min(24.5rem, 82%); } }
html.motion .scope .slide-card { opacity: 0; translate: 0 18px; transition: opacity .7s ease .55s, translate .7s cubic-bezier(.2, .7, .2, 1) .55s; }
html.motion .scope.is-focused .slide-card { opacity: 1; translate: 0 0; }
.stem { font: 400 18px/1.42 var(--reading); color: var(--ink); }

.options { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .1rem; }
.option {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  padding: .42rem .5rem; margin: 0 -.5rem;
  border: 0; border-radius: 10px; background: transparent;
  font: 400 16px/1.35 var(--reading); color: var(--ink); text-align: left; cursor: pointer;
}
.option:hover { background: rgba(58, 47, 148, .05); }
.well {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 8px;
  border: 1.5px solid var(--ink); background: var(--sheet);
  font: 700 13px/1 var(--display); color: var(--ink);
  overflow: hidden; isolation: isolate;
}
.well::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: var(--haem); transform: scale(0); transition: transform .28s cubic-bezier(.3, .7, .2, 1);
}
.option.is-picked .well { color: #fff; border-color: var(--haem); }
.option.is-picked .well::before { transform: scale(1); }
.option.is-picked.is-right .well { border-color: var(--correct); }
.option.is-picked.is-right .well::before { background: var(--correct); }
.option.is-picked.is-wrong .well { border-color: var(--wrong); }
.option.is-picked.is-wrong .well::before { background: var(--wrong); }
/* The answer shades in once the field is in focus. */
html.motion .scope:not(.is-focused) .option.is-picked .well::before { transform: scale(0); }
html.motion .scope:not(.is-focused) .option.is-picked .well { color: var(--ink); border-color: var(--ink); }
html.motion .scope.is-focused .options.intro .option.is-picked .well::before { transition-delay: 1.45s; }
.verdict { margin-top: .6rem; font-size: 15px; font-weight: 600; color: var(--correct); min-height: 1.4em; }
.verdict.is-wrong { color: var(--wrong); }
html.motion .scope:not(.is-focused) .verdict { opacity: 0; }
html.motion .scope .verdict { transition: opacity .4s ease 1.7s; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-head { max-width: 44rem; }
.section-head h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1; font-weight: 800; font-stretch: 80%; letter-spacing: -.022em; }
.section-head p { margin-top: 1rem; font-size: 18px; color: var(--ink-soft); }

/* Course map: glass slides */
.course { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.semester { margin-top: 2.6rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ink); font-size: 19px; font-weight: 700; }
.slides { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 760px) { .slides { grid-template-columns: 1fr 1fr; } }
.slide {
  display: grid; grid-template-columns: 4.9rem minmax(0, 1fr);
  border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  background: var(--sheet);
}
.slide-label {
  display: flex; flex-direction: column; justify-content: center;
  padding: .7rem .75rem;
  background: var(--frost); border-right: 1px solid var(--rule);
  font-stretch: 82%; line-height: 1;
}
.slide-label small { font-size: 12px; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.slide-label b { margin-top: .2rem; font-size: 24px; font-weight: 800; }
.slide-body { display: block; padding: .8rem 1rem .9rem; min-width: 0; }
.slide-body .name { display: block; font-weight: 600; line-height: 1.3; }
.slide-body .count { display: block; margin-top: .15rem; font-size: 14px; color: var(--ink-soft); }
.stain { display: flex; height: 7px; margin-top: .65rem; border-radius: 999px; overflow: hidden; background: #E6E9F0; }
.stain > span { display: block; height: 100%; }

.disciplines {
  margin-top: 2.4rem; padding: 1.2rem 1.3rem;
  border-radius: 16px; background: var(--glass);
  display: grid; gap: .9rem;
}
@media (min-width: 900px) { .disciplines { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.disciplines p { font-size: 16px; color: var(--ink-soft); }
.disciplines p b { color: var(--ink); }
.disciplines ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.disciplines li {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet);
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.dot { width: .6rem; height: .6rem; border-radius: 999px; flex: none; }
.course-foot { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--ink-soft); font-size: 15px; }
.course-foot b { color: var(--ink); font-size: 20px; font-weight: 800; }

/* Features */
.feature-grid { margin-top: 2.8rem; display: grid; gap: 1.2rem; }
@media (min-width: 860px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature { background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; padding: 1.2rem 1.2rem 1.5rem; }
@media (min-width: 640px) { .feature { padding: 1.4rem 1.6rem 1.8rem; } }
.feature h3 { margin-top: 1.4rem; font-size: 22px; line-height: 1.15; font-weight: 700; font-stretch: 88%; letter-spacing: -.01em; }
.feature > p { margin-top: .6rem; color: var(--ink-soft); }
.feature ul { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 15px; }
.feature li { margin-top: .25rem; }
.feature li::marker { color: var(--eosin); }
.demo { border-radius: 14px; background: var(--glass); padding: 1.1rem; min-height: 11.5rem; display: flex; flex-direction: column; justify-content: center; }

.demo-title { font-weight: 700; }
.chips { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips span { padding: .12rem .55rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-soft); }
.rank { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .45rem; }
.rank li { display: grid; grid-template-columns: 1.1rem 4.2rem minmax(0, 1fr) 2.6rem; align-items: center; gap: .55rem; font-size: 14px; color: var(--ink-soft); }
.rank li > span:first-child { font-weight: 700; color: var(--ink); text-align: right; }
.rank li > span:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank .track { height: 12px; border-radius: 0 999px 999px 0; background: #DDE1E9; overflow: hidden; }
.rank .track span { display: block; height: 100%; border-radius: inherit; background: var(--rule-strong); }
.rank li.top .track span { background: var(--eosin); }
.rank li.you { color: var(--ink); font-weight: 700; }
.rank li.you .track span { background: var(--haem); }

.score { font-size: 3.4rem; line-height: .9; font-weight: 800; font-stretch: 80%; }
.score small { font-size: .5em; }
.meters { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .55rem; }
.meters li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; font-size: 13.5px; color: var(--ink-soft); }
.meters b { color: var(--ink); font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #DDE1E9; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--haem); }

.mini-slide { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; max-width: 22rem; width: 100%; margin: 0 auto; box-shadow: 0 16px 30px -24px rgba(30, 27, 58, .6); }
.mini-label { padding: .45rem .9rem .4rem; background: var(--frost); border-bottom: 1px solid var(--rule); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.mini-stem, .mini-item, .mini-q { padding: 0 .9rem; font-family: var(--reading); font-size: 15px; }
.mini-stem { padding-top: .7rem; color: var(--ink-soft); }
.mini-item { margin-top: .25rem; font-size: 17px; }
.mini-q { margin-top: .5rem; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.mini-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding: .7rem .9rem .9rem; }
.mini-btns span { padding: .45rem; border-radius: 999px; text-align: center; font-size: 13px; font-weight: 600; background: var(--haem); color: #fff; }
.mini-btns span.quiet { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); }

.dose-num { font-size: 15px; color: var(--ink-soft); }
.dose-num b { font-size: 2.6rem; line-height: .9; font-weight: 800; color: var(--ink); font-stretch: 80%; margin-right: .2rem; }
.dose { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.dose li {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .4rem 0 .5rem; border-radius: 10px; background: #DFE3EB;
  box-shadow: inset 0 2px 0 rgba(30, 27, 58, .06);
  font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.dose .pill { width: 70%; max-width: 2.2rem; aspect-ratio: 2.1 / 1; border-radius: 999px; border: 1.5px dashed var(--rule-strong); display: flex; overflow: hidden; }
.dose li.is-taken .pill { border: 1.5px solid var(--ink); transform: rotate(-18deg); }
.dose li.is-taken .pill::before, .dose li.is-taken .pill::after { content: ""; flex: 1; }
.dose li.is-taken .pill::before { background: var(--haem); }
.dose li.is-taken .pill::after { background: var(--eosin); }
.dose li.is-today { background: var(--sheet); box-shadow: 0 0 0 2px var(--eosin); color: var(--ink); }

/* Checked before it reaches you: a real sequence, so numbered */
.steps { list-style: none; margin: 2.6rem 0 0; padding: 0; display: grid; gap: 1.6rem; counter-reset: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; } }
.steps li { display: flex; gap: 1rem; }
@media (min-width: 860px) { .steps li { flex-direction: column; } }
.num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; border-radius: 10px; border: 1.5px solid var(--ink);
  font-weight: 800; font-size: 15px;
}
.steps li:last-child .num { background: var(--haem); border-color: var(--haem); color: #fff; }
.steps h3 { font-size: 18px; line-height: 1.25; font-weight: 700; }
.steps p { margin-top: .4rem; font-size: 15.5px; color: var(--ink-soft); }

/* Install */
.install { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.install-grid { display: grid; gap: 2.4rem; }
@media (min-width: 960px) { .install-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.install-state { margin-top: 1.2rem; padding: .8rem 1rem; border-radius: 12px; background: var(--haem-wash); font-weight: 600; }
.install-now { margin-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.install-now span { color: var(--ink-soft); font-size: 15px; }
.laptop { margin-top: 1.4rem; font-size: 15px; color: var(--ink-soft); }
.howto-box { border: 1px solid var(--rule); border-radius: 20px; padding: 1.1rem; background: var(--glass); }
@media (min-width: 640px) { .howto-box { padding: 1.5rem; } }
.tabs { display: inline-flex; gap: .3rem; padding: .25rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); }
.tabs button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border: 0; border-radius: 999px; background: transparent;
  font: 600 15px/1 var(--display); color: var(--ink-soft); cursor: pointer;
}
.tabs button svg { width: 1.05em; height: 1.05em; }
.tabs button[aria-selected="true"] { background: var(--haem); color: #fff; }
.howto { margin-top: 1.2rem; }
.howto h3 { font-size: 19px; font-weight: 700; }
.howto ol { margin: .8rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: .7rem; }
.howto ol li { counter-increment: step; display: grid; grid-template-columns: 1.9rem minmax(0, 1fr); gap: .6rem; align-items: start; }
.howto ol li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 8px; background: var(--sheet); border: 1.5px solid var(--ink);
  font-weight: 700; font-size: 13px;
}
.howto ol p { padding-top: .1rem; }
.key { display: inline-flex; vertical-align: middle; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 7px; background: var(--sheet); border: 1px solid var(--rule); }
.key svg { width: 1rem; height: 1rem; }
.note { margin-top: 1rem; font-size: 15px; color: var(--ink-soft); }
html.js .howto[hidden] { display: none; }

/* Questions */
.faq-list { margin-top: 2rem; max-width: 50rem; border-top: 1px solid var(--rule); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600;
}
.faq-list summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 1rem; height: 1rem; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--ink); transition: transform .2s ease; }
.plus::after { transform: rotate(90deg); }
.faq-list details[open] .plus::after { transform: rotate(0); }
.faq-list details p { padding: 0 0 1.2rem; max-width: 44rem; color: var(--ink-soft); }

/* Last word */
.last { text-align: center; }
.last h2 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; font-weight: 800; font-stretch: 78%; letter-spacing: -.025em; }
.last p { margin: 1rem auto 0; max-width: 32rem; color: var(--ink-soft); font-size: 18px; }
.last .actions { justify-content: center; }

.footer { padding: 2rem 0 2.6rem; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-soft); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

@media (display-mode: standalone) { .hide-installed { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

[hidden] { display: none !important; }
