/* ============================================================
   Marathon Ballot: share cards (checker + simulator result pages)
   Cards are fixed 1080x1920 (IG Stories), always rendered at
   native size in the DOM and scaled for display via transform,
   which keeps the html-to-image PNG export pixel-true.
   Checker variants:   .mb-sc--pile .mb-sc--ledger .mb-sc--time .mb-sc--stack
   Simulator variants: .mb-sim--medal .mb-sim--roll .mb-sim--tally
   Depends on styles.css tokens (--accent, --mono, --font),
   JetBrains Mono, Instrument Serif (Google Fonts).
   ============================================================ */

.mb-sc,
.mb-sim {
  width: 1080px;
  height: 1920px;
  box-sizing: border-box;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}
.mb-sc *, .mb-sc *::before, .mb-sc *::after,
.mb-sim *, .mb-sim *::before, .mb-sim *::after { box-sizing: border-box; }

/* shared mono footer row */
.mb-sc__foot,
.mb-sim__foot {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}
.mb-sc .o, .mb-sim .o { color: var(--accent); }

/* medal disc crop: full medal PNG cropped to the disc */
.mb-sc__disc {
  width: 68px; height: 68px;
  object-fit: cover;
  object-position: 50% 78%;
  border-radius: 50%;
}

/* ============================================================
   CHECKER · PILE — white, Instrument Serif, qualified medals heaped center
   ============================================================ */
