/* Inner pages: each its own living studio head (Drafts: the floor of typers, Sent: the stack of delivered messages,
   Rules: the bubble cut open), then one column of tables in the text face. */
:root { --ph: clamp(400px, 52svh, 520px); }
.inner::before { content: ""; position: absolute; inset: 0 0 auto 0; height: calc(var(--hh) + var(--rl) + var(--ph)); z-index: -1; background: var(--bgimg) center top / auto calc((var(--hh) + var(--rl) + var(--ph)) * 1.75) no-repeat, var(--milk); }
.inner::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--hh) + var(--rl) + var(--ph) - 80px); height: 80px; z-index: -1; background: linear-gradient(rgba(244, 241, 236, 0), var(--milk)); }
.phead { position: relative; height: var(--ph); }
.phead .wrap { height: 100%; display: flex; align-items: center; position: relative; z-index: 3; pointer-events: none; }
.phc { width: min(520px, 42vw); pointer-events: auto; }
.phc small { display: block; font-weight: 700; font-size: 16px; color: var(--ink2); }
.phc h1 { margin: 6px 0 0; font: 800 clamp(64px, 7vw, 104px)/.95 var(--display); letter-spacing: -.03em; }
.phc p { margin: 14px 0 0; max-width: 44ch; }
.pnums { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-size: 17px; }
.pnums b { font-size: 22px; }
.phc .btn { margin-top: 22px; height: 52px; }
.pscene { position: absolute; z-index: 2; right: 0; bottom: 0; width: min(58vw, calc(var(--ph) * 1.6)); height: 100%; container-type: inline-size; }

/* drafts: the floor of typers */
.cloud .tb { position: absolute; transform: translate(-50%, -50%); transition: left .6s ease-out, top .6s ease-out, width .6s ease-out, filter .3s; cursor: pointer; }
.cloud .tb img { display: block; animation: sway var(--sd, 3s) ease-in-out var(--sdl, 0s) infinite alternate; }
@keyframes sway { from { transform: translateY(-3%) rotate(-1.2deg); } to { transform: translateY(3%) rotate(1.2deg); } }
.cloud .mb span { position: absolute; left: 12%; right: 10%; top: 42%; transform: translateY(-50%); font: 700 16px/1.2 var(--text); color: var(--ink); white-space: nowrap; text-align: center; }
@media (prefers-reduced-motion: reduce) { .cloud .tb img { animation: none; } }
.cloud .tb img { width: 100%; filter: drop-shadow(0 10px 10px rgba(30, 45, 120, .22)); }
.cloud .tb.hot img { filter: drop-shadow(0 0 0 transparent) drop-shadow(0 10px 18px rgba(46, 143, 107, .55)) brightness(1.08); }
.cloud .tb.grey img { filter: grayscale(1) brightness(1.05); }
.cloud .tb .cap { position: absolute; inset: -12% -8%; border-radius: 50%; border: 4px solid var(--mint); opacity: 0; }
.cloud .tb.capped .cap { opacity: 1; }
.cloud .more { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); margin: 0; padding: 12px 24px; border-radius: 999px; background: var(--plate); font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }

/* sent: the stack of delivered messages, newest at the bottom */
.stack .dm { position: absolute; left: 50%; transform: translate(-50%, 0); transition: top .7s ease-out, width .7s ease-out, opacity .5s; }
.stack .dm img.b { width: 100%; }
.stack .dm .t { position: absolute; left: 11%; right: 24%; top: 46%; transform: translateY(-50%); display: grid; gap: 2px; white-space: nowrap; }
.stack .dm .t b { font: 800 clamp(22px, 3cqi, 32px)/1 var(--display); }
.stack .dm .t span { font: 600 clamp(16px, 2cqi, 20px)/1.2 var(--text); font-variant-numeric: tabular-nums; }
.stack .dm .tk { position: absolute; right: 7%; bottom: 15%; width: 16%; }
.stack .dm.hot { filter: drop-shadow(0 0 22px rgba(159, 227, 201, .9)); }
.stack .empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 12px 20px; border-radius: 999px; background: var(--plate); font-weight: 600; }

/* rules: the bubble cut open, three chambers = the three steps */
.cut { position: absolute; left: 8%; top: 22%; width: 86%; }
.cut img.s { width: 100%; height: auto; filter: drop-shadow(0 26px 30px rgba(30, 45, 120, .3)); }
.cut .ch { position: absolute; top: 50.5%; width: 25%; aspect-ratio: 1.05; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; }
.cut .ch img { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(calc((1 - var(--f, 0)) * 100%) 0 0 0); transition: clip-path .8s cubic-bezier(.2, .9, .3, 1.2); }
.cut .lbl { position: absolute; top: 102%; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 16px; white-space: nowrap; }

