/* =========================================================================
   "Is AMR a joke to you?" landing page
   Built on the pharmaprolearn.com system: navy and lime, cream page, white
   cards, pill buttons, Raleway.
   Solid colours only: no gradients, no drop shadows.
   ========================================================================= */

:root {
  /* pharmaprolearn.com colours */
  --brand: #102D6C;        /* navy: top bar, hero, webinar band, primary buttons on light */
  --brand-mid: #1A3C7D;    /* panels and hover on navy */
  --brand-ink: #102D6C;    /* headings, text on lime */
  --link: #1C46A5;
  --tint: #EEF3FF;
  --line: #E3E8F4;
  --accent: #DCF465;       /* lime: primary buttons, numbers, highlights */
  --accent-hover: #CDE84F;
  --accent-soft: #F4FBD3;
  --on-brand-soft: #DCE5F7;

  --ink: #1D1A2B;
  --muted: #5B5866;
  --cream: #FFFBF6;
  --white: #FFFFFF;
  --error: #B42318;
  --error-bg: #FEF3F2;
  --success: #1B6B3A;
  --success-bg: #ECF8F0;

  --font: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --radius-small: 12px;
  --pill: 999px;
  --wrap: 1120px;
  --wrap-text: 720px;
  --topbar-h: 64px;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  font-variant-numeric: lining-nums;
}

img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; color: var(--brand-ink); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }

:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.on-brand :focus-visible { outline-color: var(--accent); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--brand-ink);
  padding: 10px 16px; font-weight: 800; border-radius: var(--pill);
}
.skip-link:focus { top: 8px; }
main:focus { outline: none; }

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 20px;
}
.wrap-text { max-width: var(--wrap-text); }
.wrap-narrow { max-width: 560px; }

.section { padding-block: 64px; }
.section-tint { background: var(--tint); }
.section-white { background: var(--white); }

.section-head { margin-bottom: 32px; max-width: 42em; }
.section-title { font-size: 1.875rem; margin: 0 0 12px; }
.section-lead { color: var(--muted); font-size: 1.0625rem; margin: 0; }
.small-caps {
  margin: 0 0 8px; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--link);
}

.page-title { font-size: 1.875rem; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  min-height: var(--topbar-h);
  padding-inline: 16px;
  display: flex; align-items: center; gap: 12px;
}
.wordmark {
  display: inline-flex; flex-direction: column;
  text-decoration: none; line-height: 1.1; margin-right: auto;
}
.wordmark-name { color: var(--white); font-weight: 800; font-size: 1.125rem; }
.wordmark-name span { color: var(--accent); }
.wordmark-tag {
  color: var(--on-brand-soft); font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-top: 3px;
}
.cta-long { display: none; }
.cta-short { display: inline; }
@media (min-width: 420px) {
  .cta-long { display: inline; }
  .cta-short { display: none; }
}
.topnav { display: none; gap: 4px; }
.topnav a {
  color: var(--white); text-decoration: none; font-weight: 700; font-size: 0.9375rem;
  padding: 10px 14px; border-radius: var(--pill);
}
.topnav a:hover { background: var(--brand-mid); color: var(--white); }

.sound-toggle {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 50%;
  cursor: pointer;
}
.sound-toggle:hover { background: var(--brand-mid); }
.sound-toggle .icon { width: 20px; height: 20px; }
.sound-toggle .icon-off { display: none; }
.sound-toggle.is-muted .icon-on { display: none; }
.sound-toggle.is-muted .icon-off { display: block; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn-small { min-height: var(--tap); padding: 8px 18px; font-size: 0.9375rem; }
.btn-large { min-height: 54px; padding: 12px 30px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: var(--brand-ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--brand-ink); }

.btn-brand { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--white); }

.btn-outline { background: var(--white); color: var(--brand-ink); border-color: #C3CDE6; }
.btn-outline:hover { background: var(--tint); border-color: var(--brand-ink); color: var(--brand-ink); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { background: var(--brand-mid); border-color: var(--white); color: var(--white); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: #E6E9EF; border-color: #E6E9EF; color: #5F6676; cursor: not-allowed;
}
.btn.is-copied { background: var(--accent-soft); border-color: var(--accent); color: var(--brand-ink); }

.btn-text {
  background: none; border: 0; padding: 8px 4px; min-height: var(--tap);
  font: inherit; font-weight: 700; color: var(--link); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

.btn-icon {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--brand-ink);
  border: 1.5px solid #C3CDE6; border-radius: var(--radius-small);
  cursor: pointer;
}
.btn-icon:hover { background: var(--tint); border-color: var(--brand-ink); }
.btn-icon .icon { width: 20px; height: 20px; }

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--brand);
  color: var(--white);
  padding-block: 56px 64px;
  overflow: hidden;
}
.hero > .wrap, .webinar > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-title {
  color: var(--white);
  font-size: clamp(2.75rem, 12vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  max-width: 9em;
}
.hero-subline { color: var(--on-brand-soft); font-size: 1.125rem; max-width: 30em; margin-bottom: 30px; }
.hero-counter { margin: 28px 0 0; font-weight: 600; font-size: 1.0625rem; color: var(--white); }
.counter-number { color: var(--accent); font-weight: 800; font-size: 1.625rem; margin-right: 6px; }

/* Wall of hands: the hand from the pledge card, one per pledge */
.hand-wall { --hand-w: 24px; --hand-gap: 6px; display: flex; flex-wrap: wrap; gap: 6px var(--hand-gap); margin-top: 32px;
  max-width: calc(var(--hand-w) * 10 + var(--hand-gap) * 9); }
@media (min-width: 480px) { .hand-wall { --hand-w: 30px; --hand-gap: 8px; } }
.hand {
  --r: calc((var(--i) * 37 % 25 - 12) * 1deg);  /* a different tilt for each hand */
  width: var(--hand-w);
  height: calc(var(--hand-w) * 1.17);
  background: currentColor;
  color: rgba(255, 255, 255, 0.14);
  -webkit-mask: url("../card/hand.png") center / contain no-repeat;
  mask: url("../card/hand.png") center / contain no-repeat;
  transform: rotate(var(--r));
  transition: color 0.4s ease;
}
/* Empty hands: a soft ripple runs along the wall, inviting the next pledge. */
.hand { animation: hand-ripple 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.16s); }
@keyframes hand-ripple {
  0%, 70%, 100% { color: rgba(255, 255, 255, 0.14); translate: 0 0; }
  35% { color: rgba(255, 255, 255, 0.38); translate: 0 -4px; }
}
/* Pledged hands: white, waving like a crowd. */
.hand.is-on { color: var(--white); animation: hand-wave 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.21s); }
.hand.is-stamped { animation: hand-stamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, hand-wave 2.6s ease-in-out 0.45s infinite; }
.hand.is-new { color: var(--accent); animation: hand-stamp 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, hand-wave 2.6s ease-in-out 0.6s infinite; }
@keyframes hand-wave {
  0%, 100% { transform: rotate(var(--r)); translate: 0 0; }
  25% { transform: rotate(calc(var(--r) - 12deg)); translate: 0 -3px; }
  75% { transform: rotate(calc(var(--r) + 10deg)); translate: 0 -1px; }
}
@keyframes hand-stamp {
  from { transform: rotate(var(--r)) scale(1.9); opacity: 0; }
  to   { transform: rotate(var(--r)) scale(1); opacity: 1; }
}
.hero-counter { margin-top: 14px; }