.mb-sc--pile { background: #fefdfb; color: #141414; display: flex; flex-direction: column; }
.mb-sc--pile .sc-head { text-align: center; padding-top: 310px; font-family: "Instrument Serif", serif; font-size: 98px; line-height: 1.04; letter-spacing: -0.01em; font-weight: 400; margin: 0; }
.mb-sc--pile .sc-head em { font-style: italic; }
.mb-sc--pile .sc-heap { position: relative; height: 1040px; flex: none; }
.mb-sc--pile .sc-heap img { position: absolute; width: 430px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.16)); }
.mb-sc--pile .sc-prline { text-align: center; font-family: "Instrument Serif", serif; font-size: 64px; padding-bottom: 44px; }
.mb-sc--pile .sc-prline .tm { font-family: var(--font); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mb-sc--pile .sc-foot { margin-top: auto; text-align: center; font-family: var(--mono); font-size: 26px; letter-spacing: 0.14em; text-transform: uppercase; padding-bottom: 96px; color: #6b6b6b; }

/* ============================================================
   CHECKER · LEDGER — dark, headline + PR band + race ledger
   ============================================================ */
.mb-sc--ledger { background: #0e0d0b; color: #f0ebde; padding: 100px 96px; display: flex; flex-direction: column; }
.mb-sc--ledger .sc-h { font-size: 122px; line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; margin: 20px 0 0; }
.mb-sc--ledger .sc-prband { display: flex; align-items: baseline; gap: 28px; margin-top: 56px; border-top: 1px solid #f0ebde26; padding-top: 44px; }
.mb-sc--ledger .sc-prband .tm { font-size: 108px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.mb-sc--ledger .sc-prband .lb { font-family: var(--mono); font-size: 27px; letter-spacing: 0.14em; text-transform: uppercase; color: #8c836b; }
.mb-sc--ledger .sc-rows { margin-top: auto; }
.mb-sc--ledger .sc-row { display: flex; align-items: center; gap: 24px; border-top: 1px solid #f0ebde26; padding: 25px 0; font-family: var(--mono); font-size: 31px; letter-spacing: 0.1em; }
.mb-sc--ledger .sc-row .race { text-transform: uppercase; }
.mb-sc--ledger .sc-row .st { margin-left: auto; text-transform: uppercase; color: #8c836b; }
.mb-sc--ledger .sc-row .st.q { color: var(--accent); font-weight: 700; }
.mb-sc--ledger .sc-row .mb-sc__disc.no { filter: grayscale(1) opacity(0.35); }
.mb-sc--ledger .sc-row .disc-tbd { width: 68px; height: 68px; border: 2px dashed #f0ebde33; border-radius: 50%; flex: none; }
.mb-sc--ledger .sc-foot { border-top: 1px solid #f0ebde26; margin-top: 8px; padding-top: 40px; }

/* ============================================================
   CHECKER · TIME — white, PR is the hero. Never offered without a PR.
   ============================================================ */
.mb-sc--time { background: #ffffff; color: #141414; display: flex; flex-direction: column; padding: 120px 90px; }
.mb-sc--time .sc-t { font-size: 288px; font-weight: 700; letter-spacing: -0.06em; line-height: 1; margin-top: 200px; margin-left: -14px; font-variant-numeric: tabular-nums; }
.mb-sc--time .sc-tlb { font-family: var(--mono); font-size: 28px; letter-spacing: 0.16em; text-transform: uppercase; color: #6b6b6b; margin-top: 36px; }
.mb-sc--time .sc-sub { font-family: "Instrument Serif", serif; font-size: 82px; line-height: 1.14; margin-top: 130px; font-weight: 400; }
.mb-sc--time .sc-medals { display: flex; margin-top: auto; }
.mb-sc--time .sc-medals .mb-sc__disc { width: 168px; height: 168px; border: 5px solid #ffffff; margin-right: -34px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16); }
.mb-sc--time .sc-foot { margin-top: 70px; border-top: 2px solid #14141422; padding-top: 36px; color: #6b6b6b; }

/* ============================================================
   CHECKER · STACK — white, italic serif city roll, unqualified faded
   ============================================================ */
.mb-sc--stack { background: #fefdfb; color: #141414; padding: 110px 96px; display: flex; flex-direction: column; }
.mb-sc--stack .sc-lead { font-family: "Instrument Serif", serif; font-size: 64px; line-height: 1.1; color: #141414; }
.mb-sc--stack .sc-list { margin-top: 60px; font-family: "Instrument Serif", serif; font-size: 122px; line-height: 1.07; font-style: italic; }
.mb-sc--stack .sc-list .no { color: #dcd8ce; }
.mb-sc--stack .sc-prband { margin-top: auto; display: flex; align-items: baseline; gap: 28px; border-top: 2px solid #14141422; padding-top: 48px; }
.mb-sc--stack .sc-prband .tm { font-size: 112px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.mb-sc--stack .sc-foot { margin-top: 48px; }

/* ============================================================
   SIMULATOR · MEDAL — white, serif headline, race medal hero
   ============================================================ */
.mb-sim--medal { background: #fefdfb; color: #141414; display: flex; flex-direction: column; }
.mb-sim--medal .sc-head { text-align: center; padding-top: 250px; font-family: "Instrument Serif", serif; font-size: 98px; line-height: 1.06; letter-spacing: -0.01em; font-weight: 400; margin: 0; }
.mb-sim--medal .sc-head em { font-style: italic; }
.mb-sim--medal .sc-tagline { text-align: center; font-family: "Instrument Serif", serif; font-size: 64px; padding-top: 56px; }
.mb-sim--medal .sc-stage { position: relative; height: 1000px; flex: none; }
.mb-sim--medal .sc-stage img { position: absolute; left: 285px; top: 110px; width: 510px; transform: rotate(-7deg); filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.18)); }
.mb-sim--medal .sc-foot { margin-top: auto; text-align: center; font-family: var(--mono); font-size: 26px; letter-spacing: 0.14em; text-transform: uppercase; padding-bottom: 96px; color: #6b6b6b; }

/* ============================================================
   SIMULATOR · ROLL — white, every ballot year listed, win row in ink+orange
   ============================================================ */
.mb-sim--roll { background: #fefdfb; color: #141414; padding: 110px 96px; display: flex; flex-direction: column; }
.mb-sim--roll .sc-lead { font-family: "Instrument Serif", serif; font-size: 64px; line-height: 1.1; }
.mb-sim--roll .sc-list { margin-top: 56px; font-family: "Instrument Serif", serif; font-size: 84px; line-height: 1.12; font-style: italic; }
.mb-sim--roll .sc-list .yr { display: flex; justify-content: space-between; color: #dcd8ce; }
.mb-sim--roll .sc-list .yr.win { color: #141414; }
.mb-sim--roll .sc-list .yr.win .st { color: var(--accent); }
.mb-sim--roll .sc-foot { margin-top: auto; border-top: 2px solid #14141422; padding-top: 40px; }

/* ============================================================
   SIMULATOR · TALLY — white, "no, no, no, ... yes." giant italic serif
   ============================================================ */
.mb-sim--tally { background: #fefdfb; color: #141414; padding: 130px 96px; display: flex; flex-direction: column; }
.mb-sim--tally .sc-lead { font-family: "Instrument Serif", serif; font-size: 66px; line-height: 1.1; }
.mb-sim--tally .sc-words { margin-top: 90px; font-family: "Instrument Serif", serif; font-size: 148px; line-height: 1.16; font-style: italic; color: #b8b3a6; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mb-sim--tally .sc-words .yes { color: var(--accent); font-style: normal; }
.mb-sim--tally .sc-sub { font-family: "Instrument Serif", serif; font-size: 62px; margin-top: 100px; }
.mb-sim--tally .sc-sub .tm, .mb-sim--tally .sc-sub strong { font-family: var(--font); font-weight: 700; letter-spacing: -0.02em; font-style: normal; }
.mb-sim--tally .sc-foot { margin-top: auto; border-top: 2px solid #14141422; padding-top: 40px; color: #6b6b6b; }

/* ============================================================
   Preview wrapper + layout picker (shared by both result pages)
   ============================================================ */
.mb-cardwrap {
  width: 100%;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow:
    0 1px 0 rgba(26, 15, 6, 0.06),
    0 24px 60px -20px rgba(26, 15, 6, 0.22),
    0 60px 100px -40px rgba(26, 15, 6, 0.18);
}
.mb-cardwrap .mb-sc,
.mb-cardwrap .mb-sim {
  position: absolute;
  top: 0; left: 0;
  transform-origin: top left;
  /* transform: scale(parentW / 1080) set by ResizeObserver in JS */
}

.mb-laypick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mb-lay {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  background: none;
  border: none;
  border-radius: 2px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--result-ink-mute, var(--ink-mute));
  transition: color 160ms ease, background 160ms ease;
}
.mb-lay:hover { color: var(--result-ink, var(--ink)); }
.mb-lay.on {
  background: var(--result-ink, var(--ink));
  color: var(--result-card-bg, var(--bg));
}
.mb-laypick .sep { color: var(--result-ink-mute, var(--ink-mute)); font-family: var(--mono); font-size: 11px; }