/* tables and lists below */
.rules-list { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 12px; }
.rules-list li { counter-increment: r; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; padding: 20px 28px; border-radius: 24px; background: var(--plate); box-shadow: var(--shadow); }
.rules-list li::before { content: counter(r); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--cobalt); color: #fff; font: 800 20px/1 var(--display); }
.rules-list p { margin: 8px 0 0; }
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s4); align-items: center; }
.calc label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.calc .inp { display: flex; align-items: center; gap: 12px; }
.calc input { width: 180px; height: 56px; padding: 0 20px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font: 700 22px var(--text); font-variant-numeric: tabular-nums; color: var(--ink); }
.calc input:focus-visible { outline: 3px solid var(--cobalt); }
.calc .presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-width: 420px; }
.calc .presets .chip { justify-content: center; padding: 0 16px; }
.calc .out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.calc .out div { padding: 16px 28px; border-radius: 20px; background: #fff; }
.calc .out small { display: block; font-weight: 600; font-size: 16px; color: var(--ink2); }
.calc .out b { font: 800 28px/1.15 var(--display); }
.calc .formula { margin-top: 24px; font-size: 16px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.calc .formula p { margin: 0; }
.calc .formula .fx { display: grid; gap: 2px; font: 600 18px/1.4 var(--text); color: var(--ink); font-variant-numeric: tabular-nums; }
.calc .formula .fx .i2 { padding-left: 4.4em; }
.calc .formula .fk { margin-top: 8px; }
.calc .formula .fd { margin-top: 8px; color: var(--ink); font-weight: 700; }
.mini-scene { position: relative; aspect-ratio: 1.3; border-radius: 28px; background: url("/img/bg-rules.webp") center / cover; overflow: hidden; }
.mini-scene .md { position: absolute; left: 50%; bottom: 30%; width: 34%; transform: translateX(-50%); }
.mini-scene .md img { width: 100%; }
.mini-scene .md .mf { position: absolute; inset: 0; clip-path: inset(calc((1 - var(--f, 0)) * 100%) 0 0 0); transition: clip-path .5s ease-out; }
.mini-scene .bar { position: absolute; left: 10%; right: 10%; bottom: 12%; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, .8); overflow: hidden; }
.mini-scene .bar i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--cobalt); border-radius: 999px; transition: width .5s ease-out; }
.mini-scene .bl { position: absolute; left: 10%; bottom: calc(12% + 30px); font-weight: 700; font-size: 16px; padding: 8px 16px; border-radius: 999px; background: var(--plate); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.facts .card h3 { margin: 0 0 8px; font: 800 26px/1.15 var(--display); }
.facts .card p { margin: 0; }
.facts .card p + p { margin-top: 10px; }

@media (max-width: 1023px) {
  :root { --ph: auto; }
  .inner::before { height: calc(var(--hh) + 640px); background-size: cover; }
  .inner::after { display: none; }
  .phead { height: auto; display: flex; flex-direction: column-reverse; }
  .phead .wrap { height: auto; padding-top: 8px; }
  .phc { width: 100%; }
  .phc h1 { font-size: 56px; }
  .pscene { position: relative; width: 100%; height: auto; aspect-ratio: 1.35; }
  .calc { grid-template-columns: 1fr; }
  .calc .out { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .rules-list li { grid-template-columns: 40px 1fr; padding: 18px 20px; }
  .rules-list li::before { width: 40px; height: 40px; }
}

/* 404: the deflated bubble on the floor, its last grey dot */
.lost { top: 62%; left: 10%; width: 76%; }
.lost .roll { position: absolute; left: 70%; bottom: 6%; width: 13%; cursor: pointer; filter: drop-shadow(0 10px 10px rgba(30, 45, 120, .25)); }
/* sent: the payees under a row */
.tbl tr.click { cursor: pointer; }
.tbl tr.click.on td { background: rgba(159, 227, 201, .35); }
.tbl tr.open > td { padding: 0; background: #fff; }
.payees { padding: 16px 24px 24px; }
.payees .tbl.in { box-shadow: none; }
.tbl tr.hot td { background: rgba(159, 227, 201, .35); }
.showmore { margin-top: 16px; }
@media (max-width: 480px) {
  #typers th:nth-child(1), #typers td:nth-child(1), #typers th:nth-child(4), #typers td:nth-child(4), #typers th:nth-child(3), #typers td:nth-child(3) { display: none; } /* phone: wallet + payout; keystrokes are the cloud above */
  #below th:nth-child(3), #below td:nth-child(3) { display: none; }
  #typers td[colspan], #below td[colspan] { display: table-cell; white-space: normal; }
}
@media (max-width: 480px) {
  #sends > thead th:nth-child(2), #sends > tbody > tr.click > td:nth-child(2),
  #sends > thead th:nth-child(5), #sends > tbody > tr.click > td:nth-child(5),
  #sends > thead th:nth-child(7), #sends > tbody > tr.click > td:nth-child(7),
  #sends > thead th:nth-child(8), #sends > tbody > tr.click > td:nth-child(8) { display: none; }
}
@media (max-width: 420px) { .calc .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
