/* ===== PIZZA HUT DEMO: THE DEAL (tools/builder/kits/ph_deal.py). The Buy One Get One Free deal rebuilt live from his
   MealDeal recording, played as a prototype walkthrough (the shared .nx-proto window on the dotted canvas). Inside the
   phone, sizes are in --d: one point of his 375-wide screens, measured from the recording (product UI, the documented
   exception to the six site sizes). Every move is GSAP in assets/js/ph-deal.js, timed from his frames
   (tools/pizzahut/motion/deal.md); nothing here transitions on its own, so a clicked frame lands exactly. */
.ph-deal .pd-canvas { margin-top: var(--head-gap, 52px); }
.ph .pd-stage.nx-proto { width: min(940px, 100%); }
.pd-stage .nx-dev.pd-dev { width: 300px; margin: 22px 0 18px; container-type: normal; }
.pd-stage.nx-proto .nx-beats { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding: 0 22px; }
.pd-stage.nx-proto .nx-beat .ph-num { display: none; }
.pd-stage.nx-proto .nx-beat .ph-name { white-space: nowrap; }
@media (min-width: 1000px) { .ph .pd-stage .nx-proto-cap { align-self: start; margin-top: 260px; } }

.pd-app { --d: calc(100cqw / 375); --pd-red: #C8102E; --pd-grey: #8A8A8A; position: absolute; inset: 0; overflow: hidden; background: #fff; color: #111; letter-spacing: 0.005em; }
.pd-app * { box-sizing: border-box; }
.pd-app p { margin: 0; }
.pd-app ul { margin: 0; padding: 0; list-style: none; }
.pd-app img { display: block; max-width: none; }
.pd-app svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.pd-round { position: absolute; z-index: 4; display: grid; place-items: center; width: calc(36 * var(--d)); height: calc(36 * var(--d)); border-radius: 50%; background: #fff; color: #111;
  box-shadow: 0 calc(3 * var(--d)) calc(10 * var(--d)) rgba(0, 0, 0, 0.12); }
.pd-round svg { width: 56%; height: 56%; stroke-width: 2.1; }

.pd-scene { position: absolute; inset: 0; overflow: hidden; background: #fff; visibility: hidden; will-change: transform; }
.pd-scene.on { visibility: visible; }

/* 0 the menu's Deals tab (his recording opens here) */
.pd-chips { position: absolute; left: calc(24 * var(--d)); top: calc(44 * var(--d)); display: flex; gap: calc(18 * var(--d)); white-space: nowrap; }
.pd-chip { display: grid; place-items: center; height: calc(32 * var(--d)); padding: 0 calc(15 * var(--d)); border-radius: calc(7 * var(--d)); background: #fff; color: #777;
  font-size: calc(var(--a-footnote) * var(--d)); font-weight: 600; box-shadow: 0 calc(3 * var(--d)) calc(10 * var(--d)) rgba(200, 16, 46, 0.1); }
.pd-chip.on { background: var(--pd-red); color: #fff; }
.pd-list::after { content: ""; position: absolute; left: 0; right: 0; top: calc(96 * var(--d)); height: 1px; background: #EDEDED; }
.pd-cards { position: absolute; left: calc(16 * var(--d)); right: calc(16 * var(--d)); top: calc(126 * var(--d)); display: grid; gap: calc(22 * var(--d)); }
.pd-card { height: calc(218 * var(--d)); }
.pd-ghost { height: calc(190 * var(--d)); border-radius: calc(14 * var(--d)); background: #F3F3F3; }

/* 1 the deal: the morph box is the card, opened */
.pd-deal { background: transparent; }
.pd-morph { position: absolute; left: 0; top: 0; width: calc(375 * var(--d)); height: calc(812 * var(--d)); overflow: hidden; background: #fff; transform-origin: 0 0; }
.pd-morph::after { content: ""; position: absolute; left: 0; right: 0; top: calc(151 * var(--d)); height: calc(70 * var(--d)); background: #fff; opacity: var(--pd-panel, 0); }   /* the card's white foot */
.pd-hero { position: absolute; left: 0; top: 0; width: calc(375 * var(--d)); transform-origin: 0 0; }
.pd-hero img { width: 100%; height: auto; }
.pd-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 95%); }
.pd-x { left: calc(16 * var(--d)); top: calc(43 * var(--d)); }
.pd-deal-copy { position: absolute; z-index: 1; left: calc(17 * var(--d)); top: calc(129 * var(--d)); }
.pd-deal-h { font-weight: 700; font-size: calc(var(--a-title-l) * var(--d)); line-height: 1.17; letter-spacing: -0.005em; color: #111; }
.pd-deal-h span { color: var(--pd-red); }
.pd-deal-s { margin-top: calc(31 * var(--d)) !important; font-size: calc(var(--a-subhead) * var(--d)); line-height: 1.3; color: #111; }
.pd-rows { position: absolute; left: calc(16 * var(--d)); right: calc(16 * var(--d)); top: calc(292 * var(--d)); display: grid; gap: calc(17 * var(--d)); }
.pd-row { position: relative; display: flex; align-items: center; justify-content: space-between; height: calc(61 * var(--d)); padding: 0 calc(21 * var(--d)) 0 calc(21 * var(--d)); border-radius: calc(6 * var(--d));
  background: #F8F8F8; box-shadow: 0 calc(4 * var(--d)) calc(12 * var(--d)) rgba(0, 0, 0, 0.07); color: var(--pd-grey); font-size: calc(var(--a-body) * var(--d)); }
.pd-row .pd-plus { width: calc(20 * var(--d)); height: calc(20 * var(--d)); color: var(--pd-red); stroke-width: 2; }
.pd-row-fill { display: none; }
.pd-filled { position: absolute; left: calc(16 * var(--d)); right: calc(16 * var(--d)); top: calc(292 * var(--d)); padding: calc(22 * var(--d)) calc(24 * var(--d)) calc(24 * var(--d)); border-radius: calc(6 * var(--d)); background: #fff;
  box-shadow: 0 calc(4 * var(--d)) calc(14 * var(--d)) rgba(0, 0, 0, 0.09); opacity: 0; }
.pd-f-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: calc(10 * var(--d)) !important; }
.pd-f-h b { font-size: calc(var(--a-body) * var(--d)); font-weight: 700; color: #111; }
.pd-f-h span { font-size: calc(var(--a-subhead) * var(--d)); color: var(--pd-red); }
.pd-sum li { display: grid; grid-template-columns: calc(14 * var(--d)) 1fr auto; font-size: calc(var(--a-footnote) * var(--d)); line-height: calc(21 * var(--d)); color: #333; }
.pd-sum i { font-style: normal; color: #2E9B4E; font-weight: 600; }
.pd-sum b { font-weight: 400; color: #333; }
.pd-sl-off i, .pd-sl-off span { color: #E2606F; }
.pd-sum2 { margin-top: calc(23 * var(--d)) !important; }
.pd-sum2 li { grid-template-columns: 1fr auto; color: #555; }
.pd-sidefill { position: absolute; left: calc(16 * var(--d)); right: calc(16 * var(--d)); top: calc(639 * var(--d)); display: flex; align-items: center; gap: calc(14 * var(--d)); height: calc(61 * var(--d));
  padding: 0 calc(16 * var(--d)) 0 calc(8 * var(--d)); border-radius: calc(6 * var(--d)); background: #fff; box-shadow: 0 calc(4 * var(--d)) calc(14 * var(--d)) rgba(0, 0, 0, 0.09); opacity: 0; }
.pd-sidefill img { width: calc(62 * var(--d)); height: auto; border-radius: calc(4 * var(--d)); }
.pd-sidefill p { flex: 1; display: flex; justify-content: space-between; align-items: baseline; }
.pd-sidefill b { font-size: calc(var(--a-callout) * var(--d)); font-weight: 700; color: #111; }
.pd-sidefill span { font-size: calc(var(--a-subhead) * var(--d)); color: var(--pd-red); }

/* 2 choose a pizza: rises over the deal */
.pd-bar { position: absolute; left: 0; right: 0; top: calc(52 * var(--d)); height: calc(36 * var(--d)); display: grid; place-items: center; z-index: 3; }
.pd-bar .pd-round { left: calc(17 * var(--d)); top: 0; }
.pd-bar b { font-size: calc(var(--a-body) * var(--d)); font-weight: 700; color: var(--pd-red); }
.pd-tiles { position: absolute; left: calc(16 * var(--d)); right: calc(16 * var(--d)); top: calc(113 * var(--d)); display: grid; grid-template-columns: 1fr 1fr; gap: calc(17 * var(--d)); }
.pd-tile { overflow: hidden; height: calc(216 * var(--d)); border-radius: calc(14 * var(--d)); background: linear-gradient(180deg, #F3F3F3, #EAEAEA); box-shadow: 0 calc(5 * var(--d)) calc(14 * var(--d)) rgba(200, 16, 46, 0.08); }
.pd-tile img { width: 100%; height: auto; }
.pd-tile p { display: grid; justify-items: center; margin-top: calc(8 * var(--d)) !important; text-align: center; line-height: 1.25; }
.pd-tile b { font-size: calc(var(--a-callout) * var(--d)); font-weight: 700; color: #111; }
.pd-tile span { margin-top: calc(4 * var(--d)); font-size: calc(var(--a-footnote) * var(--d)); color: #333; }

/* 3 to 5 the pizza */
.pd-pizza { background: transparent; }
.pd-pizza::before { content: ""; position: absolute; inset: 0; background: #fff; opacity: var(--pd-bg, 1); }
.pd-phero { position: absolute; left: 0; top: 0; width: calc(375 * var(--d)); height: calc(270 * var(--d)); overflow: hidden; transform-origin: 0 0; }
.pd-phero img { width: 100%; height: auto; }
.pd-phero .pd-phero-tile { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.pd-phero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 92%); opacity: var(--pd-fade, 1); }
.pd-back { left: calc(17 * var(--d)); top: calc(43 * var(--d)); }
.pd-pbody { position: absolute; left: 0; right: 0; top: calc(275 * var(--d)); display: grid; justify-items: center; text-align: center; }
.pd-p-h { font-size: calc(var(--a-title-s) * var(--d)); font-weight: 700; color: #111; }
.pd-p-d { margin-top: calc(10 * var(--d)) !important; font-size: calc(var(--a-subhead) * var(--d)); line-height: 1.3; color: #333; }
.pd-cust { display: inline-flex; align-items: center; gap: calc(7 * var(--d)); height: calc(38 * var(--d)); margin-top: calc(15 * var(--d)); padding: 0 calc(18 * var(--d)); border-radius: calc(6 * var(--d)); background: #fff;
  box-shadow: 0 calc(3 * var(--d)) calc(12 * var(--d)) rgba(0, 0, 0, 0.1); color: var(--pd-red); font-size: calc(var(--a-footnote) * var(--d)); font-weight: 700; }
.pd-tom { width: calc(18 * var(--d)); height: calc(18 * var(--d)); stroke-width: 1.8; }
.pd-lab { margin-top: calc(39 * var(--d)) !important; font-size: calc(var(--a-subhead) * var(--d)); color: #111; }
.pd-lab b { font-weight: 700; }
.pd-lab-c { display: grid; justify-items: center; margin-top: calc(42 * var(--d)) !important; line-height: 1.3; }
.pd-lab-c span { font-size: calc(var(--a-subhead) * var(--d)); color: #333; }
.pd-sizes { display: flex; gap: calc(30 * var(--d)); margin-top: calc(16 * var(--d)); }
.pd-size { display: grid; place-items: center; width: calc(48 * var(--d)); height: calc(48 * var(--d)); border-radius: calc(8 * var(--d)); background: #F6F6F6; color: #666; font-size: calc(var(--a-callout) * var(--d)); font-weight: 700;
  box-shadow: 0 calc(3 * var(--d)) calc(10 * var(--d)) rgba(0, 0, 0, 0.07); }
.pd-size.off { color: #E2E2E2; box-shadow: none; }
.pd-size.on { background: var(--pd-red); color: #fff; }
.pd-crusts { display: flex; gap: calc(16 * var(--d)); margin-top: calc(22 * var(--d)); }
.pd-crust { width: calc(60 * var(--d)); height: calc(60 * var(--d)); overflow: hidden; border-radius: calc(7 * var(--d)); box-shadow: 0 calc(4 * var(--d)) calc(10 * var(--d)) rgba(200, 16, 46, 0.08);
  outline: calc(3 * var(--d)) solid rgba(200, 16, 46, 0); outline-offset: calc(-3 * var(--d)); }
.pd-crust img { width: 100%; height: 100%; object-fit: cover; opacity: 0.78; }
.pd-crust.on { outline-color: var(--pd-red); }
.pd-crust.on img { opacity: 1; }
.pd-add { position: absolute; left: calc(22 * var(--d)); right: calc(22 * var(--d)); top: calc(722 * var(--d)); height: calc(52 * var(--d)); justify-content: space-between; padding: 0 calc(22 * var(--d)) 0 calc(118 * var(--d));
  border-radius: calc(8 * var(--d)); background: var(--pd-red); font-size: calc(var(--a-body) * var(--d)); font-weight: 500; }
.pd-add > * { position: relative; }
.pd-add::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #fff; opacity: var(--pd-blink, 0); }
/* the price is an odometer: each digit a column that rolls to its new value */
.pd-price { display: inline-flex; font-weight: 500; font-size: calc(var(--a-subhead) * var(--d)); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pd-dg { position: relative; display: inline-block; height: 1.2em; overflow: hidden; }
.pd-dg i { display: block; font-style: normal; }
.pd-dg > span { position: absolute; left: 0; top: 0; display: block; }

/* sheets rise over a dim */
.pd-dim { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; }
.pd-sheet { position: absolute; left: 0; right: 0; top: calc(100 * var(--d)); bottom: 0; z-index: 6; overflow: hidden; padding: 0 calc(21 * var(--d)); border-radius: calc(20 * var(--d)) calc(20 * var(--d)) 0 0; background: #fff;
  transform: translateY(105%); }
.pd-sx { right: calc(25 * var(--d)); top: calc(20 * var(--d)); }
.pd-sh { margin-top: calc(60 * var(--d)) !important; font-size: calc(var(--a-title-m) * var(--d)); line-height: 1.3; color: #111; }
.pd-g { margin-top: calc(29 * var(--d)) !important; font-size: calc(var(--a-body) * var(--d)); color: var(--pd-grey); }
.pd-chips2, .pd-sheet .pd-chips { position: static; display: flex; flex-wrap: wrap; gap: calc(14 * var(--d)) calc(16 * var(--d)); margin-top: calc(14 * var(--d)); max-width: calc(300 * var(--d)); white-space: normal; margin-top: calc(16 * var(--d)); }
.pd-tchip { display: inline-flex; align-items: center; height: calc(34 * var(--d)); padding: 0 calc(16 * var(--d)); border-radius: calc(4 * var(--d)); background: #F8F8F8; color: #777; font-size: calc(var(--a-footnote) * var(--d));
  box-shadow: 0 calc(3 * var(--d)) calc(10 * var(--d)) rgba(0, 0, 0, 0.07); }
.pd-tchip.on { background: var(--pd-red); color: #fff; box-shadow: none; }
.pd-toplist { margin: calc(14 * var(--d)) calc(-6 * var(--d)) 0 !important; }
.pd-top { display: flex; align-items: center; gap: calc(10 * var(--d)); height: calc(68 * var(--d)); }
.pd-top img { width: calc(60 * var(--d)); height: calc(34 * var(--d)); object-fit: contain; }
.pd-top p { flex: 1; display: flex; align-items: baseline; gap: calc(8 * var(--d)); }
.pd-top b { font-size: calc(var(--a-subhead) * var(--d)); font-weight: 500; color: #111; }
.pd-top p span { font-size: calc(var(--a-footnote) * var(--d)); color: #999; }
.pd-step { display: flex; align-items: center; gap: calc(6 * var(--d)); }
.pd-plusb, .pd-minus { display: grid; place-items: center; width: calc(30 * var(--d)); height: calc(30 * var(--d)); border-radius: 50%; background: #fff; color: var(--pd-red);
  box-shadow: 0 calc(2 * var(--d)) calc(8 * var(--d)) rgba(0, 0, 0, 0.12); }
.pd-plusb .pd-plus, .pd-minus .pd-plus { width: 60%; height: 60%; stroke-width: 2.2; }
.pd-n { position: relative; width: calc(16 * var(--d)); height: calc(20 * var(--d)); overflow: hidden; text-align: center; font-size: calc(var(--a-subhead) * var(--d)); font-variant-numeric: tabular-nums; }
.pd-n b { position: absolute; left: 0; right: 0; top: 0; font-weight: 500; line-height: calc(20 * var(--d)); }
.pd-top[data-n="0"] .pd-minus, .pd-top[data-n="0"] .pd-n { opacity: 0; }
.pd-sidelist { display: grid; gap: calc(14 * var(--d)); margin-top: calc(26 * var(--d)) !important; }
.pd-side { display: flex; align-items: center; gap: calc(14 * var(--d)); height: calc(76 * var(--d)); padding: 0 calc(16 * var(--d)) 0 calc(8 * var(--d)); border-radius: calc(8 * var(--d)); background: #F8F8F8;
  box-shadow: 0 calc(3 * var(--d)) calc(10 * var(--d)) rgba(0, 0, 0, 0.06); }
.pd-side img { width: calc(76 * var(--d)); height: auto; border-radius: calc(4 * var(--d)); }
.pd-side p { flex: 1; display: grid; }
.pd-side b { font-size: calc(var(--a-callout) * var(--d)); font-weight: 700; color: #111; }
.pd-side span { font-size: calc(var(--a-footnote) * var(--d)); color: #888; }
.pd-side .pd-plus { width: calc(22 * var(--d)); height: calc(22 * var(--d)); color: var(--pd-red); stroke-width: 2; }

/* his touch: a soft white disc that glides between taps and dips on each press (GSAP moves it) */
.pd-phone .ip-touch, .pd-phone .ip-touch.press { animation: none; background: rgba(255, 255, 255, 0.72); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 calc(3 * var(--p)) calc(10 * var(--p)) rgba(0, 0, 0, 0.22); }

@media (max-width: 700px) {
  .pd-stage .nx-dev.pd-dev { width: min(300px, 78%); }
  .pd-stage.nx-proto .nx-beats { gap: 6px; padding: 0 14px; }
  .pd-stage .nx-beat .ph-name { display: none; }
}