.hero-card { display: none; margin: 0; justify-self: center; }
.hero-card canvas {
  display: block;
  width: min(340px, 100%);
  height: auto;
  border: 8px solid var(--white);
  border-radius: 14px;
  transform: rotate(3deg);
  background: var(--white);
}
.hero-card figcaption {
  margin-top: 18px; text-align: center;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-brand-soft);
}

/* ---------- Today strip ---------- */

.today {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding-block: 28px;
}
.today-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px 20px;
  align-items: center;
}
.today-day {
  display: grid; justify-items: center; align-content: center;
  width: 92px; min-height: 92px;
  background: var(--accent); color: var(--brand-ink);
  border-radius: var(--radius-small);
  padding: 8px;
  text-align: center; line-height: 1;
}
.today-day small { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.today-day strong { font-size: 2.5rem; font-weight: 800; margin: 2px 0; }
.today-label { margin: 0 0 4px; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.today-title { font-size: 1.375rem; margin: 0 0 4px; }
.today-text { margin: 0; color: var(--ink); }
.today .btn { grid-column: 1 / -1; justify-self: start; }

.mini-countdown { margin: 6px 0 8px; }
.mini-countdown .cd-unit { display: flex; align-items: baseline; gap: 4px; }
.mini-countdown .cd-num { font-size: 1.5rem; color: var(--brand); }
.mini-countdown .cd-label { color: var(--muted); }

/* ---------- Countdown ---------- */

.countdown-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.mini-countdown .countdown-units { display: flex; flex-wrap: wrap; gap: 4px 14px; text-align: left; }
.cd-num {
  display: block;
  color: var(--accent);
  font-weight: 800;
  font-size: clamp(1.75rem, 8.5vw, 2.5rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cd-label { display: block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-brand-soft); }
.cd-ended { margin: 0; font-weight: 800; font-size: 1.0625rem; color: var(--accent); }
.mini-countdown .cd-ended { color: var(--brand-ink); }

.countdown-panel {
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
}
.countdown-caption { margin: 0 0 12px; font-weight: 700; color: var(--white); }

/* Flip clock (competition). Seconds stay as plain ticking digits. */
.countdown--flip .countdown-units { gap: 8px; align-items: end; }
.countdown--flip .cd-unit { display: grid; gap: 6px; }
.flip { display: block; }
.flip-card {
  --h: clamp(52px, 15vw, 72px);
  position: relative; display: block; width: 100%; max-width: 88px; height: var(--h); margin: 0 auto;
  perspective: 320px; font-size: calc(var(--h) * 0.58); line-height: var(--h);
}
.flip-upper, .flip-lower, .flip-leaf-front, .flip-leaf-back {
  position: absolute; left: 0; right: 0; height: 50%; overflow: hidden;
  background: #0A1E4A; color: var(--accent);
}
.flip-upper, .flip-leaf-front { top: 0; border-radius: 10px 10px 0 0; }
.flip-lower, .flip-leaf-back { bottom: 0; border-radius: 0 0 10px 10px; }
.flip-upper > span, .flip-lower > span, .flip-leaf-front > span, .flip-leaf-back > span {
  display: block; height: var(--h); text-align: center;
}
.flip-lower > span, .flip-leaf-back > span { margin-top: calc(var(--h) / -2); }
.flip-leaf {
  position: absolute; left: 0; right: 0; top: 0; height: 50%; z-index: 2;
  transform-origin: bottom center; transform-style: preserve-3d;
}
.flip-leaf-front, .flip-leaf-back { height: 100%; backface-visibility: hidden; }
.flip-leaf-back { top: 0; bottom: auto; transform: rotateX(180deg); }
.flip-card.is-flipping .flip-leaf { animation: flip-down 0.6s cubic-bezier(0.45, 0, 0.55, 1) both; }
@keyframes flip-down { from { transform: rotateX(0deg); } to { transform: rotateX(-180deg); } }
.flip-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; z-index: 3;
  background: var(--brand);
}
.countdown--flip [data-unit="seconds"] { line-height: clamp(52px, 15vw, 72px); font-size: clamp(1.75rem, 8vw, 2.4rem); }

/* ---------- Pledge card builder ---------- */

.builder-shell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip; /* clip, not hidden: keeps the sticky preview working */
}
.builder { display: grid; }

.builder-preview { background: var(--tint); padding: 16px; z-index: 5; }
@media (max-width: 859px) and (min-height: 700px) {
  .builder-preview {
    position: sticky;
    top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--line);
  }
}
.preview-frame { display: flex; justify-content: center; }
#card-canvas {
  display: block;
  height: auto;
  max-width: 100%;
  max-height: 38vh;
  width: auto;
  border-radius: var(--radius-small);
  touch-action: none;
  background: var(--white);
}
#card-canvas.has-photo { cursor: grab; }
#card-canvas.is-dragging { cursor: grabbing; }
.preview-hint { text-align: center; font-size: 0.8125rem; color: var(--muted); margin: 10px 0 0; }
.privacy-note { text-align: center; font-size: 0.8125rem; font-weight: 700; color: var(--brand-ink); margin: 10px 0 0; }

.builder-controls { display: grid; gap: 26px; align-content: start; padding: 24px 20px 28px; }

.step-label { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand-ink); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--tint); color: var(--brand-ink);
  font-size: 0.875rem; font-weight: 800;
}

