/* Help Me Be a Millionaire - public site. Bold, playful, high contrast. */
:root {
  --ink: #14110f;
  --paper: #fff4dc;
  --card: #ffffff;
  --sun: #ffd23f;
  --pink: #ff4d8d;
  --blue: #2d5bff;
  --mint: #19c37d;
  --muted: #4a4540;
  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 14px;
  --font: ui-rounded, "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.55;
  background-image: radial-gradient(circle at 1px 1px, rgba(20, 17, 15, 0.12) 1px, transparent 0); background-size: 22px 22px;
}
.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--muted); }
.fine { font-size: 0.875rem; color: var(--muted); }
.mono { font-family: var(--mono); }
h1, h2, h3 { line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.4rem; }

/* header + banner */
.top { background: var(--sun); border-bottom: var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; }
.brand { font-weight: 900; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.04em; }
.brand span { color: var(--pink); }
.top nav a { color: var(--ink); font-weight: 700; margin-left: 1.1rem; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.banner { background: var(--pink); color: var(--ink); border-bottom: var(--line); padding: 0.7rem 1rem; text-align: center; font-weight: 800; }
.notice { background: var(--sun); border: var(--line); padding: 0.8rem 1rem; border-radius: var(--radius); }

/* hero */
.hero { padding: clamp(1.4rem, 4vw, 2.6rem) 0 1.2rem; }
.eyebrow { display: inline-block; background: var(--ink); color: var(--sun); font-weight: 800; padding: 0.25rem 0.8rem; border-radius: 99px; margin: 0 0 1rem; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; }
h1 { font-size: clamp(2.6rem, 9.5vw, 6.4rem); font-weight: 950; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.92; }
h1 span { display: inline-block; }
.hl { background: var(--pink); padding: 0 0.18em; border: var(--line); box-shadow: var(--shadow); transform: rotate(-1.2deg); margin-top: 0.1em; }
.lede { max-width: 56rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.45; margin: 1.1rem 0 0; white-space: pre-line; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 0; }

.btn {
  display: inline-block; font: inherit; font-weight: 800; padding: 0.8rem 1.3rem; border: var(--line); border-radius: 12px; cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 4px 4px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s; line-height: 1.2;
}
.btn:hover:not([disabled]) { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active:not([disabled]) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--sun); color: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-block { display: block; width: 100%; font-size: 1.1rem; }
.icon-btn { font: inherit; font-weight: 900; border: var(--line); background: #fff; border-radius: 10px; width: 2.4rem; height: 2.4rem; cursor: pointer; }

/* progress */
.progress-card { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem clamp(1rem, 3vw, 1.8rem); margin-bottom: 2.4rem; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.raised { margin: 0; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 950; letter-spacing: -0.04em; }
.of { font-size: 0.45em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.pct { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; }
.bar { height: 2.2rem; border: var(--line); border-radius: 99px; background: #fff; overflow: hidden; margin: 0.6rem 0 1rem; }
.bar-fill { height: 100%; width: 0; min-width: 0; background: repeating-linear-gradient(135deg, var(--mint) 0 14px, #12a569 14px 28px); transition: width 0.8s ease; border-right: var(--line); }
.bar-fill[data-zero="true"] { border-right: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin: 0; }
.stats div { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 0.55rem 0.8rem; }
.stats dt { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stats dd { margin: 0; font-size: 1.6rem; font-weight: 900; }

/* board */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.6rem; align-items: start; margin-bottom: 3rem; }
.board-col h2 { max-width: 40rem; }
.hint { margin: 0.6rem 0 1rem; color: var(--muted); }
.board-frame { border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--ink); padding: 6px; }
.board { display: grid; width: 100%; aspect-ratio: var(--ar, 1.6); background: var(--ink); gap: 0; position: relative; }
.board .row { display: contents; }
.tile {
  position: relative; padding: 0; margin: 0; border: 0; cursor: pointer; background: var(--tier, #ccc); outline-offset: -3px; min-width: 0; min-height: 0; overflow: hidden;
  box-shadow: inset 0 0 0 0.5px rgba(20, 17, 15, 0.4);
  font: inherit; color: var(--ink);
}
.tile[data-status="available"]:hover { filter: brightness(1.12) saturate(1.2); z-index: 2; box-shadow: inset 0 0 0 2px var(--ink); }
.tile[data-status="held"] { cursor: not-allowed; background-image: repeating-linear-gradient(45deg, rgba(20, 17, 15, 0.55) 0 3px, transparent 3px 7px); }
.tile[data-status="revealed"] { cursor: default; background: var(--ink); }
.tile[aria-selected="true"] { outline: 3px solid var(--ink); z-index: 3; box-shadow: inset 0 0 0 2px #fff; animation: pulse 1.1s ease-in-out infinite alternate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; image-rendering: auto; }
.tile.pop img { animation: reveal 0.9s cubic-bezier(.2, .9, .3, 1.2); }
.tile:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 3px var(--blue); z-index: 4; }
@keyframes reveal { from { opacity: 0; transform: scale(1.8); filter: saturate(3) brightness(1.6); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; padding: 0; margin: 1rem 0 0.3rem; font-size: 0.9rem; font-weight: 700; }
.legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch { width: 1rem; height: 1rem; border: 2px solid var(--ink); border-radius: 4px; display: inline-block; background: var(--tier); }

/* side panel */
.panel { position: sticky; top: 1rem; background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.panel h3 { margin-top: 1.4rem; font-size: 1rem; }
.selection { min-height: 4.2rem; margin: 0.8rem 0 1rem; }
.selection .big { font-size: 2.3rem; font-weight: 950; letter-spacing: -0.04em; line-height: 1; margin: 0; }
.selection .sub { margin: 0.2rem 0 0; font-weight: 700; }
.msg { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; background: #ffe0ea; border: 2px solid var(--ink); border-radius: 10px; font-weight: 700; }
.msg[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.chip { font: inherit; font-weight: 800; border: 2px solid var(--ink); background: #fff; border-radius: 99px; padding: 0.25rem 0.8rem; cursor: pointer; }
.chip small { font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--sun); }
.chip[aria-pressed="true"] small { color: #ddd; }
.chip[disabled] { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.payline { margin: 1.2rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--muted); }

/* how + honest */
.how { margin-bottom: 3rem; }
.steps { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.steps li { background: #fff; border: var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.steps li:nth-child(1) .n { background: var(--pink); }
.steps li:nth-child(2) .n { background: var(--sun); }
.steps li:nth-child(3) .n { background: var(--mint); }
.n { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: var(--line); border-radius: 50%; font-weight: 900; margin-bottom: 0.5rem; }
.steps p { margin: 0; }
.honest { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.honest h3 { color: var(--sun); }
.honest ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.honest li { margin: 0.3rem 0; }

/* share */
.share { margin-bottom: 3.5rem; }
.share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.8rem 0; }
.input { flex: 1 1 14rem; min-width: 0; font: inherit; border: var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; background: #fff; color: var(--ink); }
.mono { font-family: var(--mono); font-size: 0.85rem; }
.share-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.share-links a { display: inline-block; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 0.35rem 0.9rem; font-weight: 800; }
.share-links a:hover { background: var(--sun); }

.foot { background: var(--ink); color: #fff; padding: 1.6rem 0 2.4rem; }
.foot a { color: var(--sun); margin-right: 1.2rem; font-weight: 700; }
.foot .fine { color: #cfc8bd; }
.foot-inner nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0; }

/* payment dialog */
.pay { width: min(720px, 100% - 1.5rem); max-height: calc(100dvh - 1.5rem); overflow: auto; border: var(--line); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); padding: 1.4rem; background: var(--paper); color: var(--ink); }
.pay::backdrop { background: rgba(20, 17, 15, 0.7); }
.pay-close { position: absolute; top: 0.8rem; right: 0.8rem; margin: 0; }
.pay h2 { padding-right: 3rem; }
.pay-status { font-weight: 800; background: var(--sun); border: 2px solid var(--ink); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 1rem 0; }
.pay-status[data-stage="confirmed"] { background: var(--mint); }
.pay-status[data-stage="expired"], .pay-status[data-stage="failed"], .pay-status[data-stage="review"] { background: #ffc2d6; }
.pay-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.2rem; align-items: start; }
.qr { width: 240px; height: 240px; background: #fff; border: var(--line); border-radius: 12px; padding: 6px; }
.amount { margin: 0; font-size: 2rem; font-weight: 950; letter-spacing: -0.03em; line-height: 1.1; }
.amount .sub { display: block; font-size: 1rem; font-weight: 700; font-family: var(--mono); letter-spacing: 0; color: var(--muted); }
.lbl { display: block; font-weight: 800; font-size: 0.85rem; margin: 0.6rem 0 0.2rem; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; }
.tabs button { font: inherit; font-weight: 800; border: 2px solid var(--ink); background: #fff; border-radius: 10px; padding: 0.4rem 0.9rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--sun); }
.mock { background: #fff; border: 3px dashed var(--pink); border-radius: 12px; padding: 0.7rem 1rem; margin: 1rem 0; }
.mock p { margin: 0 0 0.5rem; }
#mock-ok { margin: 0.2rem 0 0.6rem; }
.mock-more summary { cursor: pointer; font-weight: 700; margin-bottom: 0.4rem; }
.mock-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mock-btns button { font: inherit; font-weight: 700; border: 2px solid var(--ink); background: var(--paper); border-radius: 8px; padding: 0.25rem 0.6rem; cursor: pointer; }
.pay-end { font-size: 1.15rem; font-weight: 700; }

/* legal pages */
.legal { max-width: 46rem; margin: 2rem auto 4rem; background: #fff; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 4vw, 2.2rem); }
.legal h1 { font-size: clamp(2rem, 6vw, 3rem); text-transform: none; letter-spacing: -0.03em; margin-bottom: 1rem; }
.legal h2 { font-size: 1.3rem; margin: 1.8rem 0 0.4rem; }
.draft { background: var(--pink); border: var(--line); border-radius: 12px; padding: 0.8rem 1rem; font-weight: 800; }
.todo { background: #fff3a8; border: 2px dashed var(--ink); border-radius: 8px; padding: 0.1rem 0.4rem; font-weight: 700; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .panel { position: static; }
  .pay-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pay-info { width: 100%; text-align: left; }
}
@media (max-width: 520px) {
  .top nav a:not(:last-child) { display: none; }
  .btn { padding: 0.75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .tile[data-status="held"] { outline: 1px dashed CanvasText; }
  .tile[aria-selected="true"] { outline: 3px solid Highlight; }
}

/* layout v2: picture first, short copy */
.top-share { font: inherit; font-weight: 800; background: var(--ink); color: var(--sun); border: 0; border-radius: 99px; padding: 0.3rem 1rem; margin-left: 1.1rem; cursor: pointer; }
.top-share:hover { background: #fff; color: var(--ink); }
.stage { margin-bottom: 2rem; }
.board-title { font-size: clamp(1.15rem, 2.6vw, 1.5rem); margin-bottom: 0.7rem; }
.legend { margin-top: 0.8rem; }
.panel-note { margin: 1rem 0 0; }
.panel h3 { margin-top: 1.1rem; }
.progress-card { padding: 1rem clamp(1rem, 3vw, 1.6rem); margin-bottom: 2rem; }
.raised { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.bar { height: 1.6rem; margin: 0.4rem 0 0.8rem; }
.stats dd { font-size: 1.3rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.6rem; }
.share-band { background: var(--pink); border-block: var(--line); padding: clamp(1.6rem, 5vw, 3rem) 0; margin-bottom: 2rem; }
.share { margin-bottom: 0; }
.share h2 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 950; text-transform: uppercase; letter-spacing: -0.04em; line-height: 0.95; }
.share-sub { margin: 0.6rem 0 1.2rem; font-weight: 700; font-size: 1.1rem; }
.share-main { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: stretch; margin: 0 0 1rem; }
.share-main .input { flex: 1 1 16rem; }
.share-links { gap: 0.6rem; }
.share-links a { background: #fff; padding: 0.55rem 1.2rem; font-size: 1.05rem; box-shadow: 3px 3px 0 var(--ink); }
.share-links a:hover { background: var(--sun); }
.how { margin-bottom: 3rem; }
.how summary { cursor: pointer; font-size: 1.15rem; font-weight: 800; padding: 0.4rem 0; }
.how .steps li { display: flex; gap: 0.8rem; align-items: flex-start; box-shadow: none; padding: 0.8rem 1rem; }
.how .steps .n { flex: none; margin: 0; }
.how .steps { margin-top: 0.8rem; }
.honest { padding: 1rem 1.3rem; }
.honest ul { margin: 0; }
@media (max-width: 900px) { .top nav a { margin-left: 0.6rem; } .top-share { margin-left: 0.6rem; } }
.chip .swatch { width: 0.8rem; height: 0.8rem; margin-right: 0.35rem; vertical-align: -0.05em; border-width: 2px; }
.panel h3 .fine { font-weight: 600; }
@media (max-width: 900px) { .panel { position: static; } .board-title { margin-top: 0.4rem; } }

/* Participation number after a confirmed payment */
.cert { margin: 1rem 0; padding: 0.9rem 1rem; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font-weight: 400; }
.cert-label { margin: 0; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.cert-number { margin: 0.2rem 0 0.4rem; font-size: 1.9rem; font-weight: 800; }
.cert-form label { font-weight: 700; font-size: 0.95rem; }

/* layout v3: full-width picture, contribution panel below it, zoom */
.stage { width: min(2000px, 100% - 1rem); margin-inline: auto; display: block; margin-bottom: 2rem; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.7rem; padding-inline: 0.5rem; }
.board-head .board-title { margin: 0; }
.zoom { display: inline-flex; align-items: center; gap: 0.35rem; }
.zoom-btn { font: inherit; font-weight: 900; font-size: 1.2rem; line-height: 1; min-width: 2.5rem; height: 2.5rem; border: 2px solid var(--ink); background: #fff; border-radius: 10px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.zoom-btn:hover { background: var(--sun); }
.zoom-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.zoom-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.zoom-fit { font-size: 0.95rem; padding: 0 0.8rem; }
.zoom-lvl { min-width: 3rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.zoom-tip { margin: 0.5rem 0 0; padding-inline: 0.5rem; }
.board-view { overflow: auto; max-height: min(86vh, 1400px); touch-action: pan-x pan-y; overscroll-behavior: contain; background: var(--ink); }
.board-view.zoomed { cursor: grab; }
.board-view.panning { cursor: grabbing; user-select: none; }
.board { width: calc(100% * var(--zoom, 1)); }
.panel { position: static; margin-top: 1.2rem; display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 1.2rem 2.2rem; align-items: start; }
.panel-random h3 { margin-top: 0.3rem; }
.panel-note { max-width: 40rem; }
@media (max-width: 900px) { .panel { grid-template-columns: 1fr; } .stage { width: min(2000px, 100% - 0.5rem); } .board-head { padding-inline: 0.25rem; } }
.board-frame { padding: 4px; }
.hero.wrap { width: min(2000px, 100% - 1rem); padding-inline: 0.5rem; }

/* BAM: the headline makes HELP ME small and BAM huge; the rest of "Millionaire" shrinks to a whisper */
h1 .hm { font-size: 0.62em; vertical-align: baseline; }
h1 .bam { font-size: 1em; line-height: 0.9; padding: 0 0.12em 0.04em; white-space: nowrap; }
h1 .bam b { font-weight: 950; font-size: 2.1em; letter-spacing: -0.06em; }
h1 .bam i { font-style: normal; font-weight: 900; font-size: 0.34em; letter-spacing: 0; text-transform: lowercase; margin-inline: 0.12em; }
.bam-sub { margin: 0.9rem 0 0; font-weight: 800; font-size: clamp(1rem, 2vw, 1.25rem); }
.bam-sub .tag { background: var(--ink); color: var(--sun); border-radius: 99px; padding: 0.1rem 0.7rem; margin-left: 0.5rem; white-space: nowrap; }
.brand { font-size: 1.6rem; }

.end-share-title { margin: 1rem 0 0.4rem; font-weight: 900; font-size: 1.2rem; }
#end-share-links { margin-bottom: 0.8rem; }

.agree { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; line-height: 1.35; margin: 0.6rem 0; }
.agree input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; flex: none; }
