/* DUDE's headline face, served from the dudewipes.com Shopify CDN (same file the site uses). */
@font-face {
  font-family: 'FuturaNow';
  src: url(https://cdn.shopify.com/s/files/1/0745/0975/files/futuranowheadline-xblk-webfont.woff2?v=1721235403) format('woff2'),
       url(https://cdn.shopify.com/s/files/1/0745/0975/files/futuranowheadline-xblk-webfont.woff?v=1721235403) format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: 'FuturaNow', 'Jost', Futura, system-ui, sans-serif;
  --blue: #43C7FF;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.78);
  --ink-3: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.16);
  --font: 'Jost', 'Futura PT', Futura, system-ui, sans-serif;
  --gutter: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: var(--ink); font-family: var(--font); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }

.frame {
  position: fixed; inset: 0;
  max-width: 520px; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) max(22px, env(safe-area-inset-bottom));
}

.screen { position: absolute; inset: 0; padding: inherit; display: none; }
.screen.active { display: flex; flex-direction: column; }

/* ----------------------------------------------------------- shared type */

.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.display { font-size: clamp(40px, 11vw, 64px); line-height: 0.98; font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 16px; text-wrap: balance; }
.headline { font-size: clamp(32px, 9vw, 48px); line-height: 1.02; font-weight: 800; letter-spacing: -0.015em; margin: 10px 0 8px; text-wrap: balance; }
.lede { font-size: 19px; line-height: 1.38; font-weight: 500; color: var(--ink-2); max-width: 30ch; text-wrap: pretty; }
.center .lede { margin-left: auto; margin-right: auto; }
.center.left .lede { margin-left: 0; }
.sub { font-size: 20px; font-weight: 600; color: var(--ink-2); }
.meta { font-size: 15px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.stat { font-size: clamp(76px, 24vw, 132px); line-height: 0.9; font-weight: 800; letter-spacing: -0.04em; margin-top: 14px; font-variant-numeric: tabular-nums; }
.stat.sm { font-size: clamp(56px, 17vw, 92px); }
.stat .ampm { font-size: 0.36em; letter-spacing: 0; margin-left: 8px; color: var(--ink-2); }
.label-xl { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; will-change: transform; }

/* ----------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 26px; border-radius: 999px;
  font-size: 17px; font-weight: 700; letter-spacing: 0.01em;
  background: var(--glass-2); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.btn:hover { background: rgba(255, 255, 255, 0.22); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--blue); color: #00131c; border-color: transparent; box-shadow: 0 10px 40px -8px rgba(67, 199, 255, 0.65); }
.btn.primary:hover { background: #6ad4ff; }
.btn.ghost { background: transparent; }

.link { color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line); font-size: 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.mute { position: fixed; z-index: 20; top: max(14px, env(safe-area-inset-top)); right: 14px; }
.mute .x { display: none; }
.mute.off .x { display: block; }
.mute.off .wave { display: none; }

input {
  height: 54px; border-radius: 16px; padding: 0 18px; font-size: 18px; font-weight: 600;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); outline: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
input::placeholder { color: var(--ink-3); }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(67, 199, 255, 0.2); }
input.bad { border-color: #ff6b6b; }

/* ----------------------------------------------------------- intro */

#intro { justify-content: flex-end; }
.intro-inner { text-align: center; padding-bottom: 6px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.wordmark { font-weight: 900; letter-spacing: 0.32em; font-size: 14px; color: var(--ink-2); }
.hero {
  font-size: clamp(64px, 19vw, 120px); font-weight: 900; line-height: 0.86; letter-spacing: -0.045em;
  text-transform: uppercase; margin-top: 10px;
  background: linear-gradient(180deg, #fff 30%, #bfeeff 100%); -webkit-background-clip: text; background-clip: text;
}
.hero .w > span { -webkit-text-fill-color: #fff; }
.hero-year { font-size: 22px; font-weight: 800; letter-spacing: 0.5em; color: var(--blue); margin: 8px 0 18px; padding-left: 0.5em; }
.intro-copy { font-size: 16px; line-height: 1.45; color: var(--ink-2); max-width: 34ch; margin: 0 auto 20px; font-weight: 500; }
.intro-copy span { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
#intro-form { display: flex; flex-direction: column; gap: 10px; }
#intro-form input { text-align: center; }
.fine { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

/* ----------------------------------------------------------- quiz */

#quiz #q-host { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.q-head { display: flex; align-items: center; gap: 12px; padding-right: 52px; }
.segs { flex: 1; display: flex; gap: 4px; }
.segs i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); transition: background 0.4s; }
.segs i.done { background: rgba(255, 255, 255, 0.75); }
.segs i.now { background: var(--blue); }
.q-count { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.q-body { margin-top: auto; padding-top: 24px; }
.q-title { font-size: clamp(32px, 9vw, 44px); line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; text-wrap: balance; }
.q-options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  min-height: 52px; padding: 12px 18px; border-radius: 16px;
  font-size: 17px; font-weight: 600;
  background: rgba(10, 12, 16, 0.42); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background 0.25s, border-color 0.25s;
}
.opt:hover { background: rgba(255, 255, 255, 0.12); transform: translateX(4px); }
.opt.sel { background: #fff; color: #000; border-color: #fff; transform: scale(1.02); }
.opt .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 12px currentColor; }
.q-zip { display: flex; gap: 10px; }
.q-zip input { flex: 1; min-width: 0; letter-spacing: 0.3em; font-size: 22px; }
#zip-skip { margin-top: 6px; }

/* ----------------------------------------------------------- loading */

#loading { justify-content: flex-start; align-items: center; padding-top: 22vh; padding-top: 22dvh; }
.loading-line { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; text-align: center; }

/* ----------------------------------------------------------- story */

.bars { position: relative; z-index: 6; display: flex; gap: 4px; padding-right: 52px; padding-top: 10px; }
.bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.bars b { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.skip { position: absolute; z-index: 6; right: var(--gutter); top: calc(max(18px, env(safe-area-inset-top)) + 42px); padding: 4px 0; font-size: 13px; color: var(--ink-2); }
#story.final .skip { display: none; }
.tap { position: absolute; inset: 0; z-index: 4; }

.slide { position: absolute; inset: 0; z-index: 5; pointer-events: none; padding: 0 var(--gutter); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 30px rgba(0, 0, 0, 0.55); }
.slide button, .slide a { pointer-events: auto; }
.slide .center { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); text-align: center; }
.slide .center.left { text-align: left; }
.slide .center.top { top: calc(max(18px, env(safe-area-inset-top)) + 78px); transform: none; }
.slide .above { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(50% + 16vh); bottom: calc(50% + 16dvh); text-align: center; }
.slide .below { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(50% + 15vh); top: calc(50% + 15dvh); text-align: center; }
.slide .above.far { bottom: calc(50% + 27vh); bottom: calc(50% + 27dvh); }
.slide .below.far { top: calc(50% + 25vh); top: calc(50% + 23dvh); }
.slide .below .lede { margin: 0 auto; }

.ranklist { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.ranklist li {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: baseline; gap: 10px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.ranklist li:first-child .nm { font-size: 26px; }
.ranklist .rk { font-size: 28px; font-weight: 800; color: #FFD676; font-variant-numeric: tabular-nums; }
.ranklist .nm { font-size: 19px; font-weight: 700; line-height: 1.15; }
.ranklist .ct { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.rule { height: 1px; background: var(--line); margin: 24px 0; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 22px; }
.chips span { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.aura-row { display: inline-flex; gap: 14px; align-items: center; text-align: left; font-size: 15px; line-height: 1.35; color: var(--ink-2); padding: 14px 18px; border-radius: 18px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.aura-row b { color: #fff; font-weight: 700; }
.swatches { display: flex; flex: none; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.5); margin-left: -6px; }
.swatches i:first-child { margin-left: 0; }

/* ----------------------------------------------------------- summary card */

.summary { position: absolute; inset: 44px var(--gutter) max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; justify-content: center; text-shadow: none; }
.card {
  position: relative; width: 100%; max-height: calc(100% - 140px); aspect-ratio: 9 / 14; margin: 0 auto;
  border-radius: 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.card-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 45% at 25% 10%, var(--a1), transparent 70%),
    radial-gradient(60% 50% at 90% 50%, var(--a2), transparent 70%),
    radial-gradient(70% 45% at 30% 100%, var(--a3), transparent 70%),
    #050608;
  filter: saturate(1.1);
}
.card-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); }
.card-inner { position: relative; height: 100%; padding: 22px; display: flex; flex-direction: column; }
.card-top, .card-foot { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; }
.card-foot { font-size: 9px; letter-spacing: 0.08em; color: var(--ink-2); margin-top: auto; gap: 10px; white-space: nowrap; }
.card-persona { margin-top: 7%; }
.card-name { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.card-persona h3 { font-size: clamp(28px, 8.4vw, 40px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 6px; }
.card-persona p { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: auto; margin-bottom: 14px; }
.card-stats div { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 8px; min-width: 0; }
.card-stats dt { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.card-stats dd { font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-year { font-size: 14px; line-height: 1.35; font-weight: 500; margin-bottom: 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .primary, .actions .wide { grid-column: 1 / -1; }
.summary .replay { align-self: center; padding: 2px 0; font-size: 14px; }

/* ----------------------------------------------------------- brand type + assets */

.display, .headline, .stat, .label-xl, .hero, .q-title, .loading-line,
.ranklist .rk, .card-persona h3, .card-stats dd, .hero-year {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.005em;
}
.display { font-size: clamp(34px, 9.6vw, 56px); line-height: 1.02; }
.headline { font-size: clamp(28px, 8vw, 42px); }
.stat { font-size: clamp(64px, 20vw, 116px); letter-spacing: -0.02em; }
.stat.sm { font-size: clamp(50px, 15vw, 84px); }
.hero { font-size: clamp(52px, 16vw, 100px); line-height: 0.92; letter-spacing: -0.01em; }
.hero-year { letter-spacing: 0.5em; }
.q-title { font-size: clamp(27px, 7.8vw, 38px); line-height: 1.06; }
.label-xl { font-size: 26px; }
.card-persona h3 { font-size: clamp(24px, 7.2vw, 34px); line-height: 1.04; }
.card-stats dd { font-size: 18px; }
.display.long { font-size: clamp(28px, 8vw, 48px); }
.card-persona h3.long { font-size: clamp(20px, 5.8vw, 28px); }

.card-top { align-items: center; }
.card-logo { height: 20px; width: auto; }
.logo { display: block; height: 40px; width: auto; margin: 0 auto; }
.toilet { width: 44px; height: 44px; color: var(--blue); margin: 0 auto 14px; display: block; filter: drop-shadow(0 0 18px rgba(67, 199, 255, 0.6)); }
.toilet svg { width: 100%; height: 100%; }
.rk-icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; margin-right: 6px; color: #FFD676; }
.rk-icon svg { width: 100%; height: 100%; }

/* Animated illustrations from the dudewipes.com education page, used like stickers. */
.sticker {
  position: absolute; z-index: 1; width: clamp(124px, 36vw, 172px); aspect-ratio: 1;
  border-radius: 22px; object-fit: cover; background: #000;
  border: 3px solid #fff; box-shadow: 0 18px 50px -10px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.sticker.tr { top: 100px; right: var(--gutter); transform: rotate(7deg); }
.sticker.tl { top: 100px; left: var(--gutter); transform: rotate(-7deg); }
.sticker.br { bottom: 24px; right: var(--gutter); transform: rotate(6deg); }
.sticker.bl { bottom: 24px; left: var(--gutter); transform: rotate(-6deg); }
.loading-stickers { position: relative; width: 150px; height: 150px; margin: 30px auto 0; }
.loading-stickers .sticker { position: absolute; inset: 0; width: 150px; transform: none; }

/* ----------------------------------------------------------- rebuild assets */

.slide .center.low { top: 62%; }

.photo {
  position: absolute; z-index: 1; margin: 0; width: clamp(150px, 46vw, 230px);
  background: #fff; padding: 8px 8px 0; border-radius: 6px;
  box-shadow: 0 18px 50px -10px rgba(0, 0, 0, 0.75); pointer-events: none;
}
.photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 2px; }
.photo figcaption { color: #111; text-shadow: none; font-size: 13px; font-weight: 700; text-align: center; padding: 6px 0 8px; }
.photo.tr { top: 96px; right: var(--gutter); transform: rotate(5deg); }

.retailers { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.retailers span { width: 100%; text-align: center; letter-spacing: 0.04em; }
.retailers img { width: auto; background: #fff; border-radius: 6px; padding: 4px 6px; box-sizing: content-box; height: 16px; }
.card { max-height: calc(100% - 190px); }
.card-pack { display: block; width: 52%; max-height: 15%; object-fit: contain; margin: 10px auto 0; transform: rotate(-4deg); filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55)); }

.q-options.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-options.packs .opt { gap: 8px; padding: 6px 10px 6px 6px; min-height: 52px; font-size: 14px; line-height: 1.12; }
.q-options.packs .opt img { width: 56px; height: 34px; flex: none; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.q-options.packs .opt .dot { margin: 0 21px; }
.q-options.packs .opt.sel img { filter: none; }

/* ----------------------------------------------------------- live counter */

.live-count { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font-variant-numeric: tabular-nums; text-shadow: none; }
.live-count[hidden] { display: none; }
.live-count i { width: 8px; height: 8px; border-radius: 50%; background: #5FF244; box-shadow: 0 0 0 0 rgba(95, 242, 68, 0.6); animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 242, 68, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(95, 242, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 242, 68, 0); } }

@media (max-height: 760px) {
  .display { font-size: clamp(30px, 8.6vw, 48px); margin: 10px 0 12px; }
  .display.long { font-size: clamp(26px, 7.2vw, 40px); }
  .headline { font-size: clamp(26px, 7.4vw, 36px); margin: 6px 0 6px; }
  .stat { font-size: clamp(56px, 17vw, 96px); margin-top: 8px; }
  .stat.sm { font-size: clamp(44px, 13vw, 70px); }
  .label-xl { font-size: 22px; margin-bottom: 10px; }
  .lede { font-size: 17px; }
  .sub { font-size: 17px; }
  .ranklist { margin-top: 12px; gap: 2px; }
  .ranklist li { padding: 8px 4px; }
  .ranklist .nm { line-height: 1.12; }
  .ranklist .nm { font-size: 17px; }
  .ranklist li:first-child .nm { font-size: 21px; }
  .ranklist .rk { font-size: 24px; }
  .chips { margin: 12px 0 14px; }
  .chips span { padding: 6px 12px; font-size: 13px; }
  .aura-row { padding: 10px 14px; font-size: 14px; }
  .rule { margin: 16px 0; }
  .sticker { width: clamp(104px, 28vw, 136px); }
  .photo { width: clamp(140px, 40vw, 200px); }
  .slide .above.far { bottom: calc(50% + 25dvh); }
  .slide .below.far { top: calc(50% + 21dvh); }
}

@media (max-height: 700px) {
  .display { font-size: clamp(34px, 9.5vw, 52px); }
  .q-title { font-size: 30px; margin-bottom: 14px; }
  .opt { min-height: 46px; padding: 9px 16px; font-size: 16px; }
  .hero { font-size: 72px; }
}

/* Very short screens (iPhone SE with Safari toolbars): smaller art so it clears centered copy. */
@media (max-height: 620px) {
  .sticker { width: 86px; border-width: 2px; border-radius: 16px; }
  .sticker.tr { top: 88px; }
  .photo.tr { top: auto; bottom: 12px; }
  .photo { width: 124px; padding: 5px 5px 0; }
  .photo figcaption { font-size: 10px; padding: 4px 0 5px; }
  .logo { height: 32px; }
  .hero { font-size: 56px; margin-top: 6px; }
  .hero-year { font-size: 18px; margin: 4px 0 10px; }
  .intro-copy { font-size: 14px; margin-bottom: 12px; }
  .live-count { margin: -2px 0 10px; }
  #intro-form input, #intro-form .btn { height: 48px; }
  .fine { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .split .w > span { transform: none !important; }
}
