/* Shared mechanics for every PepsRx page: reset, accessibility, chips, button states, entrance. Themes add the look. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus, #5EEAD4); outline-offset: 3px; }
.wrap { position: relative; width: min(100% - 32px, 420px); margin: 0 auto; }
.ic { width: 18px; height: 18px; flex: none; }
.name { display: inline-flex; align-items: center; justify-content: center; gap: .24em; }
.name .badge { width: .74em; height: .74em; flex: none; }

/* the real Instagram, Skool and pepsrx.org icons, app-icon style, so everyone recognises them */
.socials a.soc-brand { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 13px; background: transparent; box-shadow: none; overflow: visible; }
.soc-brand .brand { width: 44px; height: 44px; border-radius: 12px; }
.soc-brand img.brand { box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .55); }

/* guide picker: one framed row on the page; the full list lives in a bottom sheet */
@property --pb-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.picker { position: relative; margin: 0 0 18px; border-radius: 20px; }
.picker::before { content: ""; position: absolute; inset: 0; z-index: 1; padding: 1.5px; border-radius: inherit; pointer-events: none; background: var(--pb-calm);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.picker.is-waiting::before { background: conic-gradient(from var(--pb-angle), var(--pb-dim) 0deg, var(--pb-dim) 210deg, var(--pb-hi) 290deg, var(--pb-dim) 360deg); animation: pb-spin 2.6s linear infinite; }
.picker.is-invalid::before { background: var(--warn); animation: none; }
@keyframes pb-spin { to { --pb-angle: 360deg; } }
.pick-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 14px 10px 12px; border: 0; border-radius: inherit; background: var(--pb-bg); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pick-btn:active { transform: scale(.99); }
.pick-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pick-step { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.picker.is-waiting .pick-step { animation: pb-ping 1.9s ease-out infinite; }
@keyframes pb-ping { 0% { box-shadow: 0 0 0 0 var(--pb-glow); } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }
.pick-act { flex: none; display: grid; place-items: center; }
.pick-open .ic { width: 22px; height: 22px; }
.pick-change { display: none; }
.picker.is-picked .pick-open { display: none; }
.picker.is-picked .pick-change { display: block; }
.step-label { display: flex; align-items: center; gap: 10px; }

.gsheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 6, 6, 0); transition: background-color .24s ease; }
.gsheet.is-open { background: rgba(2, 6, 6, .62); }
.gsheet-panel { display: flex; flex-direction: column; width: min(100%, 480px); max-height: min(84dvh, 760px); border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); }
.gsheet.is-open .gsheet-panel { transform: none; }
@media (min-width: 700px) {
  .gsheet { align-items: center; }
  .gsheet-panel { border-radius: 26px; transform: translateY(20px) scale(.98); opacity: 0; transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
  .gsheet.is-open .gsheet-panel { transform: none; opacity: 1; }
  .gsheet-grab { display: none; }
}
html.gsheet-open, html.gsheet-open body { overflow: hidden; }
.gsheet-grab { width: 40px; height: 5px; margin: 10px auto 2px; border-radius: 3px; }
.gsheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px 8px 20px; }
.gsheet-title { margin: 0; }
.gsheet-close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; }
.gsheet-list { margin: 0; padding: 2px 10px 14px; list-style: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.gopt { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 12px; border: 0; border-radius: 16px; background: transparent; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gopt-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .5; }
.gopt[aria-pressed="true"] .gopt-dot { opacity: 1; border-color: var(--dot-on); background: var(--dot-on) var(--dot-check) center / 12px no-repeat; }
.gopt-txt { display: grid; gap: 2px; min-width: 0; }

/* returning visitor: one tap back to their guides */
.gc-back { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px -6px 16px; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.25; text-decoration: none; }
.gc-back-txt { min-width: 0; overflow-wrap: anywhere; }
.gc-back-go { display: inline-flex; align-items: center; gap: 6px; flex: none; font-weight: 800; white-space: nowrap; }
.gc-back .ic { width: 16px; height: 16px; }

/* the guide page hides itself until app.js has checked this device signed up (boot.js adds .lib-gate; the failsafe removes it) */
html.lib-gate body { visibility: hidden; }

/* honeypot field: off screen, never seen or tabbed to by people */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* form controls */
.ctl { display: block; width: 100%; -webkit-appearance: none; appearance: none; }
select.ctl { cursor: pointer; text-overflow: ellipsis; background-repeat: no-repeat; }
.chk { flex: none; -webkit-appearance: none; appearance: none; margin: 0; cursor: pointer; }
.consent { display: flex; align-items: flex-start; }
.consent label { cursor: pointer; }
.gc-err:empty { display: none; }

/* buttons: label, loading dots, arrow */
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.cta .cta-dots { display: none; gap: 6px; }
.cta .cta-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pr-dot .9s ease-in-out infinite; }
.cta .cta-dots i:nth-child(2) { animation-delay: .12s; }
.cta .cta-dots i:nth-child(3) { animation-delay: .24s; }
.cta.is-loading .cta-label, .cta.is-loading > .ic { display: none; }
.cta.is-loading .cta-dots { display: inline-flex; }
.cta[disabled] { cursor: progress; }
@keyframes pr-dot { 0%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }

/* terms */
.terms summary { list-style: none; cursor: pointer; }
.terms summary::-webkit-details-marker { display: none; }

/* headline swap when a guide is picked */
.gc-title { transition: opacity .16s ease, transform .16s ease; }
.gc-title.is-swapping { opacity: 0; transform: translateY(6px); }

/* entrance: content only hides when JS is on, and boot.js reveals it after 2.5 s no matter what */
html.js .rise { opacity: 0; transform: translateY(12px); }
html.js.is-ready .rise { animation: pr-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
html.js.is-ready .d1 { animation-delay: .08s; }
html.js.is-ready .d2 { animation-delay: .16s; }
html.js.is-ready .d3 { animation-delay: .26s; }
html.js.is-ready .d4 { animation-delay: .34s; }
html.js.is-ready .d5 { animation-delay: .4s; }
html.js.is-ready .d6 { animation-delay: .46s; }
@keyframes pr-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html.js .rise { opacity: 1; transform: none; }
}