/* ---------- Forms ---------- */

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.stack-form, .builder-controls { grid-template-columns: minmax(0, 1fr); }
.field label, .field-legend, .small-label { font-weight: 700; color: var(--ink); }
.small-label { font-size: 0.9375rem; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.optional { font-weight: 500; color: var(--muted); }
.char-count { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.char-count.is-over { color: var(--error); font-weight: 700; }
.help { font-size: 0.875rem; color: var(--muted); margin: 0; }
.error { color: var(--error); font-weight: 600; font-size: 0.9375rem; margin: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #C3CDE6;
  border-radius: var(--radius-small);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #7A8194; }
input:focus, textarea:focus, select:focus { border-color: var(--link); outline: 3px solid var(--tint); outline-offset: 0; }
input:focus-visible, textarea:focus-visible { outline: 3px solid #C4D3F5; outline-offset: 0; }
.has-error input, .has-error textarea { border-color: var(--error); }
input[type="file"]:not(.visually-hidden) { font: inherit; max-width: 100%; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-group { display: grid; gap: 12px; }
.field-legend { padding: 0; margin-bottom: 4px; }

.checkbox-field { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.checkbox-field input[type="checkbox"] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
.checkbox-field label { font-weight: 500; font-size: 0.9375rem; }
.checkbox-field .error { grid-column: 2; }
.consent-box { background: var(--tint); border-radius: var(--radius-small); padding: 14px 16px; }

.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.photo-tools { display: grid; gap: 10px; }
.photo-tools input[type="range"] { width: 100%; min-height: var(--tap); accent-color: var(--brand); }
.nudge { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pledge-group { display: grid; gap: 8px; }
.pledge-pillar {
  margin: 8px 0 0; font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--link);
}
.pledge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pledge-option {
  position: relative;
  display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  padding: 13px 14px;
  min-height: var(--tap);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.45;
}
.pledge-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pledge-option::before {
  content: "";
  width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #B0BCD6;
  background: var(--white);
}
.pledge-option:hover { border-color: #B0BCD6; }
.pledge-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.pledge-option:has(input:checked)::before {
  border: 6px solid var(--brand);
  background: var(--white);
}
.pledge-option:has(input:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }

.prefixed-input {
  display: flex; align-items: stretch;
  border: 1.5px solid #C3CDE6; border-radius: var(--radius-small); background: var(--white);
}
.prefixed-input:focus-within { border-color: var(--link); outline: 3px solid var(--tint); }
.prefixed-input .prefix { display: flex; align-items: center; padding: 0 4px 0 14px; font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.prefixed-input input { border: 0; padding-left: 4px; }
.prefixed-input input:focus, .prefixed-input input:focus-visible { outline: none; }

.download-area { display: grid; gap: 10px; }
.missing { font-size: 0.875rem; color: var(--muted); margin: 0; text-align: center; }
.status { margin: 0; font-weight: 600; text-align: center; }
.status:empty { display: none; }
.status.is-error { color: var(--error); }
.status.is-success { color: var(--success); }

.share-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--cream);
  display: grid; gap: 12px;
}
.share-panel:focus { outline: none; }
.share-title { font-size: 1.375rem; margin: 0; }
.share-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: step; }
.share-steps li { display: flex; gap: 10px; align-items: flex-start; counter-increment: step; }
.share-steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--accent); color: var(--brand-ink); font-weight: 800; font-size: 0.8125rem;
}
.caption-box { background: var(--white); font-size: 0.9375rem; }
.copy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.copy-fallback { margin: 0; font-weight: 700; color: var(--brand-ink); }
.handles { margin: 0; font-size: 0.875rem; color: var(--muted); }
.share-lead { margin: 0; }
.share-tag {
  margin: 0; padding: 10px 14px; border-radius: var(--radius-small);
  background: var(--accent-soft); color: var(--brand-ink); font-size: 0.9375rem;
}
.share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.share-tag-title { margin: 0 0 6px; font-weight: 800; }
.tag-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.875rem; }
.hashtag-block { display: grid; gap: 8px; justify-items: start; }
.hashtag-block .small-label { margin: 0; }
.hashtag-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hashtag-chip {
  min-height: var(--tap); padding: 0 16px; border-radius: var(--pill);
  border: 1px solid var(--brand); background: var(--white); color: var(--brand-ink);
  font: 700 0.9375rem var(--font); cursor: pointer;
}
.hashtag-chip:hover { background: var(--tint); }
.hashtag-chip.is-copied { background: var(--accent); border-color: var(--accent); }
.dialog-reminder { margin: 4px 0 0; text-align: center; font-size: 0.875rem; color: var(--muted); }
.share-note { margin: 0; }

/* ---------- Competition ---------- */

.competition-grid { display: grid; gap: 32px; }
.key-dates { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 12px; }
.key-date { display: flex; align-items: center; gap: 16px; }
.date-tile {
  display: grid; justify-items: center; align-content: center;
  width: 64px; height: 64px; flex: none;
  border: 2px solid var(--brand-ink); border-radius: var(--radius-small);
  color: var(--brand-ink); line-height: 1;
}
.date-tile strong { font-size: 1.5rem; font-weight: 800; }
.date-tile small { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
.key-date p { margin: 0; font-weight: 600; }
.key-date p span { display: block; font-weight: 500; color: var(--muted); font-size: 0.9375rem; }

.brief { margin: 16px 0 0; display: grid; gap: 0; }
.brief-item { padding: 14px 0; border-top: 1px solid var(--line); }
.brief-item:last-child { border-bottom: 1px solid var(--line); }
.brief dt { font-weight: 800; color: var(--brand-ink); }
.brief dd { margin: 2px 0 0; color: var(--muted); }
.rules-link { display: inline-block; margin-top: 16px; font-weight: 700; }

/* ---------- Webinar ---------- */

.webinar { position: relative; overflow: hidden; background: var(--brand); color: var(--white); }
.webinar .section-title { color: var(--white); }
.webinar .section-lead { color: var(--on-brand-soft); }
.ticket {
  position: relative;
  display: grid;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
}
.ticket-stub {
  background: var(--accent);
  color: var(--brand-ink);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 22px;
  display: grid; align-content: center; gap: 2px;
  position: relative;
}
.ticket-stub small { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.ticket-stub strong { font-size: 3.25rem; font-weight: 800; line-height: 1; }
.ticket-stub span { font-weight: 700; }
/* Punched notches where the stub tears off */
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); bottom: -13px;
}
.ticket-stub::before { left: -13px; }
.ticket-stub::after { right: -13px; }
.ticket-body { padding: 26px 22px 28px; display: grid; gap: 16px; }
.ticket-title { font-size: 1.375rem; margin: 0; }
.ticket-meta { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--muted); font-weight: 600; }
.ticket-meta strong { color: var(--ink); }
.webinar-note { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Get involved ---------- */

.involve-list { list-style: none; margin: 0; padding: 0; }
.involve-row {
  display: grid; gap: 6px 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.involve-row:last-child { border-bottom: 1px solid var(--line); }
.involve-row h3 { font-size: 1.25rem; margin: 0; }
.involve-row p { margin: 0 0 10px; color: var(--muted); }
.involve-row .btn { justify-self: start; }

/* ---------- Partners ---------- */


/* Moving strip: two identical tracks slide left together, so the loop is seamless. */
.partner-marquee { display: flex; overflow: hidden; padding-block: 4px; }
.partner-track {
  list-style: none; margin: 0; padding: 0 16px 0 0;
  display: flex; gap: 16px; flex: none;
  animation: partner-scroll var(--duration, 28s) linear infinite;
}
@keyframes partner-scroll { to { transform: translateX(-100%); } }
.partner-marquee:hover .partner-track,
.partner-marquee:focus-within .partner-track { animation-play-state: paused; }
.partner { flex: none; }
.partner a, .partner > img { display: block; }
.partner img, .partner-placeholder {
  width: 168px; height: 88px;
  border-radius: var(--radius-small);
}
.partner img { object-fit: contain; padding: 16px; background: var(--white); border: 1px solid var(--line); }
.partner-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px;
  background: var(--tint); color: var(--muted);
  border: 1px dashed #C3CDE6;
  font-weight: 600; font-size: 0.875rem;
}
@media (prefers-reduced-motion: reduce) {
  .partner-marquee { flex-wrap: wrap; justify-content: center; }
  .partner-track { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .partner-track[aria-hidden="true"], .partner[aria-hidden="true"] { display: none; }
}


/* ---------- Secondary pages ---------- */

.page-band { background: var(--brand); color: var(--white); padding-block: 36px 44px; }
.page-band .page-title { color: var(--white); margin-bottom: 6px; }
.page-band p { color: var(--on-brand-soft); margin: 0; }
.page-band a { color: var(--accent); }
.breadcrumb { font-size: 0.875rem; font-weight: 700; margin-bottom: 10px; }
.breadcrumb a { color: var(--on-brand-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }

.form-card { margin-top: -22px; position: relative; padding-bottom: 64px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
.card > :last-child { margin-bottom: 0; }
.form-footnote { margin: 18px 0 0; text-align: center; }
.stack-form { display: grid; gap: 20px; }

.radio-row > div { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: var(--pill);
  background: var(--white); font-weight: 600; cursor: pointer;
}
.radio-row label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.radio-row input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }

.page-band .countdown-panel { background: var(--brand-mid); margin-top: 18px; }
.status-line { margin: 4px 0 0; font-weight: 600; color: var(--on-brand-soft); }
.status-badge {
  display: inline-block; padding: 4px 12px; border-radius: var(--pill);
  font-weight: 800; font-size: 0.875rem;
  background: var(--brand-mid); color: var(--white); border: 1px solid rgba(255, 255, 255, 0.25);
}
.status-draft { background: var(--white); color: var(--brand-ink); border-color: var(--white); }
.status-submitted { background: var(--accent); color: var(--brand-ink); border-color: var(--accent); }
.logout-form { margin-top: 20px; text-align: center; }

.error-summary {
  border: 1.5px solid var(--error); border-radius: var(--radius-small);
  padding: 14px 16px; margin: 0 0 20px; background: var(--error-bg); color: var(--ink);
}
.error-summary:focus { outline: 3px solid #F9C5C0; }
.error-summary-title { font-weight: 800; color: var(--error); margin: 0 0 6px; }
.error-summary ul { margin: 0; padding-left: 1.25em; }
.error-summary a { color: var(--error); }

.messages { padding-top: 16px; }
.message {
  padding: 12px 16px; border-radius: var(--radius-small);
  border: 1px solid #C4D3F5; background: var(--tint); color: var(--brand-ink);
  font-weight: 600; margin: 0 0 12px;
}
.message-success { border-color: #A6D9B7; background: var(--success-bg); color: var(--success); }
.message-error { border-color: #F9C5C0; background: var(--error-bg); color: var(--error); }

/* ---------- Footer ---------- */

.footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-block: 44px calc(28px + env(safe-area-inset-bottom, 0px));
}
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.footer-grid > div { min-width: 0; }
.footer-heading { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; overflow-wrap: anywhere; }
.footer a:hover { color: var(--link); text-decoration: underline; }
.footer-hashtags { font-weight: 800; color: var(--brand-ink); margin: 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--muted);
}
.footer-bottom p { margin: 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  .section { padding-block: 80px; }
  .section-title { font-size: 2.25rem; }
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { padding: 36px 40px; }
  .today .btn { grid-column: auto; }
  .today-grid { grid-template-columns: auto minmax(0, 1fr) auto; }
  .mini-countdown .cd-num { font-size: 1.75rem; }
  .involve-row { grid-template-columns: 220px 1fr auto; align-items: center; }
  .involve-row p { margin: 0; }
  .ticket { grid-template-columns: 200px 1fr; }
  .ticket-stub { border-radius: var(--radius) 0 0 var(--radius); padding: 28px; }
  .ticket-stub::before, .ticket-stub::after { left: auto; right: -13px; }
  .ticket-stub::before { top: -13px; bottom: auto; }
  .ticket-stub::after { bottom: -13px; }
  .ticket-body { padding: 32px 36px 36px; }
}

@media (min-width: 860px) {
  .wrap { padding-inline: 28px; }
  .topnav { display: flex; }
  .hero { padding-block: 88px 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .hero-card { display: block; }
  .section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; max-width: none; align-items: end; }
  .section-head .section-title { margin: 0; }
  .builder { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch; }
  .builder-preview { padding: 32px; border-right: 1px solid var(--line); }
  .builder-preview-inner { position: sticky; top: calc(var(--topbar-h) + 24px); }
  #card-canvas { max-height: calc(100vh - var(--topbar-h) - 150px); }
  .builder-controls { padding: 32px 36px 36px; }
  .competition-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
}

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

/* ---------- Card preview dialog ---------- */

.card-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.card-dialog::backdrop { background: rgba(16, 45, 108, 0.72); }
.card-dialog-inner { padding: 16px 20px 20px; }
.card-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-dialog-head h3 { margin: 0; font-size: 1.25rem; }
.card-dialog-lead { margin: 4px 0 12px; color: var(--muted); font-size: 0.9375rem; }
.card-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 330px);
  object-fit: contain;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: var(--tint);
}
.card-dialog-actions { display: grid; gap: 10px; margin-top: 16px; justify-items: center; }
.card-dialog-actions .btn { width: 100%; }

/* ---------- Test mode banner (DEBUG only) ---------- */

.demo-banner {
  background: var(--accent);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
  padding: 8px 16px;
}
.demo-banner a { color: var(--brand-ink); margin-left: 6px; }

/* ---------- Pledge wall: a celebration ---------- */

.consent-wall { border: 1px dashed var(--brand); }
.pledge-wall { position: relative; overflow: hidden; background: var(--brand); color: var(--white); }
.pledge-wall > .wrap { position: relative; z-index: 1; }
.pledge-wall .section-title { color: var(--white); }
.pledge-wall .section-lead { color: var(--on-brand-soft); }
.wall-head { max-width: 40em; margin-bottom: 28px; }
.wall-kicker {
  display: inline-block; margin: 0 0 10px; padding: 6px 14px; border-radius: var(--pill);
  background: var(--accent); color: var(--brand-ink);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}

/* The wall: two rows slide sideways in opposite directions at different
   speeds, and each card bobs and tilts as it passes, like cards on a line. */
.wall-stage { display: grid; gap: 18px; overflow: hidden; padding-block: 12px; }
.wall-row { display: flex; overflow: visible; }
.wall-track {
  list-style: none; margin: 0; padding: 0 16px 0 0;
  display: flex; gap: 16px; flex: none; align-items: center;
  animation: wall-left calc(46s + var(--r) * 12s) linear infinite;
}
.wall-row:nth-child(even) .wall-track { animation-name: wall-right; }
@keyframes wall-left { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes wall-right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.wall-stage:hover .wall-track, .wall-stage:focus-within .wall-track { animation-play-state: paused; }
.wall-tile {
  --tilt: calc((var(--i) * 47 % 9 - 4) * 0.9deg);
  flex: none; width: 150px;
  transform: rotate(var(--tilt));
  animation: tile-bob calc(4.5s + var(--i) * 0.6s) ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.1s);
  transition: scale 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.wall-tile:hover { scale: 1.06; position: relative; z-index: 2; }
@keyframes tile-bob {
  0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
  50% { transform: translateY(-10px) rotate(calc(var(--tilt) * -1)); }
}
.wall-tile.is-new img { outline: 4px solid var(--accent); }
@media (min-width: 600px) { .wall-tile { width: 200px; } }
@media (min-width: 860px) { .wall-tile { width: 230px; } .wall-track { gap: 24px; padding-right: 24px; } .wall-stage { gap: 26px; } }
.wall-tile img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-small); border: 5px solid var(--white); background: var(--white);
}
.wall-placeholder {
  display: grid; place-items: center; align-content: center; gap: 10px;
  aspect-ratio: 3 / 4; border-radius: var(--radius-small);
  border: 2px dashed rgba(220, 244, 101, 0.55); color: var(--accent);
  font-weight: 800; text-decoration: none; text-align: center; padding: 12px;
}
.wall-placeholder:hover { background: rgba(220, 244, 101, 0.1); color: var(--accent); }
.wall-placeholder-hand {
  width: 44px; height: 52px; background: currentColor;
  -webkit-mask: url("../card/hand.png") center / contain no-repeat;
  mask: url("../card/hand.png") center / contain no-repeat;
  animation: hand-wave 2.6s ease-in-out infinite; --r: -8deg;
}
.wall-cta { display: flex; justify-content: center; margin-top: 28px; }

/* Confetti: lime and white dots drifting down behind the wall */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute; top: -12px;
  left: calc((var(--i) * 37 % 100) * 1%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: 0.5;
  animation: confetti-fall calc(9s + (var(--i) * 13 % 7) * 1s) linear infinite;
  animation-delay: calc(var(--i) * -1.1s);
}
.confetti span:nth-child(3n) { background: var(--white); width: 6px; height: 6px; opacity: 0.35; }
.confetti span:nth-child(4n) { border-radius: 2px; width: 10px; height: 4px; }
@keyframes confetti-fall {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(1400px) rotate(540deg); }
}
.pledge-wall .corner-dots--tr { top: 24px; }

@media (prefers-reduced-motion: reduce) {
  .wall-row { overflow-x: auto; }
  .wall-track[aria-hidden="true"], .confetti { display: none; }
}

/* ---------- Competition: pledge required ---------- */

.competition-note { margin-bottom: 20px; }
.competition-note a { margin-left: 4px; font-weight: 700; }
.competition-return { margin: 0; display: grid; gap: 10px; justify-items: center; text-align: center; font-weight: 700; color: var(--success); }
.pledge-step {
  display: grid; gap: 8px; justify-items: start;
  padding: 18px; margin-bottom: 20px; border-radius: var(--radius-small);
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.pledge-step.is-done { background: var(--success-bg); border-color: #A6D9B7; }
.pledge-step-title { margin: 0; font-weight: 800; color: var(--brand-ink); }
.pledge-step-text { margin: 0; }

/* ---------- AMR theme: microbes, corner dots, ticker, reveal ---------- */

.microbes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.microbe {
  transform-box: fill-box; transform-origin: center;
  animation: microbe-drift var(--d, 24s) ease-in-out infinite alternate;
}
.microbe:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes microbe-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(var(--x), var(--y)) rotate(var(--rot)); }
}
.mb-body { fill: #1F4590; }
.mb-tail, .mb-spiral { fill: none; stroke: #1F4590; stroke-linecap: round; }
.mb-tail { stroke-width: 4; }
.mb-spiral { stroke-width: 10; }
.mb-ring { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0.45; }
@media (max-width: 859px) { .microbes { opacity: 0.7; } .mb-center { display: none; } }

/* pharmaprolearn.com corner dots */
.corner-dots { position: absolute; pointer-events: none; }
.corner-dots circle { fill: rgba(220, 244, 101, 0.55); }
.corner-dots--tr { top: 28px; right: 4%; opacity: 0.86; }
.corner-dots--bl { bottom: 28px; left: 3%; opacity: 0.62; }
@media (max-width: 859px) { .corner-dots--tr { top: 12px; right: 12px; transform: scale(0.7); transform-origin: top right; } }

.ticker { display: flex; overflow: hidden; background: var(--accent); color: var(--brand-ink); }
.ticker-track {
  list-style: none; margin: 0; padding: 14px 0; flex: none;
  display: flex; align-items: center; gap: 22px; padding-right: 22px;
  font-weight: 800; font-size: 1rem; letter-spacing: 0.01em; white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
@keyframes ticker-scroll { to { transform: translateX(-100%); } }
.ticker-hand {
  width: 18px; height: 21px; flex: none; background: var(--brand-ink);
  -webkit-mask: url("../card/hand.png") center / contain no-repeat;
  mask: url("../card/hand.png") center / contain no-repeat;
}

/* Sections slide up gently as they come into view (added by hero.js). */
.reveal { opacity: 0; translate: 0 26px; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s ease; }
.reveal.is-visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track + .ticker-track { display: none; }
  .ticker-track { flex-wrap: wrap; white-space: normal; padding-inline: 16px; }
  .reveal { opacity: 1; translate: none; }
}

/* Flip clock in the today strip (light background, compact) */
.mini-flip .countdown--flip .countdown-units { display: grid; grid-template-columns: repeat(4, minmax(0, 64px)); gap: 8px; text-align: center; }
.mini-flip .countdown--flip .cd-unit { display: grid; gap: 4px; }
.mini-flip .flip-card { --h: 48px; max-width: 64px; }
.mini-flip .flip-card::after { background: var(--white); }
.mini-flip .countdown--flip [data-unit="seconds"] { line-height: 48px; font-size: 1.6rem; color: var(--brand); }
.mini-flip .cd-label { color: var(--muted); }

/* ---------- Photo step and photo editor ---------- */

.photo-empty { display: grid; gap: 8px; }
.photo-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 72px; padding: 14px 18px; border-radius: var(--radius-small);
  border: 2px dashed var(--brand); background: var(--white); color: var(--brand-ink);
  font-weight: 800; font-size: 1.0625rem; cursor: pointer;
}
.photo-drop:hover { background: var(--tint); }
.photo-drop .icon { width: 26px; height: 26px; }
#photo-input:focus-visible + .photo-empty .photo-drop { outline: 3px solid var(--link); outline-offset: 2px; }
.photo-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.photo-thumb { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--accent); background: var(--tint); flex: none; }
.photo-tools .photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.photo-editor-canvas {
  display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 1; margin: 0 auto;
  border-radius: var(--radius-small); touch-action: none; cursor: grab; background: #0A1E4A;
}
.photo-editor-canvas.is-dragging { cursor: grabbing; }
.zoom-row { display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 14px auto 0; }
.zoom-row input[type=range] { flex: 1; accent-color: var(--brand); min-height: var(--tap); }
.editor-tools { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 8px; }
.editor-actions { margin-top: 12px; }

/* ---------- Share step (after download) ---------- */

.share-panel { gap: 18px; background: var(--white); }
.share-done { display: flex; align-items: center; gap: 14px; }
.share-check {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%; background: var(--success-bg); color: var(--success);
}
.share-check svg { width: 28px; height: 28px; }
.share-title { margin: 0; }
.share-saved { margin: 2px 0 0; color: var(--muted); font-size: 0.9375rem; }
.share-block { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-label { margin: 0; font-weight: 800; color: var(--brand-ink); }
.share-block .help { margin: 0; }
.platform-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.platform {
  display: grid; justify-items: center; gap: 6px; padding: 12px 6px;
  border: 1px solid var(--line); border-radius: var(--radius-small);
  text-decoration: none; color: var(--ink); font-size: 0.8125rem; font-weight: 700;
  min-height: var(--tap);
}
.platform:hover { border-color: var(--brand); background: var(--tint); color: var(--ink); }
.platform.is-copied { border-color: var(--accent); background: var(--accent-soft); }
.platform-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--cream); }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9375rem; }
.tag-list li { display: inline-flex; align-items: center; gap: 6px; }
.copy-all { justify-self: start; }
.caption-details summary { cursor: pointer; font-weight: 700; color: var(--link); min-height: var(--tap); display: flex; align-items: center; }
.caption-details[open] { display: grid; gap: 10px; }
.caption-details .btn { justify-self: start; }
.share-edit { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-edit .help { margin: 0; text-align: center; }
@media (min-width: 480px) { .platform-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- Published submissions ---------- */

.results-callout {
  display: grid; gap: 10px; justify-items: start; margin: 0 0 20px; padding: 18px;
  border-radius: var(--radius); background: var(--brand); color: var(--white);
}
.results-callout p { margin: 0; font-weight: 800; font-size: 1.125rem; }
.winners-lead { margin-bottom: 20px; }
.winner-entry { display: grid; gap: 10px; margin-bottom: 20px; }
.award-badge {
  justify-self: start; margin: 0; padding: 6px 14px; border-radius: var(--pill);
  font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--tint); color: var(--brand-ink);
}
.award-winner { background: var(--accent); }
.winner-title { margin: 0; font-size: 1.5rem; }
.winner-meta { margin: 0; color: var(--muted); }
.winner-text { border-top: 1px solid var(--line); padding-top: 12px; }
.winner-entry .btn { justify-self: start; }

/* ---------- Learn about AMR ---------- */

.learn { background: var(--white); }
.learn-head { max-width: 42em; margin-bottom: 24px; }
.learn-kicker {
  display: inline-block; margin: 0 0 10px; padding: 6px 14px; border-radius: var(--pill);
  background: var(--brand); color: var(--accent);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.learn-label { margin: 32px 0 14px; font-size: 1.25rem; }
.action-grid, .fact-grid, .myth-grid, .resource-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.action-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
  border-radius: var(--radius-small); background: var(--tint);
}
.action-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--brand-ink); font-weight: 800;
}
.action-title { margin: 0 0 2px; font-weight: 800; color: var(--brand-ink); }
.action-text { margin: 0; color: var(--ink); }
.fact-card { padding: 20px; border-radius: var(--radius); background: var(--white); border: 2px solid var(--brand); color: var(--brand-ink); }
.fact-number { display: block; font-size: clamp(1.75rem, 7vw, 2.4rem); line-height: 1.1; color: var(--brand-ink); font-weight: 800; }
.fact-card p { margin: 8px 0; }
.fact-card small { color: var(--brand-ink); font-weight: 700; }
.myth-card {
  position: relative; display: grid; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0;
  background: none; cursor: pointer; perspective: 900px; font: inherit; text-align: left;
}
/* Both faces use the playing-card style of "Six things you can do". */
.myth-front, .myth-back {
  position: relative; grid-area: 1 / 1; display: grid; align-content: center; gap: 10px; padding: 30px 26px;
  border-radius: 22px; border: 3px solid var(--brand); overflow: hidden; backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.myth-front::before, .myth-back::before {
  content: ""; position: absolute; inset: 9px; border-radius: 15px;
  border: 2px dashed currentColor; opacity: 0.35; pointer-events: none;
}
.myth-front { background: var(--brand); color: var(--white); }
.myth-back { background: var(--accent); color: var(--brand-ink); transform: rotateY(180deg); }
.myth-front .myth-tag { color: var(--accent); }
.myth-front .myth-hint { color: var(--accent); }
.myth-card[aria-expanded="true"] .myth-front { transform: rotateY(-180deg); }
.myth-card[aria-expanded="true"] .myth-back { transform: rotateY(0deg); }
.myth-tag { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.myth-back .myth-tag { color: var(--brand-ink); }
.myth-claim { position: relative; font-size: 1.375rem; line-height: 1.2; font-weight: 800; }
.myth-hint { position: relative; font-size: 0.875rem; font-weight: 700; }
.myth-answer { position: relative; font-size: 1.125rem; font-weight: 700; }
.resource {
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-small);
  color: var(--ink); background: var(--white); height: 100%;
}
.resource-by {
  display: inline-flex; padding: 4px 10px; border-radius: var(--pill);
  background: var(--brand); color: var(--white); font-size: 0.75rem; font-weight: 800;
}
.resource-main { display: grid; gap: 4px; min-width: 0; }
.resource-cat { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.resource-title { font-weight: 800; color: var(--brand-ink); }
.resource-desc { color: var(--muted); font-size: 0.9375rem; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.resource-meta { font-weight: 600; opacity: 0.85; }
.library { display: grid; gap: 12px; }
.library-filter { flex-wrap: wrap; overflow: visible; }
.library-empty, .library-empty-all { margin: 0; padding: 18px; border-radius: var(--radius-small); background: var(--tint); color: var(--brand-ink); font-weight: 700; }
.resource-list li[hidden] { display: none; }
@media (min-width: 600px) {
  .action-grid, .myth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .resource-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .action-grid, .myth-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .myth-back { transform: none; display: none; }
  .myth-card[aria-expanded="true"] .myth-front { display: none; }
  .myth-card[aria-expanded="true"] .myth-back { display: grid; }
}

/* ---------- Pledge audience chips ---------- */

.audience-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 4px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.audience-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  border-radius: var(--pill); border: 1px solid #B0BCD6; background: var(--white);
  color: var(--brand-ink); font-weight: 700; font-size: 0.9375rem; white-space: nowrap; cursor: pointer;
}
.chip:hover span { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.pledge-group[hidden] { display: none; }
.show-more { justify-self: start; }
.pledge-own { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Scrolling rows must not widen their containers (grid items and fieldsets
   default to their content width). */
.audience-chips { min-width: 0; }
fieldset { min-width: 0; }

/* Pledge groups: four options in a 2 x 2 grid */
.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.audience-option { position: relative; display: flex; }
.audience-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.audience-option span {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px;
  padding: 10px 12px; border-radius: var(--radius-small); border: 1px solid #B0BCD6; background: var(--white);
  color: var(--brand-ink); font-weight: 700; font-size: 0.9375rem; line-height: 1.25; text-align: center; cursor: pointer;
}
.audience-option:hover span { border-color: var(--brand); }
.audience-option input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); }
.audience-option input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.audience-prompt { margin: 0; }

/* ---------- Six things you can do: a stack of playing cards ---------- */

.deck-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.deck-card {
  --bg: var(--accent); --fg: var(--brand-ink); --num-bg: var(--brand); --num-fg: var(--accent);
  position: relative; display: grid; align-content: start; gap: 8px;
  padding: 30px 26px 34px; border-radius: 22px; overflow: hidden;
  background: var(--bg); color: var(--fg); border: 3px solid var(--brand);
}
.deck-card::before {   /* the inner border of a playing card */
  content: ""; position: absolute; inset: 9px; border-radius: 15px;
  border: 2px dashed currentColor; opacity: 0.35; pointer-events: none;
}
.deck-card--2, .deck-card--5 { --bg: var(--brand); --fg: var(--white); --num-bg: var(--accent); --num-fg: var(--brand-ink); }
.deck-card--3, .deck-card--6 { --bg: var(--white); --fg: var(--brand-ink); --num-bg: var(--accent); --num-fg: var(--brand-ink); }
.deck-corner {
  position: absolute; font-weight: 800; font-size: 1.125rem; line-height: 1;
}
.deck-corner--top { top: 18px; left: 20px; }
.deck-corner--bottom { bottom: 18px; right: 20px; transform: rotate(180deg); }
.deck-hand {
  position: absolute; right: -18px; bottom: -14px; width: 150px; height: 176px;
  background: currentColor; opacity: 0.1; transform: rotate(-14deg);
  -webkit-mask: url("../card/hand.png") center / contain no-repeat;
  mask: url("../card/hand.png") center / contain no-repeat;
}
.deck-num {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  width: 64px; height: 64px; margin: 8px 0 6px; border-radius: 50%;
  background: var(--num-bg); color: var(--num-fg); font-size: 2rem; font-weight: 800;
}
.deck-title { position: relative; margin: 0; font-size: 1.5rem; line-height: 1.15; font-weight: 800; }
.deck-text { position: relative; margin: 0; font-size: 1.0625rem; max-width: 22em; }

/* Stacked (with JavaScript): cards fan out behind the top one */
.deck.is-ready .deck-cards { position: relative; display: block; height: 380px; max-width: 360px; margin: 0 auto; }
.deck.is-ready .deck-card {
  --fan: 3deg;
  position: absolute; inset: 0 24px 24px 0; touch-action: pan-y; user-select: none;
  transform:
    translate(calc(var(--pos, 0) * 9px + var(--drag, 0px)), calc(var(--pos, 0) * 9px))
    rotate(calc(var(--pos, 0) * var(--fan) + var(--tilt, 0deg)));
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease;
}
.deck.is-ready .deck-card:nth-child(even) { --fan: -3deg; }
.deck.is-ready .deck-card.is-top { cursor: grab; animation: deck-bob 3.2s ease-in-out infinite; }
.deck.is-ready .deck-card.is-dragging { transition: none; cursor: grabbing; animation: none; }
.deck.is-ready .deck-card.is-tossed {
  transform: translateX(calc(var(--toss, 1) * 140%)) rotate(calc(var(--toss, 1) * 24deg));
  opacity: 0; animation: none;
}
@keyframes deck-bob { 50% { translate: 0 -6px; } }
.deck-controls { display: grid; justify-items: center; gap: 10px; margin-top: 18px; text-align: center; }
.deck-count { margin: 0; font-weight: 800; color: var(--brand-ink); }
.deck-buttons { display: flex; align-items: center; gap: 12px; }
.deck-hint { margin: 0; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 860px) { .deck.is-ready .deck-cards { max-width: 420px; height: 360px; } }
.deck { overflow-x: clip; padding-block: 8px; }
.deck.is-ready .deck-controls { margin-top: 34px; }

/* Want to do more? Playing cards side by side (not stacked) */
.involve-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.involve-card { padding-bottom: 40px; }
.involve-card .deck-title { font-size: 1.5rem; }
.involve-btn { position: relative; justify-self: start; margin-top: 10px; }
.involve-cards .involve-card:nth-child(odd) { rotate: -1deg; }
.involve-cards .involve-card:nth-child(even) { rotate: 1deg; }
.involve-card { transition: rotate 0.3s ease, translate 0.3s ease; }
.involve-card:hover { rotate: 0deg; translate: 0 -4px; }
@media (min-width: 860px) { .involve-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.deck-card .deck-title { color: inherit; }

/* ---------- Know AMR card (landing page) ---------- */

.know-card-section { padding-block: 40px; }
.know-card {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 200px; padding: 36px 28px; border-radius: 22px; overflow: hidden;
  background: var(--brand); color: var(--white); border: 3px solid var(--brand); text-decoration: none;
  transition: translate 0.3s ease;
}
.know-card::before {
  content: ""; position: absolute; inset: 9px; border-radius: 15px;
  border: 2px dashed currentColor; opacity: 0.3; pointer-events: none;
}
.know-card:hover { color: var(--white); translate: 0 -4px; }
.know-card .deck-hand { color: var(--accent); opacity: 0.18; width: 190px; height: 222px; right: 70px; bottom: -40px; }
.know-card-title { position: relative; margin: 0; max-width: 16em; color: var(--white); }
.know-card-arrow {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--brand-ink);
  transition: translate 0.3s ease;
}
.know-card-arrow svg { width: 30px; height: 30px; }
.know-card:hover .know-card-arrow { translate: 6px 0; }

/* ---------- Section headings: one size everywhere ("Make your pledge card") ---------- */

.learn-label, .today-title, .page-title { font-size: 1.875rem; line-height: 1.15; }
@media (min-width: 600px) {
  .learn-label, .today-title, .page-title { font-size: 2.25rem; }
}

/* ---------- Partner logos sit on the background, not in cards ---------- */

.partner img { padding: 0; background: none; border: 0; border-radius: 0; }
.partner-placeholder {
  background: none; border: 0; border-radius: 0; padding: 0;
  color: var(--muted); font-size: 1rem; font-weight: 700;
}

/* ---------- Hero: centred, sizes matched to the pharmaprolearn.com hero ---------- */
/* Measured on pharmaprolearn.com: headline 21.75px (375px wide) to 26.24px (1280px),
   subheading 14px to 15.1px, buttons 14px. */
.hero-centered { grid-template-columns: minmax(0, 1fr) !important; justify-items: center; text-align: center; }
.hero-centered > div { display: grid; justify-items: center; max-width: 800px; }
.hero-centered .hero-title {
  font-size: clamp(30px, calc(24px + 1.6vw), 44px);
  line-height: 1.1; letter-spacing: -0.01em; max-width: 800px; margin-bottom: 14px;
}
.hero-centered .hero-subline {
  font-size: clamp(14px, calc(11.6px + 0.273vw), 15.1px);
  line-height: 1.62; font-weight: 600; max-width: 640px; margin-bottom: 24px;
}
.hero-centered .button-row { justify-content: center; }
.hero-centered .btn-large { font-size: 14px; min-height: 44px; padding: 8px 22px; }
.hero-centered .hero-counter { font-size: 0.9375rem; }
.hero-centered .counter-number { font-size: 1.25rem; }
.hero-centered .hand-wall { justify-content: center; }

/* ---------- Competition: short landing section, full details on /competition/ ---------- */

.competition-teaser { display: grid; gap: 24px; align-items: center; }
.competition-teaser .button-row { margin-top: 4px; }
.certificate-callout {
  display: grid; gap: 6px; justify-items: start; margin-top: 24px; padding: 18px;
  border-radius: var(--radius-small); background: var(--tint);
}
.certificate-callout p { margin: 0; }
.certificate-callout-title { font-weight: 800; color: var(--brand-ink); }
@media (min-width: 860px) { .competition-teaser { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }

/* ---------- Certificates ---------- */

.certificate-form { display: grid; gap: 18px; }
.certificate-preview { border-radius: var(--radius-small); border: 1px solid var(--line); overflow: hidden; background: var(--tint); }
.certificate-preview canvas { display: block; width: 100%; height: auto; }
.certificate-panel { display: grid; gap: 8px; justify-items: start; margin-top: 20px; }
.certificate-panel p { margin: 0; }

/* ---------- Pledge hand (hero) ---------- */
/* Phones: under the text. From 860px: a column on the right, beside the text. */
.pledge-hand { display: flex; justify-content: center; margin-top: 28px; }
.pledge-hand canvas {
  display: block; width: min(200px, 55vw); height: auto;
  opacity: 1;
}
@media (min-width: 860px) {
  .hero-centered { grid-template-columns: minmax(0, 1fr) minmax(0, 360px) !important; justify-items: stretch; column-gap: 48px; }
  .hero-centered > div:first-child { justify-self: center; }
  .pledge-hand { margin-top: 0; justify-content: flex-end; align-self: center; }
  .pledge-hand canvas { width: 100%; max-width: 340px; }
}

/* ---------- Writing competition, part A ---------- */
.competition-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; font-weight: 700; }
.competition-links a { min-height: 44px; display: inline-flex; align-items: center; }
.verification-line { margin-top: 4px; }
.entry-receipt { border: 2px solid var(--brand); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.entry-receipt-title { margin: 0 0 8px; font-weight: 800; color: var(--brand-ink); }
.entry-receipt dl { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 8px; }
.entry-receipt dt { font-size: 0.8125rem; color: var(--muted); }
.entry-receipt dd { margin: 0; font-weight: 700; }
.entry-code { font-size: 1.25rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.autosave-status { min-height: 1.4em; margin: 8px 0 0; }
.confirm-dialog { max-width: 420px; }
.confirm-dialog h3 { margin: 0 0 4px; font-size: 1.25rem; }
.entry-form textarea[disabled], .entry-form input[disabled] { background: #F3F5FA; color: var(--ink, #1A1F2E); }
.rules h2 { margin: 32px 0 10px; font-size: 1.25rem; color: var(--brand-ink); }
.rules-lead { font-size: 1.0625rem; font-weight: 600; }
.table-scroll { overflow-x: auto; margin: 12px 0 16px; }
.rules table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.9375rem; }
.rules th, .rules td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rules thead th { background: var(--brand); color: #fff; font-weight: 700; }
.rules tbody th { font-weight: 700; color: var(--brand-ink); }
.rules ul, .rules ol { padding-left: 1.25rem; }
.rules li { margin: 6px 0; }
.consent-box .checkbox-field + .checkbox-field { margin-top: 14px; }
input[type="file"] { font: inherit; font-size: 0.9375rem; max-width: 100%; min-height: 44px; }
input[type="file"]::file-selector-button {
  min-height: 44px; padding: 0 18px; margin-right: 12px; border: 2px solid var(--brand); border-radius: 999px;
  background: #fff; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer;
}

/* Shared PharmaProLearn footer: mirrors the main site without importing its global CSS. */
.ppl-footer-simple { background: #ffffff; border-top: 1px solid #e7eaf0; color: #26324a; padding: 48px 0 24px; }
.ppl-footer-simple .container { margin-inline: auto; max-width: 1180px; padding-inline: 24px; width: 100%; }
.ppl-footer-simple__grid { display: grid; gap: 32px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ppl-footer-simple__title { color: #102d6c; font-size: 13px; font-weight: 800; letter-spacing: .09em; margin: 0 0 16px; text-transform: uppercase; }
.ppl-footer-simple__list { list-style: none; margin: 0; padding: 0; }
.ppl-footer-simple__list li + li { margin-top: 9px; }
.ppl-footer-simple a { color: #4d5668; text-decoration: none; }
.ppl-footer-simple a:hover, .ppl-footer-simple a:focus-visible { color: #1c46a5; text-decoration: underline; text-underline-offset: 3px; }
.ppl-footer-simple__disclaimer, .ppl-footer-simple__copy { color: #667085; font-size: 13px; line-height: 1.65; margin: 0; }
.ppl-footer-simple__socials--inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ppl-footer-simple__socials a { align-items: center; border: 1px solid #e3e8f4; border-radius: 50%; display: inline-flex; height: 34px; justify-content: center; width: 34px; }
.ppl-footer-simple__bottom { border-top: 1px solid #e7eaf0; display: flex; justify-content: space-between; margin-top: 36px; padding-top: 20px; }
@media (max-width: 760px) {
  .ppl-footer-simple { padding-top: 36px; }
  .ppl-footer-simple__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ppl-footer-simple__bottom { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (max-width: 420px) {
  .ppl-footer-simple__grid { grid-template-columns: 1fr; }
}