/* Heather's Heroes giveaway: base styles for everything giveaway.js builds.
   Plain defaults, single-class selectors on purpose, so a look.css can restyle any piece with one class.
   Set these on <body> in look.css (every one has a fallback here):
     --hh-font --hh-ink --hh-muted --hh-surface --hh-line --hh-accent --hh-accent-ink --hh-pop --hh-radius
   Optional: --hh-error (error text), --hh-tint (soft fill for chips and done tiles). */

/* ---------- shared bits ---------- */
.hh-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.hh-error {
  margin: 10px 0 0; padding: 9px 12px; border-radius: calc(var(--hh-radius, 14px) * .6);
  background: #fdecea; color: var(--hh-error, #b3261e); font-size: .9rem; line-height: 1.35; font-weight: 600;
}
.hh-error[hidden] { display: none; }
[data-hh-card] { scroll-margin-top: 16px; }
html.hh-lock { overflow: hidden; scrollbar-gutter: stable; }

button.is-loading { cursor: progress; pointer-events: none; opacity: .85; }
button.is-loading::after {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .55em; vertical-align: -.14em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: hh-spin .7s linear infinite;
}
@keyframes hh-spin { to { transform: rotate(360deg); } }

/* ---------- the "You're in" state ---------- */
.hh-in, .hh-modal, .hh-demo-pill, .hh-toast {
  font-family: var(--hh-font, Sen, "Trebuchet MS", system-ui, sans-serif);
}
.hh-in { color: var(--hh-ink, #2a1740); text-align: left; }
.hh-in__kicker { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.2; font-weight: 800; outline: none; text-wrap: balance; overflow-wrap: anywhere; }   /* a very long first name wraps inside the card, never past it */
.hh-in__kicker [data-hh-name] { overflow-wrap: anywhere; }
.hh-in__count { margin: 0 0 8px; display: flex; align-items: baseline; gap: .4em; flex-wrap: wrap; line-height: 1; }
.hh-in__num {
  display: inline-block; font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.02em;
  color: var(--hh-pop, #c27c00); font-variant-numeric: tabular-nums;
}
.hh-in__num.is-pop { animation: hh-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes hh-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45) rotate(-4deg); } 100% { transform: scale(1); } }
.hh-in__unit { font-size: 1rem; font-weight: 700; color: var(--hh-muted, #6a5a7a); }
.hh-in__sub { margin: 0 0 16px; font-size: .95rem; line-height: 1.45; color: var(--hh-muted, #6a5a7a); text-wrap: pretty; }
.hh-in__lead { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; }
.hh-in--dup { text-align: center; padding: 8px 0; }
.hh-in--dup .hh-in__sub { margin-bottom: 0; font-size: 1rem; color: var(--hh-ink, #2a1740); }

/* tiles: two columns on a wide card, one on the narrowest phones */
.hh-tiles { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hh-tiles > li { margin: 0; padding: 0; display: flex; }
.hh-tile {
  appearance: none; -webkit-appearance: none; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 84px; margin: 0; padding: 12px; text-align: left; cursor: pointer;
  font: inherit; color: var(--hh-ink, #2a1740); background: var(--hh-surface, #fff);
  border: 2px solid var(--hh-line, #e2d8ee); border-radius: var(--hh-radius, 14px);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.hh-tile:hover { transform: translateY(-2px); border-color: var(--hh-accent, #6b4a96); box-shadow: 0 6px 16px rgba(50, 27, 88, .12); }
.hh-tile:focus-visible, .hh-chip input:focus-visible + span, .hh-share__copy:focus-visible, .hh-share__btn:focus-visible,
.hh-modal__submit:focus-visible, .hh-modal__close:focus-visible, .hh-input:focus-visible, .hh-share__link:focus-visible {
  outline: 3px solid var(--hh-pop, #c27c00); outline-offset: 2px;
}
.hh-tile__pts {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
  background: var(--hh-accent, #6b4a96); color: var(--hh-accent-ink, #fff);
}
.hh-tile__label { font-size: .92rem; line-height: 1.25; font-weight: 700; }
.hh-tile.is-done { border-color: var(--hh-pop, #c27c00); background: var(--hh-tint, #fbf6e8); }
.hh-tile.is-done .hh-tile__pts { background: var(--hh-pop, #c27c00); color: var(--hh-ink, #2a1740); }
.hh-tile.is-partial { border-color: var(--hh-accent, #6b4a96); }   /* the dog questions, partly answered ("3 of 7") */
.hh-tile[aria-disabled="true"] { cursor: default; transform: none; box-shadow: none; }
.hh-tile[aria-disabled="true"]:hover { border-color: var(--hh-pop, #c27c00); }
.hh-tile.is-loading { opacity: .7; }
.hh-tile.is-loading::after { position: absolute; right: 10px; top: 10px; margin: 0; }
.hh-tile { position: relative; }
@media (max-width: 359px) { .hh-tiles { grid-template-columns: 1fr; } }

/* share */
.hh-share { padding-top: 16px; border-top: 2px dashed var(--hh-line, #e2d8ee); }
.hh-share__title { margin: 0 0 10px; font-size: 1rem; font-weight: 800; }
.hh-share__row { display: flex; gap: 8px; margin-bottom: 10px; }
.hh-share__link {
  flex: 1; min-width: 0; box-sizing: border-box; padding: 11px 12px; font: inherit; font-size: .88rem;
  color: var(--hh-ink, #2a1740); background: var(--hh-surface, #fff); border: 2px solid var(--hh-line, #e2d8ee); border-radius: calc(var(--hh-radius, 14px) * .7);
}
.hh-share__copy, .hh-share__btn {
  appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; padding: 0 16px; margin: 0; font: inherit; font-size: .92rem; font-weight: 800; text-decoration: none; cursor: pointer;
  border-radius: calc(var(--hh-radius, 14px) * .7); border: 2px solid var(--hh-accent, #6b4a96);
}
.hh-share__copy { background: var(--hh-accent, #6b4a96); color: var(--hh-accent-ink, #fff); min-width: 84px; }
.hh-share__copy.is-copied { background: var(--hh-pop, #c27c00); border-color: var(--hh-pop, #c27c00); color: var(--hh-ink, #2a1740); }
.hh-share__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hh-share__btn { background: var(--hh-surface, #fff); color: var(--hh-accent, #6b4a96); flex: 1 1 auto; }
.hh-share__btn:hover { background: var(--hh-accent, #6b4a96); color: var(--hh-accent-ink, #fff); }
.hh-share__ftc { margin: 0; font-size: .78rem; line-height: 1.4; color: var(--hh-muted, #6a5a7a); text-wrap: pretty; }

/* ---------- modal ---------- */
.hh-modal {
  box-sizing: border-box; width: min(92vw, 460px); max-height: 90vh; margin: auto; padding: 0; overflow: auto;
  color: var(--hh-ink, #2a1740); background: var(--hh-surface, #fff);
  border: 0; border-radius: calc(var(--hh-radius, 14px) * 1.4); box-shadow: 0 24px 60px rgba(30, 12, 50, .4);
}
.hh-modal::backdrop { background: rgba(26, 12, 44, .6); }
.hh-modal[open] { animation: hh-rise .22s ease-out; }
@keyframes hh-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.hh-modal--plain { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2147483000; }
.hh-modal__body { margin: 0; padding: 26px 22px 22px; }
.hh-modal__title { margin: 0 34px 6px 0; font-size: 1.35rem; line-height: 1.2; font-weight: 800; outline: none; text-wrap: pretty; }
.hh-modal__sub { margin: 0 0 16px; font-size: .95rem; line-height: 1.45; color: var(--hh-muted, #6a5a7a); text-wrap: pretty; }
.hh-modal__earned { margin: 0 0 16px; font-size: 1.05rem; font-weight: 800; color: var(--hh-ink, #2a1740); }
/* The quiz result (Andrew 11-04): a kicker over the heading, the first step, a "try this" box, Heather's free training */
.hh-result__kicker { margin: 0 34px 6px 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hh-muted, #6a5a7a); }
.hh-result__try { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--hh-radius, 14px); background: var(--hh-tint, #f3ecf9); }
.hh-result__try-k { margin: 0 0 4px; font-size: .9rem; font-weight: 800; color: var(--hh-ink, #2a1740); }
.hh-result__try-t { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--hh-ink, #2a1740); text-wrap: pretty; }
.hh-result__train {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin: 0 0 14px; padding: 8px 14px 8px 16px;
  border-radius: calc(var(--hh-radius, 14px) * .8); box-shadow: inset 0 0 0 1.5px var(--hh-line, rgba(64, 31, 90, .18));
  font-weight: 800; font-size: .95rem; line-height: 1.25; color: var(--hh-accent, #6b4a96); text-decoration: none; transition: box-shadow .2s;
}
.hh-result__train:hover { box-shadow: inset 0 0 0 2px var(--hh-accent, #6b4a96); }
.hh-result__train:focus-visible { outline: 3px solid var(--hh-pop, #E6A700); outline-offset: 2px; }
.hh-result__pts { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .82rem; background: var(--hh-pop, #E6A700); color: var(--hh-ink, #2a1740); }
.hh-result__train.is-done .hh-result__pts { background: var(--hh-tint, #f3ecf9); }
.hh-result__train.is-done .hh-result__pts::before { content: "\2713  "; }
.hh-result__train.is-loading { opacity: .7; }
.hh-modal__close {
  appearance: none; -webkit-appearance: none; position: absolute; top: 10px; right: 10px; z-index: 1; width: 40px; height: 40px; padding: 0;
  font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--hh-ink, #2a1740);
  background: transparent; border: 0; border-radius: 50%;
}
.hh-modal__close:hover { background: var(--hh-tint, #f3ecf9); }
.hh-modal__submit {
  appearance: none; -webkit-appearance: none; display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box;
  min-height: 50px; margin: 16px 0 0; padding: 0 20px; font: inherit; font-size: 1.02rem; font-weight: 800; cursor: pointer;
  color: var(--hh-accent-ink, #fff); background: var(--hh-accent, #6b4a96); border: 0; border-radius: calc(var(--hh-radius, 14px) * .8);
}
.hh-modal__submit:hover { filter: brightness(1.08); }

.hh-q { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hh-q > legend { width: 100%; margin: 0 0 8px; padding: 0; font-size: .98rem; font-weight: 800; line-height: 1.3; }
.hh-q__hint { width: 100%; margin: -4px 0 6px; font-size: .86rem; line-height: 1.4; color: var(--hh-muted, #6a5a7a); text-wrap: pretty; }
.hh-chip { position: relative; display: inline-flex; max-width: 100%; margin: 0; cursor: pointer; }
.hh-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.hh-chip span {
  display: block; box-sizing: border-box; padding: 10px 14px; font-size: .92rem; line-height: 1.3; font-weight: 600;
  border: 2px solid var(--hh-line, #e2d8ee); border-radius: calc(var(--hh-radius, 14px) * .8); background: var(--hh-surface, #fff);
  transition: background .12s ease, border-color .12s ease;
}
.hh-chip:hover span { border-color: var(--hh-accent, #6b4a96); }
.hh-chip input:checked + span { background: var(--hh-accent, #6b4a96); border-color: var(--hh-accent, #6b4a96); color: var(--hh-accent-ink, #fff); }
/* One question at a time (Heather 11-02): the quiz and the dog questions. Step count, a thin gold bar, Back and Skip. */
.hh-steps { margin: 0 0 16px; }
.hh-steps__count { margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .02em; color: var(--hh-muted, #6a5a7a); }
.hh-steps__bar { height: 4px; overflow: hidden; border-radius: 999px; background: var(--hh-tint, #f3ecf9); }
.hh-steps__bar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--hh-pop, #E6A700); transition: width .25s ease; }
.hh-step__q { margin: 0 0 10px; font-size: 1.08rem; font-weight: 800; line-height: 1.3; color: var(--hh-ink, #2a1740); outline: none; text-wrap: pretty; }
.hh-step__plus { font-size: .82rem; font-weight: 800; color: var(--hh-muted, #6a5a7a); white-space: nowrap; }
.hh-step .hh-q { margin-bottom: 4px; }
.hh-step .hh-chip span { display: flex; align-items: center; min-height: 44px; }
.hh-step .hh-q__hint { margin: -4px 0 10px; }
.hh-modal--steps .hh-modal__submit[hidden], .hh-steps__nav [hidden] { display: none; }
.hh-steps__nav { display: flex; gap: 12px; margin: 8px 0 0; }
.hh-steps__nav button {
  appearance: none; -webkit-appearance: none; min-width: 44px; min-height: 44px; padding: 0 14px; font: inherit; font-size: .95rem; font-weight: 800;
  cursor: pointer; color: var(--hh-accent, #6b4a96); background: transparent; border: 0; border-radius: var(--r-inner, var(--r-in, 14px));
}
.hh-steps__nav button:hover { background: var(--hh-tint, #f3ecf9); }
.hh-steps__nav button:focus-visible { outline: 3px solid var(--hh-pop, #E6A700); outline-offset: 2px; }
.hh-steps__back { margin-left: -14px; }
.hh-steps__skip { margin-left: auto; margin-right: -14px; }
@media (prefers-reduced-motion: no-preference) { .hh-step.is-in { animation: hh-step-in .2s ease-out; } }
@media (prefers-reduced-motion: reduce) { .hh-steps__bar > span { transition: none; } }
@keyframes hh-step-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.hh-field { display: block; margin: 0 0 14px; }
.hh-field__label { display: block; margin: 0 0 6px; font-size: .92rem; font-weight: 800; }
.hh-input {
  display: block; width: 100%; box-sizing: border-box; min-height: 46px; margin: 0; padding: 10px 14px; font: inherit; font-size: 1rem;
  color: var(--hh-ink, #2a1740); background: var(--hh-surface, #fff);
  border: 2px solid var(--hh-line, #e2d8ee); border-radius: calc(var(--hh-radius, 14px) * .7);
}
.hh-input[aria-invalid="true"], [data-hh-card] [aria-invalid="true"] { border-color: var(--hh-error, #b3261e); }

/* ---------- preview pill, toast, confetti ---------- */
.hh-demo-pill {
  display: block; position: relative; z-index: 2147482000; margin: 0; padding: 5px 12px; text-align: center; pointer-events: none;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3; color: #fff; background: rgba(35, 16, 57, .95);
}
.hh-toast {
  position: fixed; left: 50%; bottom: 56px; z-index: 2147482500; max-width: min(90vw, 420px); padding: 10px 16px; border-radius: 12px;
  font-size: .9rem; font-weight: 700; line-height: 1.3; text-align: center; color: #fff; background: rgba(35, 16, 57, .94);
  opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.hh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.hh-confetti { position: fixed; inset: 0; z-index: 2147482800; pointer-events: none; overflow: hidden; }
.hh-paw { position: absolute; display: block; will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .hh-in__num.is-pop, .hh-modal[open] { animation: none; }
  .hh-tile, .hh-chip span, .hh-toast { transition: none; }
  .hh-tile:hover { transform: none; }
  button.is-loading::after { animation-duration: 1.6s; }
  .hh-confetti { display: none; }
}

/* The US question in the in-state: one tap, no entries. Looks restyle these. */
.hh-us { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 16px; padding: 10px 12px; border-radius: var(--hh-radius, 14px); background: var(--hh-tint, rgba(0, 0, 0, .04)); }
.hh-us__q { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.3; color: var(--hh-ink); }
.hh-us__btns { display: flex; gap: 8px; }
.hh-us__btn { min-width: 64px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--hh-ink); background: #fff; color: var(--hh-ink); font: 700 .95rem/1 var(--hh-font, inherit); cursor: pointer; }
.hh-us__btn:hover:not(:disabled) { background: var(--hh-ink); color: #fff; }
.hh-us__btn:disabled { opacity: .6; cursor: default; }
.hh-us__done { margin: 0 0 16px; font-size: .9rem; color: var(--hh-muted); }
.hh-in__page { margin: 14px 0 0; text-align: center; font-weight: 700; font-size: .95rem; }
.hh-in__page a { color: var(--hh-ink); text-underline-offset: 3px; }
