Betting is now a tap away for young Kentuckians, and Kentucky bettors lost $330 million in 2025. Most people remember the wins, not the losses, and few know a break-even year can still mean owing tax. About Even walks through the real money math of sportsbooks, parlays, prediction markets and horse racing, shows what betting costs you after tax, then helps you set a budget and put that money toward a goal. Educational use only.
<!-- Copyright (c) 2026 Ryan Beam. Released under the MIT License. -->
<!--
About Even: the real money math of betting in Kentucky (sportsbooks, parlays, prediction markets, horse racing).
Who it's for: young adult Kentuckians who bet or are around betting.
Educational use only. Not betting, tax or investment advice. Nothing here recommends any bet, security or product.
Single file, works offline: no network requests, no accounts, no API keys. Your data stays on your device
unless you save it to a file yourself.
Third-party assets: Geist and Geist Mono fonts (SIL Open Font License 1.1), embedded.
Built 2026-11-20 from src/ with build.mjs.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="color-scheme" content="dark">
<title>About Even: the real money math of betting in Kentucky</title>
<meta name="description" content="You think you're about even. Kentucky bet $3 billion in 2025. The books kept $330 million. The real money math of betting in Kentucky, then a plan for your own money: a betting budget, a savings goal and the after-tax view. Single file, offline.">
<link rel="icon" href="data:,">
<style>
@font-face{font-family:"Geist";font-style:normal;font-weight:300;font-display:swap;src:url(data:font/woff2;base64,d09GMgABAAAAADOsABAAAAAAfpgAADNMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEqG9YMHIdMBmA/U1RBVEQAhRARCAr3AN5EC4RCAAE2AiQDiQAEIAWEOAeLSQwHGwNvBRvX4G5VqxDBzGywbdiD8yBJuHVvRGJKZP+fE+gQWak3wPjmVWEhRazOIqzu0mKqqXCrVKVN96h2pkbofMJME9HOi1LYzgSDcE/inng4O33tGdvm+8JYsBybtS3r/ZbrO/4i1/0jE1KbuuYMbBv5k5y8BPVj/PbeF5HkkjBrNDyJePT0h2jNIiSaWCIyhCiW3N4RP2c/+96LvZgCIYRASUiIYJYaUqFcoUYFbx1RORd6FTFUa4qVk09Nr/ab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dMYfO4BjIXpSfCA6yOM738AaD2VXLKDOkMvra6FcZTFC9PQMrZnDEwU+8843l6dGnIYMqduWajhjoGoPTrXHCudN4+YierlHEtIrvsa94u6jmd4BYCUmMRAkSHC4BSFGDFA1xCQjJ9/gHUM0DEIAEUAIAABwAEEAZAPigGbJTOVR1spUq5eXoAcMUMJFj5dg5js/lvkBCxXaOPYvNjN4l51R4GBk1eoZPJA/6ytO+Bf3P9ocR/wxaNk/yeuN3e+tJTiTntBrJ0x4+Leqimsr/mapq9vjUefp86mR1Hnk1VN10OPM1nJczmlH8BHJiouugcnEgp+Dmf/OXW0f2a6voTe45lKMHbPUmkoLBrhEDKhsxSzp7HcPPe8cjhgWx3uzT3cXK7XSOOIrBLSbWYHDqTK4pMqjUY6GYeXaUyvaml9rdBgAA) format("woff2")}
@font-face{font-family:"Geist";font-style:normal;font-weight:600;font-display:swap;src:url(data:font/woff2;base64,d09GMgABAAAAADQ8ABAAAAAAfswAADPbAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoEqG9Y2HIdMBmA/U1RBVEQAhRARCAr2cN4BC4RCAAE2AiQDiQAEIAWEUAeLSQwHGwJvFezYi3gcABy/B0YG8jiExo4ckZJzafb/5wQ1huxBO0Cx3BIeQmEjCVuRpNbuWixz9K36rcveS6mDOkMP6nptY/5+DDPheIiRPZqf96jRNQwEgMF/bVwTrcg5PW0x3HgJGJhWzKLMnpHuGdg28ic5eXn+ef/iXfvcN28+gMmPoA5im5aVWqGo4CqpjJLs4PvzOGfvJ2nSSIU2LcVK0RqUYjJHxo6xzjG3E7OJGQc3U2d4fps9e85N7GkDFiFVHxD+JwU+tAEYaIMBiEMbHcbm2ttcZFzVXN/1bn2RRfT8ITa7P000sUQ0WDrY1Sp0wl3okFt/Q+sqlPaXvwanhTg8eLTw63XmrsCe2acfxAq46FMDfpAln4HDLLVSGwJqw23u/tTpD9PaYeztOHYsz0huWv5AbsMKKT6FZJ1CiqtvS4rzAhT+DQ5gNjAAGhCAjO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Ua9ifFMNH2ZJ/WjMqZD9kuRKiwqlCqCZt8kk1dNCS52H1L9uuiS58tXNq2UwyZziJS8142qnjxbpnWPSOf3W6GHe7q4/6OMXzgzYxkgiYViGxTIt8Qk37rJo3aKT7T+j/qdnYORhr332O8AzeGHfjnP4OOiQXEd8+s/6sb7u8eNf8ueOOi+vQLAQoZvfMU64fHIF/sDFfhEhUqkot01VNhWWlYsuqDvyCVVq1CYaqk1PDCJLBS+WOrPUa9Skwa+aLTfbfXPMNU+/+eK0aNOuVbwEiZLctUFy4mCb7VkEP/op8SAvXWwr/NuZHfswiEUcEhW0/u+OVWSRh48iylhHFZvYxi72cYg6jtHEKc5xiWvc4h6tTZ565nkI0ccQYzziGVO8YobHOz7xjR8rEg7UFiL8ztlvduolQpKZEP8EkFphpclYnBRpxptol91WWW2Ntf61wBZbCTAJTFCCE8IFrU+PQQOGdEaYMKlu6rIZlXG6fUXsgYfW0XDi6HPp/jCJMOMzIRMDB4ks8iiijCrqVEQTbXRBo4/BR6b40EnnnHLa+ZzJGAs3+luWtyT0dXfQ6WyYzqIz4juoBfCrrWZtXGQpk8VTyN20qLW+lVoyv2ZRoD7QtobVLEQWd5z0vQKtsT3dLc8SCPboon2PsTuk4g5IBhnqWK4d1NvRjwOvUcB+1OjpoO6Obh2fizbUV4sYbScAejGDdTzjEQwLMQBmXTD7EzHAmDb0B9B2ADCAATwCAAALADDgCQBo2pSZdB5djqXTEUEv02NpHhu9nF5uL8/lWx8H03HtA9dls0X9Iz8oHuZGh9mD26U23YwDwHlNe/7DnH8YMtia80pnfquSDinHcyO9cVktEcvLT/nNykzz48bus8+NPWydij4yqiDO5X+OB/u88UKHkmNL3Qidjxvy4i8D2DntdzX2ZdNF6vDQy/S48gJwfKCjs/l5PfbS9p4ezz7wKDK+pLkncOC7iqdhJo8OYfGXaM504H0W30o06LrbIVt7tkVkT6ZPZsFdAA==) format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:300;font-display:swap;src:url(data:font/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VprPKjAb+a9h6JOrR0SjtOEXlYYmFjYOLh4+ASERMQkmknJyJuB2ewzX/vcF74JK5ioaR/pnOjMHR/s4fPFGr6IL8ju4fYPJfs9LkumMCQUSSPpZmH9GUviSd/FWUODnXZ9bDKiczhEkFrMLjjCcxo9EywHjPYspmIyXJP4XrjmAYM9g+7gxVPDAmQLEFxQmUAGgSBAhgcqEwgEMsRsHS/kS/mZDVROTGhEWUYMJmHNTFqSsQ5p+MTCQUpEHhlFwjuYvP7wY35iJFk0OT6cTYJ/BSW2RHwZJkuzfz3COeQPtH9vJsfHHA9MaJrpcTTZYz39HdaO4vzU0FBfon2o50V5HUNj3DY69JlC6ZBIlicWJf/d4PlQ5q7mbVHsGejemkcJmwEA) format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:400;font-display:swap;src:url(data:font/woff2;base64,d09GMgABAAAAACaIABAAAAAAUiAAACYmAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGnQbiR4chCoGYD9TVEFUSACFEBEICvJk2wULhBIAATYCJAOIEAQgBYRCB4hDDAcbFkOzERVsHAAySGeEKEoYpyP7rw5sQ8x+sO1olPA8jh5tWhy5ls6ROoYs4n1/fCZJOP3LvOEb7LABCks7lmzdYVhYj+2xmi+eP3Q9QmOf5Bo8bevn7a5r5lfEJY3mGrGaMzGy8CIj+MpFydG7+c2QDTKTbakZfeaym6WhRmlfese5wG84laci3Ov38ZA/hr77ZYhHTRrIEStEW1+FqgM1odkCxc+Jzi43PG3zn1/RKdaw5hSDjKPq7oCDO+qEo07EiglGrV33j5p/3/3O/d/sV+aS/8c/0HveTypcsloFKk1TKNBAdJnJdPv7uYVSSJ2U5oraROTxFxLH/6+zz1b3v3ln7fmoj/YCBbn/noQrny1TYZcu1dN9kqXn999IpowlezL+bP1ZGDpnPXBORuOA7GXuAgDyohexCmCFLXGXkypNmaIokw4qKsoqRRnf3+8zbiLR96mkTDpFyirifHyv70Tf+uQ/txvcYIwrdCL4ggkduTUybo5j88W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DNr05QnCdhj73vaTor+BBhlgucG2S/WFSpp042XINMQwww2VJVuOXJ8ckGexJay7rZmdvv4ZdsILfWJADIkRMSYmxJSYEXNiwZIVazZs2bHn4D+OHaLFN3wnTnic8bngCAiJokOcJXPO+DZirCS0wkljmWJZCWZhh53CGDORr1CQEKectstue+y13gZHHKXHiIihccaYaIJJRgaftALvjHKYfrg22hxmvtJgH46Ai5mKrBIabhmEOw+evHi/SUFJRQ2ioaWjZ2BkakpOe3uvx93vQU+YL0jPZP9sP3MmO6xSaRGVRqUuHlaMjvWOUmFfUaAJaQyRET3+2UnYS/fAkrFs/311es6TJQM68HmxeKQHq6gNz3K2Tw2v5ONamGs+TIW53p4dzpr62OMXwe8RHBZwy8FXHBwIvrLAtxwcHHyF9XoSpDKoimqoyVJIaWJKC6qjemrYY+Q2EVXhaB57Coe0KBb8ziTrzbBnXvfkYf/czHixxeEmeHBSozLigobifxXCeORleuqN3pnpwgKFlN5+FKR4eni0b7NSWzY0Nraiu2dMvL+0b2x6cIxVyw2Qoakxlpqi7v9ksB4Qo9nMS1Hngy5uPYq9AAAA) format("woff2")}
@font-face{font-family:"Geist Mono";font-style:normal;font-weight:500;font-display:swap;src:url(data:font/woff2;base64,d09GMgABAAAAACeEABAAAAAAUmgAACckAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGnQbiUgchCoGYD9TVEFURACFEBEICvJg2nALhBIAATYCJAOIEAQgBYRsB4hDDAcbUUOzERVsHIAwSBfI4DgPGwf4bZYpispJN/uvE7gxROsDfYXGdpfBgxLwbp0ZETs40EBQUEBky3KEOP4rU15Eroz+znwAzigryw2mi+z60j1ail1eLkx7hMY+yYX+Ia/+69ykMXA/kCsQ+FppJzCNATM8v80eBnYjJSrRIlH1ESkJwZiVi3Sbt3OVV3MVF9vNq5RFxlUt+q5yWt3SyNCtSZxFxAFHCjlOVlvluheh/ZUPIbSEHKB/+nv07H0zEQ5FAxirQK1TKFBArVrt5/n/vzf3eTwFvC8fwPS6vBWDU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vl16l0LsrV8jzWEUhz1uBJPO7op2qwqyF1CI15gdyLxQodn6vR0p2g2TXdETkx/2JDtOM54cW8ox/8+fMT8iAA) format("woff2")}
/* ---- styles/base.css ---- */
/* base.css: tokens, type, header, footer, shared controls, drawer, toast.
Palette from mocks/v2/03b. Two charged colors, never decorative:
green = money that comes back / wins / what you remember; red = what the books keep / losses.
Red and green also differ in brightness, size and motion, and every group carries a word label. */
:root{
--ink:#0A0C0F;
--ink-2:#0E1115; /* lifted surface: drawer, lab head */
--bone:#ECE5D5;
--bone-2:rgba(236,229,213,.78);
--bone-3:rgba(236,229,213,.66); /* was .55; brighter for readability (11/20 review) */
--hair:rgba(236,229,213,.13);
--green:#5ED6A0;
--red:#F04A3A;
--display:"Geist", ui-sans-serif, system-ui, sans-serif; /* headlines: Geist 600, tight tracking, never italic */
--sans:"Geist", ui-sans-serif, system-ui, sans-serif;
--mono:"Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
--gut:clamp(16px, 6vw, 88px);
--header-h:56px;
--ease:cubic-bezier(.2,.8,.2,1);
}
*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none !important}
html{background:var(--ink);color:var(--bone);-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{background:var(--ink);font-family:var(--sans);font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.45}
::selection{background:var(--bone);color:var(--ink)}
button{font:inherit;color:inherit}
em,i,cite,var,dfn,address{font-style:normal} /* no italics anywhere in the UI */
a{color:inherit}
.g{color:var(--green)} .r{color:var(--red)}
.ae-skip{position:absolute;left:-9999px;top:8px;z-index:100;background:var(--bone);color:var(--ink);padding:8px 12px;font:500 13px/1 var(--mono)}
.ae-skip:focus{left:8px}
.ae-noscript{padding:120px var(--gut);font:400 20px/1.5 var(--sans);color:var(--bone-2)}
html.ae-lab-open, html.ae-drawer-open{overflow:hidden}
/* ---------- small type roles ---------- */
.ae-kick{font:500 12.5px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
.ae-disclaimer{font:400 13px/1.5 var(--sans);color:var(--bone-3)}
/* ---------- header ---------- */
.ae-header{position:fixed;top:0;left:0;right:0;height:var(--header-h);z-index:30;display:flex;align-items:center;gap:24px;padding:0 var(--gut)}
/* Scrim: solid ink behind the header, fading to clear about 24px below it, with a blur under the
fade, so headlines and controls never read through the wordmark or ticks. */
.ae-header::before{content:"";position:absolute;left:0;right:0;top:0;height:calc(var(--header-h) + 24px);z-index:-1;pointer-events:none;
background:linear-gradient(var(--ink) 0, var(--ink) 58%, rgba(10,12,15,.82) 74%, rgba(10,12,15,0) 100%);
-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
-webkit-mask-image:linear-gradient(#000 0, #000 72%, transparent 100%);mask-image:linear-gradient(#000 0, #000 72%, transparent 100%)}
.ae-wordmark{font:600 20px/1 var(--display);letter-spacing:-.035em;color:var(--bone);text-decoration:none;white-space:nowrap}
/* tabs: mono caps like the header actions; the active one is bone with an underline (not a pill) */
.ae-tabs{display:flex;align-items:stretch;gap:2px;height:100%;margin-left:12px}
.ae-tab{position:relative;display:flex;align-items:center;padding:0 12px;min-height:32px;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);text-decoration:none;white-space:nowrap;transition:color .2s}
.ae-tab::after{content:"";position:absolute;left:12px;right:12px;bottom:12px;height:1.5px;background:var(--bone);transform:scaleX(0);transform-origin:left center;transition:transform .35s var(--ease)}
.ae-tab:hover{color:var(--bone)}
.ae-tab.is-active{color:var(--bone)}
.ae-tab.is-active::after{transform:scaleX(1)}
.ae-tab:focus-visible{outline:1px solid var(--bone-3);outline-offset:-6px}
.ae-tab-s{display:none}
.ae-ticks{flex:1;display:flex;justify-content:flex-end;align-items:center;gap:9px;height:100%}
.ae-tick{appearance:none;background:none;border:0;width:13px;height:28px;cursor:pointer;position:relative;padding:0}
.ae-tick::before{content:"";position:absolute;left:6px;top:50%;width:1px;height:10px;transform:translateY(-50%);background:var(--bone-3);transition:height .35s var(--ease), background .35s}
.ae-tick:hover::before{background:var(--bone)}
.ae-tick.is-done::before{background:var(--bone-2)}
.ae-tick.is-current::before{background:var(--bone);height:20px}
.ae-tick.is-missing{cursor:default}
.ae-tick.is-missing::before{background:var(--hair)}
.ae-tick:focus-visible{outline:1px solid var(--bone-3);outline-offset:2px}
.ae-actions{display:flex;gap:4px;margin-left:auto} /* same right edge on every tab, ticks or not */
.ae-act{appearance:none;background:none;border:0;cursor:pointer;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);padding:10px 8px;min-height:32px;position:relative;transition:color .2s}
.ae-act:hover,.ae-act:focus-visible{color:var(--bone)}
.ae-act:focus-visible{outline:1px solid var(--bone-3);outline-offset:-2px}
.ae-act.is-dirty::after{content:"";position:absolute;right:1px;top:7px;width:4px;height:4px;border-radius:50%;background:var(--bone)}
/* ---------- tab links: "Make your plan →" and other route buttons (data-ae-go) ---------- */
.ae-go{appearance:none;background:none;border:0;border-bottom:1px solid var(--bone-3);cursor:pointer;display:inline-flex;align-items:flex-end;gap:8px;min-height:36px;padding:0 0 6px;font:500 13px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone);text-decoration:none;transition:border-color .2s, gap .25s var(--ease)}
.ae-go:hover,.ae-go:focus-visible{border-color:var(--bone);gap:12px;outline:none}
.ae-go--big{margin-top:30px;font:600 clamp(22px,2vw,28px)/1 var(--display);letter-spacing:-.03em;text-transform:none;padding-bottom:8px;min-height:44px}
.ae-go-row{margin-top:18px !important}
/* ---------- the money lesson: every chapter's closing line, one style everywhere ---------- */
.ae-lesson{margin-top:22px !important;padding-top:14px;border-top:1px solid var(--hair);max-width:32ch !important}
.ae-lesson-k{display:block;margin-bottom:8px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
.ae-lesson-k::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--bone);margin:0 9px 1px 0;vertical-align:middle}
.ae-lesson-t{display:block;font:600 21px/1.22 var(--display);letter-spacing:-.022em;color:var(--bone)}
.ae-panel-disclaimer{margin-top:18px !important;font-size:13px !important;color:var(--bone-3) !important}
/* ---------- tab pages: How They Win index, Labs ---------- */
.ae-page{position:relative;z-index:2;min-height:100vh;min-height:100svh;padding:calc(var(--header-h) + 72px) var(--gut) 96px}
.ae-page-inner{max-width:760px}
.ae-page .ae-kick{margin-bottom:18px}
.ae-page h1{font:600 clamp(40px,4.6vw,64px)/1 var(--display);letter-spacing:-.045em;max-width:16ch;text-wrap:balance}
.ae-page-lede{margin-top:20px;font:400 18.5px/1.5 var(--sans);color:var(--bone-2);max-width:48ch}
.ae-page-disclaimer{margin-top:14px}
.ae-page-foot{margin-top:48px}
/* a clean list threaded by a hairline, one dot per row (the dot fills on hover) */
.ae-dotlist{list-style:none;position:relative;margin-top:44px}
.ae-dotlist::before{content:"";position:absolute;left:7px;top:14px;bottom:30px;width:1px;background:var(--hair)}
.ae-dotrow{appearance:none;background:none;border:0;width:100%;text-align:left;cursor:pointer;color:var(--bone);text-decoration:none;display:grid;grid-template-columns:15px 1fr;gap:0 26px;padding:14px 0 26px;font:inherit}
.ae-dot{position:relative;width:15px;height:15px;border-radius:50%;margin-top:3px;background:var(--ink);border:1px solid var(--bone-3);transition:background .25s, border-color .25s, transform .35s var(--ease)}
.ae-dotrow-body{display:grid;gap:8px;min-width:0}
.ae-dotrow-k{font:500 12px/1.4 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
.ae-dotrow-t{font:600 clamp(24px,2.4vw,32px)/1.08 var(--display);letter-spacing:-.035em;transition:color .2s}
.ae-dotrow-d{font:400 17.5px/1.45 var(--sans);color:var(--bone-2);max-width:52ch}
.ae-dotrow-go{margin-top:4px;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);transition:color .2s}
.ae-dotrow:hover .ae-dot,.ae-dotrow:focus-visible .ae-dot{background:var(--bone);border-color:var(--bone);transform:scale(1.15)}
.ae-dotrow:hover .ae-dotrow-go,.ae-dotrow:focus-visible .ae-dotrow-go{color:var(--bone)}
.ae-dotrow:focus-visible{outline:1px solid var(--bone-3);outline-offset:4px}
.ae-labgroup{margin-top:52px}
.ae-labgroup-h{font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-2);padding-bottom:14px;border-bottom:1px solid var(--hair)}
.ae-dotlist--labs{margin-top:22px}
.ae-dotlist--labs .ae-dotrow{padding:10px 0 20px}
.ae-dotlist--labs .ae-dotrow-t{font-size:clamp(21px,1.9vw,25px)}
.ae-dotlist--labs .ae-dotrow-d{font-size:16.5px}
.ae-dotlist--labs .ae-dotrow-k{color:var(--bone-3)}
/* ---------- footer ---------- */
.ae-footer{position:relative;z-index:16;background:var(--ink);border-top:1px solid var(--hair);padding:56px var(--gut) 48px}
.ae-foot-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px 48px;max-width:1100px}
.ae-foot-disclaimer{font-size:14.5px;color:var(--bone-2)}
.ae-foot-for{font:400 14.5px/1.55 var(--sans);color:var(--bone-3);max-width:52ch}
.ae-foot-links{display:flex;gap:22px}
.ae-credits{font:400 13px/1.6 var(--sans);color:var(--bone-3);max-width:60ch}
.ae-credit-k{font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-2);margin-right:2px}
/* ---------- shared controls ---------- */
/* Text buttons: the visible part is the caps label and its underline; min-height gives a 32px tap
target (the extra space sits above the label, so the look doesn't change). */
.ae-link,.ae-quiet,.ae-how,.ae-close{appearance:none;background:none;border:0;border-bottom:1px solid var(--hair);cursor:pointer;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);padding:0 0 5px;min-height:32px;display:inline-flex;align-items:flex-end;transition:color .2s, border-color .2s;text-decoration:none}
.ae-link:hover,.ae-quiet:hover,.ae-how:hover,.ae-close:hover,
.ae-link:focus-visible,.ae-quiet:focus-visible,.ae-how:focus-visible,.ae-close:focus-visible{color:var(--bone);border-color:var(--bone-3);outline:none}
.ae-seg{--seg-l:84px;display:flex;align-items:center;flex-wrap:wrap}
/* label sits in a fixed left gutter, so wrapped buttons line up under the first button, not under the label */
/* (no position change here: stage.place() positions these controls absolutely via .ae-placed) */
.ae-seg:not(.ae-seg--big):has(> .ae-seg-label){padding-left:var(--seg-l)}
.ae-seg:not(.ae-seg--big) > .ae-seg-label{margin-left:calc(-1 * var(--seg-l))}
.ae-seg-label{font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);width:var(--seg-l);flex:none;white-space:nowrap}
.ae-seg-btn{appearance:none;background:none;border:0;color:var(--bone-3);font:400 16.5px/1 var(--mono);height:40px;padding:0 9px;cursor:pointer;position:relative;transition:color .2s;white-space:nowrap}
.ae-seg-btn::after{content:"";position:absolute;left:8px;right:8px;bottom:6px;height:1.5px;background:var(--bone);transform:scaleX(0);transition:transform .35s var(--ease)}
.ae-seg-btn:hover{color:var(--bone)}
.ae-seg-btn[aria-pressed="true"]{color:var(--bone)}
.ae-seg-btn[aria-pressed="true"]::after{transform:scaleX(1)}
.ae-seg-btn:focus-visible{outline:1px solid var(--bone-3);outline-offset:-4px}
.ae-seg--big{gap:6px 4px}
.ae-seg--big .ae-seg-btn{font:600 clamp(24px,2.2vw,32px)/1 var(--display);letter-spacing:-.035em;height:58px;padding:0 14px 0 0;margin-right:14px}
.ae-seg--big .ae-seg-btn::after{left:0;right:14px;bottom:8px}
.ae-slider{--p:50%;display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 16px;width:100%;max-width:360px}
.ae-slider-label{grid-column:1 / -1;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
.ae-slider input{-webkit-appearance:none;appearance:none;width:100%;height:32px;background:transparent;cursor:pointer}
.ae-slider input::-webkit-slider-runnable-track{height:1px;background:linear-gradient(90deg,var(--bone-2) var(--p),var(--hair) var(--p))}
.ae-slider input::-moz-range-track{height:1px;background:var(--hair)}
.ae-slider input::-moz-range-progress{height:1px;background:var(--bone-2)}
.ae-slider input::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;border-radius:50%;background:var(--bone);margin-top:-7px;border:0;transition:transform .2s}
.ae-slider input::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background:var(--bone);border:0}
.ae-slider input:active::-webkit-slider-thumb{transform:scale(1.2)}
.ae-slider input:focus-visible{outline:1px solid var(--bone-3);outline-offset:2px}
.ae-slider-out{font:400 16.5px/1 var(--mono);color:var(--bone);min-width:11ch;text-align:right;white-space:nowrap} /* ui.js fixes its width to the longest readout */
/* ---------- drawer ("How this works", Sources, Explore) ---------- */
.ae-scrim{position:fixed;inset:0;z-index:40;background:rgba(5,6,8,.62);opacity:0;transition:opacity .3s ease}
.ae-scrim.is-open{opacity:1}
.ae-scrim:not(.is-open),.ae-drawer:not(.is-open){pointer-events:none} /* closing: let taps through at once */
.ae-drawer{position:fixed;top:0;right:0;bottom:0;z-index:41;width:min(560px,100vw);background:var(--ink-2);border-left:1px solid var(--hair);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .32s var(--ease)}
.ae-drawer.is-open{transform:none}
.ae-drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:26px 32px 18px;border-bottom:1px solid var(--hair)}
.ae-drawer-title{margin-top:12px;font:600 28px/1.08 var(--display);letter-spacing:-.035em}
.ae-drawer-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:22px 32px 48px}
.ae-drawer-lede{font:400 16.5px/1.5 var(--sans);color:var(--bone-2);max-width:44ch}
.ae-drawer-sub{margin:30px 0 12px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
.ae-drawer-lab{margin-top:26px}
.ae-math{display:grid;gap:14px;font:400 16px/1.55 var(--sans);color:var(--bone-2)}
.ae-math > div,.ae-math > p{padding-left:14px;border-left:1px solid var(--hair)}
.ae-math code{font:400 14.5px/1.5 var(--mono);color:var(--bone);white-space:nowrap}
.ae-math strong{font-weight:500;color:var(--bone)}
.ae-math .ae-label{display:block;margin-bottom:4px;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
.ae-sources{list-style:none;display:grid;gap:12px;font:400 14.5px/1.5 var(--sans);color:var(--bone-2)}
.ae-sources a{color:var(--bone-2);text-decoration:underline;text-decoration-color:var(--hair);text-underline-offset:3px}
.ae-sources a:hover{color:var(--bone)}
.ae-src-id{font:500 12px/1 var(--mono);letter-spacing:.08em;color:var(--bone-3);margin-right:6px}
.ae-src-note{display:block;color:var(--bone-3);font-size:14px}
.ae-menu{list-style:none;margin-top:18px;border-top:1px solid var(--hair)}
.ae-menu-item{appearance:none;background:none;border:0;border-bottom:1px solid var(--hair);width:100%;text-align:left;cursor:pointer;display:grid;grid-template-columns:36px 1fr;gap:4px 8px;padding:16px 0;color:var(--bone)}
.ae-menu-num{font:500 12px/1.9 var(--mono);color:var(--bone-3);letter-spacing:.1em}
.ae-menu-title{font:600 21px/1.15 var(--display);letter-spacing:-.025em;transition:color .2s}
.ae-menu-ch{grid-column:2;font:500 12px/1.4 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3)}
.ae-menu-blurb{grid-column:2;font:400 15px/1.45 var(--sans);color:var(--bone-3)}
.ae-menu-item:hover .ae-menu-title,.ae-menu-item:focus-visible .ae-menu-title{color:var(--bone-2)}
.ae-menu-item:focus-visible{outline:1px solid var(--bone-3);outline-offset:2px}
/* ---------- toast ---------- */
.ae-toast{position:fixed;left:50%;bottom:22px;z-index:60;transform:translate(-50%,12px);max-width:min(560px,calc(100vw - 32px));padding:12px 16px;background:var(--ink-2);border:1px solid var(--hair);font:400 14.5px/1.45 var(--sans);color:var(--bone);opacity:0;pointer-events:none;transition:opacity .25s ease, transform .25s var(--ease)}
.ae-toast.is-shown{opacity:1;transform:translate(-50%,0)}
.ae-toast.is-error{border-color:rgba(240,74,58,.55)}
.ae-toast:empty{display:none}
/* narrow desktop: short tab labels so the header fits on one row */
@media (max-width: 1080px){
.ae-tab-l{display:none}
.ae-tab-s{display:inline}
.ae-tab{padding:0 9px}
.ae-tab::after{left:9px;right:9px}
.ae-tabs{margin-left:4px}
.ae-header{gap:16px}
}
@media (max-width: 819px){
:root{--header-h:84px}
/* phone: wordmark + Save/Open on row one, the four tabs on row two, the ticks as a thin bar under them */
.ae-header{flex-wrap:wrap;gap:0;padding:0 16px;height:var(--header-h);align-content:flex-start}
.ae-wordmark{font-size:21px;line-height:42px;flex:1}
.ae-actions{height:42px;align-items:center;margin-right:-8px}
.ae-act{padding:10px 7px;min-height:36px}
.ae-tabs{order:3;flex:0 0 100%;height:36px;margin:0 -10px;gap:0;justify-content:space-between}
.ae-tab{padding:0 10px;min-height:36px;font-size:11.5px;letter-spacing:.12em}
.ae-tab::after{left:10px;right:10px;bottom:5px}
.ae-ticks{order:4;flex:0 0 100%;height:6px;gap:0;justify-content:stretch;align-items:flex-start} /* one continuous bar that fills, not segments under the tabs */
.ae-tick{flex:1;height:20px;width:auto;margin-bottom:-12px} /* taller tap area, thin bar */
/* a 1px progress line, dimmer than the 1.5px tab underline above it, so it never reads as a tab marker */
.ae-tick::before{left:0;right:0;width:auto;height:1px;top:4px;transform:none;background:var(--hair)}
.ae-tick.is-done::before,.ae-tick.is-current::before{height:1px;background:var(--bone-3)}
.ae-foot-grid{grid-template-columns:1fr}
.ae-footer{padding:40px 16px 36px}
.ae-drawer-head{padding:20px 18px 14px}
.ae-drawer-body{padding:18px 18px 40px}
.ae-drawer-title{font-size:30px}
.ae-seg{--seg-l:72px}
.ae-seg-btn{padding:0 7px;font-size:15.5px}
.ae-page{padding:calc(var(--header-h) + 36px) 16px 72px}
.ae-page-lede{font-size:17px}
.ae-dotlist{margin-top:32px}
.ae-dotrow{gap:0 18px;padding:12px 0 22px}
.ae-dotrow-d{font-size:16.5px}
.ae-labgroup{margin-top:40px}
.ae-lesson{margin-top:12px !important;padding-top:10px}
.ae-lesson-k{margin-bottom:6px}
.ae-lesson-t{font-size:18.5px}
.ae-go-row{margin-top:10px !important}
.ae-panel-disclaimer{margin-top:10px !important}
}
@media (prefers-reduced-motion: reduce){
html{scroll-behavior:auto}
*,*::before,*::after{transition-duration:0s !important;animation-duration:0s !important;animation-iteration-count:1 !important}
}
/* ---- styles/stage.css ---- */
/* stage.css: the sticky dot stage, the scroll steps and their cards (from mocks/v2/03b). */
.ae-scrolly{position:relative}
.ae-stage{position:sticky;top:0;width:100%;height:100vh;height:100svh;overflow:hidden}
.ae-canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.ae-halo{position:absolute;border-radius:50%;pointer-events:none;background:radial-gradient(closest-side, rgba(236,229,213,.05), rgba(236,229,213,0) 70%);transition:opacity 1.2s ease}
.ae-stage-layer{position:absolute;inset:0;pointer-events:none}
.ae-placed{position:absolute;pointer-events:auto;opacity:0;transition:opacity .45s ease .2s}
.ae-placed.is-shown{opacity:1}
.ae-story{position:relative;margin-top:-100vh;margin-top:-100svh;pointer-events:none;z-index:2;outline:none}
/* Desktop pacing: steps are 62vh (82vh at a chapter start), so the empty gap between two cards is
about half what it was (110vh / 130vh steps averaged ~730px of nothing at 1280x800; now ~360px). */
.ae-step{min-height:62vh;min-height:62svh;display:flex;align-items:center;padding:0 var(--gut);scroll-margin-top:var(--header-h)}
.ae-step.is-chapter-start{min-height:82vh;min-height:82svh}
.ae-panel > .ae-chapter:last-child .ae-step:last-child:not(.is-wide){min-height:120vh;min-height:120svh}
.ae-step.is-wide{min-height:100vh;min-height:100svh;padding-top:var(--header-h)}
.ae-card{pointer-events:auto;width:min(420px, 33vw);transition:opacity .6s ease;scroll-margin-top:calc(var(--header-h) + 16px)}
.ae-step.is-wide .ae-card{width:min(820px, 100%)}
.ae-step:not(.is-active) .ae-card{opacity:.16}
.ae-card .ae-kick{margin-bottom:16px}
.ae-card h1{font:600 clamp(50px, 6vw, 92px)/.95 var(--display);letter-spacing:-.05em;text-wrap:balance}
.ae-card h2{font:600 clamp(30px, 2.8vw, 42px)/1.06 var(--display);letter-spacing:-.038em;text-wrap:balance}
.ae-card p{margin-top:16px;font:400 17.5px/1.45 var(--sans);color:var(--bone-2);max-width:34ch}
.ae-card .ae-how{display:inline-flex;margin-top:8px} /* 32px tall now; the label sits where it did */
.ae-card .ae-src{max-width:none;margin-top:14px;font:400 14px/1.4 var(--mono);letter-spacing:.02em;color:var(--bone-3)}
.ae-card .ae-slot{margin-top:18px}
.ae-cue{display:flex;align-items:center;gap:12px;margin-top:34px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
/* the story's hand-off step */
.ae-step.ae-handoff .ae-card{width:min(720px,100%)}
.ae-step.ae-handoff h2{font-size:clamp(44px,5vw,76px);line-height:.98;letter-spacing:-.048em}
.ae-step.ae-handoff p{font-size:18.5px;max-width:44ch}
.ae-cue i{display:block;width:1px;height:34px;background:linear-gradient(var(--bone-3),transparent);transform-origin:top;animation:ae-cue 2.4s cubic-bezier(.6,0,.2,1) infinite}
@keyframes ae-cue{0%{transform:scaleY(0)}50%{transform:scaleY(1)}100%{transform:scaleY(1);opacity:0}}
@media (max-width: 819px){
.ae-step,.ae-step.is-chapter-start{min-height:125vh;min-height:125svh;align-items:flex-start;padding:0 16px}
.ae-panel > .ae-chapter:last-child .ae-step:last-child:not(.is-wide){min-height:160vh;min-height:160svh}
/* --ae-sheet: set per card by steps.js when the card is taller than the default sheet, so it sticks
higher and the stage region shrinks to stay above it (stage.geom.safe.bottom). */
.ae-card{position:sticky;top:calc(100vh - var(--ae-sheet, 204px));top:calc(100svh - var(--ae-sheet, 204px));width:100%;min-height:190px;padding:18px 2px 22px;background:var(--ink);border-top:1px solid var(--hair)}
.ae-step:not(.is-active) .ae-card{opacity:0;pointer-events:none;transition-duration:.25s}
/* Keep the active sheet pinned until the next step takes over (the activation line in steps.js is
230px above the bottom; the card's bottom sits 14px above it), instead of letting it ride up over
the graphic for the last 216px of its step. */
.ae-step:not(.is-wide) .ae-card{margin-bottom:-216px}
.ae-card .ae-kick{margin-bottom:10px}
.ae-card h1{font-size:44px;line-height:.97}
.ae-card h2{font-size:25px;line-height:1.08;letter-spacing:-.032em}
.ae-card p{font-size:16.5px;margin-top:10px;max-width:none}
.ae-card .ae-how{margin-top:0}
.ae-card .ae-slot{margin-top:10px}
.ae-step.is-wide{min-height:100vh;min-height:100svh;align-items:center;padding-top:var(--header-h)}
.ae-step.is-wide .ae-card{position:relative;top:auto;border-top:0;background:none;min-height:0}
.ae-cue{display:none}
}
/* ---- styles/chapters.css ---- */
/* chapters.css: small patterns shared by chapter cards. A chapter's own styles go in
src/styles/chapters/<file>.css, scoped under [data-chapter="<id>"]. */
/* a quiet one-line acknowledgement under a control (aria-live in the markup) */
.ae-ack{min-height:1.45em}
/* a number shown inside card text: mono, tabular */
.ae-num{font-family:var(--mono);font-weight:400;font-size:.94em;letter-spacing:-.01em}
/* inline "illustration" / assumption label under a scene's card text */
.ae-assume{margin-top:12px;font:400 14px/1.4 var(--mono);color:var(--bone-3)}
/* his guess, in card text: neutral bone with a dotted underline (red and green mean kept / came back) */
.ae-guess{color:var(--bone);text-decoration:underline dotted;text-decoration-thickness:1px;text-underline-offset:3px}
/* ---- styles/labs.css ---- */
/* labs.css: the full-screen lab shell. A lab's own styles go in src/styles/labs/<id>.css,
scoped under [data-lab="<id>"]. */
.ae-lab{position:fixed;inset:0;z-index:35;background:var(--ink);display:flex;flex-direction:column;opacity:0;transition:opacity .3s ease}
.ae-lab.is-open{opacity:1}
.ae-lab-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;padding:22px var(--gut) 18px;border-bottom:1px solid var(--hair);background:var(--ink)}
.ae-lab-title{margin-top:10px;font:600 clamp(26px,2.5vw,36px)/1.04 var(--display);letter-spacing:-.038em}
.ae-lab-body{position:relative;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:28px var(--gut) 56px}
.ae-lab-error{font:400 16.5px/1.5 var(--sans);color:var(--bone-2)}
@media (max-width: 819px){
.ae-lab-head{padding:16px 16px 14px;align-items:flex-start;flex-direction:column}
.ae-lab-body{padding:20px 16px 40px}
}
/* ---- styles/chapters/c00-cold-open.css ---- */
/* C0 Cold open. Scoped to the chapter. */
[data-chapter="c0"] .ae-card h1{max-width:12ch;font-size:clamp(48px, min(6.2vw, 10vh), 92px)}
/* what it is: the first line anyone reads */
[data-chapter="c0"] .c0-lede{margin:0 0 18px;font:400 20px/1.4 var(--sans);color:var(--bone);max-width:62ch}
/* selection underline draws from the left edge of the word, so even mid-animation it reads as an underline (B15) */
[data-chapter="c0"] .ae-seg--big .ae-seg-btn::after{transform-origin:left center}
[data-chapter="c0"] .c0-choices{margin-top:30px}
[data-chapter="c0"] .c0-none{margin-top:14px}
[data-chapter="c0"] .c0-none[aria-pressed="true"]{color:var(--bone);border-color:var(--bone)}
[data-chapter="c0"] .c0-ack{margin-top:18px;color:var(--bone)}
[data-chapter="c0"] .c0-disclaimer{margin-top:26px;max-width:none}
@media (max-width: 819px){
[data-chapter="c0"] .ae-card h1{font-size:42px}
[data-chapter="c0"] .c0-lede{font-size:17px;margin-bottom:12px}
[data-chapter="c0"] .c0-choices{margin-top:18px}
[data-chapter="c0"] .ae-seg--big .ae-seg-btn{font-size:23px;height:48px}
}
/* ---- styles/chapters/c04-gimme.css ---- */
/* C4 The gimme. The guess dial is placed on the stage (stage.place), so it lives in the stage
layer, not inside [data-chapter="c4"]; its rules are scoped by the c4- class prefix instead. */
.c4-dial{position:absolute;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.c4-dial.is-drag{cursor:grabbing}
.c4-dial-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;outline:none}
.c4-dial-svg:focus-visible .c4-track{stroke:var(--bone-3)}
.c4-dial .c4-track{fill:none;stroke:var(--hair);stroke-width:2}
.c4-dial .c4-fill{fill:none;stroke:var(--bone);stroke-width:5;stroke-linecap:butt}
.c4-dial .c4-tick{stroke:var(--bone-3);stroke-width:1.5;opacity:.55}
.c4-dial .c4-tick.is-mj{stroke-width:2.5;opacity:.8}
.c4-dial .c4-tick.is-lit{stroke:var(--bone);opacity:1}
.c4-dial .c4-end{fill:var(--bone-3);font:500 15.5px var(--mono);letter-spacing:.14em}
.c4-dial .c4-knob-halo{fill:var(--bone);opacity:0;transition:opacity .2s}
.c4-dial.is-drag .c4-knob-halo,.c4-dial-svg:focus-visible .c4-knob-halo{opacity:.12}
.c4-dial .c4-knob-o{fill:var(--bone)}
.c4-dial .c4-knob-i{fill:var(--ink)}
.c4-read{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;gap:6px}
.c4-read-k{font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
.c4-read-n{font:300 clamp(56px,8vw,96px)/1 var(--mono);letter-spacing:-.03em;color:var(--bone);font-variant-numeric:tabular-nums}
@media (max-width: 819px){
.c4-read-n{font-size:58px}
}
[data-chapter="c4"] .ae-assume{max-width:34ch}
@media (max-width: 819px){
[data-chapter="c4"] .ae-assume{margin-top:8px;font-size:12px}
}
/* ---- styles/chapters/c05-trading.css ---- */
/* C5 It's called trading. It's still a bet. Scoped to the chapter. The ticket lives on the
stage layer (outside the chapter section), so it carries data-chapter="c5" itself. */
[data-chapter="c5"] .ae-seg-btn{font-size:15.5px}
/* the ticket: a printed slip, hairline only. No shadow, no fill beyond ink. */
.c5-ticket[data-chapter="c5"]{position:absolute;background:var(--ink);border:1px solid var(--hair);border-radius:2px;color:var(--bone);overflow:hidden;
transition:border-color .6s ease}
.c5-ticket[data-chapter="c5"][data-mode="market"]{border-color:rgba(236,229,213,.24)}
.c5-ticket[data-chapter="c5"] .c5-t-in{display:flex;flex-direction:column;height:100%;padding:16px 18px 14px}
.c5-ticket[data-chapter="c5"] b{font-weight:inherit}
.c5-ticket[data-chapter="c5"] .c5-sw{display:inline-grid;vertical-align:top}
.c5-ticket[data-chapter="c5"] .c5-sw > b{grid-area:1 / 1;transition:opacity .45s var(--ease), transform .55s var(--ease), filter .45s ease;white-space:nowrap}
.c5-ticket[data-chapter="c5"][data-mode="book"] .c5-sw > .b,
.c5-ticket[data-chapter="c5"][data-mode="market"] .c5-sw > .a{opacity:0;transform:translateY(7px);filter:blur(2px)}
.c5-ticket[data-chapter="c5"][data-mode="market"] .c5-sw > .a{transform:translateY(-7px)}
.c5-ticket[data-chapter="c5"] .c5-t-top{display:flex;justify-content:space-between;align-items:baseline;font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-2)}
.c5-ticket[data-chapter="c5"] .c5-t-ill{color:var(--bone-3)}
.c5-ticket[data-chapter="c5"] .c5-t-game{margin-top:16px;padding-top:12px;border-top:1px dashed var(--hair);font:400 14px/1 var(--sans);color:var(--bone-3)}
.c5-ticket[data-chapter="c5"] .c5-t-pick{margin-top:8px;font:600 21px/1.1 var(--display);letter-spacing:-.025em}
.c5-ticket[data-chapter="c5"] .c5-t-hero{margin-top:auto;font:300 52px/1 var(--mono);letter-spacing:-.03em}
.c5-ticket[data-chapter="c5"] .c5-t-unit{margin-top:6px;font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
.c5-ticket[data-chapter="c5"] .c5-t-row{display:flex;justify-content:space-between;align-items:baseline;margin-top:14px;padding-top:11px;border-top:1px dashed var(--hair);font:400 14.5px/1 var(--sans);color:var(--bone-2)}
.c5-ticket[data-chapter="c5"] .c5-t-amt{font:400 15.5px/1 var(--mono);color:var(--bone)}
/* printed on the slip, not a control: dim, no underline (fix round 1) */
.c5-ticket[data-chapter="c5"] .c5-t-cta{margin-top:12px;align-self:flex-start;font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);opacity:.7;padding-bottom:5px;pointer-events:none;user-select:none}
@media (max-width: 819px){
.c5-ticket[data-chapter="c5"] .c5-t-in{padding:13px 15px 12px}
.c5-ticket[data-chapter="c5"] .c5-t-game{margin-top:10px;padding-top:9px}
.c5-ticket[data-chapter="c5"] .c5-t-pick{font-size:20px;margin-top:6px}
.c5-ticket[data-chapter="c5"] .c5-t-hero{font-size:38px}
.c5-ticket[data-chapter="c5"] .c5-t-row{margin-top:9px;padding-top:8px}
.c5-ticket[data-chapter="c5"] .c5-t-cta{margin-top:8px;padding-bottom:2px}
}
@media (prefers-reduced-motion: reduce){
.c5-ticket[data-chapter="c5"], .c5-ticket[data-chapter="c5"] .c5-sw > b{transition:none}
}
/* ---- styles/chapters/c08-even-isnt-even.css ---- */
/* C8 Even isn't even. Restructure: the play panel and fine-print styles went with those steps
(the Tax Check lab and the drawer cover them). */
[data-chapter="c8"] .c8-try{margin-top:10px}
/* ---- styles/chapters/c09-your-ledger.css ---- */
/* C9 Your Plan, part 1. Scoped to the chapter. (The Wrapped preview sits in the stage layer and is sized inline.) */
/* ---- 0: the plan's top (wide card) ---- */
[data-chapter="c9"] .c9-top h2{font-size:clamp(38px,4.4vw,64px);line-height:1;letter-spacing:-.045em;max-width:16ch}
[data-chapter="c9"] .c9-top .c9-lede{font-size:20px;max-width:46ch;margin-top:18px}
[data-chapter="c9"] .c9-top .ae-label{display:block;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c9"] .c9-learned{margin-top:40px;padding-top:20px;border-top:1px solid var(--hair);max-width:760px}
[data-chapter="c9"] .c9-learned[hidden]{display:none}
[data-chapter="c9"] .c9-learned ol{list-style:none;counter-reset:c9l;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 36px;margin-top:10px}
[data-chapter="c9"] .c9-learned li{counter-increment:c9l;display:grid;grid-template-columns:28px 1fr;align-items:baseline;padding:11px 0;border-bottom:1px solid var(--hair)}
[data-chapter="c9"] .c9-learned li::before{content:counter(c9l,decimal-leading-zero);font:400 12px/1 var(--mono);letter-spacing:.06em;color:var(--bone-3)}
[data-chapter="c9"] .c9-learned li a,[data-chapter="c9"] .c9-learned li span{font:500 17.5px/1.3 var(--display);letter-spacing:-.012em;color:var(--bone);text-decoration:none}
[data-chapter="c9"] .c9-learned li a:hover,[data-chapter="c9"] .c9-learned li a:focus-visible{text-decoration:underline;text-decoration-color:var(--bone-3);text-underline-offset:4px;outline:none}
[data-chapter="c9"] .c9-habit{margin-top:34px;padding-top:20px;border-top:1px solid var(--hair);max-width:760px}
[data-chapter="c9"] .c9-top .c9-habit-line{margin-top:12px;font:500 22px/1.3 var(--display);letter-spacing:-.018em;color:var(--bone);max-width:none}
[data-chapter="c9"] .c9-tag{display:block;margin:0 0 8px;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);vertical-align:.25em}
[data-chapter="c9"] .c9-set{margin-top:10px;color:var(--bone);border-color:var(--bone-3)}
[data-chapter="c9"] .c9-habit-ed{display:grid;gap:2px;margin-top:14px}
[data-chapter="c9"] .c9-habit-ed[hidden]{display:none}
[data-chapter="c9"] .c9-top .c9-help{margin-top:34px;padding-top:16px;border-top:1px solid var(--hair);max-width:760px;font:400 15.5px/1.6 var(--sans);color:var(--bone-2)}
[data-chapter="c9"] .c9-help-k{display:block;margin-bottom:6px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c9"] .c9-help a{color:var(--bone);text-decoration:underline;text-decoration-color:var(--bone-3);text-underline-offset:4px;text-decoration-thickness:1px}
[data-chapter="c9"] .c9-help a:hover,[data-chapter="c9"] .c9-help a:focus-visible{text-decoration-color:var(--bone);outline:none}
/* ---- 2: Wrapped actions ---- */
[data-chapter="c9"] .c9-acts{display:flex;flex-wrap:wrap;gap:8px 22px}
/* ---- 3: budget slider: readout on its own line, so the track never resizes as the value changes ---- */
[data-chapter="c9"] .ae-slider{grid-template-columns:1fr}
[data-chapter="c9"] .ae-slider-out{text-align:left;font:400 16.5px/1.2 var(--mono);color:var(--bone)}
@media (max-width: 819px){
[data-chapter="c9"] .c9-top h2{font-size:36px}
[data-chapter="c9"] .c9-top .c9-lede{font-size:17.5px;margin-top:12px}
[data-chapter="c9"] .c9-learned{margin-top:26px;padding-top:14px}
[data-chapter="c9"] .c9-learned ol{grid-template-columns:1fr}
[data-chapter="c9"] .c9-learned li{padding:9px 0}
[data-chapter="c9"] .c9-learned li a,[data-chapter="c9"] .c9-learned li span{font-size:16.5px}
[data-chapter="c9"] .c9-habit{margin-top:24px;padding-top:14px}
[data-chapter="c9"] .c9-top .c9-habit-line{font-size:20px}
[data-chapter="c9"] .c9-top .c9-help{margin-top:24px}
[data-chapter="c9"] .c9-acts{gap:4px 18px}
}
/* the plan opens here: keep the kicker clear of the header scrim */
[data-chapter="c9"].c9-top{padding-top:calc(var(--header-h) + 32px)}
/* ---- styles/chapters/c10-your-move.css ---- */
/* C10 Your Plan, part 2 (goals, rule, card, help). Scoped to [data-chapter="c10"]: the chapter section, plus the rules panel, the
commitment card and the print node, which carry data-chapter="c10" themselves because they live
on the stage layer / body. */
/* ---- 0: savings goals (wide card) ---- */
[data-chapter="c10"] .c10-goals-step h2{font-size:clamp(36px,4vw,58px);line-height:1;letter-spacing:-.045em;max-width:18ch}
[data-chapter="c10"] .c10-goals-step .c10-lede{font-size:18.5px;max-width:48ch;margin-top:16px}
[data-chapter="c10"] .c10-goals{list-style:none;margin-top:30px;display:grid;gap:0;max-width:820px;border-top:1px solid var(--hair)}
[data-chapter="c10"] .c10-goal{padding:20px 0 22px;border-bottom:1px solid var(--hair)}
[data-chapter="c10"] .c10-g-head{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:32px}
[data-chapter="c10"] .c10-g-k{font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-g-k em{margin-left:12px;font:inherit;color:var(--green)}
[data-chapter="c10"] .c10-g-fields{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));gap:14px 22px;margin-top:10px}
[data-chapter="c10"] .c10-f{display:grid;gap:6px;align-content:start}
[data-chapter="c10"] .c10-f > span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:500 12px/1.2 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-in{display:flex;align-items:center;height:42px;box-sizing:border-box;gap:4px;border-bottom:1px solid var(--bone-3);transition:border-color .2s}
[data-chapter="c10"] .c10-in:focus-within{border-color:var(--bone)}
[data-chapter="c10"] .c10-in i{font:400 16.5px/1 var(--mono);color:var(--bone-3);white-space:nowrap}
[data-chapter="c10"] .c10-f input{appearance:none;width:100%;min-width:0;background:transparent;border:0;border-radius:0;color:var(--bone);font:400 20px/1.3 var(--mono);padding:0;height:100%;outline:none}
[data-chapter="c10"] .c10-f-name input{height:42px;box-sizing:border-box;font:500 21px/1.3 var(--display);letter-spacing:-.015em;border-bottom:1px solid var(--bone-3);transition:border-color .2s}
[data-chapter="c10"] .c10-f-name input:focus{border-color:var(--bone)}
[data-chapter="c10"] .c10-f input::placeholder{color:var(--bone-3)}
[data-chapter="c10"] .c10-g-quick{display:flex;flex-wrap:wrap;align-items:center;gap:2px 16px;margin-top:10px;font:400 14px/1.4 var(--sans);color:var(--bone-3)}
[data-chapter="c10"] .c10-q{appearance:none;background:none;border:0;border-bottom:1px solid var(--hair);min-height:32px;padding:6px 0 4px;cursor:pointer;font:400 14.5px/1.2 var(--sans);color:var(--bone-2);transition:color .2s, border-color .2s}
[data-chapter="c10"] .c10-q:hover,[data-chapter="c10"] .c10-q:focus-visible{color:var(--bone);border-color:var(--bone-3);outline:none}
[data-chapter="c10"] .c10-q[aria-pressed="true"]{color:var(--green);border-color:var(--green)}
[data-chapter="c10"] .c10-dots{display:grid;grid-template-columns:repeat(25,11px);justify-content:space-between;gap:7px 0;max-width:none;margin-top:18px}
[data-chapter="c10"] .c10-dots i{display:block;width:11px;height:11px;border-radius:50%;background:var(--bone);opacity:.16;transform:scale(.8);transition:background-color .5s var(--ease), opacity .5s var(--ease), transform .5s var(--ease)}
[data-chapter="c10"] .c10-dots i.on{background:var(--green);opacity:1;transform:scale(1)}
[data-chapter="c10"] .c10-dots i:nth-child(n){transition-delay:calc(var(--d, 0) * 1ms)}
[data-chapter="c10"] .c10-goals-step .c10-g-out{margin-top:14px;max-width:none;font:400 16.5px/1.45 var(--sans);color:var(--bone-2)}
[data-chapter="c10"] .c10-g-out strong{font:500 22px/1.1 var(--display);letter-spacing:-.02em;color:var(--green);margin-right:4px}
[data-chapter="c10"] .c10-g-out span{display:block;margin-top:4px;font-size:15px;color:var(--bone-3)}
[data-chapter="c10"] .c10-goals-foot{display:grid;gap:10px;margin-top:16px;max-width:820px}
[data-chapter="c10"] .c10-goals-foot .ae-quiet{justify-self:start;color:var(--bone);border-color:var(--bone-3)}
[data-chapter="c10"] .c10-goals-foot .ae-quiet[hidden]{display:none}
[data-chapter="c10"] .c10-goals-step .c10-note{margin-top:0;max-width:62ch;font:400 14px/1.5 var(--sans);color:var(--bone-3)}
[data-chapter="c10"] .c10-goals-step .c10-help-line{margin-top:28px;padding-top:14px;border-top:1px solid var(--hair);max-width:820px;font:400 15.5px/1.6 var(--sans);color:var(--bone-2)}
[data-chapter="c10"] .c10-help-line span{display:block;margin-bottom:4px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-help-line a{color:var(--bone);text-decoration:underline;text-decoration-color:var(--bone-3);text-underline-offset:4px;text-decoration-thickness:1px}
@media (prefers-reduced-motion: reduce){ [data-chapter="c10"] .c10-dots i{transition:none} }
/* the rules panel's own-rule input */
[data-chapter="c10"].c10-panel input{appearance:none;width:100%;background:transparent;border:0;border-bottom:1px solid var(--bone-3);border-radius:0;color:var(--bone);font:400 18.5px/1.3 var(--sans);padding:6px 0 8px;outline:none;transition:border-color .2s}
[data-chapter="c10"].c10-panel input:focus{border-color:var(--bone)}
[data-chapter="c10"].c10-panel input::placeholder{color:var(--bone-3)}
/* ---- rules panel (placed on the stage) ---- */
[data-chapter="c10"].c10-panel{overflow-y:auto;padding:4px 2px}
[data-chapter="c10"] .c10-panel-k{display:block;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-rules{list-style:none;margin:12px 0 26px;border-top:1px solid var(--hair)}
[data-chapter="c10"] .c10-rule{appearance:none;background:none;border:0;border-bottom:1px solid var(--hair);width:100%;display:flex;align-items:center;gap:14px;padding:15px 2px;text-align:left;cursor:pointer;color:var(--bone-2);font:500 clamp(18px,1.6vw,22px)/1.2 var(--display);letter-spacing:-.02em;transition:color .2s}
/* multi-select, so square checkboxes (not radio circles); the check is a filled dot, like the stage preview */
[data-chapter="c10"] .c10-rule i{flex:none;width:16px;height:16px;border:1px solid var(--bone-3);border-radius:2px;position:relative;transition:border-color .2s}
[data-chapter="c10"] .c10-rule i::after{content:"";position:absolute;inset:3.5px;border-radius:50%;background:var(--bone);transform:scale(0);transition:transform .3s var(--ease)}
[data-chapter="c10"] .c10-rule:hover{color:var(--bone)}
[data-chapter="c10"] .c10-rule[aria-pressed="true"]{color:var(--bone)}
[data-chapter="c10"] .c10-rule[aria-pressed="true"] i{border-color:var(--bone)}
[data-chapter="c10"] .c10-rule[aria-pressed="true"] i::after{transform:scale(1)}
[data-chapter="c10"] .c10-rule:focus-visible{outline:1px solid var(--bone-3);outline-offset:2px}
[data-chapter="c10"] .c10-own{display:grid;gap:8px}
[data-chapter="c10"] .c10-own-row{display:flex;align-items:flex-end;gap:16px}
[data-chapter="c10"] .c10-own-row .ae-quiet{flex:none;margin-bottom:6px}
[data-chapter="c10"] .c10-own-row .ae-quiet:disabled,
[data-chapter="c10"].c10-panel input:disabled{opacity:.35;cursor:default}
[data-chapter="c10"] .c10-count{min-height:1em;font:400 12px/1 var(--mono);color:var(--bone-3)}
/* ---- commitment card (placed on the stage) ---- */
[data-chapter="c10"].c10-card{overflow-y:auto;background:var(--ink-2);border:1px solid var(--hair);padding:26px 28px 22px}
[data-chapter="c10"] .c10-card-top{display:flex;justify-content:space-between;gap:12px;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3);padding-bottom:16px;border-bottom:1px solid var(--hair)}
[data-chapter="c10"] .c10-rows{display:grid}
[data-chapter="c10"] .c10-row{display:grid;grid-template-columns:1fr;gap:4px 12px;padding:14px 0 12px;border-bottom:1px solid var(--hair)}
[data-chapter="c10"] .c10-row-k{grid-column:1 / -1;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-row-k:empty{display:none}
[data-chapter="c10"] .c10-row-v{font:500 21px/1.25 var(--display);letter-spacing:-.018em;color:var(--bone)}
[data-chapter="c10"] .c10-row-v small{display:block;margin-top:4px;font:400 14px/1.4 var(--sans);letter-spacing:0;color:var(--bone-3)}
[data-chapter="c10"] .c10-row.is-muted .c10-row-v{color:var(--bone-3)}
[data-chapter="c10"] .c10-row.is-goal .c10-row-v{color:var(--green)}
[data-chapter="c10"] .c10-x{appearance:none;background:none;border:0;cursor:pointer;align-self:start;min-height:32px;min-width:44px;margin-top:-8px;font:500 12px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3);padding:8px 0 6px;text-align:right;opacity:.75;transition:opacity .2s, color .2s}
[data-chapter="c10"] .c10-x:hover,[data-chapter="c10"] .c10-x:focus-visible{opacity:1;color:var(--bone);outline:none}
[data-chapter="c10"] .c10-empty{padding:22px 0;font:500 21px/1.3 var(--display);letter-spacing:-.018em;color:var(--bone-2)}
[data-chapter="c10"] .c10-card-help{margin-top:16px;font:400 13px/1.5 var(--sans);color:var(--bone-2)}
[data-chapter="c10"] .c10-card-help strong{font-weight:500;color:var(--bone)}
[data-chapter="c10"] .c10-acts{display:flex;gap:22px;margin-top:20px}
[data-chapter="c10"] .c10-card-foot{margin-top:14px;font:400 12px/1.4 var(--sans);color:var(--bone-3)}
/* ---- the ending (wide step) ---- */
[data-chapter="c10"] .c10-end .ae-card{width:min(900px,100%)}
[data-chapter="c10"] .c10-end h2{font-size:clamp(38px,4.4vw,68px);line-height:1;letter-spacing:-.045em;max-width:19ch}
[data-chapter="c10"] .c10-end-num{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin-top:30px;max-width:none}
[data-chapter="c10"] .c10-end-fig{font:300 clamp(40px,4.4vw,64px)/1 var(--mono);letter-spacing:-.03em;color:var(--red)}
[data-chapter="c10"] .c10-end-num span:last-child{font-size:18.5px;color:var(--bone-2)}
[data-chapter="c10"] .c10-end-line{font-size:20px;margin-top:18px}
[data-chapter="c10"] .c10-help{display:block;margin-top:48px;padding-top:22px;border-top:1px solid var(--hair);max-width:820px}
[data-chapter="c10"] .c10-help-k{display:block;font:500 12px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-chapter="c10"] .c10-help ul{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 40px;margin-top:20px}
[data-chapter="c10"] .c10-help li{display:grid;gap:6px;grid-row:span 2;grid-template-rows:subgrid;row-gap:6px} /* titles share a row, so descriptions start on one line */
[data-chapter="c10"] .c10-help strong{font:400 26px/1.05 var(--mono);font-weight:300;letter-spacing:-.01em;color:var(--bone)}
[data-chapter="c10"] .c10-help li span{font:400 15.5px/1.45 var(--sans);color:var(--bone-2);max-width:36ch}
[data-chapter="c10"] .c10-help a{color:inherit;text-decoration:underline;text-decoration-color:var(--bone-3);text-underline-offset:4px;text-decoration-thickness:1px}
[data-chapter="c10"] .c10-help a:hover,[data-chapter="c10"] .c10-help a:focus-visible{text-decoration-color:var(--bone);outline:none}
[data-chapter="c10"] .c10-end-save{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px;margin-top:40px;max-width:none}
[data-chapter="c10"] .c10-end-save span{font-size:15px;color:var(--bone-3)}
[data-chapter="c10"] .c10-end-disc{margin-top:18px;max-width:none;font:400 13px/1.5 var(--sans);color:var(--bone-3)}
@media (max-width: 819px){
[data-chapter="c10"] .c10-goals-step h2{font-size:34px}
[data-chapter="c10"] .c10-goals-step .c10-lede{font-size:16.5px;margin-top:10px}
[data-chapter="c10"] .c10-goals{margin-top:20px}
[data-chapter="c10"] .c10-goal{padding:14px 0 16px}
[data-chapter="c10"] .c10-g-fields{grid-template-columns:1fr 1fr;gap:12px 18px}
[data-chapter="c10"] .c10-f-name{grid-column:1 / -1}
[data-chapter="c10"] .c10-f input{font-size:17.5px}
[data-chapter="c10"] .c10-f-name input{font-size:20px}
[data-chapter="c10"] .c10-dots{gap:6px 0;grid-template-columns:repeat(25,8px)}
[data-chapter="c10"] .c10-dots i{width:8px;height:8px}
[data-chapter="c10"] .c10-g-out strong{font-size:22px}
[data-chapter="c10"].c10-panel input{font-size:17.5px}
[data-chapter="c10"].c10-card{padding:16px 16px 14px}
[data-chapter="c10"] .c10-card-top{padding-bottom:10px}
[data-chapter="c10"] .c10-row{padding:9px 0 8px}
[data-chapter="c10"] .c10-row-v{font-size:18.5px}
[data-chapter="c10"] .c10-row-v small{font-size:12.5px}
[data-chapter="c10"] .c10-card-help{margin-top:10px;font-size:12px}
[data-chapter="c10"] .c10-acts{margin-top:12px}
[data-chapter="c10"] .c10-rules{margin:8px 0 16px}
[data-chapter="c10"] .c10-rule{font-size:21px;padding:11px 2px}
[data-chapter="c10"] .c10-end h2{font-size:34px}
[data-chapter="c10"] .c10-end-line{font-size:17.5px}
[data-chapter="c10"] .c10-end-fig{font-size:40px}
[data-chapter="c10"] .c10-end-num{margin-top:22px}
[data-chapter="c10"] .c10-rule{min-height:44px}
[data-chapter="c10"] .c10-help{margin-top:30px}
[data-chapter="c10"] .c10-help ul{grid-template-columns:1fr;gap:16px}
[data-chapter="c10"] .c10-help strong{font-size:22px}
[data-chapter="c10"] .c10-end-save{margin-top:28px}
}
/* ---- print: only while C10's Print button is printing (html.c10-printing is set by it) ---- */
#c10-print[data-chapter="c10"]{display:none}
@media print{
html.c10-printing, html.c10-printing body{background:#fff !important;color:#000 !important;overflow:visible !important}
html.c10-printing body > :not(#c10-print){display:none !important}
html.c10-printing #c10-print[data-chapter="c10"]{display:block;padding:0.4in}
[data-chapter="c10"] .c10-card--print{max-width:5.5in;border:1px solid #000;padding:0.35in 0.4in;background:#fff;color:#000;box-shadow:none}
[data-chapter="c10"] .c10-card--print .c10-card-top{color:#444;border-color:#999}
[data-chapter="c10"] .c10-card--print .c10-row{border-color:#ccc}
[data-chapter="c10"] .c10-card--print .c10-row-k{color:#555}
[data-chapter="c10"] .c10-card--print .c10-row-v,[data-chapter="c10"] .c10-card--print .c10-row.is-goal .c10-row-v{color:#000;font-size:18pt}
[data-chapter="c10"] .c10-card--print .c10-row-v small{color:#444}
[data-chapter="c10"] .c10-card--print .c10-card-help,[data-chapter="c10"] .c10-card--print .c10-card-help strong{color:#000;font-size:10pt}
[data-chapter="c10"] .c10-card--print .c10-card-foot{color:#555}
}
/* ---- styles/labs/bet-log.css ---- */
/* Bet Log + Wrapped lab. Scoped to the lab. */
[data-lab="bet-log"] .bl{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,400px);gap:56px;align-items:start;max-width:1240px}
[data-lab="bet-log"] .bl-h{font:500 11.5px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="bet-log"] .bl-form{display:grid;gap:18px;padding-bottom:30px;border-bottom:1px solid var(--hair)}
[data-lab="bet-log"] .bl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px}
[data-lab="bet-log"] .bl-f{display:grid;gap:8px;min-width:0}
[data-lab="bet-log"] .bl-f[hidden]{display:none}
[data-lab="bet-log"] .bl-f > span{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="bet-log"] .bl-f > span i{font-style:normal;letter-spacing:.06em;text-transform:none;color:var(--bone-3);opacity:.8;margin-left:4px}
[data-lab="bet-log"] .bl-f input,[data-lab="bet-log"] .bl-f select{appearance:none;-webkit-appearance:none;width:100%;min-width:0;height:40px;padding:0 2px;background:transparent;border:0;border-bottom:1px solid var(--hair);border-radius:0;color:var(--bone);font:400 17.5px/1 var(--mono);font-variant-numeric:tabular-nums;color-scheme:dark;transition:border-color .2s}
[data-lab="bet-log"] .bl-f select{cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,var(--bone-3) 50%),linear-gradient(135deg,var(--bone-3) 50%,transparent 50%);background-position:calc(100% - 12px) 18px,calc(100% - 7px) 18px;background-size:5px 5px;background-repeat:no-repeat;padding-right:22px}
[data-lab="bet-log"] .bl-f select option{background:var(--ink-2);color:var(--bone)}
[data-lab="bet-log"] .bl-f input::placeholder{color:var(--bone-3);opacity:.7}
[data-lab="bet-log"] .bl-f input:focus,[data-lab="bet-log"] .bl-f select:focus{outline:none;border-bottom-color:var(--bone-2)}
[data-lab="bet-log"] .bl-note{max-width:none}
[data-lab="bet-log"] .bl-result .ae-seg{--seg-l:84px}
[data-lab="bet-log"] .bl-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px 22px}
[data-lab="bet-log"] .bl-submit{appearance:none;background:var(--bone);color:var(--ink);border:0;border-radius:0;height:40px;padding:0 20px;cursor:pointer;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;transition:opacity .2s}
[data-lab="bet-log"] .bl-submit:hover{opacity:.86}
[data-lab="bet-log"] .bl-submit:focus-visible{outline:1px solid var(--bone);outline-offset:3px}
[data-lab="bet-log"] .bl-err{flex:1 1 220px;font:400 15px/1.4 var(--sans);color:var(--red)}
[data-lab="bet-log"] .bl-err:empty{display:none}
[data-lab="bet-log"] .bl-listhead{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:30px}
[data-lab="bet-log"] .bl-count{color:var(--bone-3)}
[data-lab="bet-log"] .bl-listacts{display:flex;gap:18px}
[data-lab="bet-log"] .bl-listacts [hidden]{display:none}
[data-lab="bet-log"] .ae-quiet.is-armed{color:var(--red);border-color:var(--red)}
[data-lab="bet-log"] .bl-list{list-style:none;margin-top:14px;border-top:1px solid var(--hair)}
[data-lab="bet-log"] .bl-row{display:grid;grid-template-columns:96px minmax(0,1fr) 128px 64px 92px auto;align-items:center;gap:6px 16px;padding:13px 0;border-bottom:1px solid var(--hair);font:400 15.5px/1.35 var(--sans);color:var(--bone-2)}
[data-lab="bet-log"] .bl-date,[data-lab="bet-log"] .bl-stake,[data-lab="bet-log"] .bl-net{font:400 15.5px/1.3 var(--mono);font-variant-numeric:tabular-nums}
[data-lab="bet-log"] .bl-date{color:var(--bone-3)}
[data-lab="bet-log"] .bl-what{display:grid;min-width:0}
[data-lab="bet-log"] .bl-type{color:var(--bone)}
[data-lab="bet-log"] .bl-note-t{font-size:14px;color:var(--bone-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-lab="bet-log"] .bl-stake{color:var(--bone)}
[data-lab="bet-log"] .bl-stake i{font-style:normal;color:var(--bone-3)}
[data-lab="bet-log"] .bl-res{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="bet-log"] .is-win .bl-res{color:var(--green)}
[data-lab="bet-log"] .is-loss .bl-res{color:var(--red)}
[data-lab="bet-log"] .bl-net{text-align:right;color:var(--bone-3)}
[data-lab="bet-log"] .bl-net.g{color:var(--green)}
[data-lab="bet-log"] .bl-net.r{color:var(--red)}
[data-lab="bet-log"] .bl-rowacts{display:flex;gap:14px;justify-content:flex-end}
[data-lab="bet-log"] .bl-empty{margin-top:18px;max-width:52ch;font:400 16px/1.5 var(--sans);color:var(--bone-3)}
[data-lab="bet-log"] .bl-empty[hidden]{display:none}
[data-lab="bet-log"] .bl-side{position:sticky;top:0;display:grid;gap:16px}
[data-lab="bet-log"] .bl-hero{font:300 52px/1 var(--mono);font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--bone)}
[data-lab="bet-log"] .bl-hero.g{color:var(--green)}
[data-lab="bet-log"] .bl-hero.r{color:var(--red)}
[data-lab="bet-log"] .bl-cap{margin-top:10px;font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="bet-log"] .bl-line{margin-top:12px;font:400 15.5px/1.5 var(--sans);color:var(--bone-2)}
[data-lab="bet-log"] .bl-card{display:block;width:100%;height:auto;aspect-ratio:1080 / 1350}
[data-lab="bet-log"] .bl-fine{font:400 14px/1.45 var(--sans);color:var(--bone-3)}
@media (max-width: 1080px){
[data-lab="bet-log"] .bl{grid-template-columns:1fr;gap:40px}
[data-lab="bet-log"] .bl-side{position:static;max-width:440px}
}
@media (max-width: 819px){
[data-lab="bet-log"] .bl-grid{grid-template-columns:1fr 1fr;gap:16px 16px}
[data-lab="bet-log"] .bl-result .ae-seg{--seg-l:72px}
[data-lab="bet-log"] .bl-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
[data-lab="bet-log"] .bl-date{grid-column:1}
[data-lab="bet-log"] .bl-res{grid-column:2;grid-row:1;text-align:right}
[data-lab="bet-log"] .bl-what{grid-column:1 / -1}
[data-lab="bet-log"] .bl-stake{grid-column:1}
[data-lab="bet-log"] .bl-net{grid-column:2}
[data-lab="bet-log"] .bl-rowacts{grid-column:1 / -1;justify-content:flex-start}
[data-lab="bet-log"] .bl-hero{font-size:42px}
}
/* ---- styles/labs/cover-charge.css ---- */
/* Cover Charge lab. Scoped to [data-lab="cover-charge"]. */
[data-lab="cover-charge"] .cc-wrap{max-width:1040px}
[data-lab="cover-charge"] .cc-controls{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding-bottom:22px;border-bottom:1px solid var(--hair)}
[data-lab="cover-charge"] .cc-controls .ae-slider{width:340px}
[data-lab="cover-charge"] .cc-head{margin-top:30px}
[data-lab="cover-charge"] .cc-hero{font:600 clamp(26px,2.6vw,36px)/1.08 var(--display);letter-spacing:-.038em;max-width:24ch}
[data-lab="cover-charge"] .cc-n{font-family:var(--mono);font-weight:300;font-size:.9em}
[data-lab="cover-charge"] .cc-sub{margin-top:10px;font:400 16.5px/1.45 var(--sans);color:var(--bone-2)}
[data-lab="cover-charge"] .cc-sub .g,[data-lab="cover-charge"] .cc-sub .r{font-family:var(--mono)}
[data-lab="cover-charge"] .cc-chart{position:relative;margin-top:26px}
[data-lab="cover-charge"] .cc-svg{display:block;width:100%;height:auto;overflow:visible}
[data-lab="cover-charge"] .cc-base{stroke:var(--hair);stroke-width:1}
[data-lab="cover-charge"] .cc-bar{fill:var(--bone-3)}
[data-lab="cover-charge"] .cc-bar.is-bet{fill:rgba(236,229,213,.30)}
[data-lab="cover-charge"] .cc-bar.is-bet.is-over{fill:var(--bone)}
[data-lab="cover-charge"] .cc-bar.is-lost{fill:rgba(240,74,58,.45)}
[data-lab="cover-charge"] .cc-bar.is-lost.is-over{fill:var(--red)}
[data-lab="cover-charge"] .cc-bar.is-hot{stroke:var(--bone);stroke-width:1}
[data-lab="cover-charge"] .cc-hit{fill:transparent;cursor:default;outline:none}
[data-lab="cover-charge"] .cc-hit:focus-visible{stroke:var(--bone-3);stroke-width:1}
[data-lab="cover-charge"] .cc-line{stroke:var(--bone);stroke-width:1;stroke-dasharray:4 4}
[data-lab="cover-charge"] .cc-line-l,[data-lab="cover-charge"] .cc-tick{font:500 11.5px/1 var(--mono);letter-spacing:.1em;text-transform:uppercase;fill:var(--bone-3)}
[data-lab="cover-charge"] .cc-line-l{fill:var(--bone);paint-order:stroke;stroke:var(--ink);stroke-width:5px;stroke-linejoin:round}
[data-lab="cover-charge"] .cc-tip{position:absolute;top:-6px;transform:translate(-50%,-100%);padding:8px 10px;background:var(--ink-2);border:1px solid var(--hair);font:400 13px/1.4 var(--mono);color:var(--bone);white-space:nowrap;pointer-events:none}
[data-lab="cover-charge"] .cc-note{margin-top:14px;font:400 14px/1.5 var(--sans);color:var(--bone-3);max-width:80ch}
[data-lab="cover-charge"] .cc-rows{margin-top:30px;border-top:1px solid var(--hair);font:400 14.5px/1.4 var(--mono)}
[data-lab="cover-charge"] .cc-row{display:grid;grid-template-columns:1.1fr .6fr 1fr 1fr 1.2fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--hair);color:var(--bone-2)}
[data-lab="cover-charge"] .cc-row--h{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);padding:12px 0}
[data-lab="cover-charge"] .cc-over{color:var(--bone)}
[data-lab="cover-charge"] .cc-under{color:var(--bone-3)}
@media (max-width: 819px){
[data-lab="cover-charge"] .cc-controls{gap:14px}
[data-lab="cover-charge"] .cc-controls .ae-slider{width:100%}
[data-lab="cover-charge"] .cc-hero{font-size:28px}
[data-lab="cover-charge"] .cc-row{grid-template-columns:1fr .5fr 1fr 1fr;font-size:13px}
[data-lab="cover-charge"] .cc-row > :nth-child(5){grid-column:1 / -1;font-size:12px}
[data-lab="cover-charge"] .cc-row--h > :nth-child(5){display:none}
[data-lab="cover-charge"] .cc-tip{white-space:normal;width:220px}
}
/* readout on its own line so the track keeps its width ("$1,083 / mo · what you bet now" is long) */
[data-lab="cover-charge"] .cc-slot[data-slot="cover"] .ae-slider{grid-template-columns:1fr}
/* ---- styles/labs/data-room.css ---- */
/* Kentucky Data Room lab. Scoped to [data-lab="data-room"]. */
[data-lab="data-room"] .dr-wrap{max-width:980px}
[data-lab="data-room"] .dr-lede{font:500 clamp(21px,2vw,28px)/1.2 var(--display);letter-spacing:-.028em;max-width:28ch}
[data-lab="data-room"] .dr-key{margin-top:16px;font:400 15px/1.6 var(--sans);color:var(--bone-3);max-width:76ch}
[data-lab="data-room"] .dr-key .dr-st{margin-right:4px}
[data-lab="data-room"] .dr-count{margin-top:12px;font:400 13px/1.4 var(--mono);color:var(--bone-3)}
[data-lab="data-room"] .dr-toc{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:22px;padding-bottom:22px;border-bottom:1px solid var(--hair)}
[data-lab="data-room"] .dr-toc a{font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);text-decoration:none;border-bottom:1px solid var(--hair);padding-bottom:5px}
[data-lab="data-room"] .dr-toc a:hover,[data-lab="data-room"] .dr-toc a:focus-visible{color:var(--bone);border-color:var(--bone-3);outline:none}
[data-lab="data-room"] .dr-group{padding-top:44px;scroll-margin-top:10px}
[data-lab="data-room"] .dr-h{font:600 clamp(24px,2.2vw,30px)/1.05 var(--display);letter-spacing:-.035em}
[data-lab="data-room"] .dr-note{margin-top:18px;padding:14px 0 14px 16px;border-left:1px solid var(--bone-3);font:400 15.5px/1.55 var(--sans);color:var(--bone-2);max-width:72ch}
[data-lab="data-room"] .dr-note-k{display:block;margin-bottom:6px;font:500 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone)}
[data-lab="data-room"] .dr-charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:28px 40px;margin-top:22px}
[data-lab="data-room"] .dr-charts:empty{display:none}
[data-lab="data-room"] .dr-fig{margin:0;padding-top:14px;border-top:1px solid var(--hair)}
[data-lab="data-room"] .dr-fig figcaption{display:grid;gap:4px}
[data-lab="data-room"] .dr-fig-t{font:500 18.5px/1.25 var(--display);letter-spacing:-.015em;color:var(--bone)}
[data-lab="data-room"] .dr-fig-s{font:400 14px/1.45 var(--sans);color:var(--bone-3)}
[data-lab="data-room"] .dr-fig-ctl:not(:empty){margin-top:6px}
[data-lab="data-room"] .dr-plot{position:relative;margin-top:14px}
[data-lab="data-room"] .dr-plot svg{display:block;width:100%;height:auto;overflow:visible}
[data-lab="data-room"] .dr-fig-src{margin-top:8px;font:400 12.5px/1.4 var(--sans);color:var(--bone-3)}
[data-lab="data-room"] .dr-mark{fill:rgba(236,229,213,.42);outline:none}
[data-lab="data-room"] .dr-mark.is-red{fill:var(--red)}
[data-lab="data-room"] .dr-mark.is-hot,[data-lab="data-room"] .dr-mark:focus-visible{fill:var(--bone)}
[data-lab="data-room"] .dr-mark.is-red.is-hot,[data-lab="data-room"] .dr-mark.is-red:focus-visible{fill:#ff7466}
[data-lab="data-room"] .dr-axis{stroke:var(--hair);stroke-width:1}
[data-lab="data-room"] .dr-grid{stroke:rgba(236,229,213,.07);stroke-width:1}
[data-lab="data-room"] .dr-stem{stroke:rgba(240,74,58,.45);stroke-width:2}
[data-lab="data-room"] .dr-stem.is-cap{stroke:rgba(236,229,213,.3)}
[data-lab="data-room"] .dr-dot{fill:var(--red);stroke:var(--ink);stroke-width:2;outline:none}
[data-lab="data-room"] .dr-dot.is-cap{fill:var(--ink);stroke:var(--bone);stroke-width:1.5}
[data-lab="data-room"] .dr-dot.is-hot,[data-lab="data-room"] .dr-dot:focus-visible{r:7}
[data-lab="data-room"] .dr-lab{font:400 14px/1 var(--mono);fill:var(--bone)}
[data-lab="data-room"] .dr-lab.is-red{fill:var(--red)}
[data-lab="data-room"] .dr-cap,[data-lab="data-room"] .dr-tick{font:400 12.5px/1 var(--sans);fill:var(--bone-3)}
[data-lab="data-room"] .dr-tick{font:500 11px/1 var(--mono);letter-spacing:.08em;text-transform:uppercase}
[data-lab="data-room"] .dr-tip{position:absolute;top:-4px;transform:translate(-50%,-100%);padding:7px 10px;background:var(--ink-2);border:1px solid var(--hair);font:400 13px/1.4 var(--mono);color:var(--bone);white-space:nowrap;pointer-events:none;z-index:2}
[data-lab="data-room"] .dr-rows{list-style:none;margin-top:22px;border-top:1px solid var(--hair)}
[data-lab="data-room"] .dr-row{display:block;padding:14px 0;border-bottom:1px solid var(--hair)}
[data-lab="data-room"] .dr-more{margin-top:14px}
[data-lab="data-room"] .dr-more summary{cursor:pointer;min-height:32px;display:flex;align-items:center;font:500 12px/1.2 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="data-room"] .dr-more summary:hover,[data-lab="data-room"] .dr-more summary:focus-visible{color:var(--bone);outline:none}
[data-lab="data-room"] .dr-more .dr-rows{margin-top:8px}
[data-lab="data-room"] .dr-main{display:grid;gap:5px;min-width:0}
[data-lab="data-room"] .dr-fact{font:500 16px/1.4 var(--sans);color:var(--bone)}
[data-lab="data-room"] .dr-val{font:400 14.5px/1.5 var(--mono);color:var(--bone-2);overflow-wrap:anywhere}
[data-lab="data-room"] .dr-meta{font:400 14px/1.45 var(--sans);color:var(--bone-3)}
[data-lab="data-room"] .dr-meta a{color:var(--bone-2);text-decoration:underline;text-decoration-color:var(--hair);text-underline-offset:3px;overflow-wrap:anywhere}
[data-lab="data-room"] .dr-meta a:hover{color:var(--bone)}
[data-lab="data-room"] .dr-status{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
[data-lab="data-room"] .dr-st{font:500 12px/1.4 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--bone-3);white-space:nowrap}
[data-lab="data-room"] .dr-st.is-ok{color:var(--bone)}
[data-lab="data-room"] .dr-st.is-mixed{color:var(--bone-2)}
[data-lab="data-room"] .dr-st.is-warn{color:var(--bone-2);border-bottom:1px dashed var(--bone-3)}
[data-lab="data-room"] .dr-why{font:400 13px/1.45 var(--sans);color:var(--bone-3)}
[data-lab="data-room"] .dr-use{font:400 12.5px/1.4 var(--mono);color:var(--bone-3)}
@media (max-width: 819px){
[data-lab="data-room"] .dr-group{padding-top:34px}
[data-lab="data-room"] .dr-tip{white-space:normal;width:200px}
}
/* ---- styles/labs/parlay-xray.css ---- */
/* Lab: Parlay X-ray. */
[data-lab="parlay-xray"] .xr-wrap{display:grid;grid-template-columns:minmax(300px,420px) 1fr;gap:28px 48px;align-items:start;max-width:1280px}
[data-lab="parlay-xray"] .xr-lede{font:400 17.5px/1.45 var(--sans);color:var(--bone-2);max-width:38ch}
[data-lab="parlay-xray"] .xr-top{margin-top:20px;display:grid;gap:12px}
[data-lab="parlay-xray"] .xr-legs{margin-top:18px;border-top:1px solid var(--hair)}
[data-lab="parlay-xray"] .xr-row{display:grid;grid-template-columns:52px 1fr 1fr;grid-template-rows:auto auto;gap:4px 14px;align-items:end;padding:10px 0;border-bottom:1px solid var(--hair)}
[data-lab="parlay-xray"] .xr-row[hidden]{display:none}
[data-lab="parlay-xray"] .xr-n{font:500 11.5px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3);padding-bottom:8px}
[data-lab="parlay-xray"] .xr-f{display:grid;gap:4px}
[data-lab="parlay-xray"] .xr-f span{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-f input{width:100%;min-width:0;background:none;border:0;border-bottom:1px solid var(--hair);color:var(--bone);font:400 17.5px/1 var(--mono);padding:6px 0;font-variant-numeric:tabular-nums}
[data-lab="parlay-xray"] .xr-f input::placeholder{color:var(--bone-3);opacity:.6}
[data-lab="parlay-xray"] .xr-f input:focus{outline:none;border-color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-f input[aria-invalid="true"]{border-color:var(--red)}
[data-lab="parlay-xray"] .xr-tag{grid-column:2 / -1;font:400 12.5px/1.3 var(--mono);color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-tag.is-assumed{color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-reset{margin-top:16px}
[data-lab="parlay-xray"] .xr-err{margin-top:10px;min-height:1.2em;font:400 14.5px/1.4 var(--sans);color:var(--red)}
[data-lab="parlay-xray"] .xr-hero{display:flex;flex-wrap:wrap;gap:16px 48px}
[data-lab="parlay-xray"] .xr-hero > div{display:grid;gap:6px}
[data-lab="parlay-xray"] .xr-k{display:block;font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-v{font:300 clamp(36px,4.4vw,60px)/1 var(--mono);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
[data-lab="parlay-xray"] .xr-s{font:400 14.5px/1 var(--mono);color:var(--bone-3)}
[data-lab="parlay-xray"] .xr-stage{position:relative;margin-top:18px;height:min(42vh,380px);min-height:240px}
[data-lab="parlay-xray"] .xr-out{margin-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
[data-lab="parlay-xray"] .xr-out > div{padding-left:14px;border-left:1px solid var(--hair)}
[data-lab="parlay-xray"] .xr-out dt{font:500 11px/1.3 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);margin-bottom:5px}
[data-lab="parlay-xray"] .xr-out dd{font:400 16.5px/1.4 var(--mono);color:var(--bone);font-variant-numeric:tabular-nums}
[data-lab="parlay-xray"] .xr-controls{grid-row:1 / span 2}
[data-lab="parlay-xray"] .xr-method{grid-column:2;margin-top:8px;padding-top:16px;border-top:1px solid var(--hair);display:grid;gap:8px;max-width:none}
[data-lab="parlay-xray"] .xr-method p{font:400 15px/1.55 var(--sans);color:var(--bone-2)}
[data-lab="parlay-xray"] .xr-method strong{font-weight:500;color:var(--bone)}
[data-lab="parlay-xray"] .xr-method code{font:400 14px/1.5 var(--mono);color:var(--bone)}
@media (max-width: 819px){
[data-lab="parlay-xray"] .xr-wrap{grid-template-columns:1fr}
[data-lab="parlay-xray"] .xr-right{order:-1}
[data-lab="parlay-xray"] .xr-hero{gap:12px 28px}
[data-lab="parlay-xray"] .xr-v{font-size:34px}
[data-lab="parlay-xray"] .xr-stage{height:220px;min-height:0}
[data-lab="parlay-xray"] .xr-out{grid-template-columns:1fr}
[data-lab="parlay-xray"] .xr-controls{grid-row:auto}
[data-lab="parlay-xray"] .xr-method{grid-column:auto}
}
/* ---- styles/labs/run-the-book.css ---- */
/* Lab: Run the Book. */
[data-lab="run-the-book"] .rb-wrap{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:28px 48px;align-items:start;max-width:1280px}
[data-lab="run-the-book"] .rb-lede{font:400 17.5px/1.45 var(--sans);color:var(--bone-2);max-width:36ch}
[data-lab="run-the-book"] .rb-side{margin-top:24px;padding-top:14px;border-top:1px solid var(--hair);display:grid;gap:10px}
[data-lab="run-the-book"] .rb-h{font:600 21px/1.05 var(--display);letter-spacing:-.03em}
[data-lab="run-the-book"] .rb-line{display:flex;align-items:center;gap:16px}
[data-lab="run-the-book"] .rb-line label{font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);width:84px}
[data-lab="run-the-book"] .rb-line input{width:110px;background:none;border:0;border-bottom:1px solid var(--hair);color:var(--bone);font:400 18.5px/1 var(--mono);padding:6px 0;font-variant-numeric:tabular-nums}
[data-lab="run-the-book"] .rb-line input:focus{outline:none;border-color:var(--bone-3)}
[data-lab="run-the-book"] .rb-line input[aria-invalid="true"]{border-color:var(--red)}
[data-lab="run-the-book"] .rb-presets{margin-top:22px;display:flex;flex-wrap:wrap;gap:12px 18px}
[data-lab="run-the-book"] .rb-err{margin-top:12px;min-height:1.2em;font:400 14.5px/1.4 var(--sans);color:var(--red)}
[data-lab="run-the-book"] .rb-err:empty{margin-top:0}
[data-lab="run-the-book"] .rb-out{margin-top:10px;display:grid;gap:12px}
[data-lab="run-the-book"] .rb-out > div{padding-left:14px;border-left:1px solid var(--hair)}
[data-lab="run-the-book"] .rb-out dt{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3);margin-bottom:5px}
[data-lab="run-the-book"] .rb-out dd{font:400 15.5px/1.45 var(--mono);color:var(--bone);font-variant-numeric:tabular-nums}
[data-lab="run-the-book"] .rb-out strong{font-weight:500}
[data-lab="run-the-book"] .rb-dim{color:var(--bone-3)}
[data-lab="run-the-book"] .rb-note{margin-top:20px;font:400 14px/1.5 var(--sans);color:var(--bone-3);max-width:44ch}
[data-lab="run-the-book"] .rb-stagebox{position:sticky;top:0}
[data-lab="run-the-book"] .rb-stage{position:relative;height:min(70vh,640px);min-height:360px}
[data-lab="run-the-book"] .rb-cap{margin-top:8px;font:400 13px/1.45 var(--mono);color:var(--bone-3);text-align:center}
@media (max-width: 819px){
[data-lab="run-the-book"] .rb-wrap{grid-template-columns:1fr}
[data-lab="run-the-book"] .rb-stagebox{position:sticky;top:-20px;z-index:2;order:-1;background:var(--ink);padding-bottom:8px;border-bottom:1px solid var(--hair)}
[data-lab="run-the-book"] .rb-stage{height:290px;min-height:0}
[data-lab="run-the-book"] .rb-cap{font-size:12px}
[data-lab="run-the-book"] .rb-line label{width:72px}
}
/* ---- styles/labs/tax-check.css ---- */
/* Lab: Tax Check */
[data-lab="tax-check"] .tc-banner{font:400 12px/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--bone-3);padding-bottom:16px;border-bottom:1px solid var(--hair)}
[data-lab="tax-check"] .tc-banner strong{font-weight:500;color:var(--bone)}
[data-lab="tax-check"] .tc-wrap{display:grid;grid-template-columns:minmax(280px,360px) 1fr;gap:48px;margin-top:28px;align-items:start}
[data-lab="tax-check"] .tc-k{font:500 11px/1.3 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="tax-check"] .tc-k em{font-style:normal;color:var(--bone-2)}
[data-lab="tax-check"] .tc-field{display:grid;gap:8px;margin-bottom:22px}
[data-lab="tax-check"] .tc-in{display:flex;align-items:baseline;gap:6px;border-bottom:1px solid var(--hair);padding-bottom:6px}
[data-lab="tax-check"] .tc-in:focus-within{border-color:var(--bone-3)}
[data-lab="tax-check"] .tc-in span{font:300 26px/1 var(--mono);color:var(--bone-3)}
[data-lab="tax-check"] .tc-in input{flex:1;min-width:0;background:none;border:0;outline:none;color:var(--bone);font:300 30px/1.1 var(--mono);font-variant-numeric:tabular-nums;-moz-appearance:textfield}
[data-lab="tax-check"] .tc-in input::-webkit-outer-spin-button,[data-lab="tax-check"] .tc-in input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
[data-lab="tax-check"] .tc-from{font:400 13px/1.5 var(--mono);color:var(--bone-3);margin:-8px 0 18px}
[data-lab="tax-check"] .tc-toggles{display:grid;gap:4px}
[data-lab="tax-check"] .tc-toggles .ae-quiet{justify-self:start;margin-top:14px}
[data-lab="tax-check"] .tc-toggles [hidden]{display:none}
[data-lab="tax-check"] .tc-out{display:grid;gap:0}
[data-lab="tax-check"] .tc-hero{display:flex;flex-direction:column;gap:8px;padding-bottom:20px;border-bottom:1px solid var(--hair)}
[data-lab="tax-check"] .tc-v{font:300 clamp(48px,5.4vw,76px)/1 var(--mono);letter-spacing:-.02em;color:var(--bone);font-variant-numeric:tabular-nums}
[data-lab="tax-check"] .tc-s{font:400 13px/1.4 var(--sans);color:var(--bone-3)}
[data-lab="tax-check"] .tc-row{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:14px 0;border-bottom:1px solid var(--hair)}
[data-lab="tax-check"] .tc-v2{font:300 22px/1 var(--mono);color:var(--bone);font-variant-numeric:tabular-nums;text-align:right}
[data-lab="tax-check"] .r{color:var(--red)}
[data-lab="tax-check"] .g{color:var(--green)}
[data-lab="tax-check"] .tc-note{min-height:1.5em;margin-top:14px;font:400 15.5px/1.5 var(--sans);color:var(--bone-2)}
[data-lab="tax-check"] .tc-assume{margin-top:34px}
[data-lab="tax-check"] .tc-assume ol{margin:14px 0 0;padding:0;list-style:none;display:grid;gap:12px;counter-reset:tc}
[data-lab="tax-check"] .tc-assume li{counter-increment:tc;position:relative;padding-left:30px;font:400 15.5px/1.5 var(--sans);color:var(--bone-2)}
[data-lab="tax-check"] .tc-assume li::before{content:counter(tc, decimal-leading-zero);position:absolute;left:0;top:2px;font:400 13px/1.4 var(--mono);color:var(--bone-3)}
[data-lab="tax-check"] .tc-assume li span{display:block;margin-top:2px;font:500 11px/1.4 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3)}
@media (max-width: 819px){
[data-lab="tax-check"] .tc-wrap{grid-template-columns:1fr;gap:28px;margin-top:20px}
[data-lab="tax-check"] .ae-seg{--seg-l:84px}
[data-lab="tax-check"] .tc-v2{font-size:21px}
}
[data-lab="tax-check"] .tc-q{margin-top:14px;font:400 14.5px/1.45 var(--sans);color:var(--bone-2);max-width:34ch}
/* ---- styles/labs/thousand-seasons.css ---- */
/* Lab: A Thousand Seasons */
[data-lab="thousand-seasons"] .ts-wrap{display:grid;grid-template-columns:minmax(260px,320px) 1fr;gap:40px;align-items:start}
[data-lab="thousand-seasons"] .ts-controls{display:grid;gap:18px}
[data-lab="thousand-seasons"] .ts-controls .ae-slider{max-width:none}
[data-lab="thousand-seasons"] .ts-note{margin-top:22px;font:400 13px/1.5 var(--mono);color:var(--bone-3)}
[data-lab="thousand-seasons"] .ts-run{display:flex;flex-wrap:wrap;gap:16px 22px;margin-top:24px}
[data-lab="thousand-seasons"] .ts-run button:disabled{opacity:.35;cursor:default}
[data-lab="thousand-seasons"] .ts-read{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:20px;align-items:start;padding-bottom:18px;border-bottom:1px solid var(--hair)}
[data-lab="thousand-seasons"] .ts-read > div{display:flex;flex-direction:column;gap:6px;min-width:0}
[data-lab="thousand-seasons"] .ts-k{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="thousand-seasons"] .ts-v{font:300 clamp(40px,4.4vw,60px)/1 var(--mono);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
[data-lab="thousand-seasons"] .ts-v2{font:300 clamp(24px,2.4vw,34px)/1 var(--mono);color:var(--bone);font-variant-numeric:tabular-nums}
[data-lab="thousand-seasons"] .ts-s{font:400 13px/1.4 var(--sans);color:var(--bone-3)}
[data-lab="thousand-seasons"] .r{color:var(--red)}
[data-lab="thousand-seasons"] .g{color:var(--green)}
[data-lab="thousand-seasons"] .ts-stage{position:relative;height:min(62vh,560px);min-height:360px;margin-top:8px}
@media (max-width: 819px){
[data-lab="thousand-seasons"] .ts-wrap{grid-template-columns:1fr;gap:22px}
[data-lab="thousand-seasons"] .ts-read{grid-template-columns:1fr 1fr;gap:16px}
[data-lab="thousand-seasons"] .ts-hero{grid-column:1 / -1}
[data-lab="thousand-seasons"] .ts-stage{height:56vh;min-height:340px}
[data-lab="thousand-seasons"] .ts-run{margin-top:16px}
}
/* ---- styles/labs/track-takeout.css ---- */
/* Track Takeout lab. Scoped to the lab. */
[data-lab="track-takeout"] .tt-wrap{display:grid;grid-template-columns:minmax(260px,360px) 1fr;gap:40px 56px;max-width:1120px;margin:0}
[data-lab="track-takeout"] .tt-controls{display:grid;gap:22px;align-content:start}
[data-lab="track-takeout"] .tt-note{font:400 15px/1.5 var(--sans);color:var(--bone-2);max-width:46ch;margin:0}
[data-lab="track-takeout"] .tt-controls .tt-note{margin-top:-12px;color:var(--bone-3)}
[data-lab="track-takeout"] .ae-seg-btn{font-size:15.5px}
[data-lab="track-takeout"] .tt-out{display:grid;gap:18px;align-content:start;min-width:0}
[data-lab="track-takeout"] .tt-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
[data-lab="track-takeout"] .tt-hero > div{display:flex;flex-direction:column;gap:8px}
[data-lab="track-takeout"] .tt-fair{text-align:right;align-items:flex-end}
[data-lab="track-takeout"] .tt-big{font:300 clamp(44px,5vw,64px)/1 var(--mono);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
[data-lab="track-takeout"] .tt-mid{font:300 clamp(26px,2.6vw,36px)/1 var(--mono);color:var(--bone-2);font-variant-numeric:tabular-nums}
[data-lab="track-takeout"] .tt-big.g{color:var(--green)}
[data-lab="track-takeout"] .tt-cap{font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="track-takeout"] .tt-stage{position:relative;height:clamp(220px,34vh,320px);border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
[data-lab="track-takeout"] .tt-rows{display:grid;margin:0}
[data-lab="track-takeout"] .tt-rows > div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--hair)}
[data-lab="track-takeout"] .tt-rows > div[hidden]{display:none}
[data-lab="track-takeout"] .tt-rows dt{font:400 15.5px/1.3 var(--sans);color:var(--bone-2)}
[data-lab="track-takeout"] .tt-rows dd{margin:0;font:400 15.5px/1.3 var(--mono);color:var(--bone);font-variant-numeric:tabular-nums}
[data-lab="track-takeout"] .tt-rows .g dd{color:var(--green)}
[data-lab="track-takeout"] .tt-rows .r dd{color:var(--red)}
[data-lab="track-takeout"] .tt-rows .tt-total{border-bottom:0}
[data-lab="track-takeout"] .tt-rows .tt-total dt{color:var(--bone)}
[data-lab="track-takeout"] .ae-assume{margin-top:0}
@media (max-width: 819px){
[data-lab="track-takeout"] .tt-wrap{grid-template-columns:1fr;gap:24px}
[data-lab="track-takeout"] .tt-stage{height:200px}
}
/* ---- styles/labs/trade-or-bet.css ---- */
/* Trade or Bet lab. Scoped to the lab. */
[data-lab="trade-or-bet"] .tob{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);grid-template-areas:"controls viz" "main viz" "notes notes";gap:28px 56px;max-width:1180px}
[data-lab="trade-or-bet"] .tob-controls{grid-area:controls;display:grid;gap:18px}
[data-lab="trade-or-bet"] .tob-main{grid-area:main}
[data-lab="trade-or-bet"] .tob-viz{grid-area:viz;min-width:0}
[data-lab="trade-or-bet"] .tob-notes{grid-area:notes;max-width:760px;margin-top:8px}
[data-lab="trade-or-bet"] .tob-k{display:block;font:500 11.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--bone-3)}
[data-lab="trade-or-bet"] .tob-presets{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:baseline}
[data-lab="trade-or-bet"] .tob-presets .tob-k{flex:0 0 100%;margin-bottom:2px}
[data-lab="trade-or-bet"] .tob-hero{padding-bottom:18px;border-bottom:1px solid var(--hair)}
[data-lab="trade-or-bet"] .tob-big{display:block;margin-top:10px;font:300 64px/1 var(--mono);letter-spacing:-.03em;color:var(--bone)}
[data-lab="trade-or-bet"] .tob-sub{display:block;margin-top:8px;font:400 14.5px/1.4 var(--sans);color:var(--bone-3)}
[data-lab="trade-or-bet"] .tob-list > div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:10px 0;border-bottom:1px solid var(--hair)}
[data-lab="trade-or-bet"] .tob-list dt{font:400 15.5px/1.3 var(--sans);color:var(--bone-2)}
[data-lab="trade-or-bet"] .tob-list dt i{font:500 11px/1 var(--mono);font-style:normal;letter-spacing:.12em;text-transform:uppercase;color:var(--bone-3);margin-left:6px}
[data-lab="trade-or-bet"] .tob-list dd{font:400 16.5px/1.3 var(--mono);color:var(--bone);text-align:right;white-space:nowrap}
[data-lab="trade-or-bet"] .tob-list dd.r{color:var(--red)} [data-lab="trade-or-bet"] .tob-list dd.g{color:var(--green)}
[data-lab="trade-or-bet"] .tob-total dt{color:var(--bone)}
[data-lab="trade-or-bet"] .tob-ev dt{color:var(--bone)}
[data-lab="trade-or-bet"] .tob-stage{position:relative;height:min(52vh,440px);min-height:260px}
[data-lab="trade-or-bet"] .tob-cap{margin-top:10px;font:400 14.5px/1.45 var(--sans);color:var(--bone-3);max-width:52ch}
@media (max-width: 819px){
[data-lab="trade-or-bet"] .tob{grid-template-columns:minmax(0,1fr);grid-template-areas:"controls" "viz" "main" "notes";gap:22px}
[data-lab="trade-or-bet"] .tob-stage{height:230px;min-height:0}
[data-lab="trade-or-bet"] .tob-big{font-size:48px}
[data-lab="trade-or-bet"] .tob-list dt{font-size:15px}
[data-lab="trade-or-bet"] .tob-list dd{font-size:15.5px}
}
</style>
</head>
<body>
<a class="ae-skip" href="#ae-main">Skip to the content</a>
<header class="ae-header">
<a class="ae-wordmark" href="#story" data-ae-go="#story" aria-label="About Even, The Story">About <em>Even</em></a>
<nav class="ae-tabs" id="ae-tabs" aria-label="Sections"></nav>
<nav class="ae-ticks" id="ae-ticks" aria-label="Chapters in this section"></nav>
<div class="ae-actions">
<button type="button" class="ae-act" id="ae-save" aria-label="Save">Save</button>
<button type="button" class="ae-act" id="ae-open">Open</button>
</div>
</header>
<main id="ae-main" tabindex="-1">
<section class="ae-scrolly">
<div class="ae-stage" id="ae-stage"></div>
<div class="ae-story" id="ae-story"></div>
</section>
<section class="ae-page" data-page="how" aria-labelledby="ae-page-how-title" hidden></section>
<section class="ae-page" data-page="labs" aria-labelledby="ae-page-labs-title" hidden></section>
<noscript><p class="ae-noscript">About Even needs JavaScript turned on. Everything runs in this file; nothing is sent anywhere.</p></noscript>
</main>
<footer class="ae-footer">
<div class="ae-foot-grid">
<p class="ae-disclaimer ae-foot-disclaimer">Educational use only. Not betting, tax or investment advice.</p>
<p class="ae-foot-for">Made for young adult Kentuckians who bet or are around betting. It runs entirely in this file: nothing you enter leaves your device, and your save file stays wherever you put it.</p>
<p class="ae-foot-links"><button type="button" class="ae-link" data-ae-sources>Sources</button><a class="ae-link" href="#labs" data-ae-go="#labs">Labs</a><a class="ae-link" href="#plan" data-ae-go="#plan">Make your plan</a></p>
<p class="ae-credits" id="ae-credits"></p>
</div>
</footer>
<div id="ae-toast" class="ae-toast" role="status" aria-live="polite"></div>
<script>
/* ---- core/namespace.js ---- */
;(function (AE) {
"use strict";
// namespace.js: creates window.AE and the small shared helpers every other file uses.
// Loaded first. The build wraps every file as (function (AE) { "use strict"; ... })(window.AE),
// so inside any src file `AE` is already the global namespace.
AE.version = "1.0.0";
AE.reduced = typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
// ---- palette (canvas uses the RGB triples; CSS uses the tokens in base.css) ----
AE.colors = {
ink: [10, 12, 15],
bone: [236, 229, 213],
green: [94, 214, 160],
red: [240, 74, 58],
};
// His guess is always neutral bone, never red or green (those mean kept / came back). Guessed dots:
// color AE.guess.color at AE.guess.alpha; the rest dim to AE.guess.rest. In card text: <span class="ae-guess">.
AE.guess = { color: "bone", alpha: 1, rest: 0.3, r: 1.15 };
// Canvas caption color that passes 4.5:1 on ink (bone at 60%). Use for small mono captions.
AE.capColor = "rgba(236,229,213,0.72)";
// AE.rgba("red", .5) -> "rgba(240,74,58,0.5)". Accepts a token name or an [r,g,b] triple.
AE.rgba = (c, a = 1) => {
const t = Array.isArray(c) ? c : AE.colors[c] || AE.colors.bone;
return `rgba(${t[0]},${t[1]},${t[2]},${a})`;
};
// ---- DOM helpers ----
AE.$ = (sel, root = document) => root.querySelector(sel);
AE.$$ = (sel, root = document) => Array.from(root.querySelectorAll(sel));
AE.esc = (s) => String(s == null ? "" : s).replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));
// AE.h('<div class="x">hi</div>') -> the element (first element of the HTML string)
AE.h = (html) => {
const t = document.createElement("template");
t.innerHTML = String(html).trim();
return t.content.firstElementChild;
};
// ---- number formatting (tabular figures come from CSS; minus is U+2212) ----
const MINUS = "−";
const group = (n) => Math.abs(n).toLocaleString("en-US");
AE.fmt = {
// The one money rule (default): whole dollars at $100 and up ($591, $1,234); cents below $100
// ($49.64, $1.75), except a whole-dollar amount stays whole ($20, not $20.00).
// opts.cents: true forces cents (only for a worked example that must show them, e.g. $132.83);
// opts.cents: false forces whole dollars. opts.sign -> +$12 / −$12 (real minus, U+2212).
money(v, opts = {}) {
let cents = opts.cents;
if (cents == null) {
const c = Math.round(Math.abs(v) * 100) / 100;
cents = c < 100 && Math.round(c * 100) % 100 !== 0;
}
cents = !!cents;
const r = cents ? Math.round(v * 100) / 100 : Math.round(v);
const body = cents
? Math.abs(r).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
: group(r);
const neg = r < 0;
const sign = neg ? MINUS : opts.sign && r > 0 ? "+" : "";
return sign + "$" + body;
},
// 0.1698 -> "16.98%" (digits default 2)
pct(v, digits = 2) {
const s = (Math.abs(v) * 100).toFixed(digits) + "%";
return v < 0 ? MINUS + s : s;
},
int(v) {
const r = Math.round(v);
return (r < 0 ? MINUS : "") + group(r);
},
// 330.1e6 -> "$330.1M", 3e9 -> "$3.0B"
compact(v, digits = 1) {
const a = Math.abs(v), sign = v < 0 ? MINUS : "";
if (a >= 1e9) return sign + "$" + (a / 1e9).toFixed(digits) + "B";
if (a >= 1e6) return sign + "$" + (a / 1e6).toFixed(digits) + "M";
if (a >= 1e3) return sign + "$" + (a / 1e3).toFixed(digits) + "K";
return sign + "$" + a.toFixed(0);
},
minus: MINUS,
};
// ---- registries (filled by AE.chapter / AE.lab / AE.source / AE.credit) ----
AE._chapters = [];
AE._labs = [];
AE._sources = new Map();
AE._credits = [];
AE._started = false;
// The 11 story slots. Ticks in the header always show 11; a slot with no registered chapter
// renders as a disabled tick. A registered chapter's own title wins over these.
AE.SLOTS = [
{ order: 0, id: "c0", title: "Cold open" },
{ order: 1, id: "c1", title: "Kentucky's scoreboard" },
{ order: 2, id: "c2", title: "It's just $20" },
{ order: 3, id: "c3", title: "The house doesn’t need a winner" },
{ order: 4, id: "c4", title: "The gimme" },
{ order: 5, id: "c5", title: "It's called trading" },
{ order: 6, id: "c6", title: "Off the top" },
{ order: 7, id: "c7", title: "Luck vs. math" },
{ order: 8, id: "c8", title: "Even isn't even" },
{ order: 9, id: "c9", title: "Your ledger" },
{ order: 10, id: "c10", title: "Your move" },
];
const fail = (what, msg, def) => {
console.error(`[About Even] ${what}: ${msg}`, def);
return false;
};
// Register a chapter. See src/README.md for the full contract.
AE.chapter = (def) => {
if (!def || typeof def !== "object") return fail("AE.chapter", "needs an object", def);
if (!/^[a-z][a-z0-9-]{0,31}$/.test(def.id || "")) return fail("AE.chapter", "id must be like 'c4'", def);
if (!Number.isFinite(def.order)) return fail("AE.chapter", `${def.id}: order must be a number`, def);
if (!Array.isArray(def.steps) || !def.steps.length) return fail("AE.chapter", `${def.id}: steps[] required`, def);
if (AE._chapters.some((c) => c.id === def.id)) return fail("AE.chapter", `${def.id}: registered twice`, def);
if (AE._chapters.some((c) => c.order === def.order)) return fail("AE.chapter", `${def.id}: order ${def.order} already taken`, def);
if (AE._started) return fail("AE.chapter", `${def.id}: registered after start (chapter files must load before boot.js)`, def);
const tab = def.tab == null ? "story" : def.tab;
if (!AE.TABS.some((t) => t.id === tab) || tab === "labs") return fail("AE.chapter", `${def.id}: tab must be 'story', 'plan' or 'how'`, def);
if (tab === "how" && !(def.how && /^[a-z][a-z0-9-]{0,40}$/.test(def.how.slug || ""))) return fail("AE.chapter", `${def.id}: tab 'how' needs how: { slug, label, blurb }`, def);
if (tab === "how" && AE._chapters.some((c) => c.how && c.how.slug === def.how.slug)) return fail("AE.chapter", `${def.id}: how slug '${def.how.slug}' already taken`, def);
if (def.lesson != null && (typeof def.lesson !== "string" || def.lesson.trim().split(/\s+/).length > 12)) console.warn(`[About Even] ${def.id}: lesson should be one line of 12 words or fewer`);
const slot = AE.SLOTS.find((s) => s.order === def.order);
AE._chapters.push({ title: slot ? slot.title : def.id, sources: [], ...def, tab, how: tab === "how" ? { label: def.title, blurb: "", ...def.how } : null });
return true;
};
// The four header tabs. A chapter lives in one of story / plan / how (AE.chapter's `tab`); labs is a page.
AE.TABS = [
{ id: "story", label: "The Story", short: "Story", hash: "#story" },
{ id: "plan", label: "Your Plan", short: "Plan", hash: "#plan" },
{ id: "how", label: "How They Win", short: "How they win", hash: "#how" },
{ id: "labs", label: "Labs", short: "Labs", hash: "#labs" },
];
// The route a chapter renders under: "story", "plan" or "how/<slug>".
AE.routeOf = (def) => (def.tab === "how" ? `how/${def.how.slug}` : def.tab);
// Every chapter's money lesson, story first, then the deep dives, then the plan, each in order.
// [{ chapterId, title, lesson, tab, route }] -> Your Plan's "What you learned".
AE.lessons = () => {
const rank = { story: 0, how: 1, plan: 2 };
return AE._chapters
.filter((c) => typeof c.lesson === "string" && c.lesson.trim())
.slice()
.sort((a, b) => rank[a.tab] - rank[b.tab] || a.order - b.order)
.map((c) => ({ chapterId: c.id, title: c.title, lesson: c.lesson.trim(), tab: c.tab, route: "#" + AE.routeOf(c) }));
};
// Register a lab. Labs may register at any time (the Labs page renders on display).
AE.lab = (def) => {
if (!def || typeof def !== "object") return fail("AE.lab", "needs an object", def);
if (!/^[a-z][a-z0-9-]{0,40}$/.test(def.id || "")) return fail("AE.lab", "id must be kebab-case", def);
if (typeof def.mount !== "function") return fail("AE.lab", `${def.id}: mount(el, ctx) required`, def);
if (AE._labs.some((l) => l.id === def.id)) return fail("AE.lab", `${def.id}: registered twice`, def);
AE._labs.push({ title: def.id, blurb: "", chapter: null, ...def });
if (AE.labs && AE.labs._changed) AE.labs._changed();
return true;
};
// Register a source row (ids match docs/sources.md). First registration of an id wins.
// { id:'MKT-03', label:'KHRGC 2025 Annual Report, p. 27', url:'https://…', note:'what we use it for' }
AE.source = (row) => {
if (!row || !row.id || !row.label) return fail("AE.source", "needs {id, label}", row);
if (!AE._sources.has(row.id)) AE._sources.set(row.id, { url: "", note: "", ...row });
return true;
};
// Register a credit (third-party code or asset). Fonts are pre-registered below.
AE.credit = (c) => {
if (!c || !c.name || !c.license) return fail("AE.credit", "needs {name, license}", c);
AE._credits.push(c);
return true;
};
AE.credit({ name: "Geist", by: "The Geist Project Authors (Vercel)", license: "SIL Open Font License 1.1", url: "https://github.com/vercel/geist-font", kind: "font" });
AE.credit({ name: "Geist Mono", by: "The Geist Project Authors (Vercel)", license: "SIL Open Font License 1.1", url: "https://github.com/vercel/geist-font", kind: "font" });
})(window.AE = window.AE || {});
/* ---- core/math.js ---- */
;(function (AE) {
"use strict";
// math.js: every formula in spec §5, as pure functions on AE.math.
// No DOM here. tests/math.test.mjs loads this file directly in Node (with a stub AE object),
// so keep it free of browser APIs.
//
// Conventions
// - Money in dollars as plain numbers; round only for display (AE.fmt) unless a rule says otherwise
// (pari-mutuel breakage and the prediction-market fee round by rule, so those functions round).
// - Rates as fractions: 0.0455, not 4.55.
// - American odds as numbers: -110, +1228 -> 1228.
const M = {};
// ---------- odds ----------
// Decimal odds (total return per $1 staked, stake included). A < 0: 1 + 100/|A|; A > 0: 1 + A/100.
M.americanToDecimal = (A) => {
if (!Number.isFinite(A) || (A > -100 && A < 100)) throw new RangeError("American odds must be <= -100 or >= +100");
return A < 0 ? 1 + 100 / Math.abs(A) : 1 + A / 100;
};
// Inverse. Decimal >= 2 -> positive American; < 2 -> negative. Not rounded.
M.decimalToAmerican = (d) => {
if (!Number.isFinite(d) || d <= 1) throw new RangeError("Decimal odds must be > 1");
return d >= 2 ? (d - 1) * 100 : -100 / (d - 1);
};
// Implied probability from American odds (= 1 / decimal). -110 -> 0.5238.
M.impliedProb = (A) => 1 / M.americanToDecimal(A);
M.impliedFromDecimal = (d) => 1 / d;
// The -110 line used everywhere in the illustration.
M.D110 = 1 + 100 / 110; // 1.909090…
// Straight bet edge at -110 on a true 50/50: 1 − 1.90909/2 = 4.545%.
M.STRAIGHT_EDGE = 1 - M.D110 / 2;
// ---------- parlays (each leg a true 50/50 priced at -110) ----------
M.parlayBook = (n) => Math.pow(M.D110, n); // book payout per $1 (stake included)
M.parlayFair = (n) => Math.pow(2, n); // fair payout per $1
M.parlayChance = (n) => 1 / Math.pow(2, n); // chance it hits
M.parlayCut = (n) => 1 - Math.pow(M.D110 / 2, n); // house cut: 4.55, 8.88, 13.03, 16.98, 20.75, 24.36, 27.79, 31.08%
M.parlayPayout = (stake, n) => stake * M.parlayBook(n); // $10 × 4 legs -> $132.83
M.parlayFairPayout = (stake, n) => stake * M.parlayFair(n); // $10 × 4 legs -> $160.00
M.parlayExpectedCost = (stake, n) => stake * M.parlayCut(n); // $10 × 4 legs -> $1.70
// American odds the book quotes for n legs, rounded to the nearest whole number (+1228 at 4 legs).
M.parlayAmerican = (n) => Math.round(M.decimalToAmerican(M.parlayBook(n)));
M.parlayFairAmerican = (n) => Math.round(M.decimalToAmerican(M.parlayFair(n)));
// "They pay you like it's 1 in X": X = book payout per $1 (13.28 at 4 legs).
M.parlayPaysLikeOneIn = (n) => M.parlayBook(n);
// Chance of at least one hit in `tries` independent parlays (12 weeks of 4-leg -> 53.9%).
M.atLeastOneHit = (n, tries) => 1 - Math.pow(1 - M.parlayChance(n), tries);
// A general parlay from real American odds per leg: product of decimals.
M.parlayFromOdds = (oddsList) => oddsList.reduce((p, a) => p * M.americanToDecimal(a), 1);
// ---------- habit ----------
// Bet types the habit can hold. 'parlay' means the 4-leg parlay from spec C2.
M.HABIT_LEGS = { straight: 1, parlay: 4 };
M.edgeFor = (type) => {
if (type === "straight") return M.STRAIGHT_EDGE;
if (type === "parlay") return M.parlayCut(4);
throw new RangeError("habit type must be 'straight' or 'parlay'");
};
M.betsPerYear = (habit) => habit.perWeek * 52;
M.yearlyWagered = (habit) => habit.stake * habit.perWeek * 52; // $20 × 3 × 52 = $3,120
// Expected yearly cost = stake × perWeek × 52 × edge. Default habit: $141.82 straight, $529.75 4-leg.
M.expectedYearlyCost = (habit) => M.yearlyWagered(habit) * M.edgeFor(habit.type);
// Profit on a winning bet of the habit's type (stake not included). $20 straight -> $18.18.
M.winProfit = (stake, type) => stake * (M.parlayBook(M.HABIT_LEGS[type]) - 1);
// ---------- Run the Book ----------
// Money on each side, odds per side (American), and the winner ('a' | 'b').
// Returns what the book takes in, pays out (stake + winnings to the winning side) and keeps.
// Balanced $1,100 / $1,100 at -110: takes $2,200, pays $2,100, keeps $100 (4.545% of handle).
M.runTheBook = ({ a, b, oddsA = -110, oddsB = -110, winner }) => {
const handle = a + b;
const payout = winner === "a" ? a * M.americanToDecimal(oddsA) : b * M.americanToDecimal(oddsB);
const kept = handle - payout;
return { handle, payout, kept, hold: handle > 0 ? kept / handle : 0 };
};
// The book's result for both outcomes at once (for "either way the book keeps $100").
M.bookBothWays = (o) => ({ ifA: M.runTheBook({ ...o, winner: "a" }), ifB: M.runTheBook({ ...o, winner: "b" }) });
// ---------- pari-mutuel (810 KAR 6:020; KRS 230.3615) ----------
// Rounding helpers. The epsilon guards float noise (3.125 must floor to 3.12, not 3.11).
M.floorCent = (v) => Math.floor(v * 100 + 1e-7) / 100;
M.ceilCent = (v) => Math.ceil(v * 100 - 1e-7) / 100;
M.roundCent = (v) => Math.round(v * 100) / 100;
// Win pool: net = pool × (1 − takeout); $1 price = floor_cent((net − W)/W) + 1, min $1.10 ($2.20 on $2).
// Minus pool (the net can't pay $1.10): KRS 230.3615(3) sets the minimum at $1.05 ($2.10 on $2). Penny breakage (Kentucky since 2022).
// $10,000 pool, 17.5%, W = $2,000 -> net $8,250 -> $1 price $4.12 -> $2 pays $8.24.
M.MIN_PRICE_PER_DOLLAR = 1.1;
M.MIN_MINUS_POOL = 1.05;
M.pariMutuel = ({ pool, takeout, onWinner, base = 2 }) => {
if (!(onWinner > 0)) throw new RangeError("money on the winner must be > 0");
const net = pool * (1 - takeout);
const raw = (net - onWinner) / onWinner;
const minusPool = M.floorCent(raw) + 1 < M.MIN_PRICE_PER_DOLLAR;
const price1 = minusPool ? Math.max(M.MIN_MINUS_POOL, M.floorCent(raw) + 1) : M.floorCent(raw) + 1;
const fairPrice1 = pool / onWinner; // no takeout, no breakage
return {
net,
takeoutAmount: pool - net,
price1: M.roundCent(price1),
payout: M.roundCent(price1 * base), // per `base` dollars bet
fairPayout: M.roundCent(fairPrice1 * base),
breakagePerDollar: (raw + 1) - price1 > 0 ? (raw + 1) - price1 : 0,
minusPool,
};
};
M.TAKEOUT = { win: 0.175, place: 0.175, show: 0.175, exotic: 0.22 }; // KY caps (KRS 230.3615)
// ---------- prediction markets ----------
// Kalshi-style taker fee on C contracts at price P (dollars, 0–1): ceil_cent(0.07 × C × P × (1 − P)).
// The fee rounds up to the cent on the whole order, so 1 contract at 50¢ is charged 2¢ while
// 100 contracts at 50¢ pay $1.75 = 1.75¢ each. `perContract` reports the unrounded rate (1.75¢ at 50¢).
// Rounding unit is unverified (DNU-20); label the example "illustrative".
M.KALSHI_FEE_RATE = 0.07;
M.predictionFee = (C, P) => {
if (!(P > 0 && P < 1)) throw new RangeError("price must be between 0 and 1");
const raw = M.KALSHI_FEE_RATE * C * P * (1 - P);
return { fee: M.ceilCent(raw), raw, perContract: M.KALSHI_FEE_RATE * P * (1 - P) };
};
// Expected return on a contract bought at a fair price P, after the fee alone, per $ spent.
// At P = 0.50 (fair): −0.0175 / 0.5 = −3.5% per dollar on the unrounded rate (spec's "about −3.4%" floor
// comes from fee ÷ (price + fee) = 0.0175 / 0.5175 = 3.38%). Both exposed; the chapter picks and labels one.
M.feeDrag = (P) => {
const f = M.KALSHI_FEE_RATE * P * (1 - P);
return { perPrice: f / P, perOutlay: f / (P + f) };
};
// ---------- taxes (educational; rules as of November 2026) ----------
// Itemizer: taxable gambling income = W − min(L × r, W), r = 0.90 (2026 law) or 1.00.
// Standard-deduction filer: losses offset nothing, so taxable gambling income = W.
M.KY_RATE = 0.035; // Kentucky flat rate TY2026 (TAX-08); KY treatment of the 90% cap is an inference (TAX-12)
M.FED_STANDARD_DEDUCTION_2026 = 16100; // single (TAX-06)
M.KY_STANDARD_DEDUCTION_2026 = 3360; // (TAX-09)
M.taxableGambling = ({ winnings, losses, itemize, lossRate = 0.9 }) => {
if (!itemize) return winnings;
return winnings - Math.min(losses * lossRate, winnings);
};
M.deductibleLosses = ({ winnings, losses, itemize, lossRate = 0.9 }) => (itemize ? Math.min(losses * lossRate, winnings) : 0);
// Kentucky tax on that same base at 3.5% (inference; label it).
M.kyTaxOn = (base) => base * M.KY_RATE;
// Federal brackets, 2026, single (TAX-07). `upTo` is the top of each bracket's taxable income.
M.FED_BRACKETS_2026 = [
{ rate: 0.1, upTo: 12400 }, { rate: 0.12, upTo: 50400 }, { rate: 0.22, upTo: 105700 },
{ rate: 0.24, upTo: 201775 }, { rate: 0.32, upTo: 256225 }, { rate: 0.35, upTo: 640600 }, { rate: 0.37, upTo: Infinity },
];
// Federal tax on taxable gambling income at one marginal bracket (default 12%). Educational estimate:
// it assumes his other income already uses the $16,100 standard deduction and the whole amount stays
// in that bracket (rough near a bracket edge). Label it "estimate, if your bracket is 12%".
// $5,909.09 at 12% -> $709.09; the default habit's $1,418.18 -> $170.18.
M.federalGamblingTax = (taxable, bracket = 0.12) => Math.max(0, taxable) * bracket;
// A habit's typical year (same counts as simulateSeason mode "typical", any seed): exactly
// round(bets × chance) winning bets. winnings = profit on the winners (counted per bet, TAX-14),
// losses = stakes on the rest. $20 × 3 straight -> 78 wins, $1,418.18 won, $1,560 lost, net −$141.82.
M.typicalYear = (habit) => {
const legs = M.HABIT_LEGS[habit.type];
if (!legs) throw new RangeError("habit type must be 'straight' or 'parlay'");
const bets = M.betsPerYear(habit), wins = Math.round(bets * M.parlayChance(legs));
const winnings = wins * M.winProfit(habit.stake, habit.type), losses = (bets - wins) * habit.stake;
return { bets, wins, winnings, losses, net: winnings - losses };
};
// Everything C8 / C9 / the cards need about tax in one call. Pass { winnings, losses } or { habit }
// (habit -> its typical year). Defaults: standard deduction (itemize false), 90% loss rule, 12% bracket.
// Returns { winnings, losses, net, taxable, deducted, ky, fed, tax (= ky + fed), afterTax (= net − tax) }.
// Default habit: net −$141.82, taxable $1,418.18, KY $49.64, federal $170.18, tax $219.82, after tax −$361.64.
M.taxBundle = ({ winnings, losses, habit, itemize = false, lossRate = 0.9, bracket = 0.12 } = {}) => {
if (habit && (winnings == null || losses == null)) ({ winnings, losses } = M.typicalYear(habit));
const x = { winnings: Math.max(0, winnings || 0), losses: Math.max(0, losses || 0), itemize, lossRate };
const taxable = M.taxableGambling(x), deducted = M.deductibleLosses(x);
const ky = M.kyTaxOn(taxable), fed = M.federalGamblingTax(taxable, bracket), tax = ky + fed, net = x.winnings - x.losses;
return { winnings: x.winnings, losses: x.losses, net, taxable, deducted, ky, fed, tax, afterTax: net - tax, bracket, itemize, lossRate };
};
// ---------- seeded randomness ----------
// mulberry32: tiny, fast, seeded PRNG. Returns a function () -> [0, 1).
M.rng = (seed) => {
let s = seed >>> 0;
return () => {
s = (s + 0x6d2b79f5) | 0;
let t = Math.imul(s ^ (s >>> 15), 1 | s);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
};
// Fisher–Yates with a given rng. Mutates and returns the array.
M.shuffle = (arr, r) => {
for (let i = arr.length - 1; i > 0; i--) {
const j = (r() * (i + 1)) | 0;
const t = arr[i]; arr[i] = arr[j]; arr[j] = t;
}
return arr;
};
// One bet at -110 per leg, each leg a fair coin. Returns true if every leg hits.
M.betHits = (legs, r) => {
for (let k = 0; k < legs; k++) if (r() >= 0.5) return false;
return true;
};
// A season of bets for a habit.
// mode 'random' : each leg a fair coin from mulberry32(seed)
// mode 'typical' : exactly round(n × p) wins, placed in a seeded random order (a representative year)
// Returns { n, legs, outcomes: Uint8Array (1 = win), wins, losses, wagered, returned, won, lost, net }
// won = profit on winning bets; lost = stakes on losing bets; net = won − lost (= returned − wagered)
M.simulateSeason = ({ stake, perWeek, type, seed = 1, mode = "random", weeks = 52 }) => {
const legs = M.HABIT_LEGS[type];
if (!legs) throw new RangeError("type must be 'straight' or 'parlay'");
const n = perWeek * weeks;
const r = M.rng(seed);
const out = new Uint8Array(n);
if (mode === "typical") {
const wins = Math.round(n * M.parlayChance(legs));
const order = M.shuffle([...Array(n).keys()], r);
for (let i = 0; i < wins; i++) out[order[i]] = 1;
} else {
for (let i = 0; i < n; i++) out[i] = M.betHits(legs, r) ? 1 : 0;
}
let wins = 0;
for (let i = 0; i < n; i++) wins += out[i];
const dec = M.parlayBook(legs);
const wagered = n * stake;
const returned = wins * stake * dec;
const won = wins * stake * (dec - 1);
const lost = (n - wins) * stake;
return { n, legs, outcomes: out, wins, losses: n - wins, wagered, returned, won, lost, net: returned - wagered };
};
// A crowd of bettors (C7, A Thousand Seasons). Every bettor places `perWeek` bets of `stake` on
// `legs`-leg parlays each week for `weeks` weeks, starting with `bankroll`. Bettors who can't cover
// a stake sit out. Deterministic for a seed.
// Returns { bettors: [{ final, net, hits, wagered }], up, down, wagered, returned, houseKept, houseShare }
M.simulateCrowd = ({ bettors = 100, bankroll = 500, stake = 10, legs = 4, weeks = 12, perWeek = 1, seed = 1 }) => {
const r = M.rng(seed);
const dec = M.parlayBook(legs);
const list = [];
let wagered = 0, returned = 0;
for (let b = 0; b < bettors; b++) {
let bank = bankroll, hits = 0, w = 0;
for (let k = 0; k < weeks * perWeek; k++) {
if (bank < stake) break;
bank -= stake; w += stake;
if (M.betHits(legs, r)) { bank += stake * dec; hits++; }
}
wagered += w;
returned += w === 0 ? 0 : bank - bankroll + w;
list.push({ final: bank, net: bank - bankroll, hits, wagered: w });
}
const up = list.filter((x) => x.net > 0).length;
const down = list.filter((x) => x.net < 0).length;
const houseKept = wagered - returned;
return { bettors: list, up, down, wagered, returned, houseKept, houseShare: wagered > 0 ? houseKept / wagered : 0 };
};
// Savings goals (Your Plan, C10). Months until a balance reaches `target`: deposit `monthly` at the end
// of each month; a growth rate he types (yearly %, 0 = none) compounds monthly at rate ÷ 12, applied
// before the next deposit. null without a target; Infinity at $0 a month or past 1,200 months (100 years).
// (1000, 11.82, 0) -> 85 (1000 / 11.82 = 84.6, rounded up); (500, 40, 4) -> 13 (only $488.94 after 12).
M.monthsToGoal = (target, monthly, ratePct = 0) => {
if (!(target > 0)) return null;
if (!(monthly > 0)) return Infinity;
const r = (ratePct || 0) / 100 / 12;
if (!r) { const n = Math.ceil(target / monthly - 1e-9); return n > 1200 ? Infinity : n; }
let b = 0;
for (let m = 1; m <= 1200; m++) { b = b * (1 + r) + monthly; if (b >= target - 1e-9) return m; }
return Infinity;
};
AE.math = M;
})(window.AE = window.AE || {});
/* ---- core/state.js ---- */
;(function (AE) {
"use strict";
// state.js: the single store. Everything the save file holds lives here and nowhere else.
//
// AE.state.get() -> frozen snapshot (never mutate; it throws in strict mode)
// AE.state.set({ guess: "even" }) -> replace top-level keys; marks dirty; notifies subscribers
// AE.state.merge("habit", { stake }) -> shallow-merge into an object key (habit, tax, commitment, guesses)
// AE.state.setGuess("c1", 250) -> store a chapter's guess under guesses[id]
// AE.state.subscribe(fn, keys?) -> fn(state, changedKeys, meta); meta.replace = true after a file open; returns unsubscribe
// AE.state.isDirty() / markClean() / onDirty(fn)
// AE.state.replace(next) -> whole-state swap (file open); marks clean; notifies every key
// AE.state.reset() -> back to defaults (marks dirty only if something changed)
//
// UI-only state (which tab is open, slider hover…) does NOT belong here: only what the file saves.
// Every real change marks the page dirty, which arms the "unsaved changes" warning.
const DEFAULTS = () => ({
guess: null, // C0: "up" | "even" | "down" | "none" | null (null = scrolled past; treat as "none")
habit: { stake: 20, perWeek: 3, type: "straight" }, // sample habit so judges see everything untouched
bets: [], // C9 bet log: [{ date, type, legs?, stake, odds?, result, payout?, note? }]
tax: { itemize: false, lossRate: 0.9, winnings: null, losses: null }, // C8 (null = derive from habit)
// Your Plan (C9/C10). goals: up to 3 savings goals, [{ name, target|null, monthly|null, rate }].
// monthly null = follow the habit's expected monthly cost; rate = his own yearly % (default 0).
// (Older saves had a single `goal: { name, monthly }`; file.js converts it into goals[0].)
commitment: { coverCharge: null, rules: [], goals: [] },
guesses: {}, // per-chapter guesses, e.g. { c1: 250, c4: 8, c7: 40 }
});
const KEYS = Object.keys(DEFAULTS());
const deepFreeze = (o) => {
if (o && typeof o === "object" && !Object.isFrozen(o)) {
Object.freeze(o);
for (const k of Object.keys(o)) deepFreeze(o[k]);
}
return o;
};
const clone = (o) => JSON.parse(JSON.stringify(o));
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
let s = deepFreeze(DEFAULTS());
let dirty = false;
const subs = new Set();
const dirtySubs = new Set();
function setDirty(v) {
if (dirty === v) return;
dirty = v;
for (const fn of dirtySubs) { try { fn(dirty); } catch (e) { console.error(e); } }
}
function notify(changed, meta = {}) {
if (!changed.length) return;
for (const sub of [...subs]) {
if (sub.keys && !changed.some((k) => sub.keys.includes(k))) continue;
try { sub.fn(s, changed, meta); } catch (e) { console.error("[About Even] state subscriber failed", e); }
}
}
AE.state = {
KEYS,
defaults: () => DEFAULTS(),
get: () => s,
set(patch, opts = {}) {
if (!patch || typeof patch !== "object") return [];
const next = { ...s }, changed = [];
for (const k of Object.keys(patch)) {
if (!KEYS.includes(k)) { console.error(`[About Even] AE.state.set: unknown key "${k}" (add it to state.js DEFAULTS and file.js validation first)`); continue; }
const v = patch[k] === undefined ? DEFAULTS()[k] : clone(patch[k]);
if (same(v, s[k])) continue;
next[k] = v; changed.push(k);
}
if (!changed.length) return changed;
s = deepFreeze(next);
if (!opts.silent) setDirty(true);
notify(changed);
return changed;
},
merge(key, partial, opts) {
const cur = s[key];
if (!cur || typeof cur !== "object" || Array.isArray(cur)) { console.error(`[About Even] AE.state.merge: "${key}" is not an object key`); return []; }
return AE.state.set({ [key]: { ...cur, ...partial } }, opts);
},
setGuess(id, value, opts) { return AE.state.merge("guesses", { [id]: value }, opts); },
subscribe(fn, keys) {
const sub = { fn, keys: keys ? [].concat(keys) : null };
subs.add(sub);
return () => subs.delete(sub);
},
onDirty(fn) { dirtySubs.add(fn); return () => dirtySubs.delete(fn); },
isDirty: () => dirty,
markClean() { setDirty(false); },
// Used by file.js after validation. `next` must already be a complete, valid state.
replace(next) {
s = deepFreeze(clone({ ...DEFAULTS(), ...next }));
setDirty(false);
notify(KEYS.slice(), { replace: true });
},
reset() {
const d = DEFAULTS();
const changed = AE.state.set(d);
return changed;
},
};
})(window.AE = window.AE || {});
/* ---- core/file.js ---- */
;(function (AE) {
"use strict";
// file.js: save / open / validate (spec §6, rules R5.2–R5.4).
//
// AE.file.save() -> downloads about-even-YYYY-MM-DD.json (Blob + download link; no network)
// AE.file.openPicker() -> opens the file picker; a valid file replaces state, an invalid one changes nothing
// AE.file.load(text) -> { ok:true, state } | { ok:false, error } and applies it when ok (used by tests too)
// AE.file.validate(obj) -> { ok:true, state } | { ok:false, error } (pure; never touches state)
// AE.file.serialize() -> the JSON object that save() writes
//
// Validation is strict: `app` and `version` must match, every known field must have the right type
// and range, unknown fields are ignored (dropped). Missing optional sections fall back to defaults.
const APP = "about-even";
const VERSION = 1;
const MAX_BYTES = 1_000_000;
const BET_TYPES = ["straight", "parlay", "prop", "futures", "live", "race", "market", "other"];
const RESULTS = ["win", "loss", "push", "pending"];
const GUESS = ["up", "even", "down", "none"];
class Invalid extends Error {}
const bad = (msg) => { throw new Invalid(msg); };
const isObj = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
const num = (v, path, min, max, { int = false, nullable = false } = {}) => {
if (v === null && nullable) return null;
if (typeof v !== "number" || !Number.isFinite(v)) bad(`${path} should be a number.`);
if (int && !Number.isInteger(v)) bad(`${path} should be a whole number.`);
if (v < min || v > max) bad(`${path} should be between ${min.toLocaleString("en-US")} and ${max.toLocaleString("en-US")}.`);
return v;
};
const str = (v, path, max, { nullable = false, pattern = null } = {}) => {
if (v === null && nullable) return null;
if (typeof v !== "string") bad(`${path} should be text.`);
if (v.length > max) bad(`${path} is too long (over ${max} characters).`);
if (pattern && !pattern.test(v)) bad(`${path} isn't in the expected format.`);
return v;
};
const oneOf = (v, path, list, { nullable = false } = {}) => {
if (v === null && nullable) return null;
if (!list.includes(v)) bad(`${path} should be one of: ${list.join(", ")}.`);
return v;
};
const bool = (v, path) => { if (typeof v !== "boolean") bad(`${path} should be true or false.`); return v; };
const date = (v, path) => {
str(v, path, 10, { pattern: /^\d{4}-\d{2}-\d{2}$/ });
const [y, m, d] = v.split("-").map(Number);
const t = new Date(Date.UTC(y, m - 1, d));
if (t.getUTCFullYear() !== y || t.getUTCMonth() !== m - 1 || t.getUTCDate() !== d) bad(`${path} isn't a real date.`);
if (y < 2000 || y > 2100) bad(`${path} should be between 2000 and 2100.`);
return v;
};
const american = (v, path) => {
num(v, path, -100000, 100000);
if (v > -100 && v < 100) bad(`${path} should be American odds (−100 or lower, +100 or higher).`);
return v;
};
// One savings goal. name: 1–60 characters (not blank). target: $1–$10,000,000 or null (not set yet).
// monthly: $0–$1,000,000 a month, or null = follow the habit's expected monthly cost.
// rate: his own yearly growth assumption in percent, 0–30 (default 0; the app never suggests one).
const GOAL_MAX = 3;
function goalOf(g, p) {
if (!isObj(g)) bad(`${p} should be an object.`);
const name = str(g.name, `${p}.name`, 60);
if (!name.trim()) bad(`${p}.name shouldn't be blank.`);
return {
name,
target: "target" in g ? num(g.target, `${p}.target`, 1, 10_000_000, { nullable: true }) : null,
monthly: "monthly" in g ? num(g.monthly, `${p}.monthly`, 0, 1_000_000, { nullable: true }) : null,
rate: "rate" in g ? num(g.rate, `${p}.rate`, 0, 30) : 0,
};
}
function validateState(o) {
const d = AE.state.defaults();
const out = d;
if ("guess" in o) out.guess = oneOf(o.guess, "guess", GUESS, { nullable: true });
if ("habit" in o) {
const h = o.habit;
if (!isObj(h)) bad("habit should be an object.");
out.habit = {
stake: num(h.stake, "habit.stake", 1, 10000),
perWeek: num(h.perWeek, "habit.perWeek", 1, 100, { int: true }),
type: oneOf(h.type, "habit.type", ["straight", "parlay"]),
};
}
if ("bets" in o) {
if (!Array.isArray(o.bets)) bad("bets should be a list.");
if (o.bets.length > 5000) bad("bets has more than 5,000 entries.");
out.bets = o.bets.map((b, i) => {
const p = `bets[${i + 1}]`;
if (!isObj(b)) bad(`${p} should be an object.`);
const bet = {
date: date(b.date, `${p}.date`),
type: oneOf(b.type, `${p}.type`, BET_TYPES),
stake: num(b.stake, `${p}.stake`, 0.01, 1_000_000),
result: oneOf(b.result, `${p}.result`, RESULTS),
};
if (b.legs != null) bet.legs = num(b.legs, `${p}.legs`, 1, 25, { int: true });
if (b.odds != null) bet.odds = american(b.odds, `${p}.odds`);
if (b.payout != null) bet.payout = num(b.payout, `${p}.payout`, 0, 100_000_000);
if (b.note != null) bet.note = str(b.note, `${p}.note`, 140);
return bet;
});
}
if ("tax" in o) {
const t = o.tax;
if (!isObj(t)) bad("tax should be an object.");
out.tax = {
itemize: "itemize" in t ? bool(t.itemize, "tax.itemize") : d.tax.itemize,
lossRate: "lossRate" in t ? oneOf(t.lossRate, "tax.lossRate", [0.9, 1]) : d.tax.lossRate,
winnings: "winnings" in t ? num(t.winnings, "tax.winnings", 0, 100_000_000, { nullable: true }) : null,
losses: "losses" in t ? num(t.losses, "tax.losses", 0, 100_000_000, { nullable: true }) : null,
};
}
if ("commitment" in o) {
const c = o.commitment;
if (!isObj(c)) bad("commitment should be an object.");
const rules = "rules" in c ? c.rules : [];
if (!Array.isArray(rules)) bad("commitment.rules should be a list.");
if (rules.length > 20) bad("commitment.rules has more than 20 entries.");
// Savings goals (Your Plan): up to GOAL_MAX of { name, target|null, monthly|null, rate }.
let goals = [];
if ("goals" in c) {
if (!Array.isArray(c.goals)) bad("commitment.goals should be a list.");
if (c.goals.length > GOAL_MAX) bad(`commitment.goals has more than ${GOAL_MAX} goals.`);
goals = c.goals.map((g, i) => goalOf(g, `commitment.goals[${i + 1}]`));
}
// Older saves (before goals) held one `goal: { name, monthly }`, where monthly always followed the
// habit. Still validated strictly; used only when the file has no `goals` list.
if (c.goal != null) {
if (!isObj(c.goal)) bad("commitment.goal should be an object.");
const name = str(c.goal.name, "commitment.goal.name", 60);
num(c.goal.monthly, "commitment.goal.monthly", 0, 1_000_000);
if (!("goals" in c) && name.trim()) goals = [{ name: name.trim(), target: null, monthly: null, rate: 0 }];
}
out.commitment = {
coverCharge: "coverCharge" in c ? num(c.coverCharge, "commitment.coverCharge", 0, 1_000_000, { nullable: true }) : null,
rules: rules.map((r, i) => str(r, `commitment.rules[${i + 1}]`, 140)),
goals,
};
}
if ("guesses" in o) {
const g = o.guesses;
if (!isObj(g)) bad("guesses should be an object.");
const keys = Object.keys(g);
if (keys.length > 50) bad("guesses has too many entries.");
out.guesses = {};
for (const k of keys) {
if (!/^[a-z][a-z0-9-]{0,31}$/.test(k)) bad(`guesses has an unexpected key "${k.slice(0, 20)}".`);
const v = g[k];
if (typeof v === "number") out.guesses[k] = num(v, `guesses.${k}`, -1e9, 1e9);
else if (typeof v === "string") out.guesses[k] = str(v, `guesses.${k}`, 40);
else bad(`guesses.${k} should be a number or short text.`);
}
}
return out;
}
function validate(obj) {
try {
if (!isObj(obj)) bad("That file isn't an About Even save.");
if (obj.app !== APP) bad("That file isn't an About Even save.");
if (typeof obj.version !== "number") bad("That file has no version number.");
if (obj.version > VERSION) bad("That file was saved by a newer version of About Even.");
if (obj.version !== VERSION) bad(`That file's version (${String(obj.version).slice(0, 8)}) isn't supported.`);
if ("savedAt" in obj) str(obj.savedAt, "savedAt", 40);
return { ok: true, state: validateState(obj) };
} catch (e) {
if (e instanceof Invalid) return { ok: false, error: e.message };
return { ok: false, error: "That file couldn't be read." };
}
}
function parse(text) {
if (typeof text !== "string") return { ok: false, error: "That file couldn't be read." };
if (text.length > MAX_BYTES) return { ok: false, error: "That file is too big to be an About Even save." };
let obj;
try { obj = JSON.parse(text); } catch { return { ok: false, error: "That file isn't valid JSON, so it can't be an About Even save." }; }
return validate(obj);
}
const pad = (n) => String(n).padStart(2, "0");
const today = () => { const t = new Date(); return `${t.getFullYear()}-${pad(t.getMonth() + 1)}-${pad(t.getDate())}`; };
function serialize() {
return { app: APP, version: VERSION, savedAt: new Date().toISOString(), ...JSON.parse(JSON.stringify(AE.state.get())) };
}
function save() {
const name = `about-even-${today()}.json`;
const blob = new Blob([JSON.stringify(serialize(), null, 2)], { type: "application/json" });
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url; a.download = name; a.style.display = "none";
document.body.appendChild(a); a.click(); a.remove();
setTimeout(() => URL.revokeObjectURL(url), 4000);
AE.state.markClean();
if (AE.ui) AE.ui.toast(`Saved ${name}. Open it here any time to pick up where you left off.`);
return name;
}
function load(text, name) {
const r = parse(text);
if (!r.ok) {
if (AE.ui) AE.ui.toast(`${r.error} Nothing was changed.`, { error: true });
return r;
}
AE.state.replace(r.state);
if (AE.ui) AE.ui.toast(name ? `Opened ${name}.` : "Opened your save.");
return r;
}
let input = null;
function makeInput() {
if (input) return input;
input = document.createElement("input");
input.type = "file";
input.accept = ".json,application/json";
input.id = "ae-open-input";
input.hidden = true;
input.addEventListener("change", async () => {
const f = input.files && input.files[0];
if (!f) return;
if (f.size > MAX_BYTES) { AE.ui.toast("That file is too big to be an About Even save. Nothing was changed.", { error: true }); input.value = ""; return; }
let text;
try { text = await f.text(); } catch { AE.ui.toast("That file couldn't be read. Nothing was changed.", { error: true }); input.value = ""; return; }
load(text, f.name);
input.value = "";
});
document.body.appendChild(input);
return input;
}
function openPicker() { makeInput().click(); }
// R5.3: warn before closing only when there are unsaved changes.
addEventListener("beforeunload", (e) => {
if (!AE.state.isDirty()) return;
e.preventDefault();
e.returnValue = "";
return "";
});
// The hidden input (#ae-open-input) is created at boot so tests and assistive tech can find it.
AE.file = { APP, VERSION, GOAL_MAX, validate, parse, load, save, serialize, openPicker, filename: () => `about-even-${today()}.json`, _init: makeInput };
})(window.AE = window.AE || {});
/* ---- core/stage.js ---- */
;(function (AE) {
"use strict";
// stage.js: the canvas dot engine (generalized from mocks/v2/03b-every-dollar.html).
//
// One Stage = one canvas + a pool of dots + keyed canvas overlays (labels, counters, lines) +
// a DOM layer for controls placed at canvas coordinates. The story uses one shared stage
// (AE.stage, created at boot); a lab can make its own with AE.Stage(container, opts).
//
// A scene is just: set dot targets, set overlays. The engine tweens from wherever the dots are now.
//
// stage.set(n, i => ({ x, y, r, color, alpha, delay, dur, ease, flash, from }), opts)
// Dots 0..n-1 get targets from the function. Defaults: every field keeps its previous target,
// except alpha, which defaults to 1. Return null to treat a dot as "rest".
// Dots n..capacity-1 ("rest") fade out where they are (opts.rest = "fade", default) or stay
// untouched (opts.rest = "keep").
// color: "bone" | "green" | "red" | [r,g,b]. ease: "inout" (default) | "drop" (falls, lands; use
// for red) | "pop" (overshoots; use for green) | "linear". flash: true rings a win once mid-tween.
// from: {x,y} spawn point used only if the dot is currently invisible.
// opts: { dur = 1150, jitter = 0 (adds rnd[i]*jitter ms of delay), quick = false (short, no delay) }
// stage.overlays([...items], { delay }) keyed crossfade; see drawOverlays() for item types
// stage.glow({ red, green }) 0..1 halo behind red / green dots (red breathes)
// stage.drift(0..1) slow idle wander (cold, ambient scenes)
// stage.halo(0..1) soft radial light behind the region
// stage.clear() fade every dot and overlay out, glow and drift off, DOM layer emptied
// stage.snap() jump everything to its target now (used after resize)
// stage.place(el, x, y, { align }) put a DOM control on the stage; removed by clearLayer()/clear()
// stage.label(text) canvas aria-label (describe what the scene shows)
// stage.geom { W, H, mobile, R:{x,y,w,h}, cx, cy, safe:{top,bottom}, sheet }
// R = the area scenes should use. safe = the hard vertical limits for
// anything drawn (dots, captions, labels): on a phone safe.bottom is just
// above the text card, which can be taller than the default sheet. sheet =
// px reserved at the bottom for the card (0 on desktop).
// stage.clampY(y, pad) min(y, safe.bottom − pad): keep a caption above the card
// stage.fitSize(size, rows, top) shrink a cell size so `rows` rows starting at y=top end above safe.bottom
// stage.fonts() canvas font strings sized for the viewport: label, cap, hero, hero2, small
// stage.rnd Float32Array of fixed per-dot randoms (stagger jitter)
// stage.on("resize", fn) fn(geom) after a resize re-measure
// stage.dot(i) { x, y, r, a } current values
// stage.pause() / resume() / destroy()
const PAL = { bone: AE.colors.bone, green: AE.colors.green, red: AE.colors.red };
const KIND = { bone: 0, green: 1, red: 2 };
const EASES = ["inout", "drop", "pop", "linear"];
const eInOut = (p) => (p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2);
const eDrop = (p) => { if (p < 0.7) { const t = p / 0.7; return t * t; } const t = (p - 0.7) / 0.3; return 1 - 0.07 * Math.sin(t * Math.PI) * (1 - t * 0.4); };
const ePop = (p) => { const c = 1.9, t = p - 1; return 1 + (c + 1) * t * t * t + c * t * t; };
const eLin = (p) => p;
const EASE_FN = [eInOut, eDrop, ePop, eLin];
AE.Stage = function Stage(container, opts = {}) {
const CAP = opts.capacity || 1200;
const reduce = AE.reduced;
const DUR = reduce ? 0 : 1150, FADE = reduce ? 1 : 420, ODELAY = reduce ? 0 : 520;
const cv = document.createElement("canvas");
cv.className = "ae-canvas";
cv.setAttribute("role", "img");
cv.setAttribute("aria-label", opts.label || "");
const halo = document.createElement("div");
halo.className = "ae-halo"; halo.setAttribute("aria-hidden", "true"); halo.style.opacity = "0";
const layer = document.createElement("div");
layer.className = "ae-stage-layer";
container.append(halo, cv, layer);
const ctx = cv.getContext("2d");
const regionFn = opts.region || ((W, H) => ({ x: 16, y: 16, w: W - 32, h: H - 32 }));
// safe(W, H, mobile) -> { top, bottom, sheet? }; default: the region plus 16px, inside the canvas.
const safeFn = opts.safe || ((W, H, mobile, R) => ({ top: Math.max(0, R.y - 16), bottom: Math.min(H, R.y + R.h + 16), sheet: 0 }));
const r0 = AE.math.rng(opts.seed || 2025);
const rnd = new Float32Array(CAP); for (let i = 0; i < CAP; i++) rnd[i] = r0();
const F32 = () => new Float32Array(CAP);
const X = F32(), Y = F32(), Rr = F32(), A = F32(), CR = F32(), CG = F32(), CB = F32();
const FX = F32(), FY = F32(), FR = F32(), FA = F32(), FCR = F32(), FCG = F32(), FCB = F32();
const TX = F32(), TY = F32(), TR = F32(), TA = F32(), TCR = F32(), TCG = F32(), TCB = F32();
const DL = F32(), DU = F32(), EZ = new Uint8Array(CAP), TK = new Uint8Array(CAP), FL = new Float64Array(CAP).fill(-1);
let tStart = 0, busyUntil = 0, drift = 0, driftT = 0, redGlow = 0, redGlowT = 0, grnGlow = 0, grnGlowT = 0;
let W = 0, H = 0, G = null, paused = false, dead = false, raf = 0, settled = false;
const listeners = { resize: new Set() };
const colCache = new Map();
const colStr = (r, g, b) => { const k = (r << 16) | (g << 8) | b; let s = colCache.get(k); if (!s) { s = `rgb(${r},${g},${b})`; colCache.set(k, s); } return s; };
function measure() {
const b = container.getBoundingClientRect();
W = Math.max(1, b.width); H = Math.max(1, b.height);
const dpr = Math.min(2, window.devicePixelRatio || 1);
cv.width = Math.round(W * dpr); cv.height = Math.round(H * dpr);
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
const mobile = W < 820;
const R = regionFn(W, H, mobile);
const S = safeFn(W, H, mobile, R) || {};
const safe = { top: S.top != null ? S.top : 0, bottom: S.bottom != null ? S.bottom : H };
G = { W, H, mobile, R, cx: R.x + R.w / 2, cy: R.y + R.h / 2, safe, sheet: S.sheet || 0 };
const hs = Math.max(R.w, R.h) * 1.1;
Object.assign(halo.style, { width: hs + "px", height: hs + "px", left: G.cx - hs / 2 + "px", top: G.cy - hs / 2 + "px" });
return G;
}
// ---------- targets ----------
function setTarget(i, t, now, o) {
FX[i] = X[i]; FY[i] = Y[i]; FR[i] = Rr[i]; FA[i] = A[i]; FCR[i] = CR[i]; FCG[i] = CG[i]; FCB[i] = CB[i];
if (t.x != null) TX[i] = t.x;
if (t.y != null) TY[i] = t.y;
if (t.r != null) TR[i] = t.r;
TA[i] = t.alpha != null ? t.alpha : t.a != null ? t.a : 1;
if (t.color != null) {
const c = Array.isArray(t.color) ? t.color : PAL[t.color] || PAL.bone;
TCR[i] = c[0]; TCG[i] = c[1]; TCB[i] = c[2];
TK[i] = Array.isArray(t.color) ? 3 : KIND[t.color] ?? 0;
}
if (A[i] < 0.04) {
if (t.from) { FX[i] = t.from.x; FY[i] = t.from.y; FR[i] = 1; }
FCR[i] = TCR[i]; FCG[i] = TCG[i]; FCB[i] = TCB[i]; // invisible dots don't visibly change color
}
const ez = EASES.indexOf(t.ease || "inout");
EZ[i] = ez < 0 ? 0 : ez;
const quick = o.quick;
DL[i] = reduce ? 0 : quick ? rnd[i] * 120 : (t.delay || 0) + rnd[i] * (o.jitter || 0);
DU[i] = reduce ? 0 : t.dur != null ? t.dur : quick ? 420 : o.dur != null ? o.dur : DUR;
FL[i] = t.flash && !reduce ? now + DL[i] + DU[i] * 0.5 : -1;
return DL[i] + DU[i];
}
function set(n, fn, o = {}) {
const now = performance.now();
let longest = 0;
n = Math.min(n, CAP);
for (let i = 0; i < CAP; i++) {
let t = i < n ? fn(i) : null;
if (!t) {
if (o.rest === "keep") { FX[i] = X[i]; FY[i] = Y[i]; FR[i] = Rr[i]; FA[i] = A[i]; FCR[i] = CR[i]; FCG[i] = CG[i]; FCB[i] = CB[i]; DL[i] = 0; DU[i] = 0; continue; }
t = { x: TX[i], y: TY[i], alpha: 0, delay: o.quick ? 0 : rnd[i] * 200, dur: 600 };
}
longest = Math.max(longest, setTarget(i, t, now, o));
}
tStart = now;
busyUntil = now + longest + 900;
wake();
}
function snap() {
for (let i = 0; i < CAP; i++) {
X[i] = FX[i] = TX[i]; Y[i] = FY[i] = TY[i]; Rr[i] = FR[i] = TR[i]; A[i] = FA[i] = TA[i];
CR[i] = FCR[i] = TCR[i]; CG[i] = FCG[i] = TCG[i]; CB[i] = FCB[i] = TCB[i]; FL[i] = -1;
}
for (const o of ov.values()) { o.a0 = o.a1; o.dl = 0; o.t0 = -1e9; if (o.it.count) o.it.count.t0 = -1e9; }
drift = driftT; redGlow = redGlowT; grnGlow = grnGlowT;
busyUntil = performance.now() + 300;
wake();
}
// ---------- overlays ----------
// Item types (all take key, color, and optionally follow: dotIndex to move with a dot):
// { type:"text", x, y, text | count:{to, from?, dur, lin?, dl?, fmt}, font, align, spacing, upper, dx, dy }
// { type:"line", x1, y1, x2, y2, w } (relative to the dot when follow is set)
// { type:"rect", x, y, w, h, dash:[2,4] }
// { type:"ring", id, rad } (circle around dot `id`)
// { type:"leader", x, y1, id } (vertical line from y1 down to just above dot `id`)
// { type:"edges", list:[[dotA, dotB, alpha]] } (lines between dots, faded with them)
const ov = new Map();
const curA = (o, now) => { const p = Math.min(1, Math.max(0, (now - o.t0 - o.dl) / FADE)); return o.a0 + (o.a1 - o.a0) * p; };
const countVal = (c, now) => { if (reduce) return c.to; const p = Math.min(1, Math.max(0, (now - c.t0) / c.dur)); const e = c.lin ? p : 1 - Math.pow(1 - p, 3); return c.from + (c.to - c.from) * e; };
// Readability floor: a bone caption in the cap or small font that's meant to be read (alpha >= .3)
// is lifted to AE.capColor (60%, 4.5:1 on ink). Deliberately faded items (< .3) are left alone.
const BONE_A = /^rgba\(236,\s*229,\s*213,\s*([\d.]+)\)$/;
function readable(it) {
if (it.type !== "text" || !it.color) return;
const f = fonts();
if (it.font !== f.cap && it.font !== f.small) return;
const m = BONE_A.exec(it.color);
if (m && +m[1] >= 0.3 && +m[1] < 0.6) it.color = AE.capColor || "rgba(236,229,213,0.6)";
}
function overlays(list, o = {}) {
const delay = o.delay != null ? (reduce ? 0 : o.delay) : ODELAY;
const now = performance.now(), keys = new Set();
for (const it of list) {
if (!it || !it.key) continue;
readable(it);
keys.add(it.key);
const cur = ov.get(it.key);
if (cur && cur.a1 === 1) {
if (it.count) {
it.count.from = it.count.from ?? (cur.it.count ? countVal(cur.it.count, now) : 0);
it.count.t0 = now + (cur.it.count ? 0 : delay) + (it.count.dl || 0);
it.count.dur = it.count.dur || 1200;
}
cur.it = it;
} else {
if (it.count) { it.count.from = it.count.from ?? 0; it.count.t0 = now + delay + 60 + (it.count.dl || 0); it.count.dur = it.count.dur || 1200; }
ov.set(it.key, { it, a0: cur ? curA(cur, now) : 0, a1: 1, t0: now, dl: delay });
}
}
for (const [k, c] of ov) if (!keys.has(k) && c.a1 !== 0) { c.a0 = curA(c, now); c.a1 = 0; c.t0 = now; c.dl = 0; }
const longestCount = list.reduce((m, it) => (it && it.count ? Math.max(m, (it.count.dl || 0) + it.count.dur + delay + 200) : m), 0);
busyUntil = Math.max(busyUntil, now + Math.max(longestCount, delay + FADE + 200));
wake();
}
const setSpacing = (sp) => { if ("letterSpacing" in ctx) ctx.letterSpacing = sp || "0px"; };
function drawOverlays(now, layerName) {
for (const [k, o] of ov) {
const a = curA(o, now);
if (a <= 0.003) { if (o.a1 === 0) ov.delete(k); continue; }
const it = o.it, under = it.type === "edges" || it.type === "rect" || it.type === "line" || it.type === "leader";
if ((layerName === "under") !== under) continue;
ctx.globalAlpha = a * (it.alpha != null ? it.alpha : 1);
const fx = it.follow != null ? X[it.follow] : 0, fy = it.follow != null ? Y[it.follow] : 0;
if (it.type === "text") {
let tx = it.count ? it.count.fmt(countVal(it.count, now)) : String(it.text ?? "");
if (it.upper) tx = tx.toUpperCase();
ctx.font = it.font || fonts().label; ctx.fillStyle = it.color || AE.rgba("bone", 0.8);
ctx.textAlign = it.align || "left"; ctx.textBaseline = "alphabetic"; setSpacing(it.spacing);
const x = it.follow != null ? fx + (it.dx || 0) : it.x, y = it.follow != null ? fy + (it.dy || 0) : it.y;
ctx.fillText(tx, x, y); setSpacing();
} else if (it.type === "line") {
ctx.strokeStyle = it.color || AE.rgba("bone", 0.3); ctx.lineWidth = it.w || 1;
ctx.beginPath(); ctx.moveTo(fx + it.x1, fy + it.y1); ctx.lineTo(fx + it.x2, fy + it.y2); ctx.stroke();
} else if (it.type === "leader") {
const y2 = Y[it.id] - Rr[it.id] - 8;
if (y2 - it.y1 > 6) { ctx.strokeStyle = it.color || AE.rgba("bone", 0.3); ctx.lineWidth = 1; ctx.beginPath(); ctx.moveTo(it.x, it.y1); ctx.lineTo(it.x, y2); ctx.stroke(); }
} else if (it.type === "rect") {
ctx.strokeStyle = it.color || AE.rgba("bone", 0.3); ctx.lineWidth = 1; ctx.setLineDash(it.dash || []);
ctx.strokeRect(it.x + 0.5, it.y + 0.5, it.w, it.h); ctx.setLineDash([]);
} else if (it.type === "ring") {
ctx.strokeStyle = it.color || AE.rgba("bone", 0.8); ctx.lineWidth = it.w || 1;
ctx.beginPath(); ctx.arc(X[it.id], Y[it.id], it.rad, 0, Math.PI * 2); ctx.stroke();
} else if (it.type === "edges") {
ctx.lineWidth = 1; ctx.strokeStyle = it.color || "rgb(236,229,213)";
for (const [p, c, ea0] of it.list) {
const ea = Math.min(A[p], A[c]) * (ea0 != null ? ea0 : 0.3);
if (ea < 0.01) continue;
ctx.globalAlpha = a * ea; ctx.beginPath(); ctx.moveTo(X[p], Y[p]); ctx.lineTo(X[c], Y[c]); ctx.stroke();
}
}
}
ctx.globalAlpha = 1;
}
function fonts() {
const m = G && G.mobile;
return {
label: `400 ${m ? 13 : 14}px Geist, ui-sans-serif, system-ui, sans-serif`,
cap: `500 ${m ? 11.5 : 13}px "Geist Mono", ui-monospace, monospace`, // was 10 / 10.5: too small to read
hero: `300 ${m ? 40 : 60}px "Geist Mono", ui-monospace, monospace`,
hero2: `300 ${m ? 28 : 40}px "Geist Mono", ui-monospace, monospace`,
small: `400 ${m ? 12.5 : 14}px "Geist Mono", ui-monospace, monospace`,
display: `600 ${m ? 22 : 28}px Geist, ui-sans-serif, system-ui, sans-serif`,
};
}
// ---------- render ----------
function frame(now) {
raf = 0;
if (dead || paused || !G) return;
const live = now < busyUntil || Math.abs(drift - driftT) > 0.002 || driftT > 0 || Math.abs(redGlow - redGlowT) > 0.01 || Math.abs(grnGlow - grnGlowT) > 0.01 || redGlowT > 0 || grnGlowT > 0;
// Idle: draw one last settled frame (tweens clamp to their targets), then stop until wake().
// The settle pass matters when the first frame after a change arrives late (background tab).
if (!live && settled) return;
if (live) raf = requestAnimationFrame(frame);
else settled = true;
const k = reduce ? 1 : 0.05;
drift += (driftT - drift) * k; redGlow += (redGlowT - redGlow) * k; grnGlow += (grnGlowT - grnGlow) * k;
const el = now - tStart;
for (let i = 0; i < CAP; i++) {
let p = DU[i] ? (el - DL[i]) / DU[i] : 1; p = p < 0 ? 0 : p > 1 ? 1 : p;
const e = EASE_FN[EZ[i]](p), ec = eInOut(Math.min(1, p * 2.2)), ea = eInOut(p);
X[i] = FX[i] + (TX[i] - FX[i]) * e; Y[i] = FY[i] + (TY[i] - FY[i]) * e; Rr[i] = Math.max(0, FR[i] + (TR[i] - FR[i]) * e);
CR[i] = FCR[i] + (TCR[i] - FCR[i]) * ec; CG[i] = FCG[i] + (TCG[i] - FCG[i]) * ec; CB[i] = FCB[i] + (TCB[i] - FCB[i]) * ec;
A[i] = FA[i] + (TA[i] - FA[i]) * ea;
}
ctx.clearRect(0, 0, W, H);
drawOverlays(now, "under");
const dAmp = reduce ? 0 : drift * 6, t = now * 0.00045;
const breathe = reduce ? 1 : 0.72 + 0.28 * Math.sin(now * 0.0016);
if (redGlow > 0.01 || grnGlow > 0.01) {
ctx.globalCompositeOperation = "lighter";
for (let i = 0; i < CAP; i++) {
if (A[i] < 0.05) continue;
let g = 0, col = null;
if (TK[i] === 2 && redGlow > 0.01) { g = 0.085 * redGlow * breathe; col = "rgb(240,74,58)"; }
else if (TK[i] === 1 && grnGlow > 0.01) { g = 0.08 * grnGlow; col = "rgb(94,214,160)"; }
if (!g) continue;
const ox = dAmp ? Math.sin(t + rnd[i] * 40) * dAmp : 0, oy = dAmp ? Math.cos(t * 1.3 + rnd[i] * 30) * dAmp : 0;
ctx.globalAlpha = g * A[i]; ctx.fillStyle = col; ctx.beginPath(); ctx.arc(X[i] + ox, Y[i] + oy, Rr[i] * 2.7, 0, 6.2832); ctx.fill();
}
ctx.globalCompositeOperation = "source-over";
}
for (let i = 0; i < CAP; i++) {
if (A[i] < 0.006 || Rr[i] < 0.2) continue;
const x = X[i], y = Y[i];
if (x < -40 || y < -40 || x > W + 40 || y > H + 40) continue;
const ox = dAmp ? Math.sin(t + rnd[i] * 40) * dAmp : 0, oy = dAmp ? Math.cos(t * 1.3 + rnd[i] * 30) * dAmp : 0;
let r = Rr[i];
if (FL[i] > 0) { // a win: a bright ring rolls out and the dot pops
const q = (now - FL[i]) / 700;
if (q >= 0 && q <= 1) {
const fade = (1 - q) * (1 - q);
ctx.globalAlpha = 0.75 * fade * A[i]; ctx.strokeStyle = "rgb(150,240,195)"; ctx.lineWidth = 1.2;
ctx.beginPath(); ctx.arc(x + ox, y + oy, r * (1.3 + 2.6 * q), 0, 6.2832); ctx.stroke();
r *= 1 + 0.35 * fade;
}
}
ctx.globalAlpha = A[i]; ctx.fillStyle = colStr(CR[i] | 0, CG[i] | 0, CB[i] | 0);
ctx.beginPath(); ctx.arc(x + ox, y + oy, r, 0, 6.2832); ctx.fill();
}
ctx.globalAlpha = 1;
drawOverlays(now, "over");
}
function wake() { settled = false; if (!raf && !dead && !paused) raf = requestAnimationFrame(frame); }
// ---------- DOM layer ----------
const placed = new Set();
function place(el, x, y, o = {}) {
el.classList.add("ae-placed");
el.style.left = x + "px"; el.style.top = y + "px";
el.style.transform = o.align === "center" ? "translateX(-50%)" : o.align === "right" ? "translateX(-100%)" : "";
if (el.parentNode !== layer) layer.appendChild(el);
placed.add(el);
requestAnimationFrame(() => el.classList.add("is-shown"));
return el;
}
function clearLayer() { for (const el of placed) el.remove(); placed.clear(); }
// ---------- boot ----------
measure();
for (let i = 0; i < CAP; i++) { // start scattered beyond the region, invisible, so the first scene flies in
const a = rnd[i] * Math.PI * 2, d = Math.max(W, H) * (0.35 + r0() * 0.5);
X[i] = TX[i] = G.cx + Math.cos(a) * d; Y[i] = TY[i] = G.cy + Math.sin(a) * d;
Rr[i] = TR[i] = 2; A[i] = TA[i] = 0;
CR[i] = TCR[i] = PAL.bone[0]; CG[i] = TCG[i] = PAL.bone[1]; CB[i] = TCB[i] = PAL.bone[2];
}
let rw = window.innerWidth, rh = window.innerHeight, rT = null;
const onResize = () => {
clearTimeout(rT);
rT = setTimeout(() => {
const w = window.innerWidth, h = window.innerHeight;
if (w === rw && Math.abs(h - rh) < 90) return; // ignore mobile URL-bar jiggle
rw = w; rh = h;
measure();
for (const fn of listeners.resize) { try { fn(G); } catch (e) { console.error(e); } }
wake();
}, 120);
};
addEventListener("resize", onResize);
const api = {
capacity: CAP,
rnd,
get geom() { return G; },
get canvas() { return cv; },
get layer() { return layer; },
set,
snap,
overlays,
fonts,
place,
clearLayer,
measure() { const g = measure(); wake(); return g; },
clampY(y, pad = 0) { return Math.min(y, G.safe.bottom - pad); },
fitSize(size, rows, top) { return Math.max(1, Math.min(size, (G.safe.bottom - top) / Math.max(1, rows))); },
glow(o = {}) { if (o.red != null) redGlowT = o.red; if (o.green != null) grnGlowT = o.green; wake(); },
drift(v) { driftT = v || 0; wake(); },
halo(v) { halo.style.opacity = String(v || 0); },
label(text) { cv.setAttribute("aria-label", text || ""); },
clear(o = {}) {
set(0, null, { quick: o.quick });
overlays([], { delay: 0 });
redGlowT = 0; grnGlowT = 0; driftT = 0; halo.style.opacity = "0";
clearLayer();
},
// Reset per-scene ambience (glow, drift, halo) without touching dots. steps.js calls this before enter().
resetAmbience() { redGlowT = 0; grnGlowT = 0; driftT = 0; },
dot(i) { return { x: X[i], y: Y[i], r: Rr[i], a: A[i] }; },
on(evt, fn) { (listeners[evt] || (listeners[evt] = new Set())).add(fn); return () => listeners[evt].delete(fn); },
pause() { paused = true; },
resume() { paused = false; busyUntil = performance.now() + 300; wake(); },
destroy() { dead = true; removeEventListener("resize", onResize); clearLayer(); cv.remove(); halo.remove(); layer.remove(); },
};
return api;
};
// Layout helpers shared by scenes. Pure geometry; no dots are touched.
AE.layout = {
// Unit-disc positions (golden-angle sunflower) for n dots, shuffled by seed so neighbours aren't
// sequential ids. Returns { x: Float32Array, y: Float32Array } in [-1, 1].
sunflower(n, seed = 2025, jitter = 0.012) {
const r = AE.math.rng(seed);
const slot = AE.math.shuffle([...Array(n).keys()], r);
const x = new Float32Array(n), y = new Float32Array(n), GA = Math.PI * (3 - Math.sqrt(5));
for (let i = 0; i < n; i++) {
const k = slot[i], rr = Math.sqrt((k + 0.5) / n), th = k * GA;
x[i] = rr * Math.cos(th) + (r() - 0.5) * jitter;
y[i] = rr * Math.sin(th) + (r() - 0.5) * jitter;
}
return { x, y };
},
// Cell j of a grid filled left-to-right, top-to-bottom. Returns {x, y} of the cell centre.
grid(j, { x0, y0, cols, size }) {
return { x: x0 + ((j % cols) + 0.5) * size, y: y0 + (((j / cols) | 0) + 0.5) * size };
},
// Cell j of a pile that stacks upward from `base` (rows grow up). Returns {x, y}.
pile(j, { x0, base, cols, size }) {
return { x: x0 + ((j % cols) + 0.5) * size, y: base - (((j / cols) | 0) + 0.5) * size };
},
};
})(window.AE = window.AE || {});
/* ---- core/ui.js ---- */
;(function (AE) {
"use strict";
// ui.js: the small set of controls every chapter and lab shares. Plain numerals with an underline,
// no pills, no boxes (mocks/v2/BRIEF.md). Each factory returns { el, get(), set(v) } and never touches
// AE.state itself: the caller decides what to store.
//
// AE.ui.segmented({ label, options:[{ value, label, aria? }], value, onChange, variant? })
// variant: "mono" (default, 03b underline numerals) | "big" (Geist 600 display, C0 choices)
// AE.ui.slider({ label, min, max, step, value, format, onInput, onChange, aria? })
// format(v) -> readout text; onInput fires while dragging, onChange on release / keyboard commit
// AE.ui.button({ label, onClick, kind? }) kind: "quiet" (default, mono caps underline) | "link"
// AE.ui.counter(el, { to, from?, dur?, fmt? }) rolls a DOM number; reduced motion snaps
// AE.ui.toast(message, { error? }) polite status line at the bottom (role=alert on error)
let uid = 0;
const nextId = (p) => `${p}-${++uid}`;
function segmented({ label = "", options = [], value = null, onChange = () => {}, variant = "mono", name } = {}) {
const el = document.createElement("div");
el.className = `ae-seg ae-seg--${variant}`;
el.setAttribute("role", "group");
if (label) el.setAttribute("aria-label", label);
if (label && variant === "mono") el.insertAdjacentHTML("beforeend", `<span class="ae-seg-label" aria-hidden="true">${AE.esc(label)}</span>`);
let cur = value;
const btns = options.map((o) => {
const b = document.createElement("button");
b.type = "button";
b.className = "ae-seg-btn";
b.textContent = o.label;
if (o.aria) b.setAttribute("aria-label", o.aria);
if (name) b.name = name;
b.dataset.value = String(o.value);
b.addEventListener("click", () => { api.set(o.value); onChange(o.value); });
el.appendChild(b);
return { b, v: o.value };
});
const mark = () => btns.forEach((x) => x.b.setAttribute("aria-pressed", String(x.v === cur)));
const api = { el, get: () => cur, set(v) { cur = v; mark(); } };
mark();
return api;
}
function slider({ label = "", min = 0, max = 100, step = 1, value = min, format = (v) => String(v), onInput = () => {}, onChange = () => {}, aria } = {}) {
const id = nextId("ae-sl");
const el = AE.h(`<div class="ae-slider">
${label ? `<label class="ae-slider-label" for="${id}">${AE.esc(label)}</label>` : ""}
<input id="${id}" type="range" min="${min}" max="${max}" step="${step}" value="${value}">
<output class="ae-slider-out" for="${id}" aria-live="off"></output>
</div>`);
const input = el.querySelector("input"), out = el.querySelector("output");
if (aria) input.setAttribute("aria-label", aria);
// Fixed-width readout (mono, so ch is exact): sized to the longest label across the range, and only
// ever grows, so the track never resizes under the thumb while dragging.
let outCh = 0;
const fit = (t) => { const n = String(t).length + 0.5; if (n > outCh) { outCh = n; out.style.minWidth = n + "ch"; } };
try {
const span = max - min, k = 24;
for (let j = 0; j <= k; j++) { const v = min + Math.round((span * j) / k / (step || 1)) * (step || 1); fit(format(Math.min(max, v))); }
} catch (e) { /* a format that needs outside state may throw before init; paint() sizes it later */ }
const paint = () => {
const v = +input.value;
out.textContent = format(v);
fit(out.textContent);
input.setAttribute("aria-valuetext", format(v));
el.style.setProperty("--p", ((v - min) / (max - min || 1)) * 100 + "%");
};
input.addEventListener("input", () => { paint(); onInput(+input.value); });
input.addEventListener("change", () => onChange(+input.value));
paint();
return { el, input, get: () => +input.value, set(v) { input.value = v; paint(); } };
}
function button({ label, onClick = () => {}, kind = "quiet" } = {}) {
const b = document.createElement("button");
b.type = "button";
b.className = kind === "link" ? "ae-link" : "ae-quiet";
b.textContent = label;
b.addEventListener("click", onClick);
return { el: b, get: () => label, set(t) { b.textContent = t; } };
}
const running = new WeakMap();
function counter(el, { to, from, dur = 1200, fmt = (v) => AE.fmt.int(v) } = {}) {
const prev = running.get(el);
if (prev) cancelAnimationFrame(prev.raf);
const start = from != null ? from : prev ? prev.value : 0;
if (AE.reduced || dur <= 0) { el.textContent = fmt(to); running.set(el, { value: to, raf: 0 }); return; }
const t0 = performance.now();
const st = { value: start, raf: 0 };
running.set(el, st);
const tick = (now) => {
const p = Math.min(1, (now - t0) / dur), e = 1 - Math.pow(1 - p, 3);
st.value = start + (to - start) * e;
el.textContent = fmt(st.value);
if (p < 1) st.raf = requestAnimationFrame(tick);
};
st.raf = requestAnimationFrame(tick);
}
let toastEl = null, toastT = null;
function toast(msg, { error = false, ms } = {}) {
if (!toastEl) toastEl = document.getElementById("ae-toast");
if (!toastEl) return;
toastEl.setAttribute("role", error ? "alert" : "status");
toastEl.classList.toggle("is-error", !!error);
toastEl.textContent = msg;
toastEl.classList.add("is-shown");
clearTimeout(toastT);
toastT = setTimeout(() => toastEl.classList.remove("is-shown"), ms || (error ? 9000 : 5000));
}
AE.ui = { segmented, slider, button, counter, toast };
})(window.AE = window.AE || {});
/* ---- core/drawer.js ---- */
;(function (AE) {
"use strict";
// drawer.js: the quiet "How this works" panel (closed by default), also used for Sources and Explore.
//
// AE.drawer.open({ kick, title, html }) generic
// AE.drawer.openChapter(id) a chapter's drawer: its drawer.html + lab link + its sources
// AE.drawer.openSources() every registered source, grouped by chapter
// AE.drawer.close() / isOpen()
//
// Declarative hooks (work anywhere in the page, including inside card HTML):
// <button data-ae-drawer="c4">How this works</button> (empty value = the enclosing chapter)
// <button data-ae-sources>Sources</button>
// <button data-ae-lab="parlay-xray">Open the lab</button> (handled by labs.js)
let el, body, titleEl, kickEl, scrim, lastFocus = null;
function ensure() {
if (el) return;
scrim = AE.h(`<div class="ae-scrim" hidden></div>`);
el = AE.h(`<aside class="ae-drawer" role="dialog" aria-modal="true" aria-labelledby="ae-drawer-title" hidden>
<div class="ae-drawer-head">
<div><div class="ae-kick ae-drawer-kick"></div><h2 id="ae-drawer-title" class="ae-drawer-title"></h2></div>
<button type="button" class="ae-close" data-ae-close>Close</button>
</div>
<div class="ae-drawer-body"></div>
</aside>`);
body = el.querySelector(".ae-drawer-body");
titleEl = el.querySelector(".ae-drawer-title");
kickEl = el.querySelector(".ae-drawer-kick");
document.body.append(scrim, el);
scrim.addEventListener("click", close);
el.querySelector("[data-ae-close]").addEventListener("click", close);
el.addEventListener("keydown", (e) => {
if (e.key === "Escape") { e.stopPropagation(); close(); }
if (e.key === "Tab") trap(e);
});
}
function trap(e) {
const f = AE.$$('button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])', el).filter((x) => !x.disabled && x.offsetParent !== null);
if (!f.length) return;
const first = f[0], last = f[f.length - 1];
if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last.focus(); }
else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first.focus(); }
}
function open({ kick = "", title = "", html = "" }) {
ensure();
lastFocus = document.activeElement;
kickEl.innerHTML = kick;
titleEl.innerHTML = title;
body.innerHTML = html;
body.scrollTop = 0;
clearTimeout(hideT); closing = false; // reopening during the close animation must not get hidden by it
scrim.hidden = false; el.hidden = false;
requestAnimationFrame(() => { scrim.classList.add("is-open"); el.classList.add("is-open"); });
document.documentElement.classList.add("ae-drawer-open");
el.querySelector("[data-ae-close]").focus({ preventScroll: true });
}
// B14: while the drawer slid out, the fading scrim still covered the header and swallowed the next tap
// (e.g. Explore). Now the scrim stops taking pointer events the moment closing starts (CSS), and a
// reopen cancels the pending hide.
let hideT = null, closing = false;
function close() {
if (!el || el.hidden || closing) return;
closing = true;
el.classList.remove("is-open"); scrim.classList.remove("is-open");
document.documentElement.classList.remove("ae-drawer-open");
const done = () => { el.hidden = true; scrim.hidden = true; closing = false; };
clearTimeout(hideT);
if (AE.reduced) done(); else hideT = setTimeout(done, 320);
if (lastFocus && document.contains(lastFocus)) lastFocus.focus({ preventScroll: true });
}
function sourcesHTML(ids) {
const rows = ids.map((id) => AE._sources.get(id)).filter(Boolean);
if (!rows.length) return "";
return `<ol class="ae-sources">${rows.map((r) => `<li><span class="ae-src-id">${AE.esc(r.id)}</span> ${r.url ? `<a href="${AE.esc(r.url)}" target="_blank" rel="noopener noreferrer">${AE.esc(r.label)}</a>` : AE.esc(r.label)}${r.note ? `<span class="ae-src-note">${AE.esc(r.note)}</span>` : ""}</li>`).join("")}</ol>`;
}
function openChapter(id) {
const def = AE._chapters.find((c) => c.id === id);
if (!def || !def.drawer) return;
const d = def.drawer;
let html = `<div class="ae-math">${typeof d.html === "function" ? d.html(AE.state.get()) : d.html || ""}</div>`;
const lab = def.lab && AE._labs.find((l) => l.id === def.lab);
if (lab) html += `<p class="ae-drawer-lab"><button type="button" class="ae-link" data-ae-lab="${AE.esc(lab.id)}">Open the lab: ${AE.esc(lab.title)}</button></p>`;
const src = sourcesHTML(def.sources || []);
if (src) html += `<h3 class="ae-drawer-sub">Sources</h3>${src}`;
open({ kick: `${String(def.order).padStart(2, "0")} · ${AE.esc(def.title)}`, title: d.title || "How this works", html });
}
function openSources() {
const used = new Set();
let html = `<p class="ae-drawer-lede">Every number in this page traces to one of these. Checked November 2026.</p>`;
for (const def of AE.steps.chapters()) {
const ids = (def.sources || []).filter((id) => AE._sources.has(id) && !used.has(id));
if (!ids.length) continue;
ids.forEach((id) => used.add(id));
html += `<h3 class="ae-drawer-sub">${String(def.order).padStart(2, "0")} · ${AE.esc(def.title)}</h3>${sourcesHTML(ids)}`;
}
const rest = [...AE._sources.keys()].filter((id) => !used.has(id));
if (rest.length) html += `<h3 class="ae-drawer-sub">Other</h3>${sourcesHTML(rest)}`;
open({ kick: "About Even", title: "Sources", html });
}
document.addEventListener("click", (e) => {
const t = e.target.closest("[data-ae-drawer], [data-ae-sources]");
if (!t) return;
e.preventDefault();
if (t.hasAttribute("data-ae-sources")) return openSources();
const host = t.closest("[data-chapter]");
openChapter(t.getAttribute("data-ae-drawer") || (host && host.dataset.chapter));
});
AE.drawer = { open, close, openChapter, openSources, sourcesHTML, isOpen: () => !!el && !el.hidden && !closing };
})(window.AE = window.AE || {});
/* ---- core/steps.js ---- */
;(function (AE) {
"use strict";
// steps.js: builds the story from registered chapters and drives it from scroll.
//
// Every chapter's steps go into one long scroll over one sticky stage (AE.stage). An
// IntersectionObserver picks the active step (the one crossing a line at 50% of the viewport on
// desktop, just above the card sheet on a phone) and calls:
// previous step's exit(stage, state, ctx) (if defined)
// new step's enter(stage, state, ctx)
// enter() is also re-called with ctx.resize = true after a resize (then the stage snaps), and with
// ctx.refresh = true after a save file is opened. So enter() must be idempotent: compute the whole
// scene from stage.geom + state every time.
//
// Tabs: chapters are grouped into panels by route ("story", "plan", "how/<slug>"; AE.routeOf). Only the
// panel of the current route is displayed (AE.route shows it), so the observer only ever sees its steps.
// The core adds, per chapter: the kicker (numbered within its panel), the lesson line at the end of the
// last card, "Make your plan" at the end of a deep dive, and the disclaimer (under the first heading + line) on the first card of every
// panel except the story (C0 carries its own). The story panel ends with a hand-off step to #plan.
//
// Public:
// AE.steps.build() (boot) render chapters into #ae-story
// AE.steps.start() (boot) begin observing
// AE.steps.refresh() re-enter the active step (e.g. after a state change a scene depends on)
// AE.steps.current() { chapter, index, global } | null
// AE.steps.onChange(fn) fn({ chapter, index, global }) whenever the active step changes
// AE.steps.goToChapter(id) scroll a chapter's first step into view
// AE.steps.chapters(route?) registered chapter defs in order (optionally only one route's)
// AE.steps.show(route) (AE.route) display that route's panel, hide the others
// AE.steps.sync({ force }) (AE.route) activate the step at the line in the shown panel
let flat = []; // [{ def, step, index, el, card, section, global, entered }]
let active = -1;
const changeSubs = new Set();
let io = null;
const sorted = () => AE._chapters.slice().sort((a, b) => a.order - b.order);
const pad2 = (n) => String(n).padStart(2, "0");
// "01 · Kentucky's scoreboard": numbered within its panel (the story's cold open is 00), so the
// story reads 01–05 and the plan 01–02. A deep dive reads "How they win · Sportsbooks".
function kickerText(def) {
if (def.tab === "how") return `How they win · ${AE.esc(def.how.label)}`;
const list = sorted().filter((c) => c.tab === def.tab);
const n = list.indexOf(def) + (def.tab === "story" && list[0] && list[0].order === 0 ? 0 : 1);
return `${pad2(n)} · ${AE.esc(def.title)}`;
}
function kickerFor(def) {
if (def.kicker === false) return "";
const text = typeof def.kicker === "string" ? def.kicker : kickerText(def);
return `<div class="ae-kick">${text}</div>`;
}
const DISCLAIMER = "Educational use only. Not betting, tax or investment advice.";
// The story's last step: hand off to Your Plan.
const HANDOFF = {
id: "handoff", order: 99, title: "Now make a plan", tab: "story", how: null, sources: [], kicker: false,
steps: [{
wide: true,
className: "ae-handoff",
aria: "End of the story. Next: make a plan.",
html: `<div class="ae-kick">Next</div><h2>Now make a plan.</h2><p>Set a betting budget, point the rest at a savings goal, and pick one rule you’ll keep. About two minutes.</p><button type="button" class="ae-go ae-go--big" data-ae-go="#plan">Make your plan <span aria-hidden="true">→</span></button>`,
enter(stage) { stage.clear(); },
}],
};
const panels = new Map(); // route -> panel element
function panelFor(root, route) {
let p = panels.get(route);
if (!p) {
p = document.createElement("div");
p.className = "ae-panel";
p.dataset.route = route;
p.hidden = true;
root.appendChild(p);
panels.set(route, p);
}
return p;
}
function build() {
const root = document.getElementById("ae-story");
root.textContent = "";
flat = [];
panels.clear();
// panel order in the DOM: story, plan, then each deep dive (chapter order)
panelFor(root, "story"); panelFor(root, "plan");
const defs = sorted();
const all = defs.filter((d) => d.tab === "story").concat([HANDOFF], defs.filter((d) => d.tab !== "story"));
const firstOf = new Set();
for (const def of all) {
const route = AE.routeOf(def);
const panel = panelFor(root, route);
const isFirst = !panel.childElementCount && route !== "story";
if (isFirst) firstOf.add(def);
const section = document.createElement("section");
section.className = "ae-chapter";
section.id = def.id;
section.dataset.chapter = def.id;
section.setAttribute("aria-label", def.title);
const howAt = def.drawer ? (def.drawer.step != null ? def.drawer.step : def.steps.length - 1) : -1;
def.steps.forEach((step, index) => {
const el = document.createElement("div");
el.className = "ae-step" + (index === 0 ? " is-chapter-start" : "") + (step.wide ? " is-wide" : "") + (step.className ? " " + step.className : "");
el.dataset.chapter = def.id;
el.dataset.index = String(index);
el.dataset.step = String(flat.length);
const card = document.createElement("div");
card.className = "ae-card";
let html = (index === 0 ? kickerFor(def) : "") + (step.html || "");
card.innerHTML = html;
if (index === howAt) {
// "How this works" goes in a [data-ae-how] placeholder if the card has one, else at the end.
const how = AE.h(`<button type="button" class="ae-how" data-ae-drawer="${def.id}">How this works</button>`);
const slot = card.querySelector("[data-ae-how]");
if (slot) slot.replaceWith(how); else card.appendChild(how);
}
if (index === 0 && isFirst) {
// right under the headline's first line of copy, so it's on the first screen even when the card is long
const disc = AE.h(`<p class="ae-disclaimer ae-panel-disclaimer">${DISCLAIMER}</p>`);
const head = card.querySelector(":scope > h1, :scope > h2");
let anchor = head;
if (head && head.nextElementSibling && head.nextElementSibling.tagName === "P") anchor = head.nextElementSibling;
if (anchor) anchor.after(disc); else card.appendChild(disc);
}
if (index === def.steps.length - 1) {
if (typeof def.lesson === "string" && def.lesson.trim()) {
card.appendChild(AE.h(`<p class="ae-lesson"><span class="ae-lesson-k">The money lesson</span><span class="ae-lesson-t">${AE.esc(def.lesson.trim())}</span></p>`));
}
if (def.tab === "how") card.appendChild(AE.h(`<p class="ae-go-row"><button type="button" class="ae-go" data-ae-go="#plan">Make your plan <span aria-hidden="true">→</span></button></p>`));
}
el.appendChild(card);
section.appendChild(el);
flat.push({ def, step, index, el, card, section, route, global: flat.length, entered: false });
});
panel.appendChild(section);
}
// the first step of every panel shows at once, no fade-in
for (const p of panels.values()) { const st = p.querySelector(".ae-step"); if (st) st.classList.add("is-active"); }
// chapter init hooks (wire controls inside cards, subscribe to state)
for (const def of defs) {
if (typeof def.init !== "function") continue;
const items = flat.filter((f) => f.def === def);
try {
def.init({ el: items[0].section, cards: items.map((f) => f.card), state: AE.state, stage: AE.stage, chapter: def });
} catch (e) { console.error(`[About Even] ${def.id}.init failed`, e); }
}
}
function ctxFor(f, extra) {
return { chapter: f.def, index: f.index, card: f.card, section: f.section, global: f.global, first: !f.entered, ...extra };
}
function runEnter(f, extra) {
const stage = AE.stage;
stage.resetAmbience();
stage.halo(0);
stage.clearLayer();
stage.label(f.step.aria || "");
if (typeof f.step.enter === "function") {
try { f.step.enter(stage, AE.state.get(), ctxFor(f, extra)); }
catch (e) { console.error(`[About Even] ${f.def.id} step ${f.index} enter failed`, e); }
} else {
stage.clear();
}
f.entered = true;
}
// ---------- phone card sheet ----------
// On a phone each card sticks at the bottom as a sheet. A card taller than the default 204px sticks
// higher (its own --ae-sheet), and the stage's drawing area shrinks to stay above it, so graphics
// never sit under the text. Desktop: no sheet.
const isMobile = () => window.innerWidth < 820;
function sheetFor(f) {
if (f.step.wide) return AE.stage.SHEET_MIN;
const max = Math.round(window.innerHeight * 0.55);
return Math.min(max, Math.max(AE.stage.SHEET_MIN, Math.ceil(f.card.offsetHeight) + 14));
}
function syncSheet(f) {
if (!isMobile() || f.step.wide) { f.sheet = 0; f.card.style.removeProperty("--ae-sheet"); return; }
f.sheet = sheetFor(f);
f.card.style.setProperty("--ae-sheet", f.sheet + "px");
}
function applySheet(f) {
return AE.stage.setSheet ? AE.stage.setSheet(f && f.sheet ? f.sheet : AE.stage.SHEET_MIN || 204) : false;
}
let ro = null;
function watchSheets() {
flat.forEach(syncSheet);
if (ro || typeof ResizeObserver !== "function") return;
ro = new ResizeObserver((entries) => {
if (!isMobile()) return;
let activeChanged = false;
for (const e of entries) {
const f = flat.find((x) => x.card === e.target);
if (!f) continue;
const before = f.sheet;
syncSheet(f);
if (f.global === active && Math.abs((f.sheet || 0) - (before || 0)) >= 4) activeChanged = true;
}
if (activeChanged && applySheet(flat[active])) runEnter(flat[active], { dir: 0, resize: true, refresh: false });
});
flat.forEach((f) => ro.observe(f.card));
}
function goTo(i) {
if (i === active || !flat[i]) return;
const prev = flat[active];
const dir = i > active ? 1 : -1;
if (prev && typeof prev.step.exit === "function") {
try { prev.step.exit(AE.stage, AE.state.get(), ctxFor(prev, { dir })); }
catch (e) { console.error(`[About Even] ${prev.def.id} step ${prev.index} exit failed`, e); }
}
active = i;
flat.forEach((f, n) => f.el.classList.toggle("is-active", n === i));
if (isMobile()) applySheet(flat[i]);
runEnter(flat[i], { dir, resize: false, refresh: false });
const cur = current();
for (const fn of changeSubs) { try { fn(cur); } catch (e) { console.error(e); } }
}
function setupIO() {
if (io) io.disconnect();
if (!flat.length) return;
const vh = window.innerHeight, mobile = window.innerWidth < 820;
const line = mobile ? vh - 230 : vh * 0.5;
io = new IntersectionObserver(
(es) => { for (const e of es) if (e.isIntersecting) goTo(+e.target.dataset.step); },
{ rootMargin: `${-Math.round(line)}px 0px ${-Math.round(vh - line - 2)}px 0px` }
);
flat.forEach((f) => io.observe(f.el));
}
function current() {
const f = flat[active];
return f ? { chapter: f.def.id, order: f.def.order, index: f.index, global: f.global, route: f.route } : null;
}
// ---------- panels (driven by AE.route) ----------
let shown = null;
function show(route) {
if (!panels.has(route)) return false;
shown = route;
for (const [r, p] of panels) p.hidden = r !== route;
return true;
}
const lineY = () => (isMobile() ? window.innerHeight - 230 : window.innerHeight * 0.5);
// Activate the step that crosses the activation line in the shown panel (the observer only reports
// changes, so after a panel swap or a scroll restore we pick it ourselves). force: re-enter even if
// it's already active (the stage was hidden or cleared meanwhile).
function sync(o = {}) {
if (!shown) return;
const line = lineY();
const mine = flat.filter((f) => f.route === shown);
if (!mine.length) return;
let pick = mine[0];
for (const f of mine) { const r = f.el.getBoundingClientRect(); if (r.top <= line) pick = f; else break; }
if (pick.global === active) {
if (o.force) { if (isMobile()) applySheet(pick); runEnter(pick, { dir: 0, resize: true, refresh: false }); AE.stage.snap(); }
return;
}
goTo(pick.global);
}
function refresh(extra = { refresh: true }) {
const f = flat[active];
if (!f) return;
runEnter(f, { dir: 0, resize: false, refresh: false, ...extra });
}
function start() {
setupIO();
watchSheets();
if (isMobile() && flat[active]) { if (applySheet(flat[active])) runEnter(flat[active], { dir: 0, resize: true, refresh: false }); }
AE.stage.on("resize", () => {
setupIO();
if (!AE.stage.geom || AE.stage.geom.W < 2) return; // story stage hidden (a page tab is open); AE.route re-syncs on return
flat.forEach(syncSheet);
const f = flat[active];
if (isMobile()) applySheet(f);
if (f) { runEnter(f, { dir: 0, resize: true, refresh: false }); AE.stage.snap(); }
});
// After a save file is opened, re-render step HTML that depends on state, then the active scene.
AE.state.subscribe((s, changed, meta) => { if (meta && meta.replace) refresh({ refresh: true }); });
// Deep links (#c4, #plan, …) are handled by AE.route.
}
function goToChapter(id, o = {}) {
const f = flat.find((x) => x.def.id === id && x.index === 0);
if (!f) return false;
if (shown !== f.route && AE.route) { AE.route.go("#" + id); return true; } // AE.route switches the tab, then scrolls here
const top = f.el.getBoundingClientRect().top + window.scrollY;
const vh = window.innerHeight, mobile = window.innerWidth < 820;
// land the first step on the activation line
const y = Math.max(0, top - (mobile ? vh * 0.1 : vh * 0.25));
window.scrollTo({ top: y, behavior: o.instant || AE.reduced ? "auto" : "smooth" });
return true;
}
AE.steps = {
build,
start,
refresh,
current,
goToChapter,
show,
sync,
shown: () => shown,
routes: () => [...panels.keys()],
chapters: (route) => (route ? sorted().filter((d) => AE.routeOf(d) === route) : sorted()),
onChange(fn) { changeSubs.add(fn); return () => changeSubs.delete(fn); },
_flat: () => flat,
};
})(window.AE = window.AE || {});
/* ---- core/labs.js ---- */
;(function (AE) {
"use strict";
// labs.js: the full-screen lab shell and the #lab/<id> overlay. The Labs tab page (#labs) lists them
// (pages.js); the old Explore menu is gone, and data-ae-explore / AE.labs.openMenu() now go to #labs.
//
// A lab registers with AE.lab({ id, title, chapter, blurb, mount(el, ctx), unmount?(el, ctx) }).
// mount(el, ctx): build the lab inside `el` (an empty full-screen body). ctx:
// ctx.state AE.state (get / set / merge / subscribe)
// ctx.subscribe(fn, keys?) like AE.state.subscribe, auto-removed when the lab closes
// ctx.onClose(fn) run fn when the lab closes (timers, listeners)
// ctx.stage(container, opts?) a private AE.Stage in `container`, destroyed on close
// ctx.close() close the lab
// unmount(el, ctx): optional; the shell empties `el` and runs the cleanups either way.
//
// AE.labs.open(id) / close() / openMenu() / list() / current() / route()
// Any element with data-ae-lab="<id>" opens that lab; data-ae-explore goes to the Labs tab.
// #lab/<id> and #labs/<id> both open a lab. It sits over the tab you came from, and closing it
// returns there (AE.route owns hashchange and calls AE.labs.route()).
let shell, bodyEl, titleEl, kickEl, cur = null, pushed = false;
function ensure() {
if (shell) return;
shell = AE.h(`<div class="ae-lab" role="dialog" aria-modal="true" aria-labelledby="ae-lab-title" hidden>
<header class="ae-lab-head">
<div class="ae-lab-titles"><div class="ae-kick ae-lab-kick"></div><h2 id="ae-lab-title" class="ae-lab-title"></h2></div>
<button type="button" class="ae-close" data-ae-lab-close>Back</button>
</header>
<div class="ae-lab-body"></div>
</div>`);
bodyEl = shell.querySelector(".ae-lab-body");
titleEl = shell.querySelector(".ae-lab-title");
kickEl = shell.querySelector(".ae-lab-kick");
document.body.appendChild(shell);
shell.querySelector("[data-ae-lab-close]").addEventListener("click", () => close());
shell.addEventListener("keydown", (e) => { if (e.key === "Escape" && !AE.drawer.isOpen()) close(); });
}
const list = () => AE._labs.slice().sort((a, b) => {
const oa = chapterOf(a), ob = chapterOf(b);
return (oa ? oa.order : 99) - (ob ? ob.order : 99) || String(a.title).localeCompare(String(b.title));
});
const chapterOf = (lab) => AE._chapters.find((c) => c.id === lab.chapter) || AE.SLOTS.find((s) => s.id === lab.chapter) || null;
function mountLab(lab) {
ensure();
if (cur) unmountLab();
const ch = chapterOf(lab);
kickEl.innerHTML = `Lab${ch ? ` · from ${AE.esc(ch.title)}` : ""}`;
titleEl.textContent = lab.title;
const under = AE.route ? AE.route.current().tab : "story";
shell.querySelector("[data-ae-lab-close]").textContent = BACK[under] || "Back";
shell.dataset.lab = lab.id;
bodyEl.textContent = "";
bodyEl.dataset.lab = lab.id;
const cleanups = [];
const ctx = {
state: AE.state,
subscribe(fn, keys) { const off = AE.state.subscribe(fn, keys); cleanups.push(off); return off; },
onClose(fn) { cleanups.push(fn); },
stage(container, opts) { const s = AE.Stage(container, opts); cleanups.push(() => s.destroy()); return s; },
close: () => close(),
};
cur = { lab, ctx, cleanups };
AE.drawer.close();
shell.hidden = false;
document.documentElement.classList.add("ae-lab-open");
if (AE.stage) AE.stage.pause();
requestAnimationFrame(() => shell.classList.add("is-open"));
try { lab.mount(bodyEl, ctx); } catch (e) { console.error(`[About Even] lab ${lab.id} mount failed`, e); bodyEl.innerHTML = `<p class="ae-lab-error">This lab hit an error. The story still works.</p>`; }
// B5: every lab opens at its top (the body element is reused, so it kept the last lab's scroll).
bodyEl.scrollTop = 0;
requestAnimationFrame(() => { if (cur && cur.lab === lab) bodyEl.scrollTop = 0; });
shell.querySelector("[data-ae-lab-close]").focus({ preventScroll: true });
}
function unmountLab() {
if (!cur) return;
const { lab, ctx, cleanups } = cur;
try { if (typeof lab.unmount === "function") lab.unmount(bodyEl, ctx); } catch (e) { console.error(e); }
for (const fn of cleanups) { try { fn(); } catch (e) { console.error(e); } }
bodyEl.textContent = "";
cur = null;
}
const BACK = { story: "Back to the story", plan: "Back to your plan", how: "Back to How they win", labs: "Back to labs" };
const LAB_HASH = /^#labs?\//;
function hideShell() {
unmountLab();
if (!shell) return;
shell.classList.remove("is-open");
shell.hidden = true;
document.documentElement.classList.remove("ae-lab-open");
const scrolly = document.querySelector(".ae-scrolly");
if (AE.stage && !(scrolly && scrolly.hidden)) AE.stage.resume(); // a page tab keeps the story stage paused
}
// The hash of the tab under the lab ("" for the story, so its URL stays clean).
function underHash() {
const r = AE.route ? AE.route.current().route : "story";
return r === "story" ? location.pathname + location.search : "#" + r;
}
function open(id) {
const lab = AE._labs.find((l) => l.id === id);
if (!lab) { AE.ui.toast("That lab isn't in this build yet."); return false; }
if (location.hash === `#lab/${id}` || location.hash === `#labs/${id}`) mountLab(lab);
else if (cur && LAB_HASH.test(location.hash)) {
// switching from one lab to another: replace the entry, so "Back to the story" goes to the story
try { history.replaceState(null, "", `#lab/${id}`); mountLab(lab); } catch { location.hash = `lab/${id}`; }
} else { pushed = true; location.hash = `lab/${id}`; } // hashchange mounts it
return true;
}
// o.replaceWith: close without going Back, replacing the lab's history entry with that hash
// (AE.route.go uses it when a link inside a lab goes to a tab).
function close(o = {}) {
if (!cur && (!shell || shell.hidden)) return;
if (o.replaceWith != null) {
pushed = false;
hideShell();
try { history.replaceState(null, "", o.replaceWith); } catch {}
return;
}
if (pushed && LAB_HASH.test(location.hash)) { pushed = false; history.back(); return; } // hashchange hides
hideShell();
if (LAB_HASH.test(location.hash)) {
try { history.replaceState(null, "", underHash()); } catch { location.hash = ""; }
}
}
function route() {
const m = /^#labs?\/([a-z0-9-]+)$/.exec(location.hash);
if (m) {
const lab = AE._labs.find((l) => l.id === m[1]);
if (lab && (!cur || cur.lab.id !== lab.id)) mountLab(lab);
} else if (cur) {
pushed = false;
hideShell();
}
}
// The Explore menu became the Labs tab. Kept as an alias so old calls and data-ae-explore still work.
function openMenu() { return AE.route ? AE.route.go("#labs") : false; }
document.addEventListener("click", (e) => {
const t = e.target.closest("[data-ae-lab], [data-ae-explore]");
if (!t) return;
e.preventDefault();
if (t.hasAttribute("data-ae-explore")) return openMenu();
open(t.getAttribute("data-ae-lab"));
});
AE.labs = {
open, close, openMenu, list, route, chapterOf,
current: () => (cur ? cur.lab.id : null),
_changed() { /* menu renders on open; nothing cached */ },
};
})(window.AE = window.AE || {});
/* ---- core/pages.js ---- */
;(function (AE) {
"use strict";
// pages.js: the two tab pages that aren't scroll stories.
// #how How They Win: the deep dives (chapters with tab "how"), one row each, with their hook line.
// #labs Labs: every registered lab, grouped by topic (replaces the old Explore menu).
// Both are rendered on display (labs can register late) into <section class="ae-page" data-page="…">.
//
// AE.pages.render(route)
// AE.pages.LAB_GROUPS [{ title, ids }] topic order for the Labs page; unknown ids go under "More"
const DISCLAIMER = "Educational use only. Not betting, tax or investment advice.";
const LAB_GROUPS = [
{ title: "Your money", ids: ["bet-log", "tax-check", "cover-charge"] },
{ title: "Parlays and luck", ids: ["parlay-xray", "thousand-seasons"] },
{ title: "How the house wins", ids: ["run-the-book", "trade-or-bet", "track-takeout"] },
{ title: "Kentucky's numbers", ids: ["data-room"] },
];
const pad2 = (n) => String(n).padStart(2, "0");
function howHTML() {
const dives = AE.steps.chapters().filter((c) => c.tab === "how");
const rows = dives.map((c, i) => {
const href = `#how/${c.how.slug}`;
return `<li><a class="ae-dotrow" href="${href}" data-ae-go="${href}">
<span class="ae-dot" aria-hidden="true"></span>
<span class="ae-dotrow-body">
<span class="ae-dotrow-k">${pad2(i + 1)} · ${AE.esc(c.how.label)}</span>
<span class="ae-dotrow-t">${AE.esc(c.title)}</span>
${c.how.blurb ? `<span class="ae-dotrow-d">${AE.esc(c.how.blurb)}</span>` : ""}
<span class="ae-dotrow-go">Read · about a minute <span aria-hidden="true">→</span></span>
</span></a></li>`;
}).join("");
return `<div class="ae-page-inner">
<div class="ae-kick">How they win</div>
<h1 id="ae-page-how-title">Three ways the house gets paid.</h1>
<p class="ae-page-lede">A sportsbook, a prediction market and a racetrack. Different names, the same idea: their cut comes first. Each one takes about a minute.</p>
<p class="ae-disclaimer ae-page-disclaimer">${DISCLAIMER}</p>
${rows ? `<ol class="ae-dotlist">${rows}</ol>` : `<p class="ae-page-lede">None of the deep dives are in this build.</p>`}
<p class="ae-page-foot"><button type="button" class="ae-go" data-ae-go="#plan">Make your plan <span aria-hidden="true">→</span></button></p>
</div>`;
}
function labsHTML() {
const labs = AE.labs.list();
const used = new Set();
const groups = LAB_GROUPS.map((g) => {
const items = g.ids.map((id) => labs.find((l) => l.id === id)).filter(Boolean);
items.forEach((l) => used.add(l.id));
return { title: g.title, items };
});
const rest = labs.filter((l) => !used.has(l.id));
if (rest.length) groups.push({ title: "More", items: rest });
const body = groups.filter((g) => g.items.length).map((g) => `<section class="ae-labgroup">
<h2 class="ae-labgroup-h">${AE.esc(g.title)}</h2>
<ul class="ae-dotlist ae-dotlist--labs">${g.items.map((l) => {
const ch = AE.labs.chapterOf(l);
return `<li><button type="button" class="ae-dotrow" data-ae-lab="${AE.esc(l.id)}">
<span class="ae-dot" aria-hidden="true"></span>
<span class="ae-dotrow-body">
<span class="ae-dotrow-t">${AE.esc(l.title)}</span>
${l.blurb ? `<span class="ae-dotrow-d">${AE.esc(l.blurb)}</span>` : ""}
${ch ? `<span class="ae-dotrow-k">From ${AE.esc(ch.title)}</span>` : ""}
</span></button></li>`;
}).join("")}</ul></section>`).join("");
return `<div class="ae-page-inner">
<div class="ae-kick">Labs</div>
<h1 id="ae-page-labs-title">The same math, every input open.</h1>
<p class="ae-page-lede">Each lab is a chapter’s engine, full screen. Put in your own numbers.</p>
<p class="ae-disclaimer ae-page-disclaimer">${DISCLAIMER}</p>
${body || `<p class="ae-page-lede">No labs are in this build yet.</p>`}
</div>`;
}
function render(route) {
const el = document.querySelector(`.ae-page[data-page="${route}"]`);
if (!el) return;
el.innerHTML = route === "how" ? howHTML() : route === "labs" ? labsHTML() : "";
}
AE.pages = { render, LAB_GROUPS };
})(window.AE = window.AE || {});
/* ---- core/route.js ---- */
;(function (AE) {
"use strict";
// route.js: the four tabs and the hash router.
//
// Routes (location.hash):
// #story (default, also an empty hash) the guided story: chapters with tab "story" + the hand-off
// #plan Your Plan: chapters with tab "plan" (C9, C10), in order
// #how How They Win index page (a list of the deep dives)
// #how/<slug> one deep dive: the chapter with how.slug === slug
// #labs the Labs page (every lab, grouped by topic)
// #lab/<id> (also #labs/<id>) a lab, full screen, over the tab you came from (labs.js)
// #c4 a chapter: switches to its tab and scrolls to it
//
// AE.route.go("#plan") navigate (pushes a history entry; Back/Forward work)
// AE.route.current() { route: "story" | "plan" | "how" | "how/<slug>" | "labs", tab, slug }
// AE.route.tab() the active tab id
// AE.route.on(fn) fn(current) after every route change; returns an unsubscribe
// <a href="#plan"> or any element with data-ae-go="#plan" navigates (buttons included).
//
// Each route keeps its own scroll position (window scroll is saved per route and restored on return).
// Story-like routes (story, plan, how/<slug>) share the one sticky stage; page routes (how, labs) hide it.
const PAGE_ROUTES = new Set(["how", "labs"]);
const positions = new Map(); // route -> scrollY
const subs = new Set();
let cur = null; // current route string
let base = "story"; // the tab route under a lab
let pendingChapter = null;
function tabOf(route) {
if (route === "plan") return "plan";
if (route === "labs") return "labs";
if (route === "how" || /^how\//.test(route)) return "how";
return "story";
}
// Parse a hash into { route, lab?, chapter? }. Unknown hashes fall back to the story.
function parse(hash) {
const h = String(hash || "").replace(/^#/, "");
if (!h || h === "story") return { route: "story" };
if (h === "plan" || h === "how" || h === "labs") return { route: h };
let m = /^how\/([a-z0-9-]+)$/.exec(h);
if (m) return AE.steps.routes().includes(h) ? { route: h } : { route: "how" };
m = /^labs?\/([a-z0-9-]+)$/.exec(h);
if (m) return { lab: m[1] };
const def = AE._chapters.find((c) => c.id === h);
if (def) return { route: AE.routeOf(def), chapter: def.id };
return { route: "story" };
}
function current() {
const route = cur || "story";
const m = /^how\/(.+)$/.exec(route);
return { route, tab: tabOf(route), slug: m ? m[1] : null };
}
function scrollToY(y) {
window.scrollTo({ top: y, left: 0, behavior: "instant" });
}
// Show a route (no history change). The heart of the router.
function apply(route, o = {}) {
const prev = cur;
if (prev != null) positions.set(prev, window.scrollY);
cur = route;
if (!PAGE_ROUTES.has(route)) base = route;
const page = PAGE_ROUTES.has(route);
const scrolly = document.querySelector(".ae-scrolly");
const wasPage = prev == null || PAGE_ROUTES.has(prev) || (scrolly && scrolly.hidden);
document.documentElement.dataset.route = route;
document.documentElement.dataset.tab = tabOf(route);
for (const p of AE.$$(".ae-page")) p.hidden = p.dataset.page !== route;
if (scrolly) scrolly.hidden = page;
if (page) {
if (AE.stage) AE.stage.pause();
AE.pages.render(route);
} else {
AE.steps.show(route);
if (AE.stage) {
AE.stage.resume();
if (wasPage) AE.stage.measure();
}
}
const y = o.chapter ? null : positions.get(route) || 0;
if (y != null) scrollToY(y);
if (!page) {
if (o.chapter) AE.steps.goToChapter(o.chapter, { instant: true });
AE.steps.sync({ force: wasPage || prev !== route });
}
const c = current();
for (const fn of subs) { try { fn(c); } catch (e) { console.error(e); } }
}
function route() {
const p = parse(location.hash);
if (p.lab) {
// a lab opens over the tab you were on; opened directly (fresh page), it sits over Labs
if (cur == null) apply("labs");
AE.labs.route();
return;
}
if (AE.labs.current()) AE.labs.route(); // leaving a lab via Back: labs.js hides it
if (p.route !== cur || p.chapter) apply(p.route, { chapter: p.chapter });
}
function go(target) {
let h = String(target || "#story").trim();
if (!h.startsWith("#")) h = "#" + h;
const p = parse(h);
if (p.lab) return AE.labs.open(p.lab);
if (AE.drawer.isOpen()) AE.drawer.close();
if (AE.labs.current()) { AE.labs.close({ replaceWith: h }); route(); return true; } // a link inside a lab
if (location.hash === h || (h === "#story" && !location.hash)) {
// already there: a second tap on the current tab goes back to its top
if (p.chapter) AE.steps.goToChapter(p.chapter);
else if (p.route === cur) window.scrollTo({ top: 0, behavior: AE.reduced ? "auto" : "smooth" });
else apply(p.route);
return true;
}
location.hash = h; // hashchange -> route()
return true;
}
// Remember each route's scroll as the reader moves (so Back/Forward and tab taps restore it).
let st = 0;
addEventListener("scroll", () => {
if (cur == null || AE.labs.current()) return;
cancelAnimationFrame(st);
st = requestAnimationFrame(() => positions.set(cur, window.scrollY));
}, { passive: true });
addEventListener("hashchange", route);
document.addEventListener("click", (e) => {
const t = e.target.closest("[data-ae-go]");
if (!t) return;
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button > 0) return; // new tab etc. for <a href>
e.preventDefault();
go(t.getAttribute("data-ae-go"));
});
function start() {
try { history.scrollRestoration = "manual"; } catch {}
route();
}
AE.route = {
go,
current,
tab: () => current().tab,
base: () => base,
on(fn) { subs.add(fn); return () => subs.delete(fn); },
start,
parse,
tabOf,
_positions: positions,
};
})(window.AE = window.AE || {});
/* ---- core/shell.js ---- */
;(function (AE) {
"use strict";
// shell.js: header (wordmark, the four tabs, the current tab's chapter ticks, Save / Open), footer
// credits, shortcuts.
// Tabs: plain links (#story, #plan, #how, #labs) so they work with the keyboard, open in a new tab,
// and show the route on hover. AE.route handles the click (data-ae-go) and marks the active one.
function renderTabs() {
const nav = document.getElementById("ae-tabs");
if (!nav) return;
nav.innerHTML = AE.TABS.map((t) => `<a class="ae-tab" href="${t.hash}" data-ae-go="${t.hash}" data-tab="${t.id}"><span class="ae-tab-l">${AE.esc(t.label)}</span><span class="ae-tab-s">${AE.esc(t.short)}</span></a>`).join("");
}
function markTab(c) {
for (const a of AE.$$(".ae-tab")) {
const on = a.dataset.tab === c.tab;
a.classList.toggle("is-active", on);
if (on) a.setAttribute("aria-current", "page"); else a.removeAttribute("aria-current");
}
}
// Ticks: one per chapter in the current route's panel (story: C0 … C8 and nothing else; plan: C9, C10).
// A one-chapter deep dive and the two pages show none.
let tickRoute = null;
function renderTicks(route) {
const nav = document.getElementById("ae-ticks");
const r = route || (AE.route ? AE.route.current().route : "story");
tickRoute = r;
nav.textContent = "";
const defs = AE.steps.chapters(r);
nav.hidden = defs.length < 2;
defs.forEach((def, i) => {
const b = document.createElement("button");
b.type = "button";
b.className = "ae-tick";
b.dataset.tick = def.id;
b.dataset.order = String(def.order);
b.setAttribute("aria-label", `${i + 1} of ${defs.length}: ${def.title}`);
b.title = def.title;
b.addEventListener("click", () => { AE.labs.close(); AE.drawer.close(); AE.steps.goToChapter(def.id); });
nav.appendChild(b);
});
markTicks(AE.steps.current());
}
function markTicks(cur) {
const order = cur && cur.route === tickRoute ? cur.order : -1;
for (const t of AE.$$(".ae-tick")) {
const o = +t.dataset.order;
t.classList.toggle("is-current", o === order);
t.classList.toggle("is-done", o < order);
if (o === order) t.setAttribute("aria-current", "step"); else t.removeAttribute("aria-current");
}
}
function renderCredits() {
const el = document.getElementById("ae-credits");
if (!el) return;
const fonts = AE._credits.filter((c) => c.kind === "font");
const code = AE._credits.filter((c) => c.kind !== "font");
let html = `<span class="ae-credit-k">Fonts</span> ${fonts.map((c) => `${AE.esc(c.name)}`).join(", ")} (${AE.esc(fonts[0] ? fonts[0].license : "")}), embedded so the page works offline.`;
if (code.length) html += ` <span class="ae-credit-k">Code</span> ${code.map((c) => `${AE.esc(c.name)}${c.by ? ` by ${AE.esc(c.by)}` : ""} (${AE.esc(c.license)})`).join("; ")}.`;
html += ` <span class="ae-credit-k">Everything else</span> original work, © 2026 Ryan Beam, MIT License.`;
el.innerHTML = html;
}
function init() {
renderTabs();
renderCredits();
AE.steps.onChange(markTicks);
AE.route.on((c) => { markTab(c); renderTicks(c.route); });
const save = document.getElementById("ae-save");
save.addEventListener("click", () => AE.file.save());
document.getElementById("ae-open").addEventListener("click", () => AE.file.openPicker());
AE.state.onDirty((d) => {
save.classList.toggle("is-dirty", d);
save.setAttribute("aria-label", d ? "Save (you have unsaved changes)" : "Save");
});
addEventListener("keydown", (e) => {
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "s") { e.preventDefault(); AE.file.save(); }
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "o") { e.preventDefault(); AE.file.openPicker(); }
if (e.key === "Escape" && AE.drawer.isOpen()) AE.drawer.close();
});
}
AE.shell = { init, renderTabs, renderTicks, renderCredits };
})(window.AE = window.AE || {});
/* ---- chapters/c00-cold-open.js ---- */
;(function (AE) {
"use strict";
try {
// C0. Cold open (spec §3 C0). Reference chapter: card controls + state.
// Data out: state.guess ∈ {"up","even","down","none"}; null (scrolled past) is read as "none".
// Desktop: a dim preview of C1's 1,000-dot field sits on the right (same sunflower seed as C1, so the
// same dots become C1's cloud) and brightens once he answers. Phone: no dots behind the hero text.
AE.source({
id: "HARM-31",
label: "Auer & Griffiths (2017), J Gambl Stud 33:795–806",
url: "https://link.springer.com/content/pdf/10.1007/s10899-016-9648-0.pdf",
note: "1,335 Norwegian online gamblers: underestimated losses, overestimated wins; bigger losers misjudged more.",
});
AE.source({
id: "HARM-40",
label: "Pew Research Center (Oct. 2, 2025): 22% of U.S. adults bet money on sports in the past year (19% in 2022); 31% of adults 18–29",
url: "https://www.pewresearch.org/short-reads/2025/10/02/americans-increasingly-see-legal-sports-betting-as-a-bad-thing-for-society-and-sports/",
note: "Survey of U.S. adults, July 2025. All of the rise since 2022 came from online betting (6% to 10%).",
});
const FIELD_N = 1000;
const fieldUnit = AE.layout.sunflower(FIELD_N, 2025); // = C1's cloud layout
function field(stage, state, quick) {
const { W, H, mobile, safe } = stage.geom;
if (mobile) { stage.clear(); return; }
const answered = !!state.guess;
const rad = Math.min(W * 0.2, (safe.bottom - safe.top) * 0.4), cx = W * 0.74, cy = (safe.top + safe.bottom) / 2 + 10;
const r = Math.max(1.4, rad * 0.0165);
stage.halo(answered ? 0.5 : 0);
stage.set(FIELD_N, (i) => {
const d = Math.hypot(fieldUnit.x[i], fieldUnit.y[i]); // ripple outward from the centre on answer
return { x: cx + fieldUnit.x[i] * rad, y: cy + fieldUnit.y[i] * rad, r, color: "bone",
alpha: answered ? 0.34 + stage.rnd[i] * 0.12 : 0.1 + stage.rnd[i] * 0.06,
delay: quick ? d * 420 : stage.rnd[i] * 900, dur: quick ? 520 : 1600 };
});
stage.overlays([]);
stage.drift(0.5);
}
const ACK = {
up: "Noted. Let’s check it against the math.",
even: "Noted. Let’s see what “about even” looks like.",
down: "Noted. Let’s see where it went.",
none: "Fair. Here’s how the math works.",
};
AE.chapter({
id: "c0",
order: 0,
title: "Cold open",
kicker: "About Even · Kentucky",
sources: ["HARM-40", "HARM-31"],
steps: [
{
wide: true,
aria: "A dim field of 1,000 dots, a preview of Kentucky's year of betting. It brightens when you answer.",
html: `
<p class="c0-lede">More than 1 in 5 American adults bet on sports last year. Here’s the real money math of betting in Kentucky, then a plan.</p>
<h1>Be honest. Up, down, or about even?</h1>
<p>Think about the last year of betting: sportsbook apps, parlays, the Derby. Add up every dollar you put in and every payout you cashed. Are you ahead, behind, or close to zero? Best guess.</p>
<div class="ae-slot c0-choices" data-slot="choices"></div>
<button type="button" class="ae-quiet c0-none" data-slot="none" aria-pressed="false">I don’t bet</button>
<p class="ae-ack c0-ack" aria-live="polite"></p>
<p class="ae-disclaimer c0-disclaimer">Educational use only. Not betting, tax or investment advice.</p>
<span data-ae-how></span>
<div class="ae-cue" aria-hidden="true"><i></i>Scroll</div>`,
enter(stage, state) {
field(stage, state, false);
},
},
],
drawer: {
title: "Why we ask first",
html: `
<div><span class="ae-label">More than 1 in 5</span>22% of U.S. adults say they bet money on sports in the past year, up from 19% in 2022. Among adults 18 to 29 it’s 31% (Pew Research Center, 2025).</div>
<div><span class="ae-label">Memory keeps the wins</span>In a study of 1,335 online gamblers in Norway, players tended to underestimate their losses and overestimate their wins, and the players who lost the most misjudged the most (Auer & Griffiths, 2017).</div>
<div><span class="ae-label">What we do with your answer</span>Nothing leaves this page. We hold your answer and show it again next to the math in <em>Your ledger</em>. Skip it and the story reads as “how it works.” Want the money part first? <a href="#plan" data-ae-go="#plan">Go straight to Your Plan</a>.</div>`,
},
init({ cards }) {
const card = cards[0];
const ack = card.querySelector(".c0-ack");
const noneBtn = card.querySelector('[data-slot="none"]');
const seg = AE.ui.segmented({
label: "Over the last year",
variant: "big",
value: AE.state.get().guess,
options: [
{ value: "up", label: "Up" },
{ value: "even", label: "About even" },
{ value: "down", label: "Down" },
],
onChange: (v) => AE.state.set({ guess: v }),
});
card.querySelector('[data-slot="choices"]').appendChild(seg.el);
noneBtn.addEventListener("click", () => AE.state.set({ guess: "none" }));
const paint = (s) => {
seg.set(s.guess);
noneBtn.setAttribute("aria-pressed", String(s.guess === "none"));
ack.textContent = s.guess ? ACK[s.guess] : "";
};
AE.state.subscribe(paint, ["guess"]);
paint(AE.state.get());
// Answering ignites the dot field (only while the cold open is the active step).
AE.state.subscribe((s) => {
const c = AE.steps.current();
if (c && c.chapter === "c0") field(AE.stage, s, true);
}, ["guess"]);
},
});
} catch (e) { console.error("[About Even] chapters/c00-cold-open.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c01-scoreboard.js ---- */
;(function (AE) {
"use strict";
try {
// C1. Kentucky's scoreboard (spec §3 C1). Reference chapter for dot scenes.
// 1,000 dots = $3M each (≈ $3.0B wagered, 2025). 110 turn red and drop into the books' pile
// (330.1 ÷ 3,000 × 1,000 = 110.03 → 110). Guess-then-reveal slider. Data out: state.guesses.c1.
// Never show a "paid back" dollar figure here: the regulator's three figures don't reconcile (MKT-05).
const KHRGC = "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf";
AE.source({ id: "MKT-01", label: "KHRGC 2025 Annual Report, p. 27: total sports wagering handle, “$3 billion”", url: KHRGC, note: "Printed rounded; the page doesn’t say calendar or fiscal year, so we say “2025, per the KHRGC annual report.”" });
AE.source({ id: "MKT-03", label: "KHRGC 2025 Annual Report, p. 27: adjusted gross revenue $330.1 million", url: KHRGC, note: "What the books kept after paying winners." });
AE.source({ id: "MKT-04", label: "Hold ≈ 11.0% (arithmetic: $330.1M ÷ $3.0B)", note: "Approximate, because the handle is printed rounded." });
AE.source({ id: "MKT-21", label: "KHRGC 2025 Annual Report, p. 27: excise tax 9.75% retail, 14.25% mobile, on adjusted gross revenue", url: KHRGC });
AE.source({ id: "MKT-23", label: "KHRGC 2025 Annual Report, p. 27: $40,706,409 to the Kentucky Permanent Pension Fund", url: KHRGC, note: "Period not stated on the page." });
AE.source({ id: "MKT-24", label: "KHRGC 2025 Annual Report, p. 27: $1,128,489 to the Problem Gambling Assistance Account", url: KHRGC, note: "Period not stated on the page." });
AE.source({ id: "MKT-25", label: "≈ $36 to pensions per $1 to problem gambling (arithmetic: $40.71M ÷ $1.13M)" });
AE.source({ id: "RACE-27", label: "KHRGC 2025 Annual Report: historical horse racing wagering $11.2 billion in 2025", url: KHRGC });
const N = 1000;
const HANDLE_M = 3000, KEPT_M = 330.1, PER_DOT_M = HANDLE_M / N; // $3M a dot
const KEPT = Math.round((KEPT_M / HANDLE_M) * N); // 110
const GUESS_DEFAULT = 0; // start empty so the guess is really his (a midpoint default anchors it)
// ---------- fixed dot identities (seeded, so every visit looks the same) ----------
const unit = AE.layout.sunflower(N, 2025);
const kept = new Uint8Array(N);
AE.math.shuffle([...Array(N).keys()], AE.math.rng(11)).slice(0, KEPT).forEach((i) => (kept[i] = 1));
// Guess tint order: the real kept dots first, then the rest. A guess above 110 tints all of them,
// so at the reveal the extra guessed dots turn green and the real 110 stay red.
const guessRank = new Int16Array(N);
{
const r = AE.math.rng(23);
const order = AE.math.shuffle([...Array(N).keys()].filter((i) => kept[i]), r).concat(AE.math.shuffle([...Array(N).keys()].filter((i) => !kept[i]), r));
order.forEach((id, rank) => (guessRank[id] = rank));
}
// Columns: paid dots stack left (cp columns), kept dots stack right (ck columns). Sorting by the
// cloud position keeps the cloud -> columns move spatially calm.
let cols = null;
function sortRows(list, c) {
list.sort((a, b) => unit.y[b] - unit.y[a]);
const out = [];
for (let i = 0; i < list.length; i += c) out.push(...list.slice(i, i + c).sort((a, b) => unit.x[a] - unit.x[b]));
return out;
}
function buildCols(cp, ck) {
const slot = new Int16Array(N);
sortRows([...Array(N).keys()].filter((i) => !kept[i]), cp).forEach((id, j) => (slot[id] = j));
const keptList = sortRows([...Array(N).keys()].filter((i) => kept[i]), ck);
keptList.forEach((id, j) => (slot[id] = j));
cols = { cp, ck, slot, top: keptList[keptList.length - 1] };
}
// ---------- geometry from the stage region ----------
function geom(stage) {
const { R, mobile } = stage.geom;
const cp = mobile ? 24 : 30, ck = mobile ? 8 : 10, gap = mobile ? 3 : 5;
const rowsMax = Math.max(Math.ceil((N - KEPT) / cp), Math.ceil(KEPT / ck));
const topPad = mobile ? 74 : 112, botPad = mobile ? 40 : 56;
const s = Math.min(R.w / (cp + gap + ck), (R.h - topPad - botPad) / rowsMax, 22);
const totalW = (cp + gap + ck) * s, x0 = R.x + (R.w - totalW) / 2;
const y0 = R.y + Math.max(0, (R.h - (topPad + rowsMax * s + botPad)) / 2);
const base = y0 + topPad + rowsMax * s;
let crad = s * Math.sqrt(N / Math.PI) * 1.04, cr = s * 0.36;
const maxR = Math.min(R.w, R.h) * 0.47;
if (crad > maxR) { cr *= maxR / crad; crad = maxR; }
if (!cols || cols.cp !== cp) buildCols(cp, ck);
return { R, mobile, cp, ck, gap, s, r: s * 0.36, x0, y0, base, px0: x0 + (cp + gap) * s, right: x0 + totalW, crad, cr, cx: R.x + R.w / 2, cy: R.y + R.h / 2 };
}
const cloudXY = (g, id) => ({ x: g.cx + unit.x[id] * g.crad, y: g.cy + unit.y[id] * g.crad });
function colXY(g, id) {
const j = cols.slot[id];
return kept[id]
? AE.layout.pile(j, { x0: g.px0, base: g.base, cols: g.ck, size: g.s })
: AE.layout.pile(j, { x0: g.x0, base: g.base, cols: g.cp, size: g.s });
}
// ---------- scenes ----------
function cloud(stage, g, colorOf) {
stage.set(N, (id) => {
const p = cloudXY(g, id), c = colorOf(id);
return { x: p.x, y: p.y, r: g.cr, color: c.color, alpha: c.alpha, delay: c.delay != null ? c.delay : stage.rnd[id] * 380, dur: c.dur };
});
}
function columns(stage, g, paidAlpha, o = {}) {
stage.set(N, (id) => {
const p = colXY(g, id), isK = kept[id] === 1, row = (cols.slot[id] / (isK ? g.ck : g.cp)) | 0;
return isK
? { x: p.x, y: p.y, r: g.r * 0.96, color: "red", alpha: 1, ease: "drop", delay: o.quick ? stage.rnd[id] * 120 : 380 + stage.rnd[id] * 520, dur: o.quick ? 500 : 1300 }
: { x: p.x, y: p.y, r: g.r, color: "green", alpha: paidAlpha, delay: o.quick ? stage.rnd[id] * 120 : row * 11 + stage.rnd[id] * 110, dur: o.quick ? 500 : undefined };
});
}
function colLabels(stage, g, paidA) {
const f = stage.fonts(), y = g.base + (g.mobile ? 18 : 22);
return [
{ key: "c1-base", type: "line", x1: g.x0, y1: g.base + 6, x2: g.right, y2: g.base + 6, color: AE.rgba("bone", 0.14) },
{ key: "c1-lp", type: "text", x: g.x0, y, text: g.mobile ? "came back" : "came back as winnings", font: f.label, color: AE.rgba("green", paidA), align: "left" },
{ key: "c1-lk", type: "text", x: g.right, y, text: "lost", font: f.label, color: AE.rgba("red", 1), align: "right" },
];
}
const guessOf = (s) => (typeof s.guesses.c1 === "number" ? s.guesses.c1 : null);
// One ringed dot = $3M. The ring must clear the nearest neighbour's edge, so size it from the real spacing.
function ringOverlays(g, f) {
let best = 0, bd = 1e9;
for (let id = 0; id < N; id++) { const d = (unit.x[id] - 0.6) ** 2 + (unit.y[id] + 0.8) ** 2; if (d < bd) { bd = d; best = id; } }
let nn = 1e9;
for (let id = 0; id < N; id++) if (id !== best) nn = Math.min(nn, Math.hypot(unit.x[id] - unit.x[best], unit.y[id] - unit.y[best]) * g.crad);
const rad = Math.max(g.cr * 1.6, nn - g.cr - Math.max(2, nn * 0.15));
const q = rad * 0.7071, L = g.mobile ? 16 : 24;
return [
{ key: "c1-ring", type: "ring", id: best, rad, w: 1.5, color: AE.rgba("bone", 0.95) },
{ key: "c1-ringln", type: "line", follow: best, x1: q + 1, y1: -q - 1, x2: q + L, y2: -q - L, color: AE.rgba("bone", 0.5) },
{ key: "c1-ringl", type: "text", follow: best, dx: q + L + 6, dy: -q - L + 4.5, text: "$3M", font: f.small, color: AE.rgba("bone", 0.95) },
];
}
let slider = null;
function paintGuessCloud(stage, g, value, quick) {
stage.set(N, (id) => {
// His guess is neutral bone (bright, slightly bigger); red and green are saved for the reveal.
const p = cloudXY(g, id), inGuess = guessRank[id] < value, G = AE.guess;
return { x: p.x, y: p.y, r: inGuess ? g.cr * G.r : g.cr, color: G.color, alpha: inGuess ? G.alpha : G.rest, delay: quick ? 0 : stage.rnd[id] * 300, dur: quick ? 260 : undefined };
});
}
AE.chapter({
id: "c1",
order: 1,
title: "Kentucky's scoreboard",
lab: "data-room",
lesson: "Small cuts on every bet add up to big losses.",
sources: ["MKT-01", "MKT-03", "MKT-04", "MKT-21", "MKT-23", "MKT-24", "MKT-25", "RACE-27"],
steps: [
{
aria: "A cloud of 1,000 dots, each $3 million of the roughly $3 billion bet in Kentucky in 2025. One dot is ringed: $3 million. Guess: the slider lights up that many dots, the share you think never came back.",
html: `<h2>Kentucky bet $3 billion in 2025. How much never came back?</h2><p>Each dot is $3 million. Drag to guess. <span class="ae-guess">Bright dots</span> are your guess.</p><div class="ae-slot" data-slot="c1-slider"></div><p class="ae-src">2025, per the KHRGC annual report.</p>`,
enter(stage, state) {
const g = geom(stage), f = stage.fonts();
stage.halo(0.6);
const v = guessOf(state) ?? GUESS_DEFAULT;
if (slider) slider.set(v);
paintGuessCloud(stage, g, v, false);
stage.overlays(ringOverlays(g, f).concat([
{ key: "c1-gcap", type: "text", x: g.cx, y: stage.clampY(g.cy + g.crad + (g.mobile ? 24 : 34), 2), text: "bright: your guess", font: f.cap, color: AE.capColor, align: "center", spacing: "0.12em", upper: true },
]));
},
},
{
aria: "The dots split: 890 turn green and stack as money that came back as winnings; 110 turn red and drop into a pile: what bettors lost. Counter: $330.1 million lost by Kentucky bettors in 2025.",
html: `<h2>Kentucky bettors lost $330 million.</h2><p>Most of it came <span class="g">back</span> as winnings. <span class="r">110 dots never did</span>: about eleven cents of every dollar bet. <span data-c1="guess"></span></p><p class="ae-src">2025, per the KHRGC annual report.</p>`,
enter(stage, state, ctx) {
const g = geom(stage), f = stage.fonts();
stage.halo(1);
stage.glow({ red: 0.8 });
columns(stage, g, 0.5);
const gv = guessOf(state);
ctx.card.querySelector('[data-c1="guess"]').textContent = gv == null ? "" : `You guessed ${AE.fmt.int(gv)}.`;
const hy = g.y0 + (g.mobile ? 40 : 58), cy = hy + (g.mobile ? 20 : 26);
stage.overlays(colLabels(stage, g, 0.6).concat([
{ key: "c1-hero", type: "text", x: g.right, y: hy, font: f.hero, color: AE.rgba("red", 1), align: "right", count: { to: KEPT_M, dur: 2600, lin: true, fmt: (v) => "$" + v.toFixed(1) + "M" } },
{ key: "c1-heroc", type: "text", x: g.right, y: cy, text: "lost by bettors, 2025", font: f.cap, color: AE.rgba("bone", 0.5), align: "right", spacing: "0.14em", upper: true },
{ key: "c1-leader", type: "leader", x: g.px0 + (g.ck * g.s) / 2, y1: cy + 12, id: cols.top, color: AE.rgba("red", 0.5) },
]));
},
},
],
drawer: {
html: `
<div><span class="ae-label">The dots</span>About <strong>$3.0 billion</strong> was bet on sports in Kentucky in 2025, per the regulator’s annual report (printed rounded as “$3 billion”). <code>1,000 dots × $3M = $3.0B</code>.</div>
<div><span class="ae-label">The red dots</span>As a group, bettors lost what the books kept: <strong>$330.1 million</strong> after winners were paid (adjusted gross revenue). <code>330.1 ÷ 3,000 × 1,000 = 110</code> red dots. That’s a hold of <code>330.1 ÷ 3,000 ≈ 11.0%</code>: about eleven cents of every dollar, or $1 of every $9.</div>
<div><span class="ae-label">What hold is, and isn’t</span>Hold is the whole market’s result: straight bets, parlays, live bets, everyone at once. It isn’t your loss rate, and Kentucky doesn’t publish how many people bet, so we never divide it per bettor.</div>
<div><span class="ae-label">Where the tax goes</span>Kentucky taxes what the books keep: 9.75% retail, 14.25% mobile. The report shows <strong>$40.7 million</strong> moved to the Kentucky Permanent Pension Fund and <strong>$1.13 million</strong> to the Problem Gambling Assistance Account: about <code>$36 : $1</code>.</div>
<div><span class="ae-label">Side note</span>Historical horse racing machines, a separate game, took <strong>$11.2 billion</strong> in wagers in Kentucky in 2025.</div>`,
},
init({ cards }) {
// The guess slider lives in step 1's card. It previews live on the stage and stores on release.
const host = cards[0].querySelector('[data-slot="c1-slider"]');
slider = AE.ui.slider({
min: 0, max: 1000, step: 10,
value: guessOf(AE.state.get()) ?? GUESS_DEFAULT,
aria: "Your guess: how many of the 1,000 dots never came back",
format: (v) => (v === 0 ? "drag to guess" : `${AE.fmt.int(v)} dots · ${AE.fmt.compact(v * PER_DOT_M * 1e6)}`),
onInput: (v) => {
const cur = AE.steps.current();
if (cur && cur.chapter === "c1" && cur.index === 0) { const g = geom(AE.stage); paintGuessCloud(AE.stage, g, v, true); }
},
onChange: (v) => AE.state.setGuess("c1", v),
});
host.appendChild(slider.el);
AE.state.subscribe((s) => slider.set(guessOf(s) ?? GUESS_DEFAULT), ["guesses"]);
},
});
} catch (e) { console.error("[About Even] chapters/c01-scoreboard.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c02-just-20.js ---- */
;(function (AE) {
"use strict";
try {
// C2. It's just $20 (spec §3 C2). Sets his habit. Ported from mock 03b "Part two: your money" (steps 8–12).
// One dot = one bet; one column = one week (52 columns on desktop, two rows of 26 on a phone).
// Steps: set the habit -> the season you remember (it fills in week by week; wins big and bright, losses
// faded) -> the real ledger (every loss comes back) -> expected yearly cost = stake × perWeek × 52 × edge.
// (Restructure: the separate "season fills in" step was merged into the memory step.)
// Step 1 is blank (no dots, no selection) until he taps a habit control; if he scrolls past without
// picking, steps 2+ draw the sample habit (state default).
// Data out: state.habit { stake, perWeek, type } (stored only when he taps a control).
//
// Seasons (documented in the drawer): season 0 is a "typical" season, AE.math.simulateSeason mode
// "typical" (exactly the expected share of wins, rounded) with seed 777 + bets×3 (+1 for parlays);
// "Run another season" k = 1, 2, … uses mode "random" with seed 9001 + k×7919 + bets×13 (+5 for parlays).
// Same inputs -> same dots. AE.c2.season(habit, k) is exported for C9 (typical season = k 0).
AE.source({ id: "PAR-03", label: "Profit on a winning −110 straight bet: stake × 100/110 ($20 → $18.18)", note: "Arithmetic." });
AE.source({ id: "PAR-05", label: "House edge on a −110 / −110 bet: 1 − 1.90909/2 = 4.55% of what’s wagered", note: "Arithmetic." });
AE.source({ id: "PAR-08", label: "Habit expected cost: amount wagered × house edge", note: "Arithmetic. 4.55% for straight −110 bets; the parlay cut for parlays." });
AE.source({ id: "PAR-09", label: "Illustration: every leg is a true 50/50 game priced at −110", note: "An illustration, labeled on screen." });
AE.source({ id: "PAR-12", label: "Parlay house cut, n legs: 1 − (1.90909 / 2)ⁿ (16.98% at 4 legs)", note: "Arithmetic, under PAR-09." });
AE.source({
id: "HARM-31",
label: "Auer & Griffiths (2017), J Gambl Stud 33:795–806",
url: "https://link.springer.com/content/pdf/10.1007/s10899-016-9648-0.pdf",
note: "1,335 Norwegian online gamblers: underestimated losses, overestimated wins; bigger losers misjudged more. Read from the abstract.",
});
AE.source({ id: "RACE-20", label: "Churchill Downs Inc. press release, May 2, 2026: Kentucky Derby 2026", url: "https://www.churchilldownsincorporated.com/?p=5367", note: "Used only for the Derby week marker (Derby Day: May 2, 2026)." });
const STAKES = [5, 10, 20, 50, 100, 200];
const WEEKS = [1, 2, 3, 5, 7, 10, 14];
const MAX_ROWS = 14; // spec: 1–14 bets a week. A save file may hold up to 100; we draw the first 14 a week.
// Calendar markers (week index from January): generic months, plus the sourced Derby date (May 2, 2026 → week 17).
const MOMENTS = [
{ w: 0, t: "Jan" },
{ w: 9, t: "March" },
{ w: 17, t: "Derby week" },
{ w: 35, t: "Football season", deskOnly: true },
];
let seasonK = 0; // UI-only: 0 = typical season, k ≥ 1 = random season k
let picked = false; // UI-only: step 1 stays blank until he taps a habit control (or the habit changes, e.g. a file open)
const cache = new Map();
function season(h, k = 0) {
const n = h.perWeek * 52, parlay = h.type === "parlay";
const key = `${h.stake}|${h.perWeek}|${h.type}|${k}`;
if (cache.has(key)) return cache.get(key);
const seed = k === 0 ? 777 + n * 3 + (parlay ? 1 : 0) : 9001 + k * 7919 + n * 13 + (parlay ? 5 : 0);
const s = AE.math.simulateSeason({ stake: h.stake, perWeek: h.perWeek, type: h.type, seed, mode: k === 0 ? "typical" : "random" });
s.seed = seed; s.k = k;
if (cache.size > 60) cache.clear();
cache.set(key, s);
return s;
}
AE.c2 = { season };
const costOf = (h) => AE.math.expectedYearlyCost(h);
const betsHanded = (h) => Math.max(1, Math.round(AE.math.betsPerYear(h) * AE.math.edgeFor(h.type)));
const money = (v) => AE.fmt.money(v);
// ---------- geometry ----------
function geom(stage, h) {
const { R, mobile } = stage.geom;
const pw = Math.min(h.perWeek, MAX_ROWS);
const cols = mobile ? 26 : 52, rowsY = mobile ? 2 * pw : pw, half = mobile ? 0.7 : 0;
const ctrlH = mobile ? 124 : 132, pileRows = 5;
const gs = Math.min(R.w / cols, 22, (R.h - ctrlH - 24 - 40) / (rowsY + half + pileRows));
const gridH = (rowsY + half) * gs;
const block = ctrlH + 24 + gridH + 40 + pileRows * gs;
// B9: anchor the controls to a reference block (7 bets a week) so they don't jump when the grid
// gains or loses rows; they only move up when a taller grid wouldn't fit below them.
const refRows = mobile ? 2 * 7 : 7;
const gsRef = Math.min(R.w / cols, 22, (R.h - ctrlH - 24 - 40) / (refRows + half + pileRows));
const blockRef = ctrlH + 24 + (refRows + half) * gsRef + 40 + pileRows * gsRef;
const ctrlTop = R.y + Math.max(0, Math.min((R.h - blockRef) / 2, R.h - block));
const gx0 = R.x + (R.w - cols * gs) / 2, gy0 = ctrlTop + ctrlH + 24;
return { R, mobile, pw, cols, rowsY, half, gs, gridH, ctrlTop, gx0, gy0, gx1: gx0 + cols * gs, pileBase: gy0 + gridH + 40 + pileRows * gs, cx: R.x + R.w / 2 };
}
function betXY(g, i) {
const w = (i / g.pw) | 0, b = i % g.pw;
let col, row;
if (g.mobile) { col = w % 26; row = ((w / 26) | 0) * g.pw + b + (w >= 26 ? g.half : 0); } else { col = w; row = b; }
return { x: g.gx0 + (col + 0.5) * g.gs, y: g.gy0 + (row + 0.5) * g.gs };
}
const shown = (g, S) => Math.min(S.n, g.pw * 52);
// ---------- scenes ----------
function grid(stage, g, S, mode, quick) {
const n = shown(g, S), gs = g.gs;
stage.set(n, (i) => {
const p = betXY(g, i), win = S.outcomes[i] === 1;
if (mode === "neutral") return { x: p.x, y: p.y, r: gs * 0.32, color: "bone", alpha: 0.8, delay: quick ? 0 : stage.rnd[i] * 500, dur: quick ? 300 : undefined };
if (mode === "reveal") {
// the season fills in week by week: wins pop bright, losses drop in dim
const delay = quick ? 0 : (i / n) * 3200;
return win
? { x: p.x, y: p.y, r: gs * 0.42, color: "green", alpha: 1, ease: "pop", flash: !quick, delay, dur: quick ? 300 : 560 }
: { x: p.x, y: p.y + gs * 0.08, r: gs * 0.27, color: "red", alpha: 0.78, ease: "drop", delay, dur: quick ? 300 : 560 };
}
if (mode === "memory") {
// the season fills in week by week, the way you remember it: wins pop big, losses barely register
const delay = quick ? 0 : (i / n) * 2600;
return win
? { x: p.x, y: p.y, r: gs * 0.5, color: "green", alpha: 1, ease: "pop", flash: !quick, delay, dur: quick ? 300 : 700 }
: { x: p.x, y: p.y, r: gs * 0.12, color: "red", alpha: 0.12, delay, dur: quick ? 300 : 700 };
}
return { x: p.x, y: p.y, r: gs * 0.3, color: "bone", alpha: 0.28, delay: quick ? 0 : stage.rnd[i] * 200, dur: quick ? 300 : undefined }; // "cost"
});
}
function pilesGeom(g, S) {
const n = shown(g, S);
let W = 0; for (let i = 0; i < n; i++) W += S.outcomes[i];
const L = n - W, pc = g.mobile ? 10 : 16, gapC = g.mobile ? 3 : 6;
const rowsN = Math.max(1, Math.ceil(Math.max(W, L) / pc));
const top = g.gy0 + 10, availH = g.pileBase - top;
const ps = Math.min(g.gs * 1.7, availH / rowsN, g.R.w / (2 * pc + gapC));
const gap = gapC * ps, wx0 = g.cx - gap / 2 - pc * ps, lx0 = g.cx + gap / 2;
return { n, pc, ps, wx0, lx0, lx1: lx0 + pc * ps, base: g.pileBase };
}
function piles(stage, g, S, quick) {
const p = pilesGeom(g, S);
let wi = 0, li = 0;
stage.set(p.n, (i) => {
const win = S.outcomes[i] === 1, j = win ? wi++ : li++, col = j % p.pc, row = (j / p.pc) | 0;
const x = (win ? p.wx0 : p.lx0) + (col + 0.5) * p.ps, y = p.base - (row + 0.5) * p.ps;
return win
? { x, y, r: p.ps * 0.36, color: "green", alpha: 1, delay: quick ? 0 : stage.rnd[i] * 220, dur: quick ? 300 : undefined }
: { x, y, r: p.ps * 0.34, color: "red", alpha: 0.95, ease: "drop", delay: quick ? 0 : 260 + stage.rnd[i] * 700, dur: quick ? 300 : 1300 };
});
return p;
}
function cost(stage, g, S, h, quick) {
const n = shown(g, S), kk = Math.min(n, betsHanded(h));
const pc = Math.max(1, Math.min(kk, g.cols, Math.max(13, Math.ceil(kk / 5)))); // right-aligned under the grid
const pick = new Map();
for (let j = 0; j < kk; j++) pick.set(Math.min(n - 1, Math.floor(((j + 0.5) * n) / kk)), j);
stage.set(n, (i) => {
const j = pick.get(i);
if (j == null) { const p = betXY(g, i); return { x: p.x, y: p.y, r: g.gs * 0.3, color: "bone", alpha: 0.28, delay: quick ? 0 : stage.rnd[i] * 200, dur: quick ? 300 : undefined }; }
const col = j % pc, row = (j / pc) | 0;
return { x: g.gx1 - (pc - col - 0.5) * g.gs, y: g.pileBase - (row + 0.5) * g.gs, r: g.gs * 0.34, color: "red", alpha: 1, ease: "drop",
delay: quick ? 0 : 500 + j * Math.min(140, 2400 / kk), dur: quick ? 300 : 1200 };
});
return { kk };
}
const usedH = (g) => (g.mobile ? 2 * g.pw + g.half : g.pw) * g.gs;
const capItem = (stage, key, x, y, text, a = 0.42, align = "left") =>
({ key, type: "text", x, y, text, font: stage.fonts().cap, color: AE.rgba("bone", a), align, spacing: "0.12em", upper: true });
function seasonLabel(S) { return S.k === 0 ? "a typical season" : `random season ${S.k}`; }
function clipNote(h) { return h.perWeek > MAX_ROWS ? ` · first ${MAX_ROWS} a week shown` : ""; }
// ---------- controls (built once in init, placed on the stage per step) ----------
let ctl = null;
function placeControls(stage, g, which) {
if (!ctl) return;
const h = AE.state.get().habit;
ctl.stake.set(h.stake); ctl.week.set(h.perWeek); ctl.type.set(h.type);
const step = g.mobile ? 40 : 44;
which.forEach((name, k) => stage.place(ctl[name].el, g.gx0, g.ctrlTop + k * step));
}
// Re-draw the active C2 step without clearing the stage layer (keeps keyboard focus on the control).
let stepsRef = null, cardsRef = null;
function redraw(quick = true) {
const c = AE.steps.current();
if (!c || c.chapter !== "c2" || !stepsRef) return;
stepsRef[c.index].enter(AE.stage, AE.state.get(), { index: c.index, card: cardsRef[c.index], quick });
}
const STEPS = [
{
aria: "Your habit as a grid of dots: one dot per bet, one column per week of the year. Blank until you pick.",
html: `<h2>What does a normal week look like?</h2><p data-c2="hint">Pick a bet size, how often, and the type.</p>`,
enter(stage, state, ctx) {
const h = state.habit, g = geom(stage, h), S = season(h, seasonK);
stage.halo(0.5);
placeControls(stage, g, ["stake", "week", "type"]);
if (!picked) {
// Blank until he chooses: no dots, no selection shown. Later steps still use the sample habit.
for (const k of ["stake", "week", "type"]) ctl && ctl[k].set(null);
stage.set(0, () => null);
stage.overlays([]);
stage.label("No dots yet. Pick a bet size, how many bets a week, and the type to see your year of bets.");
return;
}
grid(stage, g, S, "neutral", ctx.quick);
stage.overlays([capItem(stage, "c2-cap", g.gx0, g.gy0 + usedH(g) + 22, `one dot = one bet · one column = one week${clipNote(h)}`)]);
stage.label(`${AE.fmt.int(S.n)} dots, one per bet in a year: ${money(h.stake)} a bet, ${h.perWeek} a week, ${h.type === "parlay" ? "four-leg parlays" : "straight bets"}.`);
},
},
{
aria: "Every loss comes back. Wins stack in a green pile on the left, losses in a taller red pile on the right.",
html: `<h2>Here’s the real ledger.</h2><p data-c2="ledger">People remember the wins. <span class="r">Every loss counts too.</span></p>`,
enter(stage, state, ctx) {
const h = state.habit, g = geom(stage, h), S = season(h, seasonK), f = stage.fonts(), m = g.mobile;
stage.halo(0.5);
stage.glow({ red: 0.7 });
const p = piles(stage, g, S, ctx.quick);
const top = g.ctrlTop + (m ? 74 : 92);
ctx.card.querySelector('[data-c2="ledger"]').innerHTML = S.net < 0
? `People remember the wins. <span class="r">Every loss counts too.</span>`
: `A lucky season. <span class="r">The next one starts from the same math.</span>`;
stage.overlays([
{ key: "c2-pw", type: "text", x: p.wx0, y: top, font: f.hero2, color: AE.rgba("green", 1), align: "left", count: { to: S.won, dur: ctx.quick ? 300 : 900, fmt: (v) => "+" + money(v) } },
{ key: "c2-pwc", type: "text", x: p.wx0, y: top + (m ? 18 : 24), text: "won on wins", font: f.cap, color: AE.rgba("green", 0.7), align: "left", spacing: "0.14em", upper: true },
{ key: "c2-pl", type: "text", x: p.lx1, y: top, font: f.hero2, color: AE.rgba("red", 1), align: "right", count: { to: S.lost, dur: ctx.quick ? 300 : 1200, lin: true, fmt: (v) => AE.fmt.minus + money(v) } },
{ key: "c2-plc", type: "text", x: p.lx1, y: top + (m ? 18 : 24), text: "lost on losses", font: f.cap, color: AE.rgba("red", 0.85), align: "right", spacing: "0.14em", upper: true },
capItem(stage, "c2-cap", g.cx, p.base + 22, `${seasonLabel(S)} · seasons vary`, 0.4, "center"),
]);
if (ctl) stage.place(ctl.again.el, g.cx, g.ctrlTop + (m ? 4 : 10), { align: "center" });
stage.label(`The real ledger, ${seasonLabel(S)}: won ${money(S.won)} on ${S.wins} wins, lost ${money(S.lost)} on ${S.losses} losses.`);
},
},
{
aria: "Expected cost of the habit every year. A handful of your bets slide into a red pile marked theirs.",
html: `<h2>What you lose in a year.</h2><p>On average, that’s about <span class="r" data-c2="kk">7</span> of your bets gone for nothing, every year.</p><p class="ae-src">Expected, from the math. One season varies.</p>`,
enter(stage, state, ctx) {
const h = state.habit, g = geom(stage, h), S = season(h, seasonK), f = stage.fonts();
const hy = g.gy0 - (g.mobile ? 34 : 44), cy = g.gy0 - (g.mobile ? 14 : 20);
stage.halo(0.5);
stage.glow({ red: 1 });
const c = cost(stage, g, S, h, ctx.quick);
ctx.card.querySelector('[data-c2="kk"]').textContent = AE.fmt.int(betsHanded(h));
placeControls(stage, g, ["type"]);
stage.overlays([
{ key: "c2-cost", type: "text", x: g.gx0, y: hy - (g.mobile ? 16 : 22), font: f.hero, color: AE.rgba("red", 1), align: "left", count: { to: costOf(h), dur: ctx.quick ? 500 : 1200, lin: true, fmt: (v) => money(v) } },
{ key: "c2-costc", type: "text", x: g.gx0, y: cy, text: "expected loss, every year", font: f.cap, color: AE.rgba("red", 0.85), align: "left", spacing: "0.14em", upper: true },
{ key: "c2-theirs", type: "text", x: g.gx1, y: g.pileBase + 20, text: "theirs", font: f.label, color: AE.rgba("red", 1), align: "right" },
]);
stage.label(`Expected cost of the habit: ${money(costOf(h))} a year, like handing over ${c.kk} of your bets.`);
},
},
];
AE.chapter({
id: "c2",
order: 2,
title: "It's just $20",
lab: "bet-log",
lesson: "Expected cost is a real cost, even when you win.",
sources: ["PAR-03", "PAR-05", "PAR-08", "PAR-09", "PAR-12", "HARM-31", "RACE-20"],
steps: STEPS,
drawer: {
title: "Why small bets add up",
html: `
<div><span class="ae-label">Expected cost</span>Every bet carries the house’s edge. Over a year it adds up to <code>stake × bets a week × 52 × edge</code>. The edge is <strong>4.55%</strong> on straight bets at −110 and <strong>16.98%</strong> on four-leg parlays.</div>
<div><span class="ae-label">Worked example (the sample habit)</span><code>$20 × 3 × 52 = $3,120</code> bet in a year. Straight bets: <code>$3,120 × 4.545% = $141.82</code>. Four-leg parlays: <code>$3,120 × 16.98% = $529.75</code>.</div>
<div><span class="ae-label">“About N of your bets”</span><code>bets a year × edge</code>, rounded: <code>156 × 4.545% ≈ 7</code> straight bets, or <code>156 × 16.98% ≈ 26</code> parlays.</div>
<div><span class="ae-label">The season you see</span>One simulated season, not a forecast. The first one is <em>typical</em>: exactly the expected share of bets win (half for straight bets, 1 in 16 for parlays, rounded), in a fixed, repeatable order. “Run another season” draws a new random season, also repeatable. Same inputs, same dots. Real seasons swing, a lot for parlays. The expected cost is the math.</div>
<div><span class="ae-label">A win pays less than a loss costs</span>A winning $20 straight bet at −110 pays <code>$20 × 100/110 = $18.18</code>. A loss costs the full $20. Win exactly half and you still come out behind.</div>
<div><span class="ae-label">Why the losses fade</span>In a study of 1,335 online gamblers, players tended to underestimate their losses and overestimate their wins (Auer & Griffiths, 2017).</div>
<div><span class="ae-label">Assumptions</span>Illustration: each leg a true 50/50 game priced at −110. Weeks run from January; Derby week is the week of May 2, 2026. Your habit carries into every chapter after this one.</div>`,
},
init({ cards }) {
stepsRef = STEPS; cardsRef = cards;
const h = AE.state.get().habit;
const store = (patch) => {
seasonK = 0;
const first = !picked;
picked = true;
// Tapping the value already held changes nothing in state, so the first pick redraws itself.
if (!AE.state.merge("habit", patch).length && first) redraw(false);
};
ctl = {
stake: AE.ui.segmented({ label: "Per bet", value: h.stake, options: STAKES.map((v) => ({ value: v, label: "$" + v, aria: `$${v} a bet` })), onChange: (v) => store({ stake: v }) }),
week: AE.ui.segmented({ label: "A week", value: h.perWeek, options: WEEKS.map((v) => ({ value: v, label: String(v), aria: `${v} ${v === 1 ? "bet" : "bets"} a week` })), onChange: (v) => store({ perWeek: v }) }),
type: AE.ui.segmented({ label: "Type", value: h.type, options: [{ value: "straight", label: "Straight", aria: "Straight bets at minus 110" }, { value: "parlay", label: "4-leg parlay", aria: "Four-leg parlays" }], onChange: (v) => store({ type: v }) }),
again: AE.ui.button({ label: "Run another season", onClick: () => { seasonK++; redraw(false); } }),
};
for (const k of ["stake", "week", "type"]) ctl[k].el.classList.add("c2-ctl");
ctl.again.el.classList.add("c2-again");
AE.state.subscribe((s, changed, meta) => {
picked = true;
ctl.stake.set(s.habit.stake); ctl.week.set(s.habit.perWeek); ctl.type.set(s.habit.type);
if (meta && meta.replace) { seasonK = 0; return; } // steps.js re-enters the active step after a file open
redraw(true);
}, ["habit"]);
},
});
} catch (e) { console.error("[About Even] chapters/c02-just-20.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c03-house.js ---- */
;(function (AE) {
"use strict";
try {
// C3. The house doesn't need a winner (spec §3 C3; retitled in fix round 1, P0-1). Run the Book, mini.
// $1,100 on UK and $1,100 on Louisville, both at −110. Each dot is $10 (110 dots a side).
// Whoever wins, the winners get $1,100 × 1.90909 = $2,100 back and the book keeps $100
// (4.55% of the $2,200 handle). Then the money goes lopsided (a slider moves it between the
// sides, total fixed at $2,200) and the book's result splits by outcome: that risk is why it
// moves lines. All results come from AE.math.runTheBook / bookBothWays.
// UK and Louisville are stand-ins: no real line is sourced (PAR-09). The winner pick and the
// lopsided split are UI-only (not saved).
AE.source({ id: "PAR-01", label: "American odds → implied probability: −110 → 110 ÷ 210 = 52.38%", note: "Standard odds conversion (arithmetic)." });
AE.source({ id: "PAR-02", label: "American odds → decimal odds: −110 → 1 + 100/110 = 1.90909", note: "Total return per $1 staked, stake included (arithmetic)." });
AE.source({ id: "PAR-04", label: "Overround on a −110 / −110 market: 52.38% + 52.38% = 104.76%", note: "Arithmetic on PAR-01." });
AE.source({ id: "PAR-09", label: "Illustration: every leg is a true 50/50 game priced at −110", note: "An illustration, labeled on screen." });
AE.source({ id: "PAR-05", label: "Book’s hold on a balanced −110 / −110 book: 4.55% of handle", note: "Takes $110 + $110, pays the winner $210, keeps $10 of $220. The chapter uses the same thing ×10 (arithmetic)." });
const PER_DOT = 10;
const SIDE = 1100, HANDLE = 2 * SIDE;
const SIDE_DOTS = SIDE / PER_DOT; // 110
const ODDS = -110;
const NAME = { a: "UK", b: "Louisville" };
const SHORT = { a: "UK", b: "UofL" };
const M3 = AE.math;
// UI-only state
let settleT = 0; // step 1: piles first, then the settle
const clearSettle = () => { clearTimeout(settleT); settleT = 0; };
let winner = "a"; // who wins in step 2/3 (UK by default; he can tap Louisville)
let ukMoney = 1600; // step 4 split: money on UK, the rest of the $2,200 on Louisville
let seg3 = null, slider3 = null;
const balanced = () => M3.bookBothWays({ a: SIDE, b: SIDE, oddsA: ODDS, oddsB: ODDS });
// ---------- geometry: two side piles with the book's pile between ----------
const PC = 10, BC = 5, GAP = 2, ROWS = 21; // winner pile ends at 210 dots = 21 rows
function g3(stage) {
const { R, mobile } = stage.geom;
const cells = PC * 2 + BC + GAP * 2;
const topPad = mobile ? 70 : 104, botPad = mobile ? 34 : 50;
const s = Math.min(R.w / cells, (R.h - topPad - botPad) / ROWS, 20);
const totalW = cells * s, x0 = R.x + (R.w - totalW) / 2;
const y0 = R.y + Math.max(0, (R.h - (topPad + ROWS * s + botPad)) / 2);
const base = y0 + topPad + ROWS * s;
const xa = x0, xk = x0 + (PC + GAP) * s, xb = x0 + (PC + GAP + BC + GAP) * s;
return { R, mobile, s, r: s * 0.36, x0, y0, base, right: x0 + totalW, xa, xk, xb, ca: xa + (PC * s) / 2, ck: xk + (BC * s) / 2, cb: xb + (PC * s) / 2 };
}
const sideX = (g, side) => (side === "a" ? g.xa : g.xb);
const sideC = (g, side) => (side === "a" ? g.ca : g.cb);
const pileXY = (g, j, x0, cols) => AE.layout.pile(j, { x0, base: g.base, cols, size: g.s });
// dots 0..109 are the money on UK, 110..219 the money on Louisville; j = slot within the side
const sideOf = (id) => (id < SIDE_DOTS ? "a" : "b");
const slotOf = (id) => id % SIDE_DOTS;
function baseLabels(stage, g, o = {}) {
const f = stage.fonts(), y = g.base + (g.mobile ? 18 : 22);
return [
{ key: "c3-base", type: "line", x1: g.x0, y1: g.base + 6, x2: g.right, y2: g.base + 6, color: AE.rgba("bone", 0.14) },
{ key: "c3-na", type: "text", x: g.xa, y, text: o.na || NAME.a, font: f.label, color: o.ca || AE.rgba("bone", 0.7), align: "left" },
{ key: "c3-nb", type: "text", x: g.right, y, text: o.nb || NAME.b, font: f.label, color: o.cb || AE.rgba("bone", 0.7), align: "right" },
{ key: "c3-nk", type: "text", x: g.ck, y, text: "the book", font: f.label, color: o.ck || AE.rgba("bone", 0.4), align: "center" },
];
}
function scenePiles(stage, g) {
stage.set(2 * SIDE_DOTS, (id) => {
const j = slotOf(id), p = pileXY(g, j, sideX(g, sideOf(id)), PC), row = (j / PC) | 0;
return { x: p.x, y: p.y, r: g.r, color: "bone", alpha: 0.82, delay: row * 30 + stage.rnd[id] * 160 };
});
}
// The settle: the winning side's money turns green; 100 of the losing side's dots fly over to pay
// the winners (green); the losing side's top 10 drop into the book's pile (red).
function sceneSettle(stage, g, w, o = {}) {
const keep = Math.round(balanced()[w === "a" ? "ifA" : "ifB"].kept / PER_DOT); // 10
const paid = SIDE_DOTS - keep; // 100
const dim = o.dim ? 0.2 : 1;
stage.set(2 * SIDE_DOTS, (id) => {
const side = sideOf(id), j = slotOf(id);
if (side === w) {
const p = pileXY(g, j, sideX(g, w), PC);
return { x: p.x, y: p.y, r: g.r, color: "green", alpha: 0.95 * dim, ease: "pop", delay: o.quick ? 0 : stage.rnd[id] * 200, dur: o.quick ? 500 : 900 };
}
if (j < paid) {
const p = pileXY(g, SIDE_DOTS + j, sideX(g, w), PC);
return { x: p.x, y: p.y, r: g.r, color: "green", alpha: 0.95 * dim, delay: o.quick ? stage.rnd[id] * 120 : 280 + j * 7, dur: o.quick ? 650 : 1000 };
}
const p = pileXY(g, j - paid, g.xk, BC);
return { x: p.x, y: p.y, r: g.r * 1.02, color: "red", alpha: 1, ease: "drop", delay: o.quick ? 0 : 160 + stage.rnd[id] * 200, dur: o.quick ? 600 : 1200 };
});
}
function settleOverlays(stage, g, w) {
const f = stage.fonts(), r = balanced()[w === "a" ? "ifA" : "ifB"];
const topW = g.base - ROWS * g.s, topK = g.base - 2 * g.s;
const capGap = g.mobile ? 12 : 16, heroGap = g.mobile ? 30 : 44;
return baseLabels(stage, g, {
ca: w === "a" ? AE.rgba("green", 0.9) : AE.rgba("bone", 0.35),
cb: w === "b" ? AE.rgba("green", 0.9) : AE.rgba("bone", 0.35),
ck: AE.rgba("red", 1),
}).concat([
{ key: "c3-paid", type: "text", x: sideC(g, w), y: topW - heroGap, font: f.hero2, color: AE.rgba("green", 1), align: "center", count: { to: r.payout, dur: 1300, fmt: (v) => AE.fmt.money(v, { cents: false }) } },
{ key: "c3-paidc", type: "text", x: sideC(g, w), y: topW - capGap, text: "goes back", font: f.cap, color: AE.rgba("green", 0.75), align: "center", upper: true, spacing: "0.14em" },
{ key: "c3-kept", type: "text", x: g.ck, y: topK - heroGap, font: f.hero2, color: AE.rgba("red", 1), align: "center", count: { to: r.kept, dur: 1300, dl: 300, fmt: (v) => AE.fmt.money(v, { cents: false }) } },
{ key: "c3-keptc", type: "text", x: g.ck, y: topK - capGap, text: "kept", font: f.cap, color: AE.rgba("red", 0.85), align: "center", upper: true, spacing: "0.14em" },
]);
}
// ---------- geometry: the book's result by outcome (steps 4–5) ----------
// Two columns, a zero line between gain and loss. Above the line (red): what the book keeps.
// Below (green): what the book pays out of its own pocket. Each dot $10.
const CC = 14, CGAP = 4, UP = Math.ceil(HANDLE / PER_DOT / CC), DOWN = Math.ceil((HANDLE * (M3.D110 - 1)) / PER_DOT / CC); // 16 up, 15 down
function g4(stage) {
const { R, mobile } = stage.geom;
const cells = CC * 2 + CGAP;
const topPad = mobile ? 66 : 92, botPad = mobile ? 6 : 20, mid = mobile ? 10 : 14;
const s = Math.min(R.w / cells, (R.h - topPad - botPad - mid) / (UP + DOWN), 18);
const totalW = cells * s, x0 = R.x + (R.w - totalW) / 2;
const y0 = R.y + Math.max(0, (R.h - (topPad + (UP + DOWN) * s + mid + botPad)) / 2);
const zero = y0 + topPad + UP * s + mid / 2;
return { R, mobile, s, r: s * 0.36, x0, y0, zero, mid, right: x0 + totalW, xa: x0, xb: x0 + (CC + CGAP) * s, ca: x0 + (CC * s) / 2, cb: x0 + (CC + CGAP) * s + (CC * s) / 2 };
}
const COL_IDS = (HANDLE / PER_DOT) | 0; // 220 ids per column: A uses 0..219, B uses 220..439
function sceneOutcomes(stage, g, both, o = {}) {
const nA = Math.round(Math.abs(both.ifA.kept) / PER_DOT), upA = both.ifA.kept >= 0;
const nB = Math.round(Math.abs(both.ifB.kept) / PER_DOT), upB = both.ifB.kept >= 0;
stage.set(2 * COL_IDS, (id) => {
const col = id < COL_IDS ? "a" : "b", j = id % COL_IDS;
const n = col === "a" ? nA : nB, up = col === "a" ? upA : upB;
if (j >= n) return null;
// a short pile (one row) sits centred under its column header, not hard left
const x0 = (col === "a" ? g.xa : g.xb) + ((CC - Math.min(n, CC)) * g.s) / 2;
const p = up
? AE.layout.pile(j, { x0, base: g.zero - g.mid / 2, cols: CC, size: g.s })
: AE.layout.grid(j, { x0, y0: g.zero + g.mid / 2, cols: CC, size: g.s });
return up
? { x: p.x, y: p.y, r: g.r, color: "red", alpha: 1, ease: "drop", delay: o.quick ? 0 : stage.rnd[id] * 380, dur: o.quick ? 280 : undefined }
: { x: p.x, y: p.y, r: g.r, color: "green", alpha: 0.95, ease: "pop", delay: o.quick ? 0 : stage.rnd[id] * 380, dur: o.quick ? 280 : undefined };
}, { quick: o.quick });
}
function resultText(kept) {
return kept >= 0 ? `book keeps ${AE.fmt.money(kept)}` : `book loses ${AE.fmt.money(-kept)}`;
}
function outcomeOverlays(stage, g, both) {
const f = stage.fonts(), yN = g.y0 + (g.mobile ? 12 : 16), yA = yN + (g.mobile ? 34 : 50), yK = yA + (g.mobile ? 16 : 20);
const col = (k, a = 1) => (k >= 0 ? AE.rgba("red", a) : AE.rgba("green", a));
const one = (side, k, cx) => [
{ key: "c3-o" + side, type: "text", x: cx, y: yN, text: `if ${NAME[side]} wins`, font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.14em" },
{ key: "c3-r" + side, type: "text", x: cx, y: yA, text: AE.fmt.money(Math.abs(k)), font: f.hero2, color: col(k), align: "center" },
{ key: "c3-k" + side, type: "text", x: cx, y: yK, text: k >= 0 ? "the book keeps" : "the book loses", font: f.cap, color: col(k, 0.8), align: "center", upper: true, spacing: "0.14em" },
];
return [{ key: "c3-zero", type: "line", x1: g.x0 - (g.mobile ? 0 : 6), y1: g.zero, x2: g.right + (g.mobile ? 0 : 6), y2: g.zero, color: AE.rgba("bone", 0.22) }]
.concat(one("a", both.ifA.kept, g.ca), one("b", both.ifB.kept, g.cb));
}
const lopsided = () => M3.bookBothWays({ a: ukMoney, b: HANDLE - ukMoney, oddsA: ODDS, oddsB: ODDS });
function lopsidedAria() {
const b = lopsided();
return `${AE.fmt.money(ukMoney)} on UK, ${AE.fmt.money(HANDLE - ukMoney)} on Louisville. If UK wins, the ${resultText(b.ifA.kept)}. If Louisville wins, the ${resultText(b.ifB.kept)}.`;
}
function settleAria(w) {
const r = balanced()[w === "a" ? "ifA" : "ifB"];
return `${NAME[w]} wins. The ${NAME[w]} bettors' pile turns green: ${AE.fmt.money(r.payout)} goes back to them. Ten red dots, ${AE.fmt.money(r.kept)}, drop into the book's pile. Pick the other team and the book keeps the same ${AE.fmt.money(r.kept)}.`;
}
const isActive = (index) => { const c = AE.steps.current(); return c && c.chapter === "c3" && c.index === index; };
AE.chapter({
id: "c3",
order: 3,
title: "The house doesn’t need a winner.",
tab: "how",
how: { slug: "sportsbooks", label: "Sportsbooks", blurb: "Why the book gets paid whichever team wins." },
lesson: "The price already includes their cut.",
kicker: "03 \u00b7 The house doesn\u2019t need a winner",
lab: "run-the-book",
sources: ["PAR-01", "PAR-02", "PAR-04", "PAR-05", "PAR-09"],
steps: [
{
// Fix round 1 (P1-8): the balanced piles and "pick the winner" are one step now. The two
// equal piles land first, then the settle plays; resize / refresh / scrolling back settle at once.
aria: settleAria("a"),
html: `<h2>The book doesn’t care who wins.</h2><p>Same money on UK and Louisville, both at −110. Pick the winner.</p><div class="ae-slot" data-slot="c3-winner"></div>`,
enter(stage, state, ctx) {
clearSettle();
const g = g3(stage);
stage.halo(0.7);
if (seg3) seg3.set(winner);
stage.label(settleAria(winner));
const settle = () => {
stage.glow({ red: 0.5, green: 0.2 });
sceneSettle(stage, g, winner);
stage.overlays(settleOverlays(stage, g, winner));
};
if (AE.reduced || ctx.resize || ctx.refresh || ctx.dir === -1) { settle(); return; }
scenePiles(stage, g);
stage.overlays(baseLabels(stage, g));
settleT = setTimeout(() => { settleT = 0; if (isActive(0)) settle(); }, 1500);
},
exit() { clearSettle(); },
},
{
aria: "The winners' pile dims. The book's ten red dots glow. Counter: 4.55% of all the money bet, kept by the book.",
html: `<h2>Win or lose, the cut is baked into −110.</h2><p>Risk $110 to win $100, on both sides. <span class="r">Balanced, the book keeps 4.55% of everything bet.</span></p>`,
enter(stage) {
const g = g3(stage), f = stage.fonts();
stage.halo(0.7);
stage.glow({ red: 1 });
sceneSettle(stage, g, winner, { dim: true, quick: true });
const r = balanced().ifA;
const hy = g.y0 + (g.mobile ? 30 : 44), cy = hy + (g.mobile ? 18 : 24);
const keptTop = AE.layout.pile(2 * BC - 1, { x0: g.xk, base: g.base, cols: BC, size: g.s }); // top row of the book's pile
stage.overlays(baseLabels(stage, g, { ca: AE.rgba("bone", 0.3), cb: AE.rgba("bone", 0.3), ck: AE.rgba("red", 1) }).concat([
{ key: "c3-hold", type: "text", x: g.ck, y: hy, font: f.hero, color: AE.rgba("red", 1), align: "center", count: { to: r.hold * 100, dur: 1600, fmt: (v) => v.toFixed(2) + "%" } },
{ key: "c3-holdc", type: "text", x: g.ck, y: cy, text: "of all the money bet, kept", font: f.cap, color: AE.rgba("bone", 0.55), align: "center", upper: true, spacing: "0.14em" },
{ key: "c3-holdl", type: "line", x1: g.ck, y1: cy + 12, x2: g.ck, y2: keptTop.y - g.s * 0.8, color: AE.rgba("red", 0.45) },
]));
},
},
{
aria: lopsidedAria(),
html: `<h2>Lopsided money. Now the book is rooting.</h2><div class="ae-slot" data-slot="c3-split"></div><p class="ae-assume"><span class="r">Red</span>, above the line: what the book keeps. <span class="g">Green</span>, below: what it pays from its own pocket.</p>`,
enter(stage) {
const g = g4(stage), b = lopsided();
stage.halo(0.5);
stage.glow({ red: 0.6, green: 0.3 });
if (slider3) slider3.set(ukMoney);
sceneOutcomes(stage, g, b);
stage.overlays(outcomeOverlays(stage, g, b));
stage.label(lopsidedAria());
},
},
{
aria: "Balanced again: if UK wins the book keeps $100, if Louisville wins the book keeps $100. Ten red dots in each column.",
html: `<h2>So the book moves the line.</h2><p>The busy side gets pricier until the money evens out. Then the cut is safe again.</p>`,
enter(stage) {
const g = g4(stage), b = balanced();
stage.halo(0.5);
stage.glow({ red: 0.8 });
sceneOutcomes(stage, g, b);
stage.overlays(outcomeOverlays(stage, g, b));
},
},
],
drawer: {
html: `
<div><span class="ae-label">What −110 means</span>Risk <strong>$110</strong> to win <strong>$100</strong>. A winning $110 bet returns <code>110 × 1.90909 = $210</code>, stake included (<code>1 + 100/110 = 1.90909</code>).</div>
<div><span class="ae-label">Implied probability</span><code>110 ÷ 210 = 52.38%</code>. Price both sides at −110 and the two add to <code>104.76%</code>. A fair coin is 50/50. Those extra 4.76 points work out to the book keeping <code>1 − 100/104.76 = 4.55%</code> of the money bet: the vig.</div>
<div><span class="ae-label">The book, balanced</span>Each dot is $10. <code>$1,100 + $1,100 = $2,200</code> comes in. The winners get <code>$1,100 × 1.90909 = $2,100</code>. The book keeps <code>$2,200 − $2,100 = $100</code>, which is <code>100 ÷ 2,200 = 4.55%</code>. Swap the winner and every number is the same.</div>
<div><span class="ae-label">The book, lopsided</span>Move it to <strong>$1,600</strong> on UK and <strong>$600</strong> on Louisville. If UK wins the book pays <code>1,600 × 1.90909 = $3,054.55</code> and loses <strong>$854.55</strong>. If Louisville wins it pays <code>$1,145.45</code> and keeps <strong>$1,054.55</strong>. Now the book has a side.</div>
<div><span class="ae-label">Why lines move</span>A book that wants its cut no matter who wins makes the popular side cost more and the other side pay more, until money comes back the other way. Balanced, the book doesn’t need to know who wins.</div>
<div><span class="ae-label">The teams</span>UK and Louisville are stand-ins. The lines here are the standard −110 illustration, not a real posted game.</div>`,
},
init({ cards }) {
seg3 = AE.ui.segmented({
label: "Who wins",
value: winner,
options: [
{ value: "a", label: NAME.a, aria: `${NAME.a} wins` },
{ value: "b", label: NAME.b, aria: `${NAME.b} wins` },
],
onChange: (v) => {
winner = v;
if (isActive(0)) {
clearSettle();
AE.stage.glow({ red: 0.5, green: 0.2 });
const g = g3(AE.stage);
sceneSettle(AE.stage, g, winner);
AE.stage.overlays(settleOverlays(AE.stage, g, winner));
AE.stage.label(settleAria(winner));
}
},
});
cards[0].querySelector('[data-slot="c3-winner"]').appendChild(seg3.el);
slider3 = AE.ui.slider({
label: "Move the money",
min: 0, max: HANDLE, step: 100, value: ukMoney,
aria: "Money on UK; the rest of the $2,200 is on Louisville",
format: (v) => `${SHORT.a} ${AE.fmt.money(v)} · ${SHORT.b} ${AE.fmt.money(HANDLE - v)}`,
onInput: (v) => {
ukMoney = v;
if (isActive(2)) {
const g = g4(AE.stage), b = lopsided();
sceneOutcomes(AE.stage, g, b, { quick: true });
AE.stage.overlays(outcomeOverlays(AE.stage, g, b), { delay: 0 });
AE.stage.label(lopsidedAria());
}
},
});
cards[2].querySelector('[data-slot="c3-split"]').appendChild(slider3.el);
},
});
} catch (e) { console.error("[About Even] chapters/c03-house.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c04-gimme.js ---- */
;(function (AE) {
"use strict";
try {
// C4. The gimme (spec §3 C4). Parlays.
// Restructure: the old intro step ("four legs, one ticket") is folded into the dial step's copy.
// Guess first (dial, 1 in 2 … 1 in 50, log scale) -> reveal 1 in 16 with his guess carried
// ("You said 1 in X") -> a 4-level tree into 16 outcomes, one green -> "they pay you like it's
// 1 in 13.3" as a fair-payout grid (16 columns × 10 dots; green = what the book pays, red = the
// cut) -> a leg control 1–8, the red share climbing 4.55% -> 31.08%.
// Fix round 1 (B10): the legs step no longer auto-sweeps 1 -> 8. It opens at 4 legs (where the
// previous step left off) and moves only when he picks; its caption holds at every leg count.
// Every leg is a true 50/50 game priced at −110 (PAR-09); that label is on screen.
// Data out: state.guesses.c4 (2–50), stored on release.
// All math from AE.math.parlay*.
AE.source({ id: "PAR-09", label: "Illustration: every leg is a true 50/50 game priced at −110", note: "An illustration, labeled on screen." });
AE.source({ id: "PAR-10", label: "Parlay book payout per $1, n legs: 1.90909ⁿ", note: "Arithmetic from the posted −110 price; formula in How this works." });
AE.source({ id: "PAR-11", label: "Parlay fair payout 2ⁿ; true chance 1 in 2ⁿ", note: "Arithmetic from the posted −110 price; formula in How this works." });
AE.source({ id: "PAR-12", label: "Parlay house cut, n legs: 1 − (1.90909 ÷ 2)ⁿ", note: "Arithmetic from the posted −110 price; formula in How this works." });
AE.source({ id: "PAR-13", label: "Parlay table, legs 1 to 8: cut 4.55, 8.88, 13.03, 16.98, 20.75, 24.36, 27.79, 31.08%", note: "Recomputed 2026-11-19 (arithmetic, under PAR-09)." });
AE.source({ id: "PAR-14", label: "Expected cost of a $10 parlay: $10 × house cut (4 legs: $1.70)", note: "Arithmetic (under PAR-09)." });
AE.source({ id: "PAR-15", label: "$10 parlay pays $132.83 against a fair $160 (4 legs)", note: "Arithmetic (under PAR-09)." });
const M4 = AE.math;
const LEGS = 4;
const OUTCOMES = 1 << LEGS; // 16
const GMIN = 2, GMAX = 50, GDEFAULT = 4;
const ILLUS = "Illustration: each leg a true 50/50 game priced at −110.";
const guessOf4 = (s) => (typeof s.guesses.c4 === "number" ? s.guesses.c4 : null);
const isActive4 = (index) => { const c = AE.steps.current(); return c && c.chapter === "c4" && c.index === index; };
const oneDec = (v) => (Math.round(v * 10) / 10).toFixed(1); // 13.283 -> "13.3"
let legs = LEGS, segLegs = null;
let dial = null;
function illusOverlay(stage, y) {
const { R, mobile } = stage.geom;
return { key: "c4-illus", type: "text", x: R.x + R.w / 2, y: y != null ? y : R.y + R.h - 6, text: mobile ? "Illustration: 50/50 legs at −110." : ILLUS, font: stage.fonts().cap, color: AE.rgba("bone", 0.42), align: "center" };
}
// ---------- step 2: the guess dial (DOM, placed on the stage) ----------
// Log scale: t in [0,1] -> v = 2 × 25^t (2 … 50). Arc from −135° to +135°.
const DR = 158, DC = 200, DARC = DR * 1.5 * Math.PI;
const tOf = (v) => Math.log(v / 2) / Math.log(25);
const vOf = (t) => 2 * Math.pow(25, t);
const angOf = (t) => ((-135 + 270 * t) * Math.PI) / 180;
const ptOf = (t, r) => [DC + r * Math.sin(angOf(t)), DC - r * Math.cos(angOf(t))];
function buildDial() {
const el = document.createElement("div");
el.className = "c4-dial";
const [x0, y0] = ptOf(0, DR), [x1, y1] = ptOf(1, DR);
const arc = `M${x0.toFixed(2)},${y0.toFixed(2)} A${DR},${DR} 0 1 1 ${x1.toFixed(2)},${y1.toFixed(2)}`;
const MJ = [2, 5, 10, 20, 50];
let ticks = "";
for (let v = GMIN; v <= GMAX; v++) {
const t = tOf(v), mj = MJ.includes(v), [a, b] = ptOf(t, DR - 14), [c, d] = ptOf(t, DR - (mj ? 32 : 24));
ticks += `<line class="c4-tick${mj ? " is-mj" : ""}" data-v="${v}" x1="${a.toFixed(2)}" y1="${b.toFixed(2)}" x2="${c.toFixed(2)}" y2="${d.toFixed(2)}"/>`;
}
const [e0x, e0y] = ptOf(0, DR + 6), [e1x, e1y] = ptOf(1, DR + 6);
el.innerHTML = `<svg class="c4-dial-svg" viewBox="-30 -30 460 460" role="slider" tabindex="0" aria-label="Your guess: how often a four-leg parlay hits" aria-valuemin="${GMIN}" aria-valuemax="${GMAX}">
<g>${ticks}</g>
<path class="c4-track" d="${arc}"/>
<path class="c4-fill" d="${arc}" style="stroke-dasharray:${DARC};stroke-dashoffset:${DARC}"/>
<text class="c4-end" x="${(e0x - 6).toFixed(1)}" y="${(e0y + 34).toFixed(1)}" text-anchor="middle">1 IN 2</text>
<text class="c4-end" x="${(e1x + 6).toFixed(1)}" y="${(e1y + 34).toFixed(1)}" text-anchor="middle">1 IN 50</text>
<g class="c4-knob"><circle class="c4-knob-halo" r="30"/><circle class="c4-knob-o" r="15"/><circle class="c4-knob-i" r="5"/></g>
</svg>
<div class="c4-read" aria-hidden="true"><span class="c4-read-k">1 in</span><span class="c4-read-n">4</span></div>`;
const svg = el.querySelector("svg"), fill = el.querySelector(".c4-fill"), knob = el.querySelector(".c4-knob"), readN = el.querySelector(".c4-read-n");
const tickEls = Array.from(el.querySelectorAll(".c4-tick"));
let value = GDEFAULT, lastT = tOf(GDEFAULT);
function draw(v) {
const t = Math.max(0, Math.min(1, tOf(v))), [x, y] = ptOf(t, DR);
knob.setAttribute("transform", `translate(${x.toFixed(2)},${y.toFixed(2)})`);
fill.style.strokeDashoffset = String(DARC * (1 - t));
tickEls.forEach((l) => l.classList.toggle("is-lit", +l.dataset.v <= v));
readN.textContent = String(v);
svg.setAttribute("aria-valuenow", String(v));
svg.setAttribute("aria-valuetext", `1 in ${v}`);
}
function set(v) { value = Math.max(GMIN, Math.min(GMAX, Math.round(v))); lastT = tOf(value); draw(value); }
function commit() { AE.state.setGuess("c4", value); }
function tFromPointer(e) {
const r = svg.getBoundingClientRect(), sc = r.width / 460;
const cx = r.left + (DC + 30) * sc, cy = r.top + (DC + 30) * sc;
const deg = (Math.atan2(e.clientX - cx, -(e.clientY - cy)) * 180) / Math.PI;
let t = (deg + 135) / 270;
if (t < 0 || t > 1) t = lastT > 0.5 ? 1 : 0; // the gap at the bottom sticks to the nearer end
return t;
}
let dragging = false;
el.addEventListener("pointerdown", (e) => {
dragging = true;
try { el.setPointerCapture(e.pointerId); } catch {}
el.classList.add("is-drag");
set(vOf(tFromPointer(e)));
e.preventDefault();
});
el.addEventListener("pointermove", (e) => { if (dragging) set(vOf(tFromPointer(e))); });
const end = () => { if (!dragging) return; dragging = false; el.classList.remove("is-drag"); commit(); };
el.addEventListener("pointerup", end);
el.addEventListener("pointercancel", end);
svg.addEventListener("keydown", (e) => {
const k = e.key;
let d = 0;
if (k === "ArrowUp" || k === "ArrowRight") d = 1;
else if (k === "ArrowDown" || k === "ArrowLeft") d = -1;
else if (k === "PageUp") d = 5;
else if (k === "PageDown") d = -5;
if (k === "Home") { set(GMIN); commit(); e.preventDefault(); return; }
if (k === "End") { set(GMAX); commit(); e.preventDefault(); return; }
if (d) { set(value + d); commit(); e.preventDefault(); }
});
set(GDEFAULT);
return { el, set, get: () => value };
}
// ---------- step 3: the tree (4 levels, 16 outcomes, one green) ----------
function treeGeom(stage) {
const { R, mobile } = stage.geom, P = [];
let geo;
if (!mobile) {
const left = R.x + R.w * 0.06, right = R.x + R.w * 0.64, top = R.y + 40, bot = R.y + R.h - 36, sp = (bot - top) / OUTCOMES;
for (let n = 0; n < 2 * OUTCOMES - 1; n++) { const L = Math.floor(Math.log2(n + 1)), j = n - (2 ** L - 1); P.push({ L, j, x: left + (L * (right - left)) / LEGS, y: top + (j + 0.5) * 2 ** (LEGS - L) * sp }); }
geo = { left, right, top, bot, sp };
} else {
const left = R.x + 2, right = R.x + R.w - 2, top = R.y + 30, bot = R.y + R.h - 64, sp = (right - left) / OUTCOMES;
for (let n = 0; n < 2 * OUTCOMES - 1; n++) { const L = Math.floor(Math.log2(n + 1)), j = n - (2 ** L - 1); P.push({ L, j, y: top + (L * (bot - top)) / LEGS, x: left + (j + 0.5) * 2 ** (LEGS - L) * sp }); }
geo = { left, right, top, bot, sp };
}
return { P, geo };
}
function sceneTree(stage) {
const { P, geo } = treeGeom(stage), m = stage.geom.mobile, f = stage.fonts();
stage.set(P.length, (n) => {
const p = P[n], win = p.j === 0, par = n > 0 ? P[(n - 1) >> 1] : null;
const base = { x: p.x, y: p.y, delay: AE.reduced ? 0 : p.L * 240, from: par ? { x: par.x, y: par.y } : null };
if (p.L === 0) return { ...base, r: m ? 8 : 12, color: "bone", alpha: 1 };
if (p.L < LEGS) return { ...base, r: m ? 3.8 : 5.2, color: "bone", alpha: win ? 1 : 0.38 };
return win
? { ...base, r: m ? 7 : 10, color: "green", alpha: 1, ease: "pop", flash: true }
: { ...base, r: m ? 4.4 : 6, color: "red", alpha: 0.9, ease: "drop" };
});
const edges = [];
for (let n = 1; n < P.length; n++) edges.push([(n - 1) >> 1, n, P[n].j === 0 ? 0.6 : 0.16]);
const ov = [{ key: "c4-edges", type: "edges", list: edges }];
const last = P.length - 1, winLeaf = OUTCOMES - 1; // leaf n=15 is j=0 (all four hit)
if (!m) {
for (let L = 1; L <= LEGS; L++) ov.push({ key: "c4-tl" + L, type: "text", x: geo.left + (L * (geo.right - geo.left)) / LEGS, y: stage.geom.R.y + 14, text: "leg " + L, font: f.cap, color: AE.rgba("bone", 0.42), align: "center", upper: true, spacing: "0.14em" });
const bx = geo.right + 22, my = (P[winLeaf + 1].y + P[last].y) / 2;
ov.push({ key: "c4-win", type: "text", x: bx, y: P[winLeaf].y + 4.5, text: "all four hit", font: f.label, color: AE.rgba("green", 1), align: "left" });
ov.push({ key: "c4-br", type: "line", x1: bx, y1: P[winLeaf + 1].y - 4, x2: bx, y2: P[last].y + 4, color: AE.rgba("red", 0.55) });
ov.push({ key: "c4-lose", type: "text", x: bx + 12, y: my - 4, text: "miss any one,", font: f.label, color: AE.rgba("red", 1), align: "left" });
ov.push({ key: "c4-lose2", type: "text", x: bx + 12, y: my + 14, text: "the ticket is theirs", font: f.label, color: AE.rgba("red", 1), align: "left" });
} else {
const by = geo.bot + 16;
ov.push({ key: "c4-br", type: "line", x1: P[winLeaf + 1].x, y1: by, x2: P[last].x, y2: by, color: AE.rgba("red", 0.55) });
ov.push({ key: "c4-win", type: "text", x: P[winLeaf].x - 4, y: by + 22, text: "all four hit", font: f.label, color: AE.rgba("green", 1), align: "left" });
ov.push({ key: "c4-lose", type: "text", x: P[last].x + 4, y: by + 22, text: "miss one, it's theirs", font: f.label, color: AE.rgba("red", 1), align: "right" });
}
ov.push(illusOverlay(stage));
stage.overlays(ov);
}
// ---------- steps 4–5: the fair-payout grid ----------
// 16 columns (one per outcome) × 10 rows = 160 dots = a fair payout. Filled column by column,
// the first round(160 × book/fair) are green (what the book pays), the rest red (the cut).
// At 4 legs: 133 green (13.28 columns: "pays like 1 in 13.3"), 27 red.
const GC = 16, GR = 10, GN = GC * GR;
function gridGeom(stage) {
const { R, mobile } = stage.geom;
const topPad = mobile ? 72 : 120, botPad = mobile ? 46 : 64;
const gs = Math.min((R.w * (mobile ? 0.96 : 0.82)) / (GC + 0.4), (R.h - topPad - botPad) / GR, 34); // +0.4: the box's padding stays inside R
const gw = GC * gs, gh = GR * gs, gx0 = R.x + (R.w - gw) / 2;
const gy0 = R.y + topPad + Math.max(0, (R.h - topPad - botPad - gh) / 2);
return { R, mobile, gs, gw, gh, gx0, gy0, pad: gs * 0.2 };
}
const redCount = (n) => Math.round(GN * M4.parlayCut(n));
function sceneGrid(stage, n, o = {}) {
const g = gridGeom(stage), red = redCount(n), green = GN - red;
stage.set(GN, (i) => {
const col = (i / GR) | 0, row = i % GR, paid = i < green;
return {
x: g.gx0 + (col + 0.5) * g.gs, y: g.gy0 + (row + 0.5) * g.gs, r: g.gs * (paid ? 0.33 : 0.3),
color: paid ? "green" : "red", alpha: paid ? 0.95 : 1, ease: paid ? "inout" : "drop",
delay: o.quick ? 0 : 80 + col * 40 + row * 6, dur: o.quick ? 380 : undefined,
};
}, { quick: o.quick });
return g;
}
function gridFrame(stage, g, extra = []) {
const f = stage.fonts(), x1 = g.gx0 + g.gw, y1 = g.gy0 + g.gh, ly = y1 + g.pad + (g.mobile ? 20 : 24);
return [
{ key: "c4-fair", type: "rect", x: g.gx0 - g.pad, y: g.gy0 - g.pad, w: g.gw + g.pad * 2, h: g.gh + g.pad * 2, color: AE.rgba("bone", 0.28), dash: [2, 4] },
{ key: "c4-gp", type: "text", x: g.gx0 - g.pad, y: ly, text: "what they pay", font: f.label, color: AE.rgba("green", 0.9), align: "left" },
{ key: "c4-gk", type: "text", x: x1 + g.pad, y: ly, text: "their cut", font: f.label, color: AE.rgba("red", 1), align: "right" },
illusOverlay(stage, ly + (g.mobile ? 22 : 30)),
].concat(extra);
}
function sceneLegsGrid(stage, o = {}) {
const g = sceneGrid(stage, legs, o), f = stage.fonts();
const hy = g.gy0 - g.pad - (g.mobile ? 30 : 46), cy = g.gy0 - g.pad - (g.mobile ? 12 : 18);
stage.glow({ red: 0.35 + 0.08 * legs });
stage.overlays(gridFrame(stage, g, [
// true at any leg count: the box is always one fair payout; red is what the book holds back
{ key: "c4-fairl", type: "text", x: g.gx0 - g.pad, y: cy, text: "the box: a fair payout", font: f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.12em" },
{ key: "c4-cut", type: "text", x: g.gx0 + g.gw + g.pad, y: hy, font: f.hero, color: AE.rgba("red", 1), align: "right", count: { to: M4.parlayCut(legs) * 100, dur: o.quick ? 600 : 1400, fmt: (v) => v.toFixed(2) + "%" } },
{ key: "c4-cutc", type: "text", x: g.gx0 + g.gw + g.pad, y: cy, text: `their cut, ${legs} ${legs === 1 ? "leg" : "legs"}`, font: f.cap, color: AE.rgba("bone", 0.5), align: "right", upper: true, spacing: "0.14em" },
]), o.quick ? { delay: 0 } : undefined);
stage.label(`Fair-payout grid for a ${legs}-leg parlay: ${GN - redCount(legs)} green dots paid, ${redCount(legs)} red dots kept. Their cut: ${AE.fmt.pct(M4.parlayCut(legs))}.`);
}
AE.chapter({
id: "c4",
order: 4,
title: "The gimme",
lab: "parlay-xray",
lesson: "Every extra leg is a fee you don't see.",
sources: ["PAR-09", "PAR-10", "PAR-11", "PAR-12", "PAR-13", "PAR-14", "PAR-15", "PAR-02"],
steps: [
{
aria: "A dial from 1 in 2 to 1 in 50. Turn it to guess how often a four-leg parlay hits.",
html: `<h2>How often does a 4-leg parlay hit?</h2><p>Four games on one ticket, each a coin flip. Turn the dial.</p><p class="ae-assume">${ILLUS}</p>`,
enter(stage, state) {
const { R, mobile } = stage.geom;
stage.halo(0.8);
stage.set(0, null, { quick: true });
stage.overlays([]);
const size = Math.min(R.w * (mobile ? 0.9 : 0.8), R.h * 0.86, 440); // no floor: stays inside R (safe area)
dial.el.style.width = size + "px";
dial.el.style.height = size + "px";
dial.set(guessOf4(state) ?? GDEFAULT);
stage.place(dial.el, R.x + R.w / 2, R.y + (R.h - size) / 2, { align: "center" });
},
},
{
aria: "A grid of 160 dots, a fair payout: 16 columns, one per outcome. 133 green dots are what the book pays; the last 27 red dots are its cut, 16.98% at four legs. Pick 1 to 8 legs: the cut grows from 4.55% at one leg to 31.08% at eight.",
html: `<h2>It hits 1 in 16. They pay like it’s 1 in ${oneDec(M4.parlayPaysLikeOneIn(LEGS))}.</h2><p><span data-c4="you"></span> <span class="r">The gap is what you lose</span>, and it grows with every leg you add.</p><div class="ae-slot" data-slot="c4-legs"></div>`,
enter(stage, state, ctx) {
stage.halo(0.6);
if (segLegs) segLegs.set(legs);
sceneLegsGrid(stage);
const g = guessOf4(state);
ctx.card.querySelector('[data-c4="you"]').textContent = g == null ? "" : `You said 1 in ${g}.${g === OUTCOMES ? " Dead on." : ""}`;
},
},
],
drawer: {
html: `
<div><span class="ae-label">The illustration</span>Every leg is a true 50/50 game priced at −110. Real legs aren’t coin flips, but the book’s cut works the same way.</div>
<div><span class="ae-label">How often it hits</span>Each leg is 1 in 2, so four in a row is <code>2 × 2 × 2 × 2 = 16</code>: <strong>1 in 16</strong>. For <code>n</code> legs, <code>1 in 2ⁿ</code>.</div>
<div><span class="ae-label">What they pay</span>Each −110 leg pays <code>1.90909×</code>; fair would be <code>2×</code>. Four legs pay <code>1.90909⁴ = 13.28×</code> your stake (they quote it as +1228). Fair is <code>2⁴ = 16×</code> (+1500). So they pay you like it’s 1 in 13.3 when it’s 1 in 16.</div>
<div><span class="ae-label">A $10 ticket</span>Four legs pay <code>$10 × 13.283 = $132.83</code> if it hits, against a fair <strong>$160.00</strong>. On average each ticket costs you <code>$10 × 16.98% = $1.70</code>.</div>
<div><span class="ae-label">Their cut, by legs</span><code>1 − (1.90909 / 2)ⁿ</code>: 1 leg 4.55% · 2 8.88% · 3 13.03% · 4 16.98% · 5 20.75% · 6 24.36% · 7 27.79% · 8 31.08%.</div>
<div><span class="ae-label">The grid</span>160 dots are a fair payout, 10 per outcome. Green is what the book pays: <code>160 × 13.283 / 16 = 133</code> dots at four legs. Red is the cut: 27 dots.</div>
<div><span class="ae-label">Why the gimme is the book’s favorite</span>Per dollar bet, a four-leg parlay leaves the book <strong>16.98%</strong>, almost four times the <strong>4.55%</strong> on a straight bet. The cut compounds with every leg you add.</div>`,
},
init({ cards }) {
dial = buildDial();
segLegs = AE.ui.segmented({
label: "Legs",
value: legs,
options: [1, 2, 3, 4, 5, 6, 7, 8].map((n) => ({ value: n, label: String(n), aria: n + (n === 1 ? " leg" : " legs") })),
onChange: (n) => {
legs = n;
if (isActive4(1)) sceneLegsGrid(AE.stage, { quick: true });
},
});
cards[1].querySelector('[data-slot="c4-legs"]').appendChild(segLegs.el);
AE.state.subscribe((s) => dial.set(guessOf4(s) ?? GDEFAULT), ["guesses"]);
},
});
} catch (e) { console.error("[About Even] chapters/c04-gimme.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c05-trading.js ---- */
;(function (AE) {
"use strict";
try {
// C5. It's called trading. It's still a bet. (spec §3 C5)
// Step 1: one Kentucky game as a sportsbook ticket and as a prediction-market contract; the ticket
// morphs between the two skins (DOM element placed on the stage). 50 dots = the $50 stake.
// Step 2: 100 one-dollar dots, YES $50 and NO $50, pour into one pot; then Kentucky wins and every
// dollar goes to YES: before fees the traders lose $0 combined (PM-02). (Fix round 1, P1-8:
// the pot and the settle were two steps; they play in sequence in one step now.)
// Step 3: after fees: a Kalshi-style taker fee on both sides (100 contracts at 50¢ = $1.75 a side,
// 14 quarter-dollar dots) drops to the platform. Headline number = the fee-alone floor:
// $3.50 ÷ $103.50 = −3.38% ≈ −3.4% (PM-14, PM-16; AE.math.feeDrag(0.5).perOutlay).
// Step 4: the investing contrast, in words only (no market-return number, DNU-32).
// Fee formula per the GWU paper (PM-03); the spread example sits in the guide's range (PM-11). No platform is recommended; volume appears only as "contract volume".
const GWU = "https://www2.gwu.edu/~forcpgm/2026-001.pdf";
const ACT184 = "https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf";
const KYAG = "https://www.ag.ky.gov/Press%20Release%20Attachments/2026.06.17%20As%20Filed%20KYOAG%20v.%20Kalshi%20et%20al%20-%20Final.pdf";
const FOLEY = "https://www.foley.com/?p=130779";
const KEYT = "https://keyt.com/news/money-and-business/cnn-business-consumer/2026/08/28/young-adults-under-21-traded-5-billion-on-kalshi-this-year-amid-prediction-market-frenzy/";
AE.source({ id: "PM-01", label: "Bürgi, Deng & Whelan, GWU CER working paper 2026-001 (Feb 2026), p. 18: an event contract pays $1 if it happens, $0 if not; price ≈ implied probability; YES + NO = $1", url: GWU });
AE.source({ id: "PM-02", label: "GWU working paper 2026-001, p. 18: “Prior to fees, Kalshi participants simply swap money”", url: GWU, note: "So the average return before fees is zero." });
AE.source({ id: "PM-03", label: "Bürgi, Deng & Whelan, GWU working paper 2026-001, p. 7: Kalshi’s taker fee is $0.07 × P × (1 − P) a contract, total rounded up to the nearest cent", url: GWU, note: "Fees vary by market, so the fee figures here are an illustration of this formula." });
AE.source({ id: "PM-04", label: "Max fee per contract: 0.07 × 0.5 × 0.5 = 1.75¢ at 50¢ (arithmetic on PM-03)" });
AE.source({ id: "PM-11", label: "Bid-ask spread: 1–2¢ on liquid NFL moneylines, 4–6¢ on thin markets (Action Network guide)", url: "https://www.actionnetwork.com/nfl/prediction-market-vs-sportsbook", note: "The 2¢ example sits inside that range." });
AE.source({ id: "PM-12", label: "Worked example: $100 at −110 on a coin flip: expected −$4.55 (arithmetic)", note: "The 50/50 game is an illustration." });
AE.source({ id: "PM-13", label: "Worked example: YES at 51¢ in a 2¢ market, 189 contracts: outlay $99.70, expected −$5.20 = $1.89 spread + $3.31 fee (arithmetic)", note: "An illustration; fee formula per PM-03." });
AE.source({ id: "PM-14", label: "Worked example: 193 contracts at a fair 50¢: fee $3.38, expected −3.4%: the fee alone (arithmetic)" });
AE.source({ id: "PM-16", label: "Zero-sum check: both sides pay the fee, the pot pays $1 a contract, the group gets $1.00 back on $1.035 = −3.4% (arithmetic)" });
AE.source({ id: "PM-27", label: "Minimum ages: Kentucky sportsbooks 21 (Act 184 §22); Robinhood event contracts 18 (Robinhood’s help page)", url: ACT184 });
// Fix round 1 (P0-2): stated as a policy point (two rules for one bet), never as a path for anyone under 21 (DNU-39).
AE.source({ id: "PM-28", label: "The age gap, a policy point: Kentucky set sportsbooks at 21; prediction apps set their own minimum, some at 18. Same bet, different rule (follows from PM-27)" });
AE.source({ id: "PM-31", label: "NCPG: trading event contracts is “functionally gambling, regardless of how it is legally defined”", url: "https://www.ncpgambling.org/advocacy/consumer-protection-prediction-markets/", note: "Disclosure: NCPG received a $2 million donation from Kalshi (CNN via KEYT)." });
AE.source({ id: "PM-32", label: "Investing vs. event contracts: a contract has no underlying cash flow (zero-sum before fees, negative after)", note: "The zero-sum half is PM-02. No market return is shown." });
AE.source({ id: "PM-34", label: "Selling before the game ends is a second trade at the new price, with a second fee (follows from PM-03)" });
AE.source({ id: "LAW-11", label: "KRS 230.3615 history: amended by 2026 Ky. Acts ch. 184 (HB 904), effective July 15, 2026", url: "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137" });
AE.source({ id: "LAW-15", label: "Act 184 (HB 904) §22, new KRS 230.805(9): Kentucky tracks, sportsbooks and fantasy licensees may not partner with prediction-market platforms in Kentucky", url: ACT184, note: "It doesn’t ban Kalshi, Polymarket or Robinhood from serving Kentuckians." });
AE.source({ id: "LAW-26", label: "Kentucky AG complaint, 6/17/2026, Franklin Circuit Court: Commonwealth v. KalshiEX et al. (Kalshi, Robinhood, Webull, Coinbase); separate suits vs Polymarket and VGW", url: KYAG });
AE.source({ id: "LAW-30", label: "Sixth Circuit (covers Kentucky), KalshiEx v. Schuler / Orgel, 9/25/2026: no preemption of state gambling law; rehearing petition filed 10/9/2026", url: FOLEY, note: "Foley & Lardner case tracker, Nov. 10, 2026." });
const N_SIDE = 50, N_POT = 100, N_FEE = 14; // 14 quarter-dollar dots = $3.50
const PRICE = 0.5, CONTRACTS = 100;
const FEE_SIDE = AE.math.predictionFee(CONTRACTS, PRICE).fee; // $1.75 (illustrative rounding)
const FEE_BOTH = FEE_SIDE * 2; // $3.50
const GROUP_RET = -FEE_BOTH / (N_POT + FEE_BOTH); // −0.0338 ≈ −3.4% (= −feeDrag(0.5).perOutlay)
const HERO_PCT = "−" + (Math.abs(GROUP_RET) * 100).toFixed(1) + "%";
// fixed dot orders, seeded so every visit looks the same
const potSlot = new Int16Array(N_POT), winSlot = new Int16Array(N_POT);
AE.math.shuffle([...Array(N_POT).keys()], AE.math.rng(505)).forEach((id, j) => (potSlot[id] = j));
AE.math.shuffle([...Array(N_POT).keys()], AE.math.rng(515)).forEach((id, j) => (winSlot[id] = j));
// ---------- the ticket (step 1) ----------
const TICKET_ARIA = {
book: "Sportsbook ticket, illustration: Kentucky vs. Louisville. Kentucky to win at minus 110. Stake $50.",
market: "Prediction-market contract, illustration: Kentucky vs. Louisville. Will Kentucky win? Yes at 50 cents. Cost $50.",
};
const sw = (a, b) => `<span class="c5-sw"><b class="a">${a}</b><b class="b">${b}</b></span>`;
let ticket = null, seg = null, mode = "book", autoT = 0, touched = false;
function makeTicket() {
const el = AE.h(`<div class="c5-ticket" data-chapter="c5" data-mode="book" role="img">
<div class="c5-t-in" aria-hidden="true">
<div class="c5-t-top">${sw("Sportsbook", "Prediction market")}<span class="c5-t-ill">Illustration</span></div>
<div class="c5-t-game">Kentucky vs. Louisville</div>
<div class="c5-t-pick">${sw("Kentucky to win", "Will Kentucky win?")}</div>
<div class="c5-t-hero">${sw("−110", "50¢")}</div>
<div class="c5-t-unit">${sw("moneyline", "price of one YES")}</div>
<div class="c5-t-row">${sw("Stake", "Cost")}<span class="c5-t-amt">$50</span></div>
<div class="c5-t-cta">${sw("Place bet", "Buy YES")}</div>
</div>
</div>`);
el.setAttribute("aria-label", TICKET_ARIA.book);
return el;
}
function setMode(m) {
mode = m;
if (ticket) { ticket.dataset.mode = m; ticket.setAttribute("aria-label", TICKET_ARIA[m]); }
if (seg) seg.set(m);
}
function stopAuto() { clearTimeout(autoT); autoT = 0; }
function startAuto() {
stopAuto();
if (AE.reduced || touched) return;
const loop = () => { setMode(mode === "book" ? "market" : "book"); autoT = setTimeout(loop, 2600); };
autoT = setTimeout(loop, 1800);
}
// ---------- geometry ----------
function g1(stage) {
const { R, mobile } = stage.geom;
const tw = Math.min(R.w - 8, mobile ? 300 : 320), th = mobile ? 206 : 246;
// no size floor: on a short phone region the stake dots shrink rather than run under the card (safe area)
const s = Math.max(1, Math.min(R.w / 13, mobile ? 18 : 22, (R.h - th - 90) / 6));
const blockH = th + 34 + 5 * s + 30;
const top = R.y + Math.max(0, (R.h - blockH) / 2);
const cx = R.x + R.w / 2, gy = top + th + 34, gx = cx - 5 * s;
return { R, mobile, tw, th, s, r: s * 0.36, top, cx, gx, gy };
}
function g2(stage) {
const { R, mobile } = stage.geom;
const COLS = 24, topPad = mobile ? 66 : 108, labH = mobile ? 24 : 30, botPad = mobile ? 58 : 76;
const s = Math.min(R.w / COLS, (R.h - topPad - labH - botPad) / 10, 26);
const W = COLS * s, x0 = R.x + (R.w - W) / 2;
const top = R.y + Math.max(0, (R.h - (topPad + labH + 10 * s + botPad)) / 2);
const gy = top + topPad + labH, base = gy + 10 * s;
const heroY = top + (mobile ? 38 : 60);
return { R, mobile, s, r: s * 0.36, x0, W, gy, base, heroY, capY: heroY + (mobile ? 20 : 26), cx: x0 + W / 2 };
}
// a cell in a block that is `cols` wide, filled from the bottom row up
const cell = (g, col0, cols, j) => ({ x: g.x0 + (col0 + (j % cols)) * g.s + g.s / 2, y: g.base - (Math.floor(j / cols) + 0.5) * g.s });
const yesXY = (g, j) => cell(g, 0, 5, j);
const noXY = (g, j) => cell(g, 19, 5, j);
const potXY = (g, id) => cell(g, 7, 10, potSlot[id]);
const winXY = (g, id) => cell(g, 0, 10, winSlot[id]);
function feeXY(g, k) { // 14 quarters in two rows of 7 under the baseline, centered
const sp = g.s * 0.62, c = k % 7, row = Math.floor(k / 7);
return { x: g.cx + (c - 3) * sp, y: g.base + g.s * 0.95 + row * sp };
}
let pourT = 0;
const clearPour = () => { clearTimeout(pourT); pourT = 0; };
function zoneLabels(g, f, o) {
const y = g.gy - (g.mobile ? 10 : 14);
const zone = (key, col0) => ({ key, type: "rect", x: g.x0 + col0 * g.s - 3, y: g.gy - 3, w: 5 * g.s + 6, h: 10 * g.s + 6, dash: [2, 5], color: AE.rgba("bone", 0.13) });
return [
{ key: "c5-base", type: "line", x1: g.x0, y1: g.base + 5, x2: g.x0 + g.W, y2: g.base + 5, color: AE.rgba("bone", 0.14) },
o.noYesZone ? null : zone("c5-zyes", 0), zone("c5-zno", 19),
{ key: "c5-lyes", type: "text", x: g.x0, y, text: o.yes, font: f.label, color: o.yesColor || AE.rgba("bone", 0.85), align: "left" },
{ key: "c5-lno", type: "text", x: g.x0 + g.W, y, text: o.no, font: f.label, color: o.noColor || AE.rgba("bone", 0.85), align: "right" },
].concat(o.pot ? [{ key: "c5-lpot", type: "text", x: g.cx, y, text: o.pot, font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.14em" }] : []);
}
function winners(stage, g, alpha, quick) {
return (i) => {
if (i >= N_POT) return null;
const p = winXY(g, i);
return { x: p.x, y: p.y, r: g.r, color: "green", alpha, ease: quick ? "inout" : "pop", delay: quick ? 0 : winSlot[i] * 9 + stage.rnd[i] * 120, dur: quick ? 500 : 1000 };
};
}
function feeDots(stage, g, alpha, animate, inPot) {
return (i) => {
if (i < N_POT && inPot) { const p = potXY(g, i); return { x: p.x, y: p.y, r: g.r, color: "bone", alpha, delay: potSlot[i] * 6, dur: 900 }; }
if (i < N_POT) return winners(stage, g, alpha, true)(i);
const k = i - N_POT, p = feeXY(g, k), fromYes = k < 7;
return {
x: p.x, y: p.y, r: g.r * 0.5, color: "red", alpha: 1, ease: "drop",
from: { x: g.x0 + (fromYes ? 2.5 : 21.5) * g.s, y: g.gy + g.s * 2 },
delay: animate ? 380 + k * 95 : 0, dur: animate ? 1150 : 500,
};
};
}
AE.chapter({
id: "c5",
order: 5,
title: "It's called trading. It's still a bet.",
tab: "how",
how: { slug: "prediction-markets", label: "Prediction markets", blurb: "Sold as trading. The fees and the math say it’s still a bet." },
lesson: "A new name doesn't change the math.",
kicker: "05 \u00b7 It\u2019s called trading",
lab: "trade-or-bet",
sources: ["PM-01", "PM-02", "PM-03", "PM-04", "PM-11", "PM-12", "PM-13", "PM-14", "PM-16", "PM-27", "PM-28", "PM-31", "PM-32", "PM-34", "LAW-11", "LAW-15", "LAW-26", "LAW-30"],
steps: [
{
aria: "Illustration: one Kentucky game shown as a sportsbook ticket, Kentucky to win at minus 110, and as a prediction-market contract, YES at 50 cents. The ticket switches between the two. Below it, 50 dots: the $50 stake, a dollar a dot.",
html: `<h2>Same bet. Different name.</h2><p>One Kentucky game: a sportsbook ticket, then a prediction-market contract.</p><div class="ae-slot" data-slot="c5-seg"></div>`,
enter(stage, state, ctx) {
clearPour();
const g = g1(stage), f = stage.fonts();
stage.halo(0.7);
if (!ticket) ticket = makeTicket();
ticket.style.width = g.tw + "px";
ticket.style.height = g.th + "px";
ticket.classList.remove("is-shown");
stage.place(ticket, g.cx, g.top, { align: "center" });
stage.set(N_SIDE, (i) => {
const p = AE.layout.grid(i, { x0: g.gx, y0: g.gy, cols: 10, size: g.s });
return { x: p.x, y: p.y, r: g.r, color: "bone", alpha: 0.9, delay: ctx.resize ? 0 : 200 + stage.rnd[i] * 380 };
});
stage.overlays([
{ key: "c5-stake", type: "text", x: g.cx, y: g.gy + 5 * g.s + 22, text: "the stake, a dollar a dot", font: f.cap, color: AE.rgba("bone", 0.45), align: "center", upper: true, spacing: "0.12em" },
]);
startAuto();
},
exit() { stopAuto(); },
},
{
aria: "100 one-dollar dots: 50 on YES at the left, 50 on NO at the right. They pour together into one pot. Kentucky wins: all 100 dots move to the YES side and turn green. Counter: $0 lost by all the traders combined, before fees.",
html: `<h2>Before fees, money just changes hands.</h2><p>Every YES needs someone’s NO: a dollar a dot, $50 a side, one pot. Kentucky wins, so it all goes to <span class="g">YES</span>.</p><p class="ae-src">“Simply swap money”: Bürgi, Deng & Whelan, GWU working paper, Feb 2026.</p>`,
enter(stage, state, ctx) {
clearPour();
const g = g2(stage), f = stage.fonts();
stage.halo(0.8);
const still = () => { const c = AE.steps.current(); return c && c.chapter === "c5" && c.index === 1; };
const settle = (quick) => {
stage.halo(1);
stage.glow({ green: 0.45 });
stage.set(N_POT, winners(stage, g, 0.92, quick));
stage.overlays(zoneLabels(g, f, { yes: "YES wins", no: "NO", yesColor: AE.rgba("green", 1), noColor: AE.rgba("bone", 0.35), noYesZone: true }).concat([
{ key: "c5-zero", type: "text", x: g.cx, y: g.heroY, text: "$0", font: f.hero, color: AE.rgba("bone", 0.95), align: "center" },
{ key: "c5-zeroc", type: "text", x: g.cx, y: g.capY, text: "lost by all traders, combined", font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.14em" },
]), quick ? { delay: 0 } : undefined);
};
const animate = !AE.reduced && !ctx.resize && !ctx.refresh && ctx.dir !== -1;
if (!animate) { settle(true); return; }
stage.overlays(zoneLabels(g, f, { yes: "YES · $50", no: "NO · $50", pot: "one pot" }));
// both sides line up (YES from the stake below the ticket, NO flies in from the right) …
stage.set(N_POT, (i) => {
const yes = i < N_SIDE, p = yes ? yesXY(g, i) : noXY(g, i - N_SIDE);
return { x: p.x, y: p.y, r: g.r, color: "bone", alpha: 0.9, from: { x: g.R.x + g.R.w + 24, y: p.y }, delay: yes ? stage.rnd[i] * 260 : 120 + stage.rnd[i] * 420 };
});
// … pour into the pot …
pourT = setTimeout(() => {
if (!still()) return;
stage.set(N_POT, (i) => {
const p = potXY(g, i);
return { x: p.x, y: p.y, r: g.r, color: "bone", alpha: 0.9, delay: potSlot[i] * 7 + stage.rnd[i] * 90, dur: 1000 };
});
// … and Kentucky wins: the whole pot goes to YES
pourT = setTimeout(() => { if (still()) settle(false); }, 1700);
}, 1500);
},
exit() { clearPour(); },
},
{
aria: `After fees: each side also paid a fee, shown as 14 small red dots, a quarter each, that drop to the platform, $3.50 in all. All traders combined finish ${HERO_PCT.replace("−", "minus ")}. Illustration.`,
html: `<h2>After fees, the platform takes its <span class="r">slice</span>.</h2><p>Everyone together finishes down, even at a fair price.</p><p class="ae-assume">Illustration: a Kalshi-style taker fee on both sides. A bid-ask spread would come on top.</p>`,
enter(stage, state, ctx) {
clearPour();
const g = g2(stage), f = stage.fonts();
stage.halo(1);
stage.glow({ red: 0.6, green: 0.15 });
stage.set(N_POT + N_FEE, feeDots(stage, g, 0.55, !ctx.resize));
const fy = feeXY(g, 7).y + (g.mobile ? 20 : 24);
stage.overlays(zoneLabels(g, f, { yes: "YES wins", no: "NO", yesColor: AE.rgba("green", 0.6), noColor: AE.rgba("bone", 0.3), noYesZone: true }).concat([
{ key: "c5-pct", type: "text", x: g.cx, y: g.heroY, text: HERO_PCT, font: f.hero, color: AE.rgba("red", 1), align: "center" },
{ key: "c5-pctc", type: "text", x: g.cx, y: g.capY, text: "all traders combined, after fees", font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.14em" },
{ key: "c5-plat", type: "text", x: g.cx, y: fy, text: "the platform · " + AE.fmt.money(FEE_BOTH, { cents: true }), font: f.label, color: AE.rgba("red", 1), align: "center" },
// B13: the fee dots are quarters, not dollars; said in words so the screen keeps two numbers
{ key: "c5-qtr", type: "text", x: g.cx, y: fy + (g.mobile ? 16 : 20), text: "small dots are quarters", font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.12em" },
]), { delay: ctx.resize ? 0 : 900 });
},
},
{
aria: "The 100 dollars gather back into the pot, dimmed, with the platform's red slice below it. The pot never grew.",
html: `<h2>It’s called trading. It’s still a bet.</h2><p>Investing puts money into something that can grow. This pot only changes hands.</p><span data-ae-how></span>`,
enter(stage, state, ctx) {
clearPour();
const g = g2(stage), f = stage.fonts();
stage.halo(0.6);
stage.glow({ red: 0.45 });
stage.set(N_POT + N_FEE, feeDots(stage, g, 0.4, false, true));
const fy = feeXY(g, 7).y + (g.mobile ? 20 : 24);
stage.overlays(zoneLabels(g, f, { yes: "YES", no: "NO", yesColor: AE.rgba("bone", 0.4), noColor: AE.rgba("bone", 0.3) }).concat([
{ key: "c5-grow", type: "text", x: g.cx, y: g.capY, text: "the pot never grew", font: f.cap, color: AE.rgba("bone", 0.6), align: "center", upper: true, spacing: "0.14em" },
{ key: "c5-plat", type: "text", x: g.cx, y: fy, text: "the platform", font: f.label, color: AE.rgba("red", 1), align: "center" },
]), { delay: ctx.resize ? 0 : 200 });
},
},
],
drawer: {
html: `
<div><span class="ae-label">The contract</span>An event contract pays <strong>$1</strong> if the thing happens and <strong>$0</strong> if it doesn’t. Its price, 1¢ to 99¢, works like a probability: a contract at <code>50¢</code> says about a 50% chance. A YES and a NO on the same game add up to <code>$1.00</code>.</div>
<div><span class="ae-label">Same bet</span>The ticket is an illustration, not a real line. At a sportsbook the cut is baked into the odds (<code>−110</code> implies <code>110 ÷ 210 = 52.4%</code>). On an exchange it’s charged as a fee and a spread. Either way you’re paid only if Kentucky wins.</div>
<div><span class="ae-label">The pot</span>100 contracts a side at 50¢: YES puts in <strong>$50</strong>, NO puts in <strong>$50</strong>, and whoever’s right gets <strong>$100</strong>. A GWU working paper on Kalshi puts it plainly: “Prior to fees, Kalshi participants simply swap money,” so the average return before fees is zero.</div>
<div><span class="ae-label">The fee</span>Kalshi-style taker fee: <code>round up(0.07 × C × P × (1 − P))</code>, C contracts at price P. It’s largest at 50¢: <code>0.07 × 0.5 × 0.5 = 1.75¢</code> a contract, so <strong>$1.75</strong> a side here, <strong>$3.50</strong> for both. The traders put in <code>$103.50</code> and get <code>$100</code> back: <code>−3.50 ÷ 103.50 = −3.4%</code>. That’s the floor, at a fair price, before any spread. The formula is the one a GWU study documents for Kalshi; fees vary by market, so treat this as an illustration.</div>
<div><span class="ae-label">The spread (illustrative)</span>You usually buy at the ask, a cent or two above the middle. Guides describe 1–2¢ on busy NFL games and 4–6¢ on thin ones. Example: YES at <code>51¢</code> in a 2¢ market, 189 contracts: <code>$96.39 + $3.31 fee = $99.70</code> in, expected <code>−$5.20</code> (<strong>−5.2%</strong>) = $1.89 spread + $3.31 fee.</div>
<div><span class="ae-label">Next to a sportsbook</span>$100 at <code>−110</code> on a true coin flip: win $90.91 or lose $100, expected <code>−$4.55</code>.</div>
<div><span class="ae-label">“Trading”</span>Selling before the game ends is a second trade at the new price, with a second fee. Investing puts money into something that can grow, like a business and its earnings. An event contract has nothing underneath it: zero-sum before fees, less than that after. (No market return is quoted here, on purpose.)</div>
<div><span class="ae-label">Kentucky</span>HB 904, in effect since July 15, 2026, bars Kentucky-licensed tracks, sportsbooks and fantasy operators from partnering with prediction-market platforms. It doesn’t ban the apps. In June 2026 Kentucky’s Attorney General sued Kalshi, Robinhood, Webull and Coinbase (and, separately, Polymarket), arguing sports event contracts are unlicensed sports wagering. In September 2026 the Sixth Circuit, the federal appeals court over Kentucky, held that state gambling law isn’t preempted for Kalshi’s sports contracts; Kalshi has asked for a rehearing.</div>
<div><span class="ae-label">The age gap</span>Kentucky set sportsbooks at 21 in HB 904. Prediction apps set their own minimum, some at 18. Same bet, different rule.</div>
<div><span class="ae-label">Who calls it gambling</span>The National Council on Problem Gambling calls trading event contracts “functionally gambling, regardless of how it is legally defined.” Disclosure: NCPG received a <strong>$2 million</strong> donation from Kalshi, per CNN.</div>`,
},
init({ cards }) {
const host = cards[0].querySelector('[data-slot="c5-seg"]');
seg = AE.ui.segmented({
label: "Show as",
options: [{ value: "book", label: "Sportsbook" }, { value: "market", label: "Market", aria: "Prediction market" }],
value: mode,
onChange: (v) => { touched = true; stopAuto(); setMode(v); },
});
host.appendChild(seg.el);
},
});
} catch (e) { console.error("[About Even] chapters/c05-trading.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c06-off-the-top.js ---- */
;(function (AE) {
"use strict";
try {
// C6. Off the top (spec §3 C6). Horse racing is pari-mutuel: everyone's win bets go in one pool,
// the track skims its cut first, and the winners split what's left.
// 200 dots = a $10,000 win pool ($50 a dot; illustration, not a real race). 17.5% = 35 dots skimmed
// red off the top to the track; 22% (trifecta) = 44 dots. $2,000 on the winner -> a $2 ticket pays
// $8.24 (fair, no cut: $10.00). Every payout number on screen comes from AE.math.pariMutuel
// (810 KAR 6:020 formula, penny breakage, $2.20 minimum). No state is written.
// Fix round 1: "the winners split" and "without the cut" are one step (P1-8); the caption names
// the pool on screen, win or trifecta (B11).
const KRS3615 = "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137";
const KAR = "https://www.law.cornell.edu/regulations/kentucky/810-KAR-6-020";
const KRS295 = "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58139";
const KYD = "https://www.kentuckyderby.com/horses/news/how-kentucky-derby-betting-traditions-have-changed-over-time-since-1875/";
const KHRGC = "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf";
const CDI = "https://www.churchilldownsincorporated.com/?p=5367";
AE.source({ id: "RACE-01", label: "KRS 230.3615(1): max takeout on single-horse bets (win, place, show), Thoroughbred, 17.5%", url: KRS3615, note: "Includes the KRS 138.510 tax and breaks. Effective version 7/15/2026." });
AE.source({ id: "RACE-02", label: "KRS 230.3615(2): max takeout on bets on two or more horses, 22% of gross handle", url: KRS3615 });
AE.source({ id: "RACE-03", label: "KRS 230.3615(3): minimum payoff $1.10 per $1 ($2.20 on $2); $1.05 per $1 only in a minus pool", url: KRS3615 });
AE.source({ id: "RACE-06", label: "KRS 230.295 and 2022 HB 607: breakage to the penny since 2022; cash may round to 5¢ when pennies aren’t available", url: KRS295 });
AE.source({ id: "RACE-08", label: "810 KAR 6:020: takeout = gross × takeout %; net pool = gross − takeout", url: KAR });
AE.source({ id: "RACE-09", label: "810 KAR 6:020: win payout. Profit per $1 = (net − bet on winner) ÷ bet on winner; $1 price = that + $1, rounded down to the break point", url: KAR });
AE.source({ id: "RACE-12", label: "Worked win pool (arithmetic on 810 KAR 6:020): $10,000 at 17.5% → $8,250; $2,000 on the winner → $2 pays $8.24; breakage $10", note: "Illustrative pool, not a real race. Checked with exact decimal arithmetic; formula in How this works." });
AE.source({ id: "RACE-13", label: "Same pool under the old dime breakage (before 2022): $2 pays $8.20, breakage $50", note: "Historical comparison only." });
AE.source({ id: "RACE-17", label: "Churchill Downs, Fall Meet 2026 takeout: win/place/show 17.50%; exacta, trifecta, superfecta 22.00%", url: "https://www.churchilldowns.com/come-to-the-track/visiting-information/event-information/" });
AE.source({ id: "RACE-19", label: "Keeneland wagering details: win/place 16%, show 10% on-track, exacta 19.5%, trifecta and superfecta 22%", url: "https://www.keeneland.com/racing/wagering/details" });
AE.source({ id: "RACE-20", label: "Churchill Downs Inc., May 2, 2026: Kentucky Derby Day all-sources handle $340 million", url: CDI });
AE.source({ id: "RACE-27", label: "KHRGC 2025 Annual Report: historical horse racing wagering $11.2 billion in 2025", url: KHRGC });
AE.source({ id: "RACE-32", label: "KHRGC 2025 Annual Report, p. 22: what historical horse racing is", url: KHRGC });
AE.source({ id: "RACE-40", label: "Racing age 18+ (age of majority, KRS 2.015 as amended by 2026 HB 904 §40)", url: "https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf", note: "Kentucky has no separate age statute for racing; 18 is the age of majority." });
AE.source({ id: "RACE-41", label: "kentuckyderby.com: first Kentucky Derby, May 17, 1875, bet by auction pools", url: KYD, note: "Track-owned source." });
AE.source({ id: "RACE-42", label: "kentuckyderby.com: pari-mutuel came back for the 1908 Derby and has been standard since", url: KYD, note: "Track-owned source." });
AE.source({ id: "RACE-47", label: "keeneland.com/about: Keeneland opened October 1936", url: "https://www.keeneland.com/about" });
AE.source({ id: "LAW-19", label: "2022 HB 607 (penny breakage): signed 4/8/2022, effective 7/14/2022", url: "https://apps.legislature.ky.gov/record/22RS/HB607.html" });
const N = 200; // dots in the pool
const POOL = 10000; // $ (illustration)
const PER_DOT = POOL / N; // $50
const ON_WINNER = 2000; // $ bet on the winning horse
const BETS = {
win: { label: "Win", rate: AE.math.TAKEOUT.win, name: "win bets" }, // 17.5% cap, KRS 230.3615(1)
tri: { label: "Trifecta", rate: AE.math.TAKEOUT.exotic, name: "trifectas" }, // 22% cap, KRS 230.3615(2)
};
const skimOf = (rate) => Math.round(rate * N); // 35 / 44 dots
const pctTxt = (r) => (Math.round(r * 1000) / 10).toString() + "%";
const WORKED = AE.math.pariMutuel({ pool: POOL, takeout: BETS.win.rate, onWinner: ON_WINNER });
// WORKED.net 8250, WORKED.payout 8.24, WORKED.fairPayout 10.00
let betType = "win";
let seg = null;
// ---------- geometry from the stage region ----------
function geom(stage) {
const { R, mobile } = stage.geom;
const tc = 5, gapC = mobile ? 3 : 4;
const topPad = mobile ? 84 : 124, botPad = mobile ? 46 : 58; // room for the pile labels and the caption under them
const capS = mobile ? 20 : 24;
// pick the pool width (10 or 20 columns) that gives the biggest dots
let best = null;
for (const c of [10, 20]) {
const rows = N / c, trows = Math.ceil(skimOf(BETS.tri.rate) / tc);
const s = Math.min(R.w / (c + gapC + tc + 0.5), (R.h - topPad - botPad) / Math.max(rows, trows), capS); // +0.5: the vessel's walls stay inside R
if (!best || s > best.s + 0.01) best = { c, rows, s };
}
const { c, rows, s } = best;
const totalW = (c + gapC + tc) * s, x0 = R.x + (R.w - totalW) / 2;
const blockH = topPad + rows * s + botPad;
const y0 = R.y + Math.max(0, (R.h - blockH) / 2);
const base = y0 + topPad + rows * s;
const tx0 = x0 + (c + gapC) * s;
return { R, mobile, c, rows, tc, s, r: s * 0.34, x0, base, top: base - rows * s, tx0, right: x0 + totalW, pcx: x0 + (c * s) / 2, tcx: tx0 + (tc * s) / 2, y0 };
}
const poolXY = (g, i) => AE.layout.pile(i, { x0: g.x0, base: g.base, cols: g.c, size: g.s });
// Skimmed dots are the top of the pool (highest i). Track slot t = N-1-i keeps each dot's slot
// stable when the cut grows from 35 to 44.
const trackXY = (g, i) => AE.layout.pile(N - 1 - i, { x0: g.tx0, base: g.base, cols: g.tc, size: g.s });
const rowOf = (g, i) => (i / g.c) | 0;
function vessel(g, a = 0.22) {
const p = g.s * 0.25, L = g.x0 - p, Rx = g.x0 + g.c * g.s + p, B = g.base + p, T = g.top - g.s * 0.9;
const col = AE.rgba("bone", a);
return [
{ key: "c6-vl", type: "line", x1: L, y1: T, x2: L, y2: B, color: col },
{ key: "c6-vb", type: "line", x1: L, y1: B, x2: Rx, y2: B, color: col },
{ key: "c6-vr", type: "line", x1: Rx, y1: T, x2: Rx, y2: B, color: col },
];
}
// dashed "the pool was full here" line (a zero-height dashed rect)
const fullLine = (g, a = 0.4) => ({ key: "c6-full", type: "rect", x: g.x0 - g.s * 0.25, y: g.top, w: g.c * g.s + g.s * 0.5, h: 0, dash: [3, 4], color: AE.rgba("bone", a) });
// hero number baseline + its caption, above the pool
function heroAt(stage, g) {
const f = stage.fonts(), hy = g.y0 + (g.mobile ? 36 : 56), cy = hy + (g.mobile ? 18 : 24);
return { f, hy, cy };
}
// ---------- scenes ----------
function sceneSkim(stage, g, K, o = {}) {
// pool: bottom N-K dots stay (bone, or green when paid); top K go red to the track
stage.set(N, (i) => {
if (i >= N - K) {
const p = trackXY(g, i);
return { x: p.x, y: p.y, r: g.r, color: "red", alpha: 1, ease: "drop", delay: o.quick ? 0 : 200 + (N - 1 - i) * 22, dur: o.quick ? 420 : 1200 };
}
const p = poolXY(g, i);
return { x: p.x, y: p.y, r: g.r, color: o.green ? "green" : "bone", alpha: o.green ? 0.95 : 0.88,
ease: o.green ? "pop" : "inout", flash: !!o.flash && i % 11 === 0,
delay: o.quick ? 0 : o.green ? rowOf(g, i) * 45 + stage.rnd[i] * 120 : stage.rnd[i] * 200, dur: o.quick ? 420 : undefined };
});
}
function trackLabel(stage, g, text, a = 1) {
const f = stage.fonts();
return { key: "c6-tl", type: "text", x: g.tcx, y: g.base + (g.mobile ? 18 : 24), text, font: f.label, color: AE.rgba("red", a), align: "center" };
}
function poolLabel(stage, g, text, color) {
const f = stage.fonts();
return { key: "c6-pl", type: "text", x: g.pcx, y: g.base + (g.mobile ? 18 : 24), text, font: f.label, color, align: "center" };
}
const caption = (stage, g, kind = "win") => ({ key: "c6-cap", type: "text", x: g.R.x + g.R.w / 2, y: stage.clampY(Math.max(g.R.y + g.R.h - 4, g.base + (g.mobile ? 40 : 50)), 2), text: g.mobile ? "Illustration, not a real race." : `Illustration: one race’s ${kind} pool, not a real race.`, font: stage.fonts().cap, color: AE.rgba("bone", 0.4), align: "center", upper: true, spacing: "0.12em" });
function drawSwitch(stage, quick) {
const g = geom(stage), bet = BETS[betType], K = skimOf(bet.rate), h = heroAt(stage, g);
const r = AE.math.pariMutuel({ pool: POOL, takeout: bet.rate, onWinner: ON_WINNER });
stage.glow({ red: 0.55 });
sceneSkim(stage, g, K, { green: true, quick });
stage.overlays(vessel(g).concat([
fullLine(g, 0.3),
{ key: "c6-hero", type: "text", x: g.x0, y: h.hy, font: h.f.hero, color: AE.rgba("green", 1), align: "left", count: { to: r.net, dur: quick ? 500 : 1400, fmt: (v) => AE.fmt.money(Math.round(v)) } },
{ key: "c6-heroc", type: "text", x: g.x0, y: h.cy, text: "left for the winners", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.14em" },
{ key: "c6-rate", type: "text", x: g.right, y: h.hy, font: h.f.hero2, color: AE.rgba("red", 1), align: "right", count: { to: bet.rate * 100, dur: quick ? 400 : 900, fmt: (v) => (Math.round(v * 10) / 10) + "%" } },
{ key: "c6-ratec", type: "text", x: g.right, y: h.cy, text: g.mobile ? "KY cap" : "Kentucky’s cap", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "right", upper: true, spacing: "0.14em" },
trackLabel(stage, g, "to the track"),
poolLabel(stage, g, bet.label.toLowerCase() + " pool", AE.rgba("green", 0.85)),
caption(stage, g, bet.label.toLowerCase()),
]));
}
AE.chapter({
id: "c6",
order: 6,
title: "Off the top",
tab: "how",
how: { slug: "horse-racing", label: "Horse racing", blurb: "The track takes its cut from the pool before any winner is paid." },
lesson: "Pooled bets pay the house first.",
lab: "track-takeout",
sources: ["RACE-01", "RACE-02", "RACE-03", "RACE-06", "RACE-08", "RACE-09", "RACE-12", "RACE-13", "LAW-19", "RACE-17", "RACE-19", "RACE-40", "RACE-41", "RACE-42", "RACE-47", "RACE-20", "RACE-27", "RACE-32"],
steps: [
{
aria: "Dots fall into one glass: a $10,000 win pool. Every bettor’s money lands in the same pool.",
html: `<h2>At the track, you’re betting against each other.</h2><p>No bookmaker. Every win bet lands in one pool.</p>`,
enter(stage) {
const g = geom(stage), h = heroAt(stage, g);
stage.halo(0.8);
stage.set(N, (i) => {
const p = poolXY(g, i);
return { x: p.x, y: p.y, r: g.r, color: "bone", alpha: 0.88, from: { x: p.x + (stage.rnd[i] - 0.5) * g.s * 6, y: g.R.y - 20 },
delay: i * 7 + stage.rnd[i] * 220, dur: 900 };
});
stage.overlays(vessel(g).concat([
{ key: "c6-hero", type: "text", x: g.x0, y: h.hy, font: h.f.hero, color: AE.rgba("bone", 0.95), align: "left", count: { to: POOL, dur: 2200, fmt: (v) => AE.fmt.money(Math.round(v / 50) * 50) } },
{ key: "c6-heroc", type: "text", x: g.x0, y: h.cy, text: "in the win pool", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.14em" },
caption(stage, g),
]));
},
},
{
aria: "The top 35 dots, 17.5% of the pool, turn red and drop into the track’s pile. $8,250 is left in the pool.",
html: `<h2>The track takes its cut first.</h2><p>Before anyone gets paid. Here, 17.5%, the posted win rate at Churchill Downs.</p>`,
enter(stage) {
const g = geom(stage), h = heroAt(stage, g), K = skimOf(BETS.win.rate);
stage.halo(0.8);
stage.glow({ red: 0.7 });
sceneSkim(stage, g, K);
stage.overlays(vessel(g).concat([
fullLine(g, 0.4),
{ key: "c6-hero", type: "text", x: g.x0, y: h.hy, font: h.f.hero, color: AE.rgba("bone", 0.95), align: "left", count: { to: WORKED.net, dur: 1600, fmt: (v) => AE.fmt.money(Math.round(v)) } },
{ key: "c6-heroc", type: "text", x: g.x0, y: h.cy, text: "left in the pool", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.14em" },
{ key: "c6-rate", type: "text", x: g.right, y: h.hy, text: pctTxt(BETS.win.rate), font: h.f.hero2, color: AE.rgba("red", 1), align: "right" },
{ key: "c6-ratec", type: "text", x: g.right, y: h.cy, text: "to the track", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "right", upper: true, spacing: "0.14em" },
trackLabel(stage, g, "the track’s cut"),
caption(stage, g),
]), { delay: 300 });
},
},
{
aria: "The 165 dots left in the pool turn green: the winners split them. $2,000 was bet on the winner, so a $2 ticket pays $8.24. With no cut, the same ticket would pay $10.00.",
html: `<h2>Then the winners split what’s left.</h2><p>Without the <span class="r">track’s cut</span>, the same ticket would pay more.</p>`,
enter(stage) {
const g = geom(stage), h = heroAt(stage, g), K = skimOf(BETS.win.rate);
stage.halo(0.8);
stage.glow({ green: 0.6, red: 0.25 });
sceneSkim(stage, g, K, { green: true, flash: true });
stage.overlays(vessel(g).concat([
fullLine(g, 0.45),
{ key: "c6-hero", type: "text", x: g.x0, y: h.hy, font: h.f.hero, color: AE.rgba("green", 1), align: "left", count: { to: WORKED.payout, dur: 1500, fmt: (v) => AE.fmt.money(v, { cents: true }) } },
{ key: "c6-heroc", type: "text", x: g.x0, y: h.cy, text: g.mobile ? "$2 ticket pays" : "a $2 winning ticket pays", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.14em" },
{ key: "c6-fair", type: "text", x: g.right, y: h.hy, text: AE.fmt.money(WORKED.fairPayout, { cents: true }), font: h.f.hero2, color: AE.rgba("bone", 0.9), align: "right" },
{ key: "c6-fairc", type: "text", x: g.right, y: h.cy, text: "with no cut", font: h.f.cap, color: AE.rgba("bone", 0.5), align: "right", upper: true, spacing: "0.14em" },
trackLabel(stage, g, "the track’s cut", 0.8),
poolLabel(stage, g, "to the winners", AE.rgba("green", 0.9)),
caption(stage, g),
]));
},
},
{
aria: "Switch the bet type. Win bets: Kentucky caps the cut at 17.5%, leaving $8,250 of $10,000. Trifectas: 22%, leaving $7,800.",
html: `<h2>Fancier bets, bigger cut.</h2><p>Kentucky caps the cut by bet type.</p><div class="ae-slot" data-slot="c6-seg"></div>`,
enter(stage, state, ctx) {
stage.halo(0.8);
if (seg) seg.set(betType);
drawSwitch(stage, false);
},
},
],
drawer: {
html: `
<div><span class="ae-label">The pool</span>Racing is pari-mutuel: every win bet on a race goes into one pool, and the odds are just the crowd’s money divided up. Our illustration is a <strong>$10,000</strong> win pool, one dot per <strong>$50</strong>. Not a real race.</div>
<div><span class="ae-label">The formula (810 KAR 6:020)</span><code>takeout = pool × rate</code>, <code>net = pool − takeout</code>. Then <code>$1 price = (net − W) ÷ W + $1</code>, rounded down, where W is the money on the winner.<br><code>10,000 × 17.5% = $1,750</code> to the track, <strong>$8,250</strong> left. <code>(8,250 − 2,000) ÷ 2,000 = 3.125</code>, so $1 pays <strong>$4.12</strong> and a $2 ticket pays <strong>$8.24</strong>. Winners are paid $8,240; the $10 left over is breakage. With no cut: <code>10,000 ÷ 2,000 = $5</code> per $1, <strong>$10.00</strong> on $2.</div>
<div><span class="ae-label">Breakage</span>Kentucky rounds payouts down to the penny, since 2022 (HB 607, effective July 14, 2022). Before that it was the dime: the same ticket paid <strong>$8.20</strong> and breakage was $50, not $10. Since July 15, 2026, a cash payout may round to the nearest 5¢ when pennies aren’t on hand; app and account bets settle to the cent.</div>
<div><span class="ae-label">The minimum</span>A $2 winner normally pays at least <strong>$2.20</strong> ($1.10 per $1). When a heavy favorite wins and the pool can’t cover that (a “minus pool”), the minimum drops to <strong>$2.10</strong> and the track makes up any gap from its cut. Example: $9,000 of a $10,000 pool on the winner pays $2.10; the track covers $1,200.</div>
<div><span class="ae-label">The cap vs. what a track charges</span>Kentucky law (KRS 230.3615) sets a ceiling: <strong>17.5%</strong> on win, place and show, <strong>22%</strong> on bets on two or more horses. The ceiling counts the cut and breakage together, so this illustration, which applies the posted 17.5% and then shows breakage on top ($1,760 of $10,000, 17.6%), runs a hair over it. Tracks post their own rates under it. Churchill Downs (Fall Meet 2026) charges the caps: 17.5% win/place/show, 22% exacta, trifecta and superfecta. Keeneland posts less on some bets: <strong>16%</strong> win and place, 10% show on-track, 19.5% exacta, 22% trifecta and superfecta. (Keeneland’s page is undated and its rates have changed before.)</div>
<div><span class="ae-label">Age</span>Betting on horses is 18+ in Kentucky. Sports betting moved to 21 on July 15, 2026 (HB 904); racing didn’t.</div>
<div><span class="ae-label">A little history</span>The first Kentucky Derby ran May 17, 1875, bet by auction pools. Pari-mutuel betting came back for the 1908 Derby, after Louisville outlawed bookmaking, and has been the standard since. Keeneland opened in October 1936.</div>
<div><span class="ae-label">Derby Day</span><strong>$340 million</strong> was bet on Derby Day 2026 (May 2), from all sources, per Churchill Downs Inc. It’s split into pools like this one, race by race and bet by bet.</div>
<div><span class="ae-label">Side note</span>Historical horse racing machines, which bet pari-mutuel style on races already run, took <strong>$11.2 billion</strong> in wagers in Kentucky in 2025. A different game from a live race.</div>`,
},
init({ cards }) {
const host = cards[3].querySelector('[data-slot="c6-seg"]');
seg = AE.ui.segmented({
label: "Bet",
options: [
{ value: "win", label: "Win", aria: "Win bet: Kentucky caps the cut at 17.5%" },
{ value: "tri", label: "Trifecta", aria: "Trifecta: Kentucky caps the cut at 22%" },
],
value: betType,
onChange: (v) => {
betType = v;
const cur = AE.steps.current();
if (cur && cur.chapter === "c6" && cur.index === 3) drawSwitch(AE.stage, true);
},
});
host.appendChild(seg.el);
},
});
} catch (e) { console.error("[About Even] chapters/c06-off-the-top.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c07-luck-vs-math.js ---- */
;(function (AE) {
"use strict";
try {
// C7. Luck vs. math (spec §3 C7). 100 bettors, $500 each, a $10 four-leg parlay every Saturday
// for 12 weeks. He guesses how many finish up (state.guesses.c7), the season plays week by week
// with a red house tally, then the reveal: how many are up, and the house's share of money wagered.
// "Run it again": a new seed, different lucky bettors, the house share converging to 16.98%.
// Restructure: 5 steps. The setup is one step (crowd + Saturdays), and "Run it again" lives on the
// house reveal (step 5) instead of its own step.
//
// Simulation: AE.math.rng (mulberry32) + AE.math.betHits, in exactly the order AE.math.simulateCrowd
// uses (bettor by bettor, week by week), so a season here equals simulateCrowd({ seed }) for the same
// seed. We replay it locally only to get the week-by-week picture (simulateCrowd returns totals).
//
// Default seed 78: 54 of 100 finish up (the math: 1 − (15/16)^12 = 53.9% hit at least once, and one
// hit in 12 weeks is enough to finish up), 75 tickets hit (the math: 1,200 ÷ 16 = 75), and the house
// keeps $2,037.51 of $12,000 wagered = 16.98% (the math: 1 − 0.954545^4 = 16.98%). A representative
// season on all three counts. "Run it again" seeds: 78 + k × 7919. (Seeds live here, not in the
// drawer: fix round 1 trimmed the PRNG detail there.)
//
// Fix round 1: one season, the house can lose (the Thousand Seasons lab shows how often), so the
// run-again copy says so (P0-1). The red pile in "Run it again" is the house's AVERAGE season so far
// (cumulative share × $12,000 a season), so it moves with the cumulative % above it (B12). The guess
// is drawn in bright bone, not green, so green keeps meaning "money back" (consistency pass).
AE.source({ id: "PAR-09", label: "Illustration: every leg is a true 50/50 game priced at −110", note: "An illustration, labeled on screen." });
AE.source({ id: "PAR-11", label: "Parlay fair payout 2ⁿ, true chance 1 in 2ⁿ (arithmetic)", note: "Four legs: 1 in 16. At least one hit in 12 tries: 1 − (15/16)¹² = 53.9%." });
AE.source({ id: "PAR-12", label: "Parlay house cut 1 − (1.90909 ÷ 2)ⁿ (arithmetic)", note: "Four legs: 16.98% of money wagered." });
AE.source({ id: "PAR-15", label: "$10 four-leg parlay pays $132.83 (fair $160) (arithmetic)" });
AE.source({ id: "PAR-08", label: "Expected loss = money wagered × house edge; the luck band grows with √bets (arithmetic)" });
const N = 100, BANK = 500, STAKE = 10, LEGS = 4, WEEKS = 12;
const SEED = 78, SEED_STEP = 7919;
const PILE_UNIT = 25; // one red pile dot = $25 the house has kept
const PILE_COLS = 10, PILE_MAX = 400;
const DEC = AE.math.parlayBook(LEGS); // 13.2833…
const CUT = AE.math.parlayCut(LEGS); // 0.16979…
// ---------- one season, week by week ----------
// Same draw order as AE.math.simulateCrowd: for each bettor, for each week, one betHits() call.
function season(seed) {
const r = AE.math.rng(seed);
const hit = new Uint8Array(N * WEEKS), act = new Uint8Array(N * WEEKS);
for (let b = 0; b < N; b++) {
let bank = BANK;
for (let w = 0; w < WEEKS; w++) {
if (bank < STAKE) break; // can't cover the stake: sits out (never happens at $500 / $10 / 12 weeks)
act[b * WEEKS + w] = 1;
bank -= STAKE;
if (AE.math.betHits(LEGS, r)) { bank += STAKE * DEC; hit[b * WEEKS + w] = 1; }
}
}
// net per bettor after week w (w = 0..WEEKS), and the house's running take
const net = new Float64Array(N * (WEEKS + 1));
const kept = new Float64Array(WEEKS + 1), wag = new Float64Array(WEEKS + 1);
for (let b = 0; b < N; b++) {
let n = 0;
for (let w = 0; w < WEEKS; w++) {
const k = b * WEEKS + w;
if (act[k]) { n -= STAKE; if (hit[k]) n += STAKE * DEC; }
net[b * (WEEKS + 1) + w + 1] = n;
}
}
for (let w = 1; w <= WEEKS; w++) {
let wk = 0, pay = 0;
for (let b = 0; b < N; b++) { const k = b * WEEKS + w - 1; if (act[k]) { wk += STAKE; if (hit[k]) pay += STAKE * DEC; } }
wag[w] = wag[w - 1] + wk; kept[w] = kept[w - 1] + wk - pay;
}
let up = 0;
for (let b = 0; b < N; b++) if (net[b * (WEEKS + 1) + WEEKS] > 0.005) up++;
return { seed, hit, net, kept, wag, up, share: wag[WEEKS] > 0 ? kept[WEEKS] / wag[WEEKS] : 0 };
}
const MAIN = season(SEED);
const netAt = (S, b, w) => S.net[b * (WEEKS + 1) + w];
const hitAt = (S, b, w) => w > 0 && S.hit[b * WEEKS + w - 1] === 1;
// "Run it again" history (UI-only; not saved)
const runs = { list: [MAIN], last: MAIN, wag: MAIN.wag[WEEKS], kept: MAIN.kept[WEEKS] };
const cumShare = () => (runs.wag > 0 ? runs.kept / runs.wag : 0);
// Guess tint order: a fixed shuffle so the guessed dots are scattered, not the top rows.
const guessRank = new Int16Array(N);
AE.math.shuffle([...Array(N).keys()], AE.math.rng(707)).forEach((id, rank) => (guessRank[id] = rank));
const guessOf = (s) => (typeof s.guesses.c7 === "number" ? s.guesses.c7 : null);
const GUESS_DEFAULT = 50;
const PER_SEASON = N * WEEKS * STAKE; // $12,000 wagered a season (nobody sits out at $500 / $10 / 12 weeks)
let guessSlider = null;
// ---------- geometry ----------
// Wide region: grid left, house pile right (10 columns). Tall region (phone): grid on top, the
// pile underneath in 20 columns, as wide as the grid. g.gb = grid bottom (week ticks), g.base = pile floor.
function geom(stage) {
const { R, mobile } = stage.geom;
const top = mobile ? 64 : 116, bottom = mobile ? 34 : 48;
if (R.h > R.w * 1.15) {
const PILE_ROWS = 7, gapT = 64; // week ticks, "Saturdays" and the illustration line sit between grid and pile
// no size floor (safe area): a short phone region shrinks the grid instead of overflowing it
const cell = Math.max(1, Math.min(R.w / 10.4, (R.h - top - bottom - gapT) / (10 + PILE_ROWS * 0.5), 46));
const ps = cell * 0.5, w = 10 * cell, x0 = R.x + (R.w - w) / 2;
const blockH = top + 10 * cell + gapT + PILE_ROWS * ps + bottom;
const y0 = R.y + Math.max(0, (R.h - blockH) / 2);
const gy = y0 + top, gb = gy + 10 * cell, base = gb + gapT + PILE_ROWS * ps;
return { R, mobile, stacked: true, cell, ps, pc: 20, x0, gy, gb, base, px0: x0, right: x0 + w, top: y0 };
}
const units = 10 + 1.7 + PILE_COLS * 0.56;
const cell = Math.max(1, Math.min((R.h - top - bottom) / 10, R.w / units, 46));
const ps = cell * 0.56;
const w = units * cell, x0 = R.x + (R.w - w) / 2;
const y0 = R.y + Math.max(0, (R.h - (top + 10 * cell + bottom)) / 2);
const gy = y0 + top, base = gy + 10 * cell;
return { R, mobile, stacked: false, cell, ps, pc: PILE_COLS, x0, gy, gb: base, base, px0: x0 + (10 + 1.7) * cell, right: x0 + w, top: y0 };
}
const dotXY = (g, i) => AE.layout.grid(i, { x0: g.x0, y0: g.gy, cols: 10, size: g.cell });
const pileCount = (k) => Math.max(0, Math.min(PILE_MAX, Math.round(k / PILE_UNIT)));
// Bettors as of week w. mode: "play" (green = up, red = down), "plain" (bone), "dimDown", "dimAll"
function paintBettors(stage, g, S, w, o = {}) {
const r = g.cell * 0.3;
const quick = !!o.quick;
return (i) => {
const p = dotXY(g, i);
if (w === 0 || o.mode === "plain") return { x: p.x, y: p.y, r, color: "bone", alpha: 0.85, delay: quick ? 0 : stage.rnd[i] * 300, dur: quick ? 300 : undefined };
const n = netAt(S, i, w), up = n > 0.005, fresh = hitAt(S, i, w);
let alpha = up ? 1 : 0.5;
if (o.mode === "dimDown" && !up) alpha = 0.22;
if (o.mode === "dimAll") alpha = up ? 0.3 : 0.16;
return {
x: p.x, y: p.y, r: up ? r : r * 0.82, color: up ? "green" : "red", alpha,
ease: up ? "pop" : "drop", flash: fresh && !quick && o.flash !== false,
delay: quick ? stage.rnd[i] * 90 : stage.rnd[i] * 220, dur: quick ? 380 : 620,
};
};
}
function paintPile(stage, g, count, o = {}) {
const from = { x: g.x0 + 5 * g.cell, y: g.gy + 5 * g.cell };
return (j) => {
if (j >= count) return null;
const p = AE.layout.pile(j, { x0: g.px0, base: g.base, cols: g.pc, size: g.ps });
return { x: p.x, y: p.y, r: g.ps * 0.36, color: "red", alpha: o.alpha != null ? o.alpha : 0.95, ease: "drop", from, delay: o.quick ? 0 : 120 + stage.rnd[100 + j] * 260, dur: o.quick ? 320 : 700 };
};
}
// Draw bettors (dots 0..99) and the house pile (dots 100..) in one set() call.
function scene(stage, g, S, w, o = {}) {
const bet = paintBettors(stage, g, S, w, o);
const n = o.noPile ? 0 : o.pileDollars != null ? pileCount(o.pileDollars) : pileCount(S.kept[w]);
const pile = paintPile(stage, g, n, { quick: o.quick, alpha: o.pileAlpha });
stage.set(100 + PILE_MAX, (i) => (i < 100 ? bet(i) : pile(i - 100)), { rest: "fade" });
}
function weekTicks(g, w, alpha = 1) {
const f = AE.stage.fonts(), y = g.gb + (g.mobile ? 16 : 24), span = 10 * g.cell, step = span / WEEKS;
const out = [];
for (let k = 0; k < WEEKS; k++) {
out.push({ key: "c7-wk" + k, type: "line", x1: g.x0 + k * step + 2, y1: y, x2: g.x0 + (k + 1) * step - 2, y2: y, w: 2, color: AE.rgba("bone", (k < w ? 0.85 : 0.16) * alpha) });
}
out.push({ key: "c7-wkl", type: "text", x: g.x0, y: y + (g.mobile ? 15 : 18), text: "Saturdays", font: f.cap, color: AE.rgba("bone", 0.45 * alpha), align: "left", upper: true, spacing: "0.12em" });
return out;
}
function pileLabel(g, alpha = 1, text = "the house") {
const f = AE.stage.fonts();
return [
// side by side: the house's floor line and label share the Saturdays row's heights
{ key: "c7-pl", type: "text", x: g.right, y: g.stacked ? g.base + (g.mobile ? 18 : 24) + 5 : g.gb + (g.mobile ? 31 : 42), text, font: g.stacked ? f.label : f.cap, color: AE.rgba("red", alpha), align: "right", upper: !g.stacked, spacing: g.stacked ? undefined : "0.12em" },
{ key: "c7-plb", type: "line", x1: g.px0, y1: g.base + 4, x2: g.right, y2: g.base + 4, color: AE.rgba("red", 0.3 * alpha) },
];
}
function houseCounter(g, value, o = {}) {
const f = AE.stage.fonts(), hy = g.top + (g.mobile ? 34 : 56), k = o.key || "c7-house";
return [
{ key: k, type: "text", x: g.right, y: hy, font: o.big ? f.hero : f.hero2, color: AE.rgba("red", 1), align: "right", count: { to: value, dur: o.dur || 520, fmt: o.fmt || ((v) => AE.fmt.money(v, { sign: true, cents: false }) /* whole dollars while it rolls */) } },
{ key: k + "c", type: "text", x: g.right, y: hy + (g.mobile ? 18 : 24), text: o.cap || "kept by the house", font: f.cap, color: AE.rgba("bone", 0.5), align: "right", upper: true, spacing: "0.14em" },
];
}
const illus = (g) => g.stacked
? { key: "c7-illus", type: "text", x: g.right, y: g.gb + 49, text: "Illustration: 50/50 legs, −110", font: AE.stage.fonts().cap, color: AE.rgba("bone", 0.32), align: "right", upper: true, spacing: "0.06em" }
: { key: "c7-illus", type: "text", x: g.x0, y: g.base + (g.mobile ? 48 : 64), text: g.mobile ? "Illustration: 50/50 legs at −110." : "Illustration: each leg a true 50/50 game priced at −110.", font: AE.stage.fonts().cap, color: AE.rgba("bone", 0.32), align: "left", upper: true, spacing: "0.1em" };
const isStep = (i) => { const c = AE.steps.current(); return !!(c && c.chapter === "c7" && c.index === i); };
const STEP_GUESS = 0, STEP_PLAY = 1, STEP_HOUSE = 2;
// ---------- the season player (step 3) ----------
const play = { w: 0, timer: 0, token: 0 };
function stopPlay() { clearTimeout(play.timer); play.timer = 0; play.token++; }
function drawWeek(stage, w, o = {}) {
const g = geom(stage);
scene(stage, g, MAIN, w, { quick: o.quick });
stage.overlays([...weekTicks(g, w), ...pileLabel(g), ...houseCounter(g, MAIN.kept[w], { cap: w === 0 ? "the house, so far" : "kept by the house, so far" }), illus(g)], { delay: 0 });
stage.glow({ red: 0.15 + 0.5 * (w / WEEKS), green: w > 0 ? 0.25 : 0 });
}
function startPlay(stage) {
stopPlay();
if (AE.reduced) { play.w = WEEKS; drawWeek(stage, WEEKS, { quick: true }); return; }
play.w = 0;
drawWeek(stage, 0);
const tok = play.token;
const tick = () => {
if (tok !== play.token || !isStep(STEP_PLAY)) return;
play.w++;
drawWeek(stage, play.w);
if (play.w < WEEKS) play.timer = setTimeout(tick, 780);
};
play.timer = setTimeout(tick, 1100);
}
// ---------- run it again (step 5, the house reveal) ----------
let againBusy = false, againBtn = null;
function drawAgain(stage, S, o = {}) {
const g = geom(stage);
const n = runs.list.length;
// the pile is the house's average season, so it grows and shrinks with the % above it
scene(stage, g, S, WEEKS, { quick: o.quick, flash: !o.quick, pileDollars: cumShare() * PER_SEASON });
stage.overlays([
...houseCounter(g, cumShare(), { key: "c7-share", big: true, dur: 900, fmt: (v) => AE.fmt.pct(v), cap: n === 1 ? "of every dollar bet, lost" : `lost, ${n} seasons together` }),
...pileLabel(g, 1, n === 1 ? "the house" : "the house, average season"),
illus(g),
], { delay: o.quick ? 0 : undefined });
stage.glow({ red: 0.7, green: 0.3 });
}
function runAgain() {
if (againBusy) return;
const S = season(SEED + runs.list.length * SEED_STEP);
runs.list.push(S); runs.last = S; runs.wag += S.wag[WEEKS]; runs.kept += S.kept[WEEKS];
if (!isStep(STEP_HOUSE)) return;
againBusy = true;
if (againBtn) againBtn.el.disabled = true;
const stage = AE.stage, g = geom(stage);
// quick replay: the crowd resets to bone, then the season lands at once
scene(stage, g, S, 0, { quick: true, noPile: true });
setTimeout(() => {
drawAgain(stage, S);
againBusy = false;
if (againBtn) againBtn.el.disabled = false;
}, AE.reduced ? 0 : 420);
}
AE.chapter({
id: "c7",
order: 7,
title: "Luck vs. math",
lab: "thousand-seasons",
lesson: "Some get lucky. On average, the group loses.",
sources: ["PAR-09", "PAR-11", "PAR-12", "PAR-15", "PAR-08"],
steps: [
{
aria: "A grid of 100 dots: 100 bettors, $500 each, a $10 four-leg parlay every Saturday for twelve weeks. Guess: the slider lights up that many of the 100 dots, the number you think finish the season up.",
html: `<h2>100 bettors. Twelve Saturdays. How many finish up?</h2><p>$500 each. A $10 four-leg parlay every Saturday. Drag to guess; the bright dots are <span class="ae-guess">your guess</span>.</p><div class="ae-slot" data-slot="c7-guess"></div>`,
enter(stage, state) {
stopPlay();
const g = geom(stage);
stage.halo(0.6);
paintGuess(stage, guessOf(state) ?? GUESS_DEFAULT, false);
stage.overlays([...weekTicks(g, 0, 0.6), ...pileLabel(g, 0.5), illus(g),
{ key: "c7-pays", type: "text", x: g.x0, y: g.gy - (g.mobile ? 16 : 22), text: "if all four hit: $10 → $132.83", font: stage.fonts().small, color: AE.rgba("bone", 0.85), align: "left" }]);
if (guessSlider) guessSlider.set(guessOf(state) ?? GUESS_DEFAULT);
},
},
{
aria: "The season plays one Saturday at a time. Dots that hit flash green and stay green; the rest turn red as their $10 tickets lose. A red pile, the house, grows to the right, with a running dollar tally.",
html: `<h2>Twelve Saturdays. Here we go.</h2><p>Every ticket goes to the house. Winners get paid out of it.</p><div class="ae-slot" data-slot="c7-replay"></div>`,
enter(stage, state, ctx) {
if ((ctx.resize || ctx.refresh) && play.w > 0) { drawWeek(stage, play.w, { quick: true }); return; }
startPlay(stage);
},
exit() { stopPlay(); },
},
{
aria: `The season is over. ${MAIN.up} of the 100 dots are green: they finished up. The red pile glows: together the 100 lost ${AE.fmt.money(MAIN.kept[WEEKS])}, 17% of every dollar bet. Run it again plays a new season: different bettors win, and the loss settles near 17%.`,
html: `<h2>${MAIN.up} finished up. Together, they lost ${AE.fmt.money(MAIN.kept[WEEKS])}.</h2><p><span data-c7="guess"></span> One good Saturday was enough to finish up. As a group they lost 17% of everything they bet, and that part isn’t luck. Run it again: new winners, same loss.</p><div class="ae-slot" data-slot="c7-again"></div><span data-ae-how></span>`,
enter(stage, state, ctx) {
stopPlay();
const gv = guessOf(state);
ctx.card.querySelector('[data-c7="guess"]').textContent = gv == null ? "" : `You guessed ${AE.fmt.int(gv)}.`;
if (runs.list.length > 1) { drawAgain(stage, runs.last, { quick: false }); return; }
const g = geom(stage), f = stage.fonts();
stage.halo(1);
scene(stage, g, MAIN, WEEKS, { mode: "dimDown", flash: false });
const hy = g.top + (g.mobile ? 34 : 56);
stage.overlays([
{ key: "c7-up", type: "text", x: g.x0, y: hy, font: f.hero, color: AE.rgba("green", 1), align: "left", count: { to: MAIN.up, dur: 1100, fmt: (v) => AE.fmt.int(v) } },
{ key: "c7-upc", type: "text", x: g.x0, y: hy + (g.mobile ? 18 : 24), text: "finished up", font: f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.14em" },
...houseCounter(g, MAIN.kept[WEEKS], { key: "c7-lost", big: true, dur: 1800, fmt: (v) => AE.fmt.money(v, { cents: false }), cap: "lost, all 100 together" }),
...pileLabel(g),
]);
stage.glow({ red: 1, green: 0.4 });
},
},
],
drawer: {
html: `
<div><span class="ae-label">The setup</span>100 bettors, <strong>$500</strong> each. Every Saturday for 12 weeks, each bets <strong>$10</strong> on a four-leg parlay. A hit pays <code>$10 × 1.90909⁴ = $132.83</code>. Illustration: each leg a true 50/50 game priced at −110.</div>
<div><span class="ae-label">Why so many finish up</span>One hit in 12 weeks is enough: <code>$132.83 > 12 × $10</code>. The chance of at least one hit is <code>1 − (15/16)¹² = 53.9%</code>, so about half the crowd ends the season ahead.</div>
<div><span class="ae-label">Why the house still wins</span>The house doesn’t need anyone to lose. It pays $132.83 on a 1-in-16 ticket that’s fairly worth $160, so it keeps <code>1 − (1.90909/2)⁴ = 16.98%</code> of every dollar wagered, on average, whoever gets lucky.</div>
<div><span class="ae-label">Variance vs. the math</span>Who wins is luck: rerun it and different bettors come out ahead. One season, the house can even lose (the A Thousand Seasons lab shows how often). The house’s share wobbles season to season too, but across many seasons it settles on 16.98%. The luck band grows with the square root of the bets; the expected cost grows with the bets. That’s why “I’m up this month” says little.</div>
<div><span class="ae-label">The simulation</span>A fixed, repeatable run of coin flips. The first season shown is a typical one, picked because it lands on the math: ${MAIN.up} of 100 finish up and 75 of 1,200 tickets hit (the math expects 53.9 and 75), and the house keeps $2,037.51 of $12,000, or 16.98%. Each “Run it again” is a new season. In “Run it again” the red pile is the house’s average season so far. Anyone who can’t cover a $10 ticket sits out; at $500 nobody does.</div>`,
},
init({ cards }) {
// step 3: the guess slider (stores on release)
guessSlider = AE.ui.slider({
min: 0, max: 100, step: 1,
value: guessOf(AE.state.get()) ?? GUESS_DEFAULT,
aria: "Your guess: how many of the 100 bettors finish the season up",
format: (v) => `${v} of 100`,
onInput: (v) => { if (isStep(STEP_GUESS)) paintGuess(AE.stage, v, true); },
onChange: (v) => AE.state.setGuess("c7", v),
});
cards[STEP_GUESS].querySelector('[data-slot="c7-guess"]').appendChild(guessSlider.el);
AE.state.subscribe((s) => guessSlider.set(guessOf(s) ?? GUESS_DEFAULT), ["guesses"]);
// step 3: replay
const replay = AE.ui.button({ label: "Replay the season", onClick: () => { if (isStep(STEP_PLAY)) startPlay(AE.stage); } });
cards[STEP_PLAY].querySelector('[data-slot="c7-replay"]').appendChild(replay.el);
// step 5: run it again
againBtn = AE.ui.button({ label: "Run it again", onClick: runAgain });
cards[STEP_HOUSE].querySelector('[data-slot="c7-again"]').appendChild(againBtn.el);
},
});
function paintGuess(stage, value, quick) {
const g = geom(stage), r = g.cell * 0.3;
const G = AE.guess || { color: "bone", alpha: 1, rest: 0.3, r: 1.15 }; // the core's neutral guess style
stage.set(100, (i) => {
const p = dotXY(g, i), on = guessRank[i] < value;
return { x: p.x, y: p.y, r: on ? r * G.r : r * 0.85, color: on ? G.color : "bone", alpha: on ? G.alpha : G.rest, delay: quick ? 0 : stage.rnd[i] * 300, dur: quick ? 240 : undefined };
});
}
} catch (e) { console.error("[About Even] chapters/c07-luck-vs-math.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c08-even-isnt-even.js ---- */
;(function (AE) {
"use strict";
try {
// C8. Even isn't even (spec §3 C8). Taxes on gambling, rules as of November 2026.
// Wins (green dots) and losses (red dots) for a year, defaulting to his habit's typical year
// (AE.math.simulateSeason, mode "typical": exactly round(n × p) wins). Standard deduction: losses
// offset nothing. Itemize: losses count at 90% (2026 law) or 100% (if Congress restores it),
// capped at winnings. Data in/out: state.tax { itemize, lossRate, winnings, losses } (null = habit).
//
// Narrative steps fix the rule they explain (step 2 = standard, step 3 = itemize at 90%). Restructure:
// the "flip the rules" play step and the fine-print step moved out of the story: the Tax Check lab has
// the controls, and the drawer lists every assumption. Kentucky: 3.5% on the same base (TAX-12 inference), with KY's $3,360
// standard deduction taken as already used by other income, so each added dollar is taxed at 3.5%.
// The Tax Check lab lets him switch that off. Every tax figure carries "educational estimate".
// Federal: a single-bracket estimate, the whole taxable amount at 12% (TAX-07), assuming other income
// already uses the $16,100 standard deduction. Step 1's headline is his year: "Down $142. Still owe
// about $220." (federal 12% + Kentucky 3.5%, his filing toggles). One basis with Your Plan (C9, C10,
// Wrapped): "Down $X" is the habit's expected yearly cost (AE.math.expectedYearlyCost), and the tax is
// on the typical year's winnings, so after tax = cost + tax ($141.82 + $219.82 = $361.64 straight;
// $529.75 + $380.77 for $20 × 3 four-leg parlays, where the typical year alone nets only −$463). With
// his own numbers typed in the Tax Check lab, the headline is their net. AE.c8 exports the tax helper
// for C9 and year(state) for that headline.
AE.source({ id: "TAX-01", label: "All gambling winnings are taxable income (IRS W-2G instructions)", url: "https://www.irs.gov/instructions/iw2g" });
AE.source({ id: "TAX-02", label: "90% wagering-loss limit, P.L. 119-21 Sec. 70114 (KPMG; National Law Review)", url: "https://kpmg.com/us/en/articles/2025/gambling-losses-under-one-big-beautiful-bill.html", note: "Deduction = 90% of wagering losses, only up to wagering gains." });
AE.source({ id: "TAX-03", label: "The 90% rule applies from tax year 2026 (KPMG; Tax Foundation)", url: "https://taxfoundation.org/blog/gambling-losses-tax-big-beautiful-bill/" });
AE.source({ id: "TAX-04", label: "Order: cut losses by 10%, then cap at winnings (KPMG)", url: "https://kpmg.com/us/en/articles/2025/gambling-losses-under-one-big-beautiful-bill.html" });
AE.source({ id: "TAX-05", label: "Only itemizers can deduct gambling losses (KPMG)", url: "https://kpmg.com/kpmg-us/content/dam/kpmg/pdf/2025/gambling-losses-under-one-big-beautiful-bill.pdf" });
AE.source({ id: "TAX-06", label: "Federal standard deduction 2026: $16,100 single (IRS)", url: "https://www.irs.gov/newsroom/irs-releases-tax-inflation-adjustments-for-tax-year-2026-including-amendments-from-the-one-big-beautiful-bill" });
AE.source({ id: "TAX-07", label: "Federal brackets 2026, single (IRS)", url: "https://www.irs.gov/newsroom/irs-releases-tax-inflation-adjustments-for-tax-year-2026-including-amendments-from-the-one-big-beautiful-bill", note: "10% to $12,400; 12% to $50,400; 22% to $105,700; 24% to $201,775; then 32%, 35%, 37%." });
AE.source({ id: "TAX-08", label: "Kentucky flat income tax 3.5% for tax year 2026 (Bloomberg Tax)", url: "https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026" });
AE.source({ id: "TAX-09", label: "Kentucky standard deduction 2026: $3,360 (Bloomberg Tax)", url: "https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026" });
AE.source({ id: "TAX-10", label: "KRS 141.019: Kentucky allows wagering losses allowed under §165(d) as an itemized deduction", url: "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=57914" });
AE.source({ id: "TAX-11", label: "HB 757 (2026), Acts ch. 161: for tax years from Jan 1, 2026, Kentucky uses the Internal Revenue Code in effect on Dec 31, 2025", url: "https://apps.legislature.ky.gov/law/acts/26RS/documents/0161.pdf" });
AE.source({ id: "TAX-12", label: "Kentucky follows the 90% rule: KRS 141.019 allows wagering losses “allowed under Section 165(d)”, and HB 757 adopts the federal code as of Dec 31, 2025, which includes the 90% limit", url: "https://apps.legislature.ky.gov/law/acts/26RS/documents/0161.pdf", note: "HB 757 keeps the 165(d) wagering-loss deduction; none of its listed exceptions touch it." });
AE.source({ id: "TAX-13", label: "Kentucky Schedule A (Form 740), 2025: “You may itemize your deductions for Kentucky even if you do not itemize for federal purposes”", url: "https://revenue.ky.gov/Forms/740%20Schedule%20A%20(2025).pdf" });
AE.source({ id: "TAX-14", label: "IRS Pub. 529: report the full amount of your gambling winnings; you can’t reduce them by your losses and report the difference", url: "https://www.irs.gov/publications/p529", note: "So winnings are counted bet by bet (the profit on each winning bet), not as the year’s net." });
AE.source({ id: "TAX-15", label: "Taxable gambling income, itemizer: W − min(0.9 × L, W) (arithmetic)" });
AE.source({ id: "TAX-16", label: "Standard-deduction filer: taxable gambling income = W; it adds to other income (arithmetic)" });
AE.source({ id: "TAX-17", label: "Worked example: $5,000 won, $5,000 lost, itemizing → $500 taxable (arithmetic)" });
AE.source({ id: "TAX-20", label: "W-2G threshold 2026: $2,000; sports bets only if winnings ≥ 300× the wager (IRS)", url: "https://www.irs.gov/instructions/iw2g" });
AE.source({ id: "TAX-24", label: "Restoring 100%: the House Ways and Means Committee voted 38–5 on Sept. 16, 2026 (Bloomberg Government; SBC Americas)", url: "https://news.bgov.com/bloomberg-government-news/house-panel-to-weigh-restoring-full-gambling-loss-tax-break", note: "A committee vote. Not law." });
const K = {
derive(habit) {
const s = AE.math.simulateSeason({ stake: habit.stake, perWeek: habit.perWeek, type: habit.type, mode: "typical", seed: 1 });
return { winnings: Math.round(s.won * 100) / 100, losses: Math.round(s.lost * 100) / 100 };
},
// The numbers the play step and the lab use: his entries, or his habit's typical year.
inputs(state) {
const d = K.derive(state.habit), t = state.tax;
return {
winnings: t.winnings != null ? t.winnings : d.winnings,
losses: t.losses != null ? t.losses : d.losses,
itemize: !!t.itemize, lossRate: t.lossRate === 1 ? 1 : 0.9,
fromHabit: t.winnings == null && t.losses == null,
};
},
calc(x) {
const taxable = AE.math.taxableGambling(x);
const deducted = AE.math.deductibleLosses(x);
const ky = AE.math.kyTaxOn(taxable), fed = fedTax(taxable);
return { taxable, deducted, ky, fed, total: ky + fed, net: x.winnings - x.losses };
},
};
// Federal estimate: one bracket (12% by default, TAX-07) on the whole taxable amount, assuming his
// other income already uses the standard deduction. Uses core's AE.math.federalGamblingTax (fix round
// 1); the local fallback is the same formula, kept so an older core can't break the chapter.
const FED_BRACKET = 0.12;
function fedTax(taxable, bracket = FED_BRACKET) {
if (typeof AE.math.federalGamblingTax === "function") return AE.math.federalGamblingTax(taxable, bracket);
return Math.max(0, taxable) * bracket;
}
// Step 1's year: the net it reports (expected cost from the habit, same as C9; or his own numbers'
// net), the tax on the year's winnings, and the two together.
function year(state) {
const x = K.inputs(state), c = K.calc(x);
const net = x.fromHabit ? -AE.math.expectedYearlyCost(state.habit) : c.net;
return { x, c, net, tax: c.total, afterTax: net - c.total };
}
AE.c8 = { calc: (x) => K.calc(x), inputs: (s) => K.inputs(s), year, fedTax, FED_BRACKET };
// ---------- geometry: hero on top, two piles (won | lost) below ----------
function geom(stage, reserve = 0) {
const { R, mobile } = stage.geom;
const top = R.y + (mobile ? 30 : 46) + reserve, bottom = R.y + R.h - (mobile ? 30 : 44);
const heroH = mobile ? 100 : 128; // hero + caption + the federal / Kentucky tax lines under it
const cols = mobile ? 8 : 10;
const pileTop = top + heroH, base = bottom;
const availH = Math.max(40, base - pileTop);
return { R, mobile, top, heroH, cols, pileTop, base, availH, cx: R.x + R.w / 2 };
}
const NICE = [1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 25000, 50000, 100000, 250000, 500000, 1e6];
function unitFor(max) { const want = max / 190; return NICE.find((u) => u >= want) || 1e6; }
// piles: dots 0..nW-1 = won (green, left), nW..nW+nL-1 = lost (red, right).
// mode: "both" | "standard" (losses don't count) | "itemize" (deductible losses cancel winnings)
function piles(stage, g0, x, mode, o = {}) {
let g = g0;
const unit = unitFor(Math.max(x.winnings, x.losses, 1));
const nW = Math.min(500, Math.round(x.winnings / unit)), nL = Math.min(500, Math.round(x.losses / unit));
const rows = Math.max(1, Math.ceil(Math.max(nW, nL) / g.cols));
const s = Math.max(3, Math.min(g.availH / rows, (g.R.w * (g.mobile ? 0.4 : 0.3)) / g.cols, g.mobile ? 16 : 22));
// centre the hero + piles block in the space left
const blockH = g.heroH + rows * s, y0 = g.top + Math.max(0, (g.base - g.top - blockH) / 2) * (g.mobile ? 0.6 : 0.8);
const base = y0 + blockH, hy = y0 + (g.mobile ? 40 : 62);
g = { ...g, base };
const gap = s * (g.mobile ? 2.2 : 3);
const wx0 = g.cx - gap / 2 - g.cols * s, lx0 = g.cx + gap / 2;
let kD = 0, taxable = x.winnings;
if (mode === "itemize") {
const c = K.calc({ ...x, itemize: true });
taxable = c.taxable;
kD = Math.min(nW, nL, Math.round(c.deducted / unit));
if (taxable > 0.005 && nW - kD < 1 && nW > 0) kD = nW - 1; // keep the sliver visible
}
const quick = !!o.quick;
const wPos = (j) => AE.layout.pile(j, { x0: wx0, base: g.base, cols: g.cols, size: s });
const lPos = (j) => AE.layout.pile(j, { x0: lx0, base: g.base, cols: g.cols, size: s });
stage.set(nW + nL, (i) => {
const d = quick ? { delay: stage.rnd[i] * 80, dur: 360 } : {};
if (i < nW) {
const p = wPos(i), gone = mode === "itemize" && i < kD;
return { x: p.x, y: p.y, r: s * 0.36, color: gone ? "bone" : "green", alpha: gone ? 0.1 : 1, ease: "pop", delay: d.delay ?? (gone ? 600 + stage.rnd[i] * 500 : stage.rnd[i] * 300), dur: d.dur };
}
const j = i - nW, p = lPos(j);
if (mode === "standard") return { x: p.x, y: p.y, r: s * 0.3, color: "red", alpha: 0.16, ease: "drop", delay: d.delay ?? stage.rnd[i] * 400, dur: d.dur };
if (mode === "itemize" && j < kD) {
const q = wPos(j); // the deductible loss slides across and cancels a dollar of winnings
return { x: q.x, y: q.y, r: s * 0.36, color: "red", alpha: 0, delay: d.delay ?? 100 + stage.rnd[i] * 500, dur: d.dur ?? 1300 };
}
const q = mode === "itemize" ? lPos(j - kD) : p; // what's left of the losses settles to the floor
return { x: q.x, y: q.y, r: s * 0.36, color: "red", alpha: mode === "itemize" ? 0.45 : 0.95, ease: "drop", delay: d.delay ?? stage.rnd[i] * 300, dur: d.dur };
});
return { unit, nW, nL, s, wx0, lx0, gap, taxable, right: lx0 + g.cols * s, left: wx0, base, hy };
}
function banner(g) {
const f = AE.stage.fonts();
return [
{ key: "c8-banner", type: "text", x: g.R.x, y: g.R.y + (g.mobile ? 12 : 16), text: g.mobile ? "Rules as of Nov. 2026" : "Rules as of November 2026", font: f.cap, color: AE.rgba("bone", 0.75), align: "left", upper: true, spacing: "0.14em" },
{ key: "c8-edu", type: "text", x: g.R.x + g.R.w, y: g.R.y + (g.mobile ? 12 : 16), text: g.mobile ? "Estimate" : "Educational estimate", font: f.cap, color: AE.rgba("bone", 0.4), align: "right", upper: true, spacing: "0.14em" },
];
}
function pileLabels(g, p, o = {}) {
const f = AE.stage.fonts(), y = p.base + (g.mobile ? 17 : 22);
return [
{ key: "c8-lw", type: "text", x: p.left, y, text: o.w || "won", font: f.label, color: AE.rgba("green", o.wa ?? 1), align: "left" },
{ key: "c8-ll", type: "text", x: p.right, y, text: o.l || "lost", font: f.label, color: AE.rgba("red", o.la ?? 1), align: "right" },
];
}
function hero(g, p, value, cap, o = {}) {
const f = AE.stage.fonts(), hy = p.hy;
const out = [
{ key: "c8-hero", type: "text", x: p.left, y: hy, font: f.hero, color: AE.rgba("bone", 1), align: "left", count: { to: value, dur: o.dur || 1200, fmt: money } },
{ key: "c8-heroc", type: "text", x: p.left, y: hy + (g.mobile ? 17 : 23), text: cap, font: f.cap, color: AE.rgba("bone", 0.5), align: "left", upper: true, spacing: "0.12em" },
];
if (o.tax) {
// The tax on that base, federal next to Kentucky. One line when it fits, two on narrow layouts.
const t = o.tax, dur = o.dur || 1200, narrow = p.right - p.left < 400;
const font = `400 ${g.mobile ? 13 : 15}px "Geist Mono", ui-monospace, monospace`, y1 = hy + (g.mobile ? 38 : 50);
const fedTxt = (v) => `Federal, 12% bracket ≈ ${money(v)}`, kyTxt = (v) => `Kentucky, 3.5% ≈ ${money(v)}`;
if (narrow) {
out.push({ key: "c8-fed", type: "text", x: p.left, y: y1, font, color: AE.rgba("red", 0.95), align: "left", count: { to: t.fed, dur, fmt: fedTxt } },
{ key: "c8-ky", type: "text", x: p.left, y: y1 + (g.mobile ? 18 : 21), font, color: AE.rgba("red", 0.95), align: "left", count: { to: t.ky, dur, fmt: kyTxt } });
} else {
out.push({ key: "c8-fed", type: "text", x: p.left, y: y1, font, color: AE.rgba("red", 0.95), align: "left", count: { to: t.fed, dur, fmt: fedTxt } },
{ key: "c8-ky", type: "text", x: p.right, y: y1, font, color: AE.rgba("red", 0.95), align: "right", count: { to: t.ky, dur, fmt: kyTxt } });
}
}
return out;
}
// Dollars, with cents under $100 so a small tax doesn't read as $0.
const money = (v) => AE.fmt.money(v, { cents: Math.abs(v) > 0.004 && Math.abs(v) < 100 });
// Step 1's headline, from year(): "Down $142. Still owe about $220." (federal 12% + Kentucky).
function headline(y) {
const owe = y.tax >= 0.005 ? `about ${money(y.tax)}` : null;
if (y.net <= -0.5) return owe ? `Down ${money(-y.net)}. Still owe ${owe}.` : `Down ${money(-y.net)}. Nothing owed.`;
if (y.net >= 0.5) return owe ? `Up ${money(y.net)}. Owe ${owe}.` : `Up ${money(y.net)}. Nothing owed.`;
return owe ? `Break even. Still owe ${owe}.` : `Break even. Nothing owed.`;
}
AE.chapter({
id: "c8",
order: 8,
title: "Even isn't even",
lab: "tax-check",
lesson: "Look at money after tax, not before.",
sources: ["TAX-01", "TAX-02", "TAX-03", "TAX-04", "TAX-05", "TAX-06", "TAX-07", "TAX-08", "TAX-09", "TAX-10", "TAX-11", "TAX-12", "TAX-13", "TAX-14", "TAX-15", "TAX-16", "TAX-17", "TAX-20", "TAX-24"],
steps: [
{
aria: "Two piles of dots: green, what you won on winning bets over a year; red, what you lost on losing bets. They're about the same height.",
html: `<h2 data-c8="head">Break even. Still owe.</h2><p>The tax code counts wins and losses differently.</p><p class="ae-src" data-c8="from"></p>`,
enter(stage, state, ctx) {
const g = geom(stage), y = year(state), { x, c } = y;
stage.halo(0.8);
// The two numbers on this step live in the headline (his net, his tax), so the piles carry words only.
const p = piles(stage, g, x, "both");
stage.overlays([...banner(g), ...pileLabels(g, p)]);
stage.glow({ green: 0.4, red: 0.3 });
ctx.card.querySelector('[data-c8="head"]').innerHTML = headline(y);
const rules = `${x.itemize ? `itemizing, losses at ${x.lossRate === 1 ? "100" : "90"}%` : "standard deduction"}, a 12% federal bracket (a job paying about $28,500+) plus Kentucky`;
ctx.card.querySelector('[data-c8="from"]').textContent = x.fromHabit
? `Down: your habit’s average year, as in Your Plan. Tax: on its typical year’s winnings, counted per bet; ${rules}. Educational estimate.`
: `Your numbers, winnings counted per bet. Tax: ${rules}. Educational estimate.`;
const after = y.afterTax <= -0.5 ? `down ${money(-y.afterTax)}` : y.afterTax >= 0.5 ? `up ${money(y.afterTax)}` : "about even";
stage.label(`${x.fromHabit ? "Your habit’s typical year" : "Your numbers"}: won ${money(x.winnings)} on winning bets, lost ${money(x.losses)} on losing bets. Estimated tax: federal at a 12% bracket ${money(c.fed)}, Kentucky ${money(c.ky)}. After tax: ${after} a year.`);
},
},
{
aria: "Standard deduction: the red losses pile fades to almost nothing. The whole green pile counts as taxable gambling income.",
html: `<h2>Standard deduction? Your losses count for nothing.</h2><p>Take it, and every dollar won counts as income.</p>`,
enter(stage, state) {
const g = geom(stage), x = K.inputs(state);
stage.halo(0.8);
const p = piles(stage, g, x, "standard");
const c = K.calc({ ...x, itemize: false });
stage.overlays([...banner(g), ...pileLabels(g, p, { la: 0.35, l: "not deductible" }), ...hero(g, p, c.taxable, g.mobile ? "taxable, estimate" : "taxable gambling income · estimate", { tax: c })]);
stage.glow({ green: 0.5 });
},
},
{
aria: "Itemizing: 90% of the red losses slide across and cancel green winnings, up to what was won. A sliver of green is left: still taxable.",
html: `<h2>Itemize, and only 90% of losses count.</h2><p>Capped at what you won. A tenth of your losses never counts.</p><p class="c8-try"><button type="button" class="ae-link" data-ae-lab="tax-check">Try your own numbers</button></p>`,
enter(stage, state) {
const g = geom(stage), x = { ...K.inputs(state), itemize: true, lossRate: 0.9 };
stage.halo(0.8);
const p = piles(stage, g, x, "itemize");
const c = K.calc(x);
stage.overlays([...banner(g), ...pileLabels(g, p, { la: 0.6, l: "10% not deductible" }), ...hero(g, p, c.taxable, g.mobile ? "taxable, estimate" : "taxable gambling income · estimate", { tax: c })]);
stage.glow({ green: 0.3, red: 0.2 });
},
},
],
drawer: {
html: `
<div><span class="ae-label">What counts as winnings</span>All gambling winnings are taxable income, W-2G or not. The IRS says to report the full amount of your winnings; you can’t net your losses against them (Pub. 529). So winnings are the profit on each winning bet, and a year that comes out about even can still show real winnings.</div>
<div><span class="ae-label">Standard deduction</span>Take the federal standard deduction (<strong>$16,100</strong> single, 2026) and gambling losses deduct nothing: <code>taxable = winnings</code>. Itemizing only pays when all your itemized deductions top $16,100.</div>
<div><span class="ae-label">Itemizing, 2026 law</span>From tax year 2026, losses count at 90%, and only up to winnings (P.L. 119-21 Sec. 70114): <code>taxable = W − min(0.9 × L, W)</code>. Win $5,000, lose $5,000: <code>$5,000 − $4,500 = $500</code> taxable on a break-even year.</div>
<div><span class="ae-label">The 100% toggle</span>A bill to restore 100% cleared the House Ways and Means Committee 38–5 on Sept. 16, 2026. A committee vote isn’t law.</div>
<div><span class="ae-label">Federal, 12% bracket</span>A rough, single-bracket estimate: <code>federal ≈ taxable × 12%</code>. It assumes your other income already uses the standard deduction and that the whole taxable amount lands in the 12% bracket (2026 single: over <strong>$12,400</strong> up to <strong>$50,400</strong> of taxable income, so roughly a job paying <strong>$28,500 or more</strong>). With little or no other income, the standard deduction can cover small winnings and the federal tax can be $0; Kentucky’s Family Size Tax Credit can cut the state tax for low incomes too. Below that you’d pay 10% on part of it; near the top edge some lands at 22%. The Tax Check lab lets you pick another bracket. Educational estimate.</div>
<div><span class="ae-label">Kentucky</span>Flat <strong>3.5%</strong> for 2026. Kentucky allows wagering losses “allowed under Section 165(d)” (KRS 141.019) and uses the federal code in effect on Dec. 31, 2025 (HB 757), which includes the 90% limit. We assume Kentucky’s <strong>$3,360</strong> standard deduction is already used by your other income, so each gambling dollar adds 3.5%. Kentucky’s 2025 Schedule A instructions say you may itemize for Kentucky even if you don’t federally; with the sample numbers, the losses are still smaller than Kentucky’s standard deduction.</div>
<div><span class="ae-label">The form</span>Books send a W-2G at <strong>$2,000</strong> or more in winnings (2026), and for sports bets only when the winnings are at least 300 times the wager. No form doesn’t mean no tax.</div>
<div><span class="ae-label">The default numbers</span>“Down” is your habit’s expected cost for a year, <code>total bet × the books’ edge</code>: the same figure Your Plan uses. The tax comes from your habit’s typical year: bets per year × the chance each wins, rounded, gives the winning bets; winnings are their profit, losses are the stakes on the rest. After tax <code>= expected cost + tax</code>: <code>$141.82 + $219.82 = $361.64</code> for the sample. For parlays a typical year can land a little better or worse than the average, so the two are kept separate. With your own numbers in the Tax Check lab, “Down” is their net. Educational estimate, not tax advice.</div>`,
},
});
} catch (e) { console.error("[About Even] chapters/c08-even-isnt-even.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c09-your-ledger.js ---- */
;(function (AE) {
"use strict";
try {
// C9. Your Plan, part 1 (restructure brief, "Your Plan"; tab "plan"). Works for someone who lands on
// #plan first, with no story behind them:
// 0 (wide) "Make a money plan": What you learned (AE.lessons(), hidden if none), the habit in use
// (the sample until he sets his own; "Set your own" edits state.habit), a one-line Kentucky help.
// The core appends the disclaimer to this card.
// 1 What betting costs you: the habit's yearly expected cost, before and after tax, as red dots.
// 2 His Wrapped card, about money: guess vs reality, cost before and after tax, a Kentucky
// comparison. Saved locally as a PNG.
// 3 Set a betting budget (cover charge), monthly. Writes state.commitment.coverCharge on release.
//
// Money: expected cost = AE.math.expectedYearlyCost(habit) (PAR-08). Tax = AE.math.taxBundle on the
// habit's typical year with his C8 filing choice (TAX-07 single 12% bracket + TAX-08 Kentucky 3.5%;
// educational estimate). "After tax" here = expected cost + that tax, so both numbers on the step
// share one base (for straight bets it equals taxBundle's afterTax exactly: $141.82 + $219.82 = $361.64).
//
// The Wrapped card also serves the Bet Log lab, which reads AE.c9 = { summarize, drawCard, paintCard,
// savePNG, returnOf, edgeOf, GUESS, TYPE_LABEL }. With settled logged bets the card uses them; else the habit.
AE.source({ id: "PAR-05", label: "House edge on a −110 / −110 bet: 1 − 1.90909/2 = 4.55% of what’s wagered", note: "Arithmetic." });
AE.source({ id: "PAR-08", label: "Habit expected cost: amount wagered × house edge", note: "Arithmetic. 4.55% for straight −110 bets; the parlay cut for parlays." });
AE.source({ id: "PAR-09", label: "Illustration: every leg is a true 50/50 game priced at −110", note: "An illustration, labeled on screen." });
AE.source({ id: "PAR-12", label: "Parlay house cut, n legs: 1 − (1.90909 / 2)ⁿ (16.98% at 4 legs)", note: "Arithmetic, under PAR-09." });
AE.source({ id: "PAR-02", label: "American odds → decimal odds: negative A: 1 + 100/|A|; positive A: 1 + A/100", note: "Arithmetic. Used to price a logged win from its odds." });
AE.source({ id: "MKT-32", label: "UK resident tuition, 2026–27: $7,088.50 a semester incl. mandatory fees (UKNow)", url: "https://uknow.uky.edu/node/262566" });
AE.source({ id: "MKT-33", label: "UK residential parking permit: $504 (UKNow)", url: "https://uknow.uky.edu/node/264026" });
AE.source({ id: "TAX-07", label: "Federal brackets 2026, single (IRS)", url: "https://www.irs.gov/newsroom/irs-releases-tax-inflation-adjustments-for-tax-year-2026-including-amendments-from-the-one-big-beautiful-bill", note: "10% to $12,400; 12% to $50,400; 22% to $105,700; 24% to $201,775; then 32%, 35%, 37%." });
AE.source({ id: "TAX-08", label: "Kentucky flat income tax 3.5% for tax year 2026 (Bloomberg Tax)", url: "https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026" });
AE.source({ id: "RACE-01", label: "KRS 230.3615(1): max takeout on win/place/show bets, 17.5%", url: "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137", note: "Used as the edge on logged race bets (exotics can be up to 22%)." });
AE.source({ id: "PM-14", label: "Prediction-market fee alone at a fair 50¢ price: about −3.4% (Kalshi-style taker fee)", note: "Arithmetic on the fee formula in PM-03; an illustration. Used as the edge on logged market bets." });
AE.source({ id: "HELP-01", label: "1-800-GAMBLER (1-800-426-2537), Kentucky’s resource line: call or text, 24/7", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx", note: "Info or a referral to a counselor or a GA meeting; answered by RiverValley Behavioral Health (CHFS DBHDID)." });
AE.source({ id: "HELP-02", label: "Kentucky Gambling Help, kygamblinghelp.org: self-assessment and online chat with a trained counselor", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx" });
AE.source({ id: "HELP-03", label: "988 Suicide and Crisis Lifeline: call, chat or text, 24/7", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx" });
const KEY = "c9";
const GUESS = { up: "Up", even: "About even", down: "Down", none: "No guess" };
const GUESS_LC = { up: "up", even: "about even", down: "down" };
const TYPE_LABEL = { straight: "Straight", parlay: "Parlay", prop: "Prop", futures: "Futures", live: "Live", race: "Race", market: "Prediction market", other: "Other" };
const money = (v) => AE.fmt.money(v);
const M = AE.math;
const SAMPLE = { stake: 20, perWeek: 3, type: "straight" }; // state.js default habit
const isSample = (h) => h.stake === SAMPLE.stake && h.perWeek === SAMPLE.perWeek && h.type === SAMPLE.type;
const habitWords = (h) => `${money(h.stake)} a bet, ${h.perWeek} ${h.perWeek === 1 ? "bet" : "bets"} a week, ${h.type === "parlay" ? "4-leg parlays" : "straight bets"}`;
// ---------- per-bet math (bet log; documented in the drawer) ----------
// What came back on a settled bet. payout, when logged, is the total returned (stake included).
function returnOf(b) {
if (b.result === "pending") return 0;
if (b.payout != null) return b.payout;
if (b.result === "loss") return 0;
if (b.result === "push") return b.stake;
if (b.odds != null) return b.stake * M.americanToDecimal(b.odds);
return b.stake * (b.type === "parlay" ? M.parlayBook(b.legs || 4) : M.D110); // assumed −110 legs
}
const assumedPrice = (b) => b.result === "win" && b.payout == null && b.odds == null;
// The house's edge we charge each bet type for "expected cost", or null when no sourced edge exists.
// Props, futures, live and other bets get null and are left out of expected cost (with a note),
// never the ~11% market-wide hold (MKT-04 is the market's hold, not a bettor's loss rate; PAR-08).
function edgeOf(b) {
switch (b.type) {
case "straight": return M.STRAIGHT_EDGE; // PAR-05
case "parlay": return M.parlayCut(b.legs || 4); // PAR-12 (50/50 legs at −110)
case "race": return M.TAKEOUT.win; // RACE-01 cap, 17.5%
case "market": return M.feeDrag(0.5).perOutlay; // PM-14, about 3.4% (illustrative)
default: return null; // prop / futures / live / other: not estimated
}
}
const NOT_ESTIMATED = { prop: "prop", futures: "futures", live: "live", other: "other" };
// Tax on a year's winnings with his C8 filing toggles: AE.math.taxBundle (single 12% federal bracket,
// TAX-07, plus Kentucky 3.5%, TAX-08). Educational estimate.
const taxOf = (winnings, losses, tax) => M.taxBundle({ winnings, losses, itemize: !!(tax && tax.itemize), lossRate: tax && tax.lossRate === 1 ? 1 : 0.9 });
// The habit's year in money: expected cost, tax on a typical year's winnings, and the two together.
function habitMoney(state) {
const h = state.habit, Y = M.typicalYear(h), T = taxOf(Y.winnings, Y.losses, state.tax), cost = M.expectedYearlyCost(h);
return { cost, tax: T.tax, after: cost + T.tax, wagered: M.yearlyWagered(h), monthly: M.yearlyWagered(h) / 12, Y, T };
}
// ---------- one Kentucky comparison (MKT-32 / MKT-33 wording) ----------
const PERMIT = 504, SEMESTER = 7088.5;
const FRACTIONS = [[0.1, "a tenth of"], [0.2, "a fifth of"], [0.25, "a quarter of"], [1 / 3, "a third of"], [0.5, "half of"], [2 / 3, "two-thirds of"], [0.75, "three-quarters of"]];
const halves = (v) => { const r = Math.round(v * 2) / 2; return (r % 1 ? (Math.floor(r) || "") + "½" : String(r)); };
function kyCompare(cost) {
if (!(cost >= 1)) return null;
if (cost < SEMESTER / 2) {
const f = cost / PERMIT;
if (f < 0.07) return null; // too small for the comparison to mean anything
if (f < 0.88) { const [, w] = FRACTIONS.reduce((a, b) => (Math.abs(b[0] - f) < Math.abs(a[0] - f) ? b : a)); return `about ${w} a UK residential parking permit ($504)`; }
if (f < 1.25) return "about a UK residential parking permit ($504)";
return `about ${halves(f)} UK residential parking permits ($504 each)`;
}
const t = cost / SEMESTER;
if (t < 0.88) return t < 0.62 ? "about half a semester of UK tuition and fees ($7,089)" : "most of a semester of UK tuition and fees ($7,089)";
if (t < 1.25) return "about a semester of UK tuition and fees ($7,089)";
return `about ${halves(t)} semesters of UK tuition and fees ($7,089 each)`;
}
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const niceDate = (d) => { const [y, m, dd] = d.split("-").map(Number); return `${MONTHS[m - 1]} ${dd}, ${y}`; };
function summarize(state) {
const guess = state.guess || "none";
const bets = state.bets || [];
const settled = bets.filter((b) => b.result !== "pending");
let out;
if (settled.length) {
let wagered = 0, returned = 0, expected = 0, assumed = 0, w = 0, l = 0, p = 0, won = 0, lost = 0;
const skipped = { n: 0, stake: 0, types: new Set() };
for (const b of settled) {
const back = returnOf(b), e = edgeOf(b), d = back - b.stake;
wagered += b.stake; returned += back;
if (e == null) { skipped.n++; skipped.stake += b.stake; skipped.types.add(NOT_ESTIMATED[b.type] || b.type); }
else expected += b.stake * e;
if (d > 0) won += d; else lost -= d; // winnings counted per bet (TAX-14)
if (assumedPrice(b)) assumed++;
if (b.result === "win") w++; else if (b.result === "loss") l++; else p++;
}
const dates = settled.map((b) => b.date).sort();
out = {
mode: "log", count: settled.length, pending: bets.length - settled.length, wagered, returned, net: returned - wagered, expected, assumed,
won, lost, unestimated: { n: skipped.n, stake: skipped.stake, types: [...skipped.types] },
record: { w, l, p }, from: dates[0], to: dates[dates.length - 1],
netLabel: "net, your logged bets",
basis: `${settled.length} settled ${settled.length === 1 ? "bet" : "bets"} · ${dates[0] === dates[dates.length - 1] ? niceDate(dates[0]) : `${niceDate(dates[0])} to ${niceDate(dates[dates.length - 1])}`}`,
};
} else {
// Habit: the expected year (so the card agrees with the plan's cost step), taxed on a typical year.
const h = state.habit, Y = M.typicalYear(h), cost = M.expectedYearlyCost(h), wagered = M.yearlyWagered(h);
out = {
mode: "habit", count: Y.bets, pending: bets.length, wagered, returned: wagered - cost, net: -cost, expected: cost,
won: Y.winnings, lost: Y.losses, unestimated: { n: 0, stake: 0, types: [] }, assumed: 0, record: { w: Y.wins, l: Y.bets - Y.wins, p: 0 }, habit: h,
netLabel: "expected cost, a year at your habit",
basis: `${money(h.stake)} a bet · ${h.perWeek} a week · ${h.type === "parlay" ? "4-leg parlays" : "straight at −110"}`,
};
}
const T = taxOf(out.won, out.lost, state.tax);
out.itemize = !!(state.tax && state.tax.itemize);
out.tax = T.tax; out.taxable = T.taxable; out.fed = T.fed; out.ky = T.ky;
out.afterTax = out.net - T.tax;
out.compare = out.afterTax < -0.5 ? kyCompare(-out.afterTax) : null;
const u = out.unestimated;
out.expectedNote = u.n ? `leaves out ${u.n} ${u.types.join(", ")} ${u.n === 1 ? "bet" : "bets"} (no sourced edge)` : "";
out.guess = guess;
out.reality = out.net < -0.005 ? "down" : out.net > 0.005 ? "up" : "even";
out.realityText = out.reality === "even" ? "Even" : `${out.reality === "up" ? "Up" : "Down"} ${money(Math.abs(out.net))}`;
return out;
}
// ---------- the Wrapped card (canvas, 1080 × 1350), about money ----------
const CW = 1080, CH = 1350;
function drawCard(cv, S) {
if (cv.width !== CW) cv.width = CW;
if (cv.height !== CH) cv.height = CH;
const c = cv.getContext("2d");
const ink = "rgb(10,12,15)", bone = (a) => AE.rgba("bone", a);
const spacing = (px) => { if ("letterSpacing" in c) c.letterSpacing = px; };
c.setTransform(1, 0, 0, 1, 0, 0);
c.fillStyle = ink; c.fillRect(0, 0, CW, CH);
c.strokeStyle = bone(0.13); c.lineWidth = 2; c.strokeRect(36, 36, CW - 72, CH - 72);
const X0 = 96, X1 = CW - 96;
c.textBaseline = "alphabetic";
// kicker
c.font = '500 26px "Geist Mono", ui-monospace, monospace'; spacing("4px");
c.fillStyle = bone(0.5); c.textAlign = "left"; c.fillText("ABOUT EVEN · WHAT BETTING COSTS ME", X0, 140);
c.textAlign = "right"; c.fillText(S.mode === "log" ? "BET LOG" : "A YEAR", X1, 140); spacing("0px");
// headline: his guess against the math, or the plain question
c.textAlign = "left";
c.font = '600 76px Geist, ui-sans-serif, system-ui, sans-serif'; spacing("-3px");
const real = S.reality === "even" ? "about even" : S.reality;
const [h1, h2] = S.guess === "none" ? ["What it costs,", "in real money."] : [`I said ${GUESS_LC[S.guess]}.`, S.guess === S.reality ? `The math: ${real}, too.` : `The math: ${real}.`];
c.fillStyle = bone(0.64); c.fillText(h1, X0, 258);
c.fillStyle = bone(1); c.fillText(h2, X0, 342);
spacing("0px");
// hero: after tax, the real cost
const after = S.afterTax, aNeg = after < -0.005, aPos = after > 0.005;
c.font = '300 148px "Geist Mono", ui-monospace, monospace';
c.fillStyle = aNeg ? AE.rgba("red", 1) : aPos ? AE.rgba("green", 1) : bone(1);
c.fillText(AE.fmt.money(after, { sign: true }), X0 - 6, 532);
c.font = '500 24px "Geist Mono", ui-monospace, monospace'; spacing("3.5px");
c.fillStyle = aNeg ? AE.rgba("red", 0.85) : aPos ? AE.rgba("green", 0.8) : bone(0.5);
c.fillText((S.mode === "log" ? "after tax, my logged bets · estimate" : "after tax, a year · estimate").toUpperCase(), X0, 582); spacing("0px");
// 100 dots: of every $100 bet, green came back, red the books kept (all green when he's up)
const share = S.wagered > 0 ? Math.min(1, S.returned / S.wagered) : 1;
const greens = Math.round(share * 100), cols = 25, step = (X1 - X0) / cols;
for (let i = 0; i < 100; i++) {
const col = i % cols, row = (i / cols) | 0, x = X0 + (col + 0.5) * step, y = 640 + row * step;
const g = i < greens;
c.beginPath(); c.arc(x, y, g ? step * 0.3 : step * 0.27, 0, Math.PI * 2);
c.fillStyle = g ? AE.rgba("green", 0.9) : AE.rgba("red", 1); c.fill();
}
c.font = '500 20px "Geist Mono", ui-monospace, monospace'; spacing("3px");
c.textAlign = "left"; c.fillStyle = AE.rgba("green", 0.75); c.fillText("CAME BACK", X0, 640 + 4 * step);
c.textAlign = "right"; c.fillStyle = AE.rgba("red", 0.9); c.fillText(S.net >= 0 ? "" : "KEPT BY THE BOOKS", X1, 640 + 4 * step); spacing("0px");
// the money, row by row
const before = S.mode === "log" ? S.net : -S.expected;
const rows = [
[S.mode === "log" ? "Money bet" : "Money bet in a year", money(S.wagered), bone(1)],
[(S.mode === "log" ? "Result before tax" : "Expected cost before tax") + (S.unestimated.n ? "*" : ""), AE.fmt.money(before, { sign: true }), before < 0 ? AE.rgba("red", 1) : before > 0 ? AE.rgba("green", 1) : bone(1)],
["Tax on winnings, estimate", AE.fmt.money(-S.tax), S.tax > 0.005 ? AE.rgba("red", 1) : bone(1)],
["After tax", AE.fmt.money(after, { sign: true }), aNeg ? AE.rgba("red", 1) : aPos ? AE.rgba("green", 1) : bone(1)],
];
let y = 846;
for (const [label, val, col] of rows) {
c.strokeStyle = bone(0.13); c.lineWidth = 2; c.beginPath(); c.moveTo(X0, y - 46); c.lineTo(X1, y - 46); c.stroke();
c.font = '400 32px Geist, ui-sans-serif, system-ui, sans-serif'; c.textAlign = "left"; c.fillStyle = bone(0.64); c.fillText(label, X0, y);
c.font = '400 38px "Geist Mono", ui-monospace, monospace'; c.textAlign = "right"; c.fillStyle = col; c.fillText(val, X1, y);
y += 72;
}
c.strokeStyle = bone(0.13); c.beginPath(); c.moveTo(X0, y - 46); c.lineTo(X1, y - 46); c.stroke();
c.textAlign = "left"; c.fillStyle = bone(0.5);
const note = (t, yy) => { // shrink to fit the card width rather than run off the edge
let px = 24; c.font = `400 ${px}px Geist, ui-sans-serif, system-ui, sans-serif`;
while (px > 16 && c.measureText(t).width > X1 - X0) { px--; c.font = `400 ${px}px Geist, ui-sans-serif, system-ui, sans-serif`; }
c.fillText(t, X0, yy);
};
let ny = y - 8;
if (S.unestimated.n) { note(`* Expected cost ${S.expectedNote}.`, ny); ny += 32; }
note(`Tax: a single 12% federal bracket plus Kentucky 3.5%, ${S.itemize ? "itemizing" : "standard deduction"}. Estimate.`, ny); ny += 32;
if (S.compare) { c.fillStyle = bone(0.85); note(`In Kentucky money: ${S.compare}.`, ny); }
// footer
c.textAlign = "left"; c.font = '400 24px "Geist Mono", ui-monospace, monospace'; c.fillStyle = bone(0.5);
c.fillText(S.basis, X0, 1240);
c.font = '400 22px Geist, ui-sans-serif, system-ui, sans-serif'; c.fillStyle = bone(0.4);
c.fillText("Educational use only. Not betting, tax or investment advice.", X0, 1276);
}
// Canvas text silently falls back if a face isn't decoded yet, so check the card's faces and redraw
// once they're loaded.
const CARD_FONTS = ['500 26px "Geist Mono"', '300 148px "Geist Mono"', '400 38px "Geist Mono"', '600 76px Geist', '400 32px Geist'];
const fontsReady = () => (document.fonts && document.fonts.load ? Promise.all(CARD_FONTS.map((f) => document.fonts.load(f))).catch(() => {}) : Promise.resolve());
function paintCard(cv, S) {
drawCard(cv, S);
if (document.fonts && document.fonts.check && !CARD_FONTS.every((f) => document.fonts.check(f))) fontsReady().then(() => drawCard(cv, S));
}
async function savePNG(S) {
await fontsReady();
const cv = document.createElement("canvas");
drawCard(cv, S);
const name = "about-even-wrapped.png";
if (!cv.toBlob) { AE.ui.toast("This browser can’t save the image. Try a screenshot instead.", { error: true }); return; }
cv.toBlob((blob) => {
if (!blob) { AE.ui.toast("The image couldn’t be made. Try a screenshot instead.", { error: true }); return; }
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url; a.download = name; a.style.display = "none";
document.body.appendChild(a); a.click(); a.remove();
setTimeout(() => URL.revokeObjectURL(url), 4000);
AE.ui.toast(`Saved ${name}. It stays on your device.`);
}, "image/png");
}
const wrapAria = (S) => `Wrapped card. ${S.guess === "none" ? "No guess." : `You said ${GUESS[S.guess].toLowerCase()}.`} ${S.mode === "log" ? `Net ${AE.fmt.money(S.net, { sign: true })}` : `Expected cost ${money(S.expected)} a year`} on ${money(S.wagered)} bet${S.unestimated.n ? `; expected cost ${S.expectedNote}` : ""}. Tax on winnings, estimate, ${money(S.tax)}. After tax ${AE.fmt.money(S.afterTax, { sign: true })}.${S.compare ? ` In Kentucky money: ${S.compare}.` : ""} ${S.basis}.`;
AE.c9 = { summarize, drawCard, paintCard, savePNG, returnOf, edgeOf, habitMoney, kyCompare, GUESS, TYPE_LABEL };
// ---------- "What you learned" (AE.lessons(); falls back to registered chapter lessons) ----------
function lessons() {
let L = [];
try { if (typeof AE.lessons === "function") L = AE.lessons() || []; } catch (e) { L = []; }
if (!Array.isArray(L) || !L.length) {
L = (AE._chapters || []).filter((c) => c.lesson).sort((a, b) => a.order - b.order).map((c) => ({ chapterId: c.id, title: c.title, lesson: c.lesson, tab: c.tab || "story" }));
}
return L.map((x) => (typeof x === "string" ? { lesson: x } : x || {}))
.filter((x) => x.lesson && x.tab !== "plan" && !["c9", "c10"].includes(x.chapterId || x.id));
}
function paintLessons(card) {
const box = card && card.querySelector('[data-c9="learned"]');
if (!box) return;
const L = lessons();
box.hidden = !L.length;
if (!L.length) return;
box.querySelector("ol").innerHTML = L.map((x) => {
const go = typeof x.route === "string" && x.route ? (x.route.charAt(0) === "#" ? x.route : "#" + x.route) : null;
const t = AE.esc(x.lesson);
return `<li>${go ? `<a href="${AE.esc(go)}" data-ae-go="${AE.esc(go)}">${t}</a>` : `<span>${t}</span>`}</li>`;
}).join("");
}
// ---------- step 1: what betting costs you (red dots) ----------
const unitFor = (total, max) => [1, 2, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000].find((u) => total / u <= max) || 5000;
function sceneCost(stage, state, quick) {
const { R, mobile } = stage.geom, f = stage.fonts(), H = habitMoney(state);
const u = unitFor(H.after, mobile ? 200 : 260);
const nCost = Math.max(1, Math.round(H.cost / u)), nTax = Math.max(0, Math.round(H.tax / u));
const pc = mobile ? 9 : 12, gapC = mobile ? 3 : 4;
const topPad = mobile ? 92 : 150, botPad = mobile ? 34 : 52;
const rows = Math.max(Math.ceil(nCost / pc), Math.ceil(nTax / pc), 1);
let s = Math.min(R.w / (2 * pc + gapC), (R.h - topPad - botPad) / rows, mobile ? 16 : 20);
const y0 = R.y + Math.max(0, (R.h - (topPad + rows * s + botPad)) / 2);
if (stage.fitSize) s = stage.fitSize(s, rows, y0 + topPad);
const totalW = (2 * pc + gapC) * s, x0 = R.x + (R.w - totalW) / 2, rx0 = x0 + (pc + gapC) * s, right = x0 + totalW;
const base = y0 + topPad + rows * s;
stage.set(nCost + nTax, (i) => {
if (i < nCost) {
const p = AE.layout.pile(i, { x0, base, cols: pc, size: s });
return { x: p.x, y: p.y, r: s * 0.36, color: "red", alpha: 1, ease: "drop", delay: quick ? 0 : stage.rnd[i] * 520, dur: quick ? 280 : 1200 };
}
const p = AE.layout.pile(i - nCost, { x0: rx0, base, cols: pc, size: s });
return { x: p.x, y: p.y, r: s * 0.3, color: "red", alpha: 0.5, ease: "drop", delay: quick ? 0 : 600 + stage.rnd[i] * 520, dur: quick ? 280 : 1200 };
});
stage.glow({ red: 0.5 });
stage.halo(0.7);
const hy = y0 + (mobile ? 34 : 56), cy = hy + (mobile ? 20 : 26), ly = stage.clampY ? stage.clampY(base + (mobile ? 18 : 22), 2) : base + 20;
stage.overlays([
{ key: `${KEY}-hero`, type: "text", x: x0, y: hy, font: f.hero, color: AE.rgba("red", 1), align: "left", count: { to: H.after, dur: quick ? 300 : 1200, fmt: money } },
{ key: `${KEY}-heroc`, type: "text", x: x0, y: cy, text: "a year, after tax · estimate", font: f.cap, color: AE.capColor, align: "left", upper: true, spacing: "0.12em" },
{ key: `${KEY}-before`, type: "text", x: x0, y: cy + (mobile ? 22 : 30), text: `${money(H.cost)} before tax, on average`, font: f.label, color: AE.rgba("bone", 0.8), align: "left" },
{ key: `${KEY}-base`, type: "line", x1: x0, y1: base + 5, x2: right, y2: base + 5, color: AE.rgba("bone", 0.14) },
{ key: `${KEY}-l1`, type: "text", x: x0, y: ly, text: "the books’ cut", font: f.label, color: AE.rgba("red", 1), align: "left" },
{ key: `${KEY}-l2`, type: "text", x: right, y: ly, text: nTax ? "tax on your wins" : "", font: f.label, color: AE.rgba("red", 0.7), align: "right" },
]);
stage.label(`Red dots: what your habit costs a year. The books' cut, ${money(H.cost)} on average, plus an estimated ${money(H.tax)} of tax on your winnings: ${money(H.after)} a year after tax. One dot is ${money(u)}.`);
}
// ---------- step 3: the betting budget (cover charge) ----------
// Slider over friendly values ($0–500 by 10, then 50s, 100s, 500s to $20,000), with the step nearest
// the habit's exact month replaced by that exact month ($260 for the sample), so the suggestion is
// what he bets now. Same list as the Cover Charge lab.
const BASE_VALUES = (() => {
const v = [];
for (let x = 0; x < 500; x += 10) v.push(x);
for (let x = 500; x < 1000; x += 50) v.push(x);
for (let x = 1000; x < 5000; x += 100) v.push(x);
for (let x = 5000; x <= 20000; x += 500) v.push(x);
return v;
})();
let CC_VALUES = BASE_VALUES.slice(), habitIdx = -1;
const round2 = (v) => Math.round(v * 100) / 100;
const nearestIn = (arr, val) => { let b = 0; for (let i = 1; i < arr.length; i++) if (Math.abs(arr[i] - val) < Math.abs(arr[b] - val)) b = i; return b; };
const nearestIdx = (val) => nearestIn(CC_VALUES, val);
const monthlyBet = (h) => M.yearlyWagered(h) / 12;
function syncValues(h) { CC_VALUES = BASE_VALUES.slice(); habitIdx = nearestIn(BASE_VALUES, monthlyBet(h)); CC_VALUES[habitIdx] = round2(monthlyBet(h)); }
const coverOf = (s) => (s.commitment.coverCharge == null ? round2(monthlyBet(s.habit)) : s.commitment.coverCharge);
function sceneCover(stage, state, value, quick) {
const { R, mobile } = stage.geom, f = stage.fonts();
const cut = value * M.edgeFor(state.habit.type);
const u = unitFor(value, 300);
const n = Math.round(value / u), k = Math.min(n, Math.max(value > 0 ? 1 : 0, Math.round(cut / u)));
const back = n - k;
const colsL = Math.max(6, Math.ceil(Math.sqrt(Math.max(1, back) * 1.5)));
const colsR = Math.max(2, Math.min(colsL, Math.ceil(Math.sqrt(Math.max(1, k)))));
const rows = Math.max(Math.ceil(back / colsL), Math.ceil(k / colsR), 1);
const topPad = mobile ? 70 : 110, botPad = mobile ? 34 : 48, gap = 3;
let s = Math.min(R.w / (colsL + gap + colsR), (R.h - topPad - botPad) / rows, mobile ? 16 : 20);
if (stage.fitSize) s = stage.fitSize(s, rows, R.y + topPad);
const totalW = (colsL + gap + colsR) * s, x0 = R.x + (R.w - totalW) / 2, xr = x0 + (colsL + gap) * s;
const base = R.y + R.h - botPad - Math.max(0, (R.h - topPad - botPad - rows * s) / 2);
stage.set(n, (i) => {
if (i < back) {
const p = AE.layout.pile(i, { x0, base, cols: colsL, size: s });
return { x: p.x, y: p.y, r: s * 0.34, color: "green", alpha: 0.5, delay: quick ? 0 : stage.rnd[i] * 380, dur: quick ? 260 : undefined };
}
const p = AE.layout.pile(i - back, { x0: xr, base, cols: colsR, size: s });
return { x: p.x, y: p.y, r: s * 0.34, color: "red", alpha: 1, ease: "drop", delay: quick ? 0 : 420 + stage.rnd[i] * 420, dur: quick ? 260 : 1200 };
});
stage.glow({ red: 0.45 });
stage.halo(0.6);
const ly = stage.clampY ? stage.clampY(base + (mobile ? 22 : 28), 2) : base + 26, hy = R.y + (mobile ? 36 : 58);
stage.overlays([
{ key: `${KEY}-cbase`, type: "line", x1: x0, y1: base + 5, x2: x0 + totalW, y2: base + 5, color: AE.rgba("bone", 0.14) },
{ key: `${KEY}-cl`, type: "text", x: x0, y: ly, text: value > 0 ? "comes back, on average" : "", font: f.label, color: AE.rgba("green", 0.75), align: "left" },
{ key: `${KEY}-cr`, type: "text", x: x0 + totalW, y: ly, text: value > 0 ? "their cut" : "", font: f.label, color: AE.rgba("red", 1), align: "right" },
{ key: `${KEY}-chero`, type: "text", x: x0 + totalW, y: hy, font: f.hero2, color: AE.rgba("red", 1), align: "right", count: { to: cut, dur: quick ? 200 : 900, fmt: money } },
{ key: `${KEY}-chcap`, type: "text", x: x0 + totalW, y: hy + (mobile ? 18 : 24), text: value > 0 ? "their cut of it, on average" : "nothing for them to keep", font: f.cap, color: AE.capColor, align: "right", upper: true, spacing: "0.12em" },
]);
stage.label(value > 0 ? `A betting budget of ${money(value)} a month. Green dots come back on average; the red pile is the books' cut, about ${money(cut)}.` : "A betting budget of $0: sitting it out.");
}
// ---------- module UI state (not saved) ----------
let wrapEl = null, wrapCv = null, ccSlider = null, habitCtl = null;
const isStep = (i) => { const c = AE.steps.current(); return !!(c && c.chapter === KEY && c.index === i); };
function paintHabit(card, s) {
if (!card) return;
const h = s.habit, line = card.querySelector('[data-c9="habit"]');
if (line) line.innerHTML = `<span class="c9-tag">${isSample(h) ? "Sample" : "Yours"}</span> ${AE.esc(habitWords(h))}.`;
if (habitCtl) { habitCtl.stake.set(h.stake); habitCtl.week.set(h.perWeek); habitCtl.type.set(h.type); }
}
const withValue = (list, v) => (list.includes(v) ? list : list.concat(v).sort((a, b) => a - b));
function buildHabitEditor(host, s) {
const store = (patch) => AE.state.merge("habit", patch);
const h = s.habit;
habitCtl = {
stake: AE.ui.segmented({ label: "Per bet", value: h.stake, options: withValue([5, 10, 20, 50, 100, 200], h.stake).map((v) => ({ value: v, label: money(v), aria: `${money(v)} a bet` })), onChange: (v) => store({ stake: v }) }),
week: AE.ui.segmented({ label: "A week", value: h.perWeek, options: withValue([1, 2, 3, 5, 7, 10, 14], h.perWeek).map((v) => ({ value: v, label: String(v), aria: `${v} ${v === 1 ? "bet" : "bets"} a week` })), onChange: (v) => store({ perWeek: v }) }),
type: AE.ui.segmented({ label: "Type", value: h.type, options: [{ value: "straight", label: "Straight", aria: "Straight bets at minus 110" }, { value: "parlay", label: "4-leg parlay", aria: "Four-leg parlays" }], onChange: (v) => store({ type: v }) }),
};
host.textContent = "";
for (const k of ["stake", "week", "type"]) host.appendChild(habitCtl[k].el);
}
const HELP_LINE = `<p class="c9-help"><span class="c9-help-k">Kentucky help, any time</span><a href="tel:+18004262537">1-800-GAMBLER</a>, call or text, 24/7 · <a href="https://kygamblinghelp.org" target="_blank" rel="noopener">kygamblinghelp.org</a> · <a href="tel:988">988</a></p>`;
const STEPS = [
{
wide: true,
className: "c9-top",
aria: "",
html: `
<h2>Make a money plan.</h2>
<p class="c9-lede">See what betting costs you, set a budget, and point the rest at something you want.</p>
<div class="c9-learned" data-c9="learned" hidden>
<span class="ae-label">What you learned</span>
<ol></ol>
</div>
<div class="c9-habit">
<span class="ae-label">The habit this plan uses</span>
<p class="c9-habit-line" data-c9="habit"></p>
<button type="button" class="ae-quiet c9-set" aria-expanded="false" aria-controls="c9-habit-ed">Set your own</button>
<div class="c9-habit-ed" id="c9-habit-ed" hidden></div>
</div>
${HELP_LINE}`,
enter(stage, state, ctx) { stage.clear(); paintHabit(ctx.card, state); },
},
{
aria: "Red dots: what your habit costs a year, the books' cut plus tax on your winnings.",
html: `<h2>What betting costs you.</h2><p>A year at your habit, on average. <span class="r">Red</span> is money that doesn’t come back, including tax on your wins.</p>`,
enter(stage, state, ctx) { sceneCost(stage, state, ctx.resize || ctx.refresh); },
},
{
aria: "Your Wrapped card: your guess against the math, and what betting costs you in a year, before and after tax.",
html: `<h2 data-c9="wrap-head">Your year, wrapped.</h2><p>Save it as an image. It stays on your device.</p><div class="ae-slot c9-acts"><span data-slot="c9-save"></span><button type="button" class="ae-quiet c9-log" data-ae-lab="bet-log">Use real bets instead</button></div>`,
enter(stage, state, ctx) {
const S = summarize(state), { R, mobile } = stage.geom;
const head = ctx.card.querySelector('[data-c9="wrap-head"]');
const real = S.reality === "even" ? "about even" : S.reality;
head.innerHTML = S.guess === "none" ? "Your year, wrapped." : `You said <span class="ae-guess">${GUESS_LC[S.guess]}</span>. The math says ${real}.`;
ctx.card.querySelector(".c9-log").textContent = S.mode === "log" ? "Edit your bet log" : "Use real bets instead";
stage.clear();
stage.halo(0.8);
if (!wrapEl) return;
const w = Math.floor(Math.min(R.w, (R.h - 8) * (CW / CH), mobile ? 420 : 460)), h = Math.round(w * (CH / CW));
wrapEl.style.width = w + "px"; wrapEl.style.height = h + "px";
stage.place(wrapEl, R.x + R.w / 2, R.y + Math.max(0, (R.h - h) / 2), { align: "center" });
paintCard(wrapCv, S); // after placing: draw into an attached canvas
wrapCv.setAttribute("aria-label", wrapAria(S));
stage.label("Your Wrapped card.");
},
},
{
aria: "Your monthly betting budget as dots. Most are dim green, money that comes back on average; a small red pile is the books' cut of it.",
html: `<h2>Set a betting budget.</h2><p>A monthly cover charge for betting. When it’s spent, you’re done till the 1st.</p><div class="ae-slot" data-slot="c9-cover"></div>`,
enter(stage, state) {
const v = coverOf(state);
if (ccSlider) ccSlider.set(nearestIdx(v));
sceneCover(stage, state, v, false);
},
},
];
AE.chapter({
id: KEY,
order: 9,
tab: "plan",
title: "What it costs",
lesson: "A budget is a decision you make before the game.",
lab: "bet-log",
sources: ["PAR-08", "PAR-05", "PAR-12", "PAR-09", "TAX-07", "TAX-08", "MKT-33", "MKT-32", "PAR-02", "RACE-01", "PM-14", "HELP-01", "HELP-02", "HELP-03"],
steps: STEPS,
drawer: {
step: 1,
title: "How the cost is computed",
html: `
<div><span class="ae-label">Your habit</span>The plan uses the habit from <em>It’s just $20</em>, or the sample ($20 a bet, 3 a week, straight bets) until you set your own. Change it with <em>Set your own</em> at the top of this page.</div>
<div><span class="ae-label">Expected cost</span><code>stake × bets a week × 52 × house edge</code>. Straight bets at −110: <strong>4.55%</strong>, so <code>$3,120 × 4.55% = $141.82</code> a year for the sample. A 4-leg parlay: <strong>16.98%</strong> (illustration: each leg a true 50/50 game priced at −110). It’s an average: a real year swings around it.</div>
<div><span class="ae-label">After tax</span>Winning bets are taxed even in a losing year. We take a typical year at your habit (exactly the expected share of bets win), tax its winnings with your filing choice from <em>Even isn’t even</em> (standard deduction unless you picked itemize): federal as a single-bracket estimate, <code>taxable × 12%</code> (2026 single, over $12,400 to $50,400), plus Kentucky <code>taxable × 3.5%</code>. Then <code>after tax = expected cost + that tax</code>: <code>$141.82 + $219.82 = $361.64</code> for the sample. Educational estimate, not tax advice.</div>
<div><span class="ae-label">The Wrapped card</span>The same numbers, plus your first-screen guess against the math. With settled bets in your bet log, the card uses them instead: <code>what came back − what you bet</code>, and expected cost <code>stake × edge</code> per bet (race bets 17.5%, prediction-market trades about 3.4%, illustrative; props, futures, live and other bets are left out, with a note). In Kentucky money: a UK residential parking permit (<strong>$504</strong>) or a semester of UK resident tuition and fees (<strong>$7,089</strong>, 2026–27). The image is drawn on your device; nothing is uploaded.</div>
<div><span class="ae-label">The betting budget</span>It starts at what your habit puts on bets in a month, not rounded: <code>stake × bets a week × 52 ÷ 12</code> (<code>$260</code> for the sample). The red pile is the books’ average cut of it: <code>$260 × 4.55% = $11.82</code>. A lower budget cuts what they expect to keep in proportion.</div>`,
},
init({ cards }) {
const s0 = AE.state.get();
// 0: What you learned, the habit, Set your own
paintLessons(cards[0]);
const ed = cards[0].querySelector(".c9-habit-ed"), setBtn = cards[0].querySelector(".c9-set");
buildHabitEditor(ed, s0);
setBtn.addEventListener("click", () => {
const open = ed.hidden;
ed.hidden = !open;
setBtn.setAttribute("aria-expanded", String(open));
setBtn.textContent = open ? "Done" : "Set your own";
});
paintHabit(cards[0], s0);
// 2: Wrapped card
wrapEl = AE.h(`<div class="c9-wrap" style="position:absolute"><canvas class="c9-wrap-cv" role="img" width="${CW}" height="${CH}" style="display:block;width:100%;height:100%;border-radius:2px"></canvas></div>`);
wrapCv = wrapEl.querySelector("canvas");
const save = AE.ui.button({ label: "Save as image", onClick: () => savePNG(summarize(AE.state.get())) });
cards[2].querySelector('[data-slot="c9-save"]').replaceWith(save.el);
// 3: betting budget slider. Previews live; stores on release.
syncValues(s0.habit);
ccSlider = AE.ui.slider({
min: 0, max: CC_VALUES.length - 1, step: 1, value: nearestIdx(coverOf(s0)),
aria: "Your monthly betting budget",
format: (i) => (CC_VALUES[i] === 0 ? "$0 · sitting out" : `${money(CC_VALUES[i])} a month${i === habitIdx ? " · what you bet now" : ""}`),
onInput: (i) => { if (isStep(3)) sceneCover(AE.stage, AE.state.get(), CC_VALUES[i], true); },
onChange: (i) => { AE.state.merge("commitment", { coverCharge: CC_VALUES[i] }); if (isStep(3)) sceneCover(AE.stage, AE.state.get(), CC_VALUES[i], true); },
});
cards[3].querySelector('[data-slot="c9-cover"]').appendChild(ccSlider.el);
// Lessons register with their chapters; re-read after boot and on every route change.
requestAnimationFrame(() => paintLessons(cards[0]));
if (AE.route && typeof AE.route.on === "function") AE.route.on(() => paintLessons(cards[0]));
AE.state.subscribe((s, changed, meta) => {
if (changed.includes("habit")) syncValues(s.habit);
paintHabit(cards[0], s);
ccSlider.set(nearestIdx(coverOf(s)));
if (meta && meta.replace) return; // steps.js re-enters the active step after a file open
const c = AE.steps.current();
if (!c || c.chapter !== KEY) return;
if (c.index === 1 && (changed.includes("habit") || changed.includes("tax"))) sceneCost(AE.stage, s, true);
if (c.index === 2 && !changed.every((k) => k === "commitment")) AE.steps.refresh({ refresh: true });
if (c.index === 3 && changed.includes("habit")) sceneCover(AE.stage, s, coverOf(s), true);
}, ["guess", "habit", "bets", "tax", "commitment"]);
},
});
} catch (e) { console.error("[About Even] chapters/c09-your-ledger.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- chapters/c10-your-move.js ---- */
;(function (AE) {
"use strict";
try {
// C10. Your Plan, part 2 (restructure brief, "Your Plan"; tab "plan"):
// 0 (wide) Point the rest at savings goals: up to 3 goals, each a name, a target, a monthly amount
// (default: the habit's expected monthly cost, editable) and an optional growth rate HE types
// (default 0%, "your assumption"). Shows months to reach it, green dots filling toward it, and a
// Kentucky comparison (MKT-32 / MKT-33). With no goals saved, an example goal shows ("Emergency
// fund", $1,000), labeled as an example; editing it makes it his.
// 1 A personal rule: presets consistent with C4, plus his own.
// 2 The commitment card: cost, budget, goals, rules, Kentucky help. Save as PNG or print.
// 3 (wide) The ending: Kentucky help, always on screen; save your file.
//
// State: state.commitment = { coverCharge, rules: string[] ≤ 20, goals: [{ name ≤ 60, target|null,
// monthly|null, rate 0–30 }] ≤ 3 } (schema in src/core/file.js). goal.monthly null = follow the
// habit's expected monthly cost. rules hold a preset id for presets and the literal text for his own.
// Rule 5 / DNU-32: no product, no suggested rate, no return assumption except the rate he types.
AE.source({ id: "PAR-05", label: "Book's hold on a balanced −110 / −110 market: 4.55% (arithmetic)", note: "The straight-bet edge used for a straight-bet habit." });
AE.source({ id: "PAR-12", label: "Parlay house cut, n legs: 1 − (1.90909 ÷ 2)ⁿ (arithmetic)", note: "16.98% at 4 legs, the edge used for a 4-leg parlay habit. Illustration: each leg a true 50/50 game priced at −110." });
AE.source({ id: "PAR-08", label: "Habit expected cost: stake × bets × house edge (arithmetic)" });
AE.source({ id: "HELP-01", label: "1-800-GAMBLER (1-800-426-2537), Kentucky’s resource line: call or text, 24/7", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx", note: "Info or a referral to a counselor or a GA meeting; answered by RiverValley Behavioral Health (CHFS DBHDID)." });
AE.source({ id: "HELP-02", label: "Kentucky Gambling Help, kygamblinghelp.org: self-assessment and online chat with a trained counselor", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx" });
AE.source({ id: "HELP-03", label: "988 Suicide and Crisis Lifeline: call, chat or text, 24/7", url: "https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx" });
AE.source({ id: "HELP-10", label: "809 KAR 10:007: each Kentucky sports wagering licensee keeps a self-exclusion list; ask at a premises, in the app or by phone", url: "https://apps.legislature.ky.gov/law/kar/titles/809/010/007/14877/", note: "There is no single statewide sign-up covering all gambling (KYCPG, as of Sept 2025)." });
AE.source({ id: "HELP-12", label: "FanDuel Responsible Play page: deposit, time, loss and wager limits", url: "https://account.www.fanduel.com/responsible-play", note: "Listed as an example of in-app limits, not a recommendation." });
AE.source({ id: "HARM-36", label: "Bjørseth et al. (2021), meta-analysis of 18 pop-up / reality-check studies", url: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7868407/", note: "Behavioral effect g = 0.505 (95% CI 0.256–0.746), with significant heterogeneity." });
AE.source({ id: "HARM-38", label: "Hungarian operator study: reminders at 80% of a loss limit were followed by reduced play", url: "https://real.mtak.hu/91516/1/2006.7.2018.106.pdf", note: "Weaker design (not randomized)." });
AE.source({ id: "HARM-39", label: "Limitation: no study has tested a self-made tracker or card", note: "All the feedback evidence uses operator-delivered, real account data." });
AE.source({ id: "MKT-32", label: "UK resident tuition: $7,088.50 per semester including mandatory fees, 2026–27 (UKNow)", url: "https://uknow.uky.edu/node/262566", note: "A Kentucky money equivalent for a year of savings." });
AE.source({ id: "MKT-33", label: "UK residential parking permit: $504 (UKNow)", url: "https://uknow.uky.edu/node/264026", note: "A Kentucky money equivalent for a year of savings." });
const KEY = "c10";
const M = AE.math;
const RULE_MAX = 20, OWN_MAX = 60, GOAL_MAX = 3, DOTS = 50;
// Rules agree with the story: C4 shows every parlay leg compounds the cut, so the presets steer
// toward straight bets and away from same-game parlays rather than capping legs.
const PRESETS = [
{ id: "straight-only", text: "Straight bets only. No parlays." },
{ id: "no-sgp", text: "No same-game parlays." },
{ id: "no-chase-1h", text: "No bet within an hour of a loss." },
];
// Preset ids from earlier builds, so an older save file still reads as words.
const LEGACY = { "no-friend-futures": "No futures a friend talks me into.", "max-3-legs": "No parlays over 3 legs." };
const ruleText = (r) => { const p = PRESETS.find((x) => x.id === r); return p ? p.text : LEGACY[r] || r; };
const EXAMPLE = { name: "Emergency fund", target: 1000, monthly: null, rate: 0 };
const money = (v) => AE.fmt.money(v);
const round2 = (v) => Math.round(v * 100) / 100;
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
// ---------- money from the habit (AE.math; same figures as C9) ----------
const yearCost = (h) => M.expectedYearlyCost(h); // $141.82 sample
const habitMonthly = (h) => yearCost(h) / 12; // $11.82 sample
const monthlyBet = (h) => M.yearlyWagered(h) / 12; // $260 sample
function afterTaxYear(s) {
const Y = M.typicalYear(s.habit);
const T = M.taxBundle({ winnings: Y.winnings, losses: Y.losses, itemize: !!s.tax.itemize, lossRate: s.tax.lossRate === 1 ? 1 : 0.9 });
return yearCost(s.habit) + T.tax; // $361.64 sample
}
// What a lower betting budget saves each month on average: the expected cost of the dollars you stop
// betting, (what you bet a month − budget) × the habit's edge. Most money bet comes back, so the cut in
// money bet is not money saved. 0 when no budget is set or it's not lower.
const freedOf = (s) => {
const mb = monthlyBet(s.habit), cc = s.commitment.coverCharge;
if (cc == null || !(mb > 0)) return 0;
return Math.max(0, round2(habitMonthly(s.habit) * (mb - cc) / mb));
};
// ---------- goals ----------
const monthlyOf = (g, h) => (g.monthly == null ? habitMonthly(h) : g.monthly);
// Months until the balance reaches the target: AE.math.monthsToGoal (deposit at the end of each month,
// his own rate compounding monthly at rate ÷ 12; tested in tests/math.test.mjs). AE.c10.monthsToGoal
// stays as an alias.
const monthsToGoal = M.monthsToGoal;
function balanceAfter(months, monthly, ratePct = 0) {
const r = (ratePct || 0) / 100 / 12;
let b = 0;
for (let m = 0; m < months; m++) b = b * (1 + r) + monthly;
return b;
}
const plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
function monthsWords(m) {
if (m == null) return "";
if (m === Infinity) return "never at this pace";
if (m > 600) return "more than 50 years";
if (m < 12) return plural(m, "month");
const y = Math.floor(m / 12), r = m % 12;
return plural(y, "year") + (r ? `, ${plural(r, "month")}` : "");
}
// The working list: his goals, or the example when he has none yet (not saved until he edits it).
const working = (s) => (s.commitment.goals.length ? s.commitment.goals.map((g) => ({ ...g })) : [{ ...EXAMPLE, example: true }]);
function sanitize(g, i) {
const name = String(g.name == null ? "" : g.name).replace(/\s+/g, " ").trim().slice(0, 60) || `Goal ${i + 1}`;
const target = g.target == null || !Number.isFinite(g.target) ? null : clamp(round2(g.target), 1, 10_000_000);
const monthly = g.monthly == null || !Number.isFinite(g.monthly) ? null : clamp(round2(g.monthly), 0, 1_000_000);
const rate = Number.isFinite(g.rate) ? clamp(Math.round(g.rate * 100) / 100, 0, 30) : 0;
return { name, target, monthly, rate };
}
function storeGoals(list) {
AE.state.merge("commitment", { goals: list.slice(0, GOAL_MAX).map(sanitize) });
}
// ---------- one Kentucky comparison (MKT-32 / MKT-33 wording, same as C9) ----------
const PERMIT = 504, SEMESTER = 7088.5;
const FRACTIONS = [[0.1, "a tenth of"], [0.2, "a fifth of"], [0.25, "a quarter of"], [1 / 3, "a third of"], [0.5, "half of"], [2 / 3, "two-thirds of"], [0.75, "three-quarters of"]];
const halves = (v) => { const r = Math.round(v * 2) / 2; return (r % 1 ? (Math.floor(r) || "") + "½" : String(r)); };
function kyCompare(cost) {
if (!(cost >= 1)) return null;
if (cost < SEMESTER / 2) {
const f = cost / PERMIT;
if (f < 0.07) return null;
if (f < 0.88) { const [, w] = FRACTIONS.reduce((a, b) => (Math.abs(b[0] - f) < Math.abs(a[0] - f) ? b : a)); return `about ${w} a UK residential parking permit ($504)`; }
if (f < 1.25) return "about a UK residential parking permit ($504)";
return `about ${halves(f)} UK residential parking permits ($504 each)`;
}
const t = cost / SEMESTER;
if (t < 0.88) return t < 0.62 ? "about half a semester of UK tuition and fees ($7,089)" : "most of a semester of UK tuition and fees ($7,089)";
if (t < 1.25) return "about a semester of UK tuition and fees ($7,089)";
return `about ${halves(t)} semesters of UK tuition and fees ($7,089 each)`;
}
// ---------- the Kentucky help block (HELP-01/02/03/10; wording from docs/sources.md) ----------
const HELP_HTML = `
<div class="c10-help" role="region" aria-label="Kentucky help">
<span class="c10-help-k">Kentucky help, if you want it</span>
<ul>
<li><strong>1-800-GAMBLER</strong><span><a href="tel:+18004262537">Call</a> or <a href="sms:+18004262537">text</a>, 24/7. Info, or a referral to a counselor or a GA meeting.</span></li>
<li><strong><a href="https://kygamblinghelp.org" target="_blank" rel="noopener">kygamblinghelp.org</a></strong><span>A self-check, and online chat with a trained counselor.</span></li>
<li><strong><a href="tel:988">988</a></strong><span>Suicide and Crisis Lifeline. Call, chat or text, 24/7.</span></li>
<li><strong>Self-exclusion</strong><span>Every Kentucky sportsbook keeps a list. Ask in the app, by phone or at the counter.</span></li>
</ul>
</div>`;
const HELP_LINE = `<p class="c10-help-line"><span>Kentucky help</span><a href="tel:+18004262537">1-800-GAMBLER</a>, call or text, 24/7 · <a href="https://kygamblinghelp.org" target="_blank" rel="noopener">kygamblinghelp.org</a> · <a href="tel:988">988</a></p>`;
// ---------- step 0: the goals editor (DOM, in the wide card) ----------
let goalsHost = null;
const parseNum = (t) => { const s = String(t).replace(/[^0-9.]/g, ""); if (!s) return null; const v = parseFloat(s); return Number.isFinite(v) ? v : null; };
const inMoney = (v) => (v == null ? "" : (Math.round(v * 100) % 100 ? round2(v).toFixed(2) : String(Math.round(v))));
function goalRowHTML(g, i, n) {
const id = `c10-g${i}`;
return `
<li class="c10-goal${g.example ? " is-example" : ""}" data-i="${i}">
<div class="c10-g-head">
<span class="c10-g-k">Goal ${i + 1}${g.example ? `<em>Example: edit it</em>` : ""}</span>
${g.example ? "" : `<button type="button" class="c10-x" data-act="remove" aria-label="Remove goal ${i + 1}">Remove</button>`}
</div>
<div class="c10-g-fields">
<label class="c10-f c10-f-name" for="${id}-name"><span>What it’s for</span>
<input id="${id}-name" data-f="name" type="text" maxlength="60" autocomplete="off" spellcheck="true" placeholder="A trip, a car, rent" value="${AE.esc(g.name)}"></label>
<label class="c10-f" for="${id}-target"><span>Target</span>
<span class="c10-in"><i>$</i><input id="${id}-target" data-f="target" type="text" inputmode="decimal" autocomplete="off" placeholder="1000" value="${inMoney(g.target)}"></span></label>
<label class="c10-f" for="${id}-monthly"><span>Each month</span>
<span class="c10-in"><i>$</i><input id="${id}-monthly" data-f="monthly" type="text" inputmode="decimal" autocomplete="off" value=""></span></label>
<label class="c10-f c10-f-rate" for="${id}-rate"><span>Your growth rate</span>
<span class="c10-in"><input id="${id}-rate" data-f="rate" type="text" inputmode="decimal" autocomplete="off" placeholder="0" value="${g.rate ? g.rate : ""}"><i>% a year</i></span></label>
</div>
<div class="c10-g-quick" data-q-wrap></div>
<div class="c10-dots" aria-hidden="true">${Array.from({ length: DOTS }, (_, k) => `<i style="--d:${k * 12}"></i>`).join("")}</div>
<p class="c10-g-out" aria-live="polite"></p>
</li>`;
}
// Read a row's inputs as a draft goal (live preview, before anything is stored).
function draftOf(li, base) {
const v = (f) => li.querySelector(`[data-f="${f}"]`).value;
const monthlyRaw = parseNum(v("monthly"));
return {
name: v("name"),
target: parseNum(v("target")),
monthly: li.dataset.follow === "1" ? null : monthlyRaw,
rate: Math.min(30, parseNum(v("rate")) || 0),
example: base && base.example,
};
}
function paintRow(li, g, s) {
const h = s.habit, mon = monthlyOf(g, h), m = monthsToGoal(g.target, mon, g.rate);
li.dataset.follow = g.monthly == null ? "1" : "0";
const mIn = li.querySelector('[data-f="monthly"]');
if (document.activeElement !== mIn) mIn.value = inMoney(round2(mon));
// quick picks for the monthly amount: the books' cut (follows the habit), or what the budget frees up
const freed = freedOf(s);
const q = [`<span>Fill in:</span><button type="button" class="c10-q" data-act="cut" aria-pressed="${g.monthly == null}">the books’ cut (${AE.esc(money(habitMonthly(h)))})</button>`];
if (freed > 0) q.push(`<button type="button" class="c10-q" data-act="freed" aria-pressed="${g.monthly != null && Math.abs(g.monthly - freed) < 0.005}">what your budget saves (${AE.esc(money(freed))})</button>`);
li.querySelector("[data-q-wrap]").innerHTML = q.join("");
// dots: the target, green where one year of this gets you
const share = g.target > 0 ? Math.min(1, balanceAfter(12, mon, g.rate) / g.target) : 0;
const green = Math.round(share * DOTS);
li.querySelectorAll(".c10-dots i").forEach((d, k) => d.classList.toggle("on", k < green));
// the answer, then a Kentucky comparison for a year of it
const out = li.querySelector(".c10-g-out");
if (!(g.target > 0)) { out.innerHTML = `Add a target to see how long it takes.`; return; }
const when = m === Infinity ? (mon > 0 ? "More than 100 years" : "Not at $0 a month") : monthsWords(m);
const cmp = kyCompare(mon * 12);
out.innerHTML = `<strong>${AE.esc(when.charAt(0).toUpperCase() + when.slice(1))}</strong> to ${AE.esc(money(g.target))}${g.rate ? `, with your ${AE.esc(String(g.rate))}% assumption` : ""}.`
+ (cmp ? `<span>A year of it is ${AE.esc(cmp)}.</span>` : "");
}
function renderGoals(s) {
if (!goalsHost) return;
const list = working(s);
const ul = goalsHost.querySelector(".c10-goals");
ul.innerHTML = list.map((g, i) => goalRowHTML(g, i, list.length)).join("");
ul.querySelectorAll(".c10-goal").forEach((li, i) => paintRow(li, list[i], s));
const add = goalsHost.querySelector('[data-act="add"]');
add.hidden = list.length >= GOAL_MAX;
}
function repaintGoals(s) { // keep the input he's in (he may be typing); sync the rest and refresh outputs
if (!goalsHost) return;
const list = working(s), rows = goalsHost.querySelectorAll(".c10-goal"), active = document.activeElement;
if (rows.length !== list.length) return renderGoals(s);
rows.forEach((li, i) => {
const g = list[i];
if (li.classList.contains("is-example") && !g.example) { // the example just became his
li.classList.remove("is-example");
const em = li.querySelector(".c10-g-k em");
if (em) em.remove();
li.querySelector(".c10-g-head").insertAdjacentHTML("beforeend", `<button type="button" class="c10-x" data-act="remove" aria-label="Remove goal ${i + 1}">Remove</button>`);
}
const set = (f, v) => { const inp = li.querySelector(`[data-f="${f}"]`); if (inp !== active) inp.value = v; };
if (!g.example) { set("name", g.name); set("target", inMoney(g.target)); set("rate", g.rate ? String(g.rate) : ""); }
set("monthly", inMoney(round2(monthlyOf(g, s.habit))));
if (li.querySelector('[data-f="monthly"]') !== active) li.dataset.follow = g.monthly == null ? "1" : "0";
paintRow(li, draftOf(li, g), s);
});
}
// Commits from the editor itself repaint in place (a full re-render would drop focus mid-Tab).
let selfCommit = false;
function storeFromEditor(list) { selfCommit = true; try { storeGoals(list); } finally { selfCommit = false; } }
function buildGoals() {
const el = AE.h(`<div class="c10-goals-wrap">
<ol class="c10-goals"></ol>
<div class="c10-goals-foot">
<button type="button" class="ae-quiet" data-act="add">Add a goal</button>
<p class="c10-note">Growth rate is optional. Leave it at 0% unless you have your own number; we don’t suggest investments.</p>
</div>
</div>`);
let t = 0;
const commitRow = (li) => {
clearTimeout(t);
const s = AE.state.get(), list = working(s), i = +li.dataset.i;
list[i] = { ...list[i], ...draftOf(li, list[i]) };
delete list[i].example;
storeFromEditor(list.map(({ example, ...g }) => g));
};
el.addEventListener("input", (e) => {
const li = e.target.closest(".c10-goal");
if (!li) return;
if (e.target.dataset.f === "monthly") li.dataset.follow = "0";
const s = AE.state.get(), base = working(s)[+li.dataset.i];
paintRow(li, draftOf(li, base), s);
clearTimeout(t); t = setTimeout(() => commitRow(li), 700);
});
el.addEventListener("change", (e) => { const li = e.target.closest(".c10-goal"); if (li && e.target.matches("input")) commitRow(li); });
el.addEventListener("keydown", (e) => { if (e.key === "Enter" && e.target.matches(".c10-goal input")) { e.preventDefault(); e.target.blur(); } });
el.addEventListener("click", (e) => {
const b = e.target.closest("[data-act]");
if (!b) return;
const s = AE.state.get(), list = working(s).map(({ example, ...g }) => g), li = b.closest(".c10-goal"), i = li ? +li.dataset.i : -1;
if (b.dataset.act === "add") {
if (list.length >= GOAL_MAX) return;
list.push({ name: `Goal ${list.length + 1}`, target: null, monthly: null, rate: 0 });
storeFromEditor(list);
const inp = el.querySelector(`.c10-goal[data-i="${list.length - 1}"] [data-f="name"]`);
if (inp) { inp.focus(); inp.select(); }
} else if (b.dataset.act === "remove") {
list.splice(i, 1); storeFromEditor(list);
} else if (b.dataset.act === "cut") {
list[i] = { ...list[i], ...draftOf(li, list[i]), monthly: null }; storeFromEditor(list);
} else if (b.dataset.act === "freed") {
list[i] = { ...list[i], ...draftOf(li, list[i]), monthly: freedOf(s) }; storeFromEditor(list);
}
});
return el;
}
// ---------- the commitment card (DOM on the stage, plus print + PNG versions) ----------
const today = () => new Date().toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" });
function cardLines(s) {
const c = s.commitment, out = [];
out.push({ k: "What betting costs me", text: `${money(yearCost(s.habit))} a year on average. ${money(afterTaxYear(s))} after tax.`, sub: "Educational estimate, at the habit in this plan." });
out.push({ k: "My betting budget", key: c.coverCharge == null ? "muted" : "",
text: c.coverCharge == null ? "Not set yet." : c.coverCharge === 0 ? "$0 a month. I’m sitting it out." : `${money(c.coverCharge)} a month. When it’s spent, I’m done till the 1st.` });
working(s).forEach((g, i, all) => {
const mon = monthlyOf(g, s.habit), m = monthsToGoal(g.target, mon, g.rate);
const when = g.target > 0 ? (m === Infinity ? "" : `, about ${monthsWords(m)}`) : "";
out.push({ k: i === 0 ? (all.length > 1 ? "My savings goals" : "My savings goal") : "", key: "goal",
text: `${g.name}: ${money(mon)} a month${g.target > 0 ? ` toward ${money(g.target)}` : ""}${when}.`,
sub: g.example ? "Example. Make it yours in the plan." : g.rate ? `Includes my own ${g.rate}% a year growth assumption.` : "" });
});
if (c.rules.length) c.rules.forEach((r, i) => out.push({ k: i === 0 ? (c.rules.length > 1 ? "My rules" : "My rule") : "", text: ruleText(r) }));
else out.push({ k: "My rule", key: "muted", text: "None yet." });
return out;
}
function cardHTML(s, { actions = true } = {}) {
const rows = cardLines(s).map((l) => `<div class="c10-row${l.key === "goal" ? " is-goal" : l.key === "muted" ? " is-muted" : ""}"><span class="c10-row-k">${AE.esc(l.k)}</span><span class="c10-row-v">${AE.esc(l.text)}${l.sub ? `<small>${AE.esc(l.sub)}</small>` : ""}</span></div>`).join("");
return `
<div class="c10-card-top"><span>My money plan</span><span>${AE.esc(today())}</span></div>
<div class="c10-rows">${rows}</div>
<p class="c10-card-help"><strong>Kentucky help:</strong> 1-800-GAMBLER, call or text 24/7 · kygamblinghelp.org · 988 · self-exclusion at any Kentucky sportsbook</p>
${actions ? `<div class="c10-acts"><button type="button" class="ae-quiet" data-c10-png>Save as image</button><button type="button" class="ae-quiet" data-c10-print>Print</button></div>` : `<p class="c10-card-foot">About Even · Educational use only. Not betting, tax or investment advice.</p>`}`;
}
// PNG: draw the card on an offscreen canvas and download it as a blob. Nothing is uploaded.
function wrap(ctx, text, maxW) {
const words = String(text).split(/\s+/), lines = [];
let line = "";
for (const w of words) {
const t = line ? line + " " + w : w;
if (ctx.measureText(t).width > maxW && line) { lines.push(line); line = w; } else line = t;
}
if (line) lines.push(line);
return lines;
}
async function savePNG() {
const s = AE.state.get();
try { if (document.fonts) await Promise.all(["600 40px Geist", "400 20px Geist", "400 20px 'Geist Mono'", "500 20px 'Geist Mono'"].map((f) => document.fonts.load(f))); } catch (e) { /* draw with fallbacks */ }
const W = 1080, P = 84, inner = W - P * 2, sc = 2;
const SANS = "Geist, system-ui, sans-serif", MONO = "'Geist Mono', ui-monospace, monospace";
const cv = document.createElement("canvas"), ctx = cv.getContext("2d");
const ops = []; let y = P;
const text = (t, font, color, x, yy, align = "left", spacing) => ops.push(() => { ctx.font = font; ctx.fillStyle = color; ctx.textAlign = align; if ("letterSpacing" in ctx) ctx.letterSpacing = spacing || "0px"; ctx.fillText(t, x, yy); });
const hair = (yy) => ops.push(() => { ctx.fillStyle = AE.rgba("bone", 0.16); ctx.fillRect(P, yy, inner, 1); });
y += 20; text("MY MONEY PLAN", `500 20px ${MONO}`, AE.rgba("bone", 0.5), P, y, "left", "4px"); text(today().toUpperCase(), `500 20px ${MONO}`, AE.rgba("bone", 0.5), W - P, y, "right", "3px");
y += 96; text("My money plan.", `600 84px ${SANS}`, AE.rgba("bone", 1), P, y, "left", "-3px");
y += 40; hair(y); y += 52;
for (const l of cardLines(s)) {
if (l.k) { text(l.k.toUpperCase(), `500 19px ${MONO}`, AE.rgba("bone", 0.45), P, y, "left", "3px"); y += 40; }
ctx.font = `400 34px ${SANS}`;
const col = l.key === "goal" ? AE.rgba("green", 1) : l.key === "muted" ? AE.rgba("bone", 0.55) : AE.rgba("bone", 1);
for (const t of wrap(ctx, l.text, inner)) { text(t, `400 34px ${SANS}`, col, P, y); y += 46; }
if (l.sub) { ctx.font = `400 24px ${SANS}`; for (const t of wrap(ctx, l.sub, inner)) { text(t, `400 24px ${SANS}`, AE.rgba("bone", 0.55), P, y); y += 34; } }
y += 26;
}
hair(y); y += 50;
text("KENTUCKY HELP", `500 19px ${MONO}`, AE.rgba("bone", 0.45), P, y, "left", "3px"); y += 42;
for (const [a, b] of [["1-800-GAMBLER", "call or text, 24/7"], ["kygamblinghelp.org", "self-check and chat with a counselor"], ["988", "Suicide and Crisis Lifeline, 24/7"], ["Self-exclusion", "ask any Kentucky sportsbook"]]) {
text(a, `400 26px ${MONO}`, AE.rgba("bone", 0.95), P, y); text(b, `400 24px ${SANS}`, AE.rgba("bone", 0.6), P + 330, y); y += 40;
}
y += 34; text("About Even · Educational use only. Not betting, tax or investment advice.", `400 20px ${SANS}`, AE.rgba("bone", 0.4), P, y);
const H = y + P - 20;
cv.width = W * sc; cv.height = H * sc;
ctx.scale(sc, sc);
ctx.fillStyle = "#0A0C0F"; ctx.fillRect(0, 0, W, H);
ctx.textBaseline = "alphabetic";
for (const op of ops) op();
cv.toBlob((blob) => {
if (!blob) { AE.ui.toast("Couldn’t make the image in this browser. Try Print instead.", { error: true }); return; }
const url = URL.createObjectURL(blob), a = document.createElement("a");
a.href = url; a.download = "about-even-my-plan.png"; a.style.display = "none";
document.body.appendChild(a); a.click(); a.remove();
setTimeout(() => URL.revokeObjectURL(url), 4000);
AE.ui.toast("Saved about-even-my-plan.png to your device. Nothing was uploaded.");
}, "image/png");
}
// Print: a dedicated node (data-chapter="c10", so its CSS stays in our scope) and an html class
// the print stylesheet keys on; both are removed after printing.
function printCard() {
let node = document.getElementById("c10-print");
if (!node) { node = document.createElement("div"); node.id = "c10-print"; node.dataset.chapter = KEY; document.body.appendChild(node); }
node.innerHTML = `<article class="c10-card c10-card--print">${cardHTML(AE.state.get(), { actions: false })}</article>`;
document.documentElement.classList.add("c10-printing");
const done = () => { document.documentElement.classList.remove("c10-printing"); node.remove(); removeEventListener("afterprint", done); };
addEventListener("afterprint", done);
try { window.print(); } catch (e) { done(); }
setTimeout(() => { if (!matchMedia("print").matches) done(); }, 1500);
}
// The ending's one number: the habit's yearly cost after tax (C8's lesson; the same figure C9 leads with).
function paintYear(card, s) {
const el = card && card.querySelector("[data-c10-year]");
if (el) el.textContent = money(afterTaxYear(s));
}
// ---------- module UI state (not saved) ----------
let rulesPanel = null, cardEl = null;
const isStep = (i) => { const c = AE.steps.current(); return !!(c && c.chapter === KEY && c.index === i); };
function placeCentered(stage, el, maxW) {
const { R } = stage.geom;
el.style.width = Math.min(R.w, maxW) + "px";
stage.place(el, R.x + R.w / 2, R.y, { align: "center" });
const h = el.offsetHeight;
el.style.top = R.y + Math.max(0, (R.h - h) / 2) + "px";
el.style.maxHeight = R.h + "px";
}
function paintRules(s) {
if (!rulesPanel) return;
const rules = s.commitment.rules, own = rules.filter((r) => !PRESETS.some((p) => p.id === r));
const item = (id, text, on) => `<li><button type="button" class="c10-rule" aria-pressed="${on}" data-rule="${AE.esc(id)}"><i aria-hidden="true"></i><span>${AE.esc(text)}</span></button></li>`;
rulesPanel.querySelector(".c10-rules").innerHTML =
PRESETS.map((p) => item(p.id, p.text, rules.includes(p.id))).join("") + own.map((r) => item(r, ruleText(r), true)).join("");
const full = rules.length >= RULE_MAX;
rulesPanel.querySelector("input").disabled = full;
rulesPanel.querySelector(".c10-add").disabled = full;
}
function setRules(next) { AE.state.merge("commitment", { rules: next.slice(0, RULE_MAX) }); }
function buildRulesPanel() {
const el = AE.h(`<div class="c10-panel" data-chapter="${KEY}">
<span class="c10-panel-k">Tap any that fit</span>
<ul class="c10-rules"></ul>
<div class="c10-own">
<label class="c10-panel-k" for="c10-own-in">Or write your own</label>
<div class="c10-own-row"><input id="c10-own-in" type="text" maxlength="${OWN_MAX}" placeholder="No bets after midnight." autocomplete="off" spellcheck="true"><button type="button" class="ae-quiet c10-add">Add</button></div>
<span class="c10-count" aria-live="polite"></span>
</div>
</div>`);
const input = el.querySelector("input"), count = el.querySelector(".c10-count");
const showCount = () => { count.textContent = input.value ? `${input.value.length} / ${OWN_MAX}` : ""; };
input.addEventListener("input", showCount);
el.querySelector(".c10-rules").addEventListener("click", (e) => {
const b = e.target.closest("[data-rule]");
if (!b) return;
const id = b.dataset.rule, cur = AE.state.get().commitment.rules.slice();
const at = cur.indexOf(id);
if (at >= 0) cur.splice(at, 1); else cur.push(id);
setRules(cur);
});
const add = () => {
const t = input.value.replace(/\s+/g, " ").trim().slice(0, OWN_MAX);
if (!t) return;
const cur = AE.state.get().commitment.rules.slice();
if (cur.length >= RULE_MAX) { AE.ui.toast(`That’s ${RULE_MAX} rules. Drop one to add another.`); return; }
if (!cur.includes(t)) cur.push(t);
setRules(cur);
input.value = ""; showCount();
};
el.querySelector(".c10-add").addEventListener("click", add);
input.addEventListener("keydown", (e) => { if (e.key === "Enter") { e.preventDefault(); add(); } });
return el;
}
function paintCard(s) {
if (!cardEl) return;
cardEl.innerHTML = cardHTML(s);
if (isStep(2)) placeCentered(AE.stage, cardEl, 460);
}
function buildCard() {
const el = AE.h(`<article class="c10-card" data-chapter="${KEY}" aria-label="Your money plan card"></article>`);
el.addEventListener("click", (e) => {
if (e.target.closest("[data-c10-png]")) return savePNG();
if (e.target.closest("[data-c10-print]")) return printCard();
});
return el;
}
AE.c10 = { monthsToGoal, balanceAfter, monthsWords, kyCompare, working, sanitize, cardLines, EXAMPLE, GOAL_MAX };
AE.chapter({
id: KEY,
order: 10,
tab: "plan",
title: "Your move",
lesson: "Every dollar needs a job, including the ones you don’t bet.",
lab: "cover-charge",
sources: ["PAR-08", "PAR-05", "PAR-12", "MKT-33", "MKT-32", "HELP-01", "HELP-02", "HELP-03", "HELP-10", "HELP-12", "HARM-36", "HARM-38", "HARM-39"],
steps: [
{
wide: true,
className: "c10-goals-step",
aria: "",
html: `
<h2>Point the rest at <span class="g">savings</span>.</h2>
<p class="c10-lede">Pick something you want. Put the books’ cut toward it instead and see how long it takes.</p>
<div data-slot="c10-goals"></div>
${HELP_LINE}`,
enter(stage, state) { stage.clear(); repaintGoals(state); },
},
{
aria: "A list of personal rules you can tap to add, and a box to write your own.",
html: `<h2>Pick a rule you’ll keep.</h2><p>Tap any that fit, or write your own.</p>`,
enter(stage) {
stage.set(0, () => null);
stage.overlays([]);
stage.halo(0.5);
if (rulesPanel) { paintRules(AE.state.get()); placeCentered(stage, rulesPanel, 440); }
},
},
{
aria: "Your money plan card: what betting costs you, your budget, savings goals and rules, with Kentucky help lines. Buttons to save it as an image or print it.",
html: `<h2>Your plan, in writing.</h2><p>Save it as an image or print it. It stays on your device.</p>`,
enter(stage, state) {
stage.set(0, () => null);
stage.overlays([]);
stage.halo(0.8);
if (cardEl) { cardEl.innerHTML = cardHTML(state); placeCentered(stage, cardEl, 460); }
},
},
{
wide: true,
className: "c10-end",
aria: "",
html: `
<h2>The house always knows its number. Now you know yours.</h2>
<p class="c10-end-num"><span class="c10-end-fig" data-c10-year>$362</span><span>a year after tax, on average, at the habit in your plan.</span></p>
<p class="c10-end-line">Bet or don’t. Either way, you know the price, and where the money could go.</p>
${HELP_HTML}
<p class="c10-end-save"><button type="button" class="ae-quiet" data-c10-save>Save your file</button><span>Your habit, budget, goals and rules, in one file you keep.</span></p>`,
enter(stage, state, ctx) { stage.clear(); paintYear(ctx.card, state); },
},
],
drawer: {
step: 0,
title: "How the goals are computed",
html: `
<div><span class="ae-label">Each month</span>It starts at your habit’s average cost, spread over twelve months: <code>expected yearly cost ÷ 12</code>, <code>$141.82 ÷ 12 = $11.82</code> for the sample. That’s the money the books keep on average, pointed somewhere else. Type any amount instead. If you set a betting budget lower than what you bet now, <em>what your budget saves</em> fills in what that cut saves you on average: <code>(what you bet a month − your budget) × the books’ edge</code>. Most money you bet comes back, so betting $160 less a month saves about $7, not $160.</div>
<div><span class="ae-label">Months to the goal</span><code>target ÷ each month</code>, rounded up. With a growth rate you type, the balance grows by <code>rate ÷ 12</code> each month before the next deposit. The default is 0%. We don’t suggest a rate, a product or an investment; any rate here is your own assumption.</div>
<div><span class="ae-label">The dots</span>Fifty dots stand for the target. Green ones show where twelve months of saving gets you.</div>
<div><span class="ae-label">In Kentucky money</span>A year of your monthly amount next to two University of Kentucky prices: a residential parking permit, <strong>$504</strong>, and resident tuition and fees, <strong>$7,089</strong> a semester (2026–27). Both from UKNow.</div>
<div><span class="ae-label">Does a plan like this work?</span>The evidence is thinner than you’d hope. In one Hungarian operator study, reminders at 80% of a loss limit were followed by less play (not randomized). A meta-analysis of 18 studies found on-screen reality checks moved behavior, with wide variation (Bjørseth et al., 2021). Nobody has tested a card you write yourself.</div>
<div><span class="ae-label">Limits inside the apps</span>Sportsbook apps have their own limits. FanDuel, for one, lists deposit, time, loss and wager limits on its Responsible Play page. Each Kentucky sportsbook also keeps a self-exclusion list: ask in the app, by phone or at a counter. There’s no single statewide sign-up that covers all gambling.</div>
<div><span class="ae-label">What gets saved</span>Your budget, goals and rules go in your save file under <code>commitment</code>. The example goal isn’t saved until you change it. The card image is drawn on this page and downloaded to your device; nothing is uploaded.</div>`,
},
init({ cards }) {
const s0 = AE.state.get();
goalsHost = buildGoals();
cards[0].querySelector('[data-slot="c10-goals"]').replaceWith(goalsHost);
renderGoals(s0);
rulesPanel = buildRulesPanel();
cardEl = buildCard();
const saveBtn = cards[3].querySelector("[data-c10-save]");
if (saveBtn) saveBtn.addEventListener("click", () => AE.file.save());
paintYear(cards[3], s0);
// Keep everything in step with state (file opens, the habit or budget changing upstream).
AE.state.subscribe((s, changed, meta) => {
if (meta && meta.replace) renderGoals(s);
else if (selfCommit || goalsHost.contains(document.activeElement)) repaintGoals(s);
else renderGoals(s);
paintRules(s);
paintCard(s);
paintYear(cards[3], s);
if (isStep(1) && rulesPanel.isConnected) placeCentered(AE.stage, rulesPanel, 440);
}, ["commitment", "habit", "tax"]);
},
});
} catch (e) { console.error("[About Even] chapters/c10-your-move.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/bet-log.js ---- */
;(function (AE) {
"use strict";
try {
// Bet Log + Wrapped (spec §4, lab for C9). Full bet log: add / edit / delete bets
// (date, type, legs, stake, American odds, result, optional payout and note), stored in state.bets.
// Every write is checked with the core validator (AE.file.validate) first, so the log always matches
// the save-file schema in src/core/file.js. The Wrapped card and its math come from AE.c9 (c09-your-ledger.js).
const TYPES = ["straight", "parlay", "prop", "futures", "live", "race", "market", "other"];
const RESULTS = [
{ value: "win", label: "Win" },
{ value: "loss", label: "Loss" },
{ value: "push", label: "Push" },
{ value: "pending", label: "Pending" },
];
const TYPE_LABEL = { straight: "Straight", parlay: "Parlay", prop: "Prop", futures: "Futures", live: "Live", race: "Race", market: "Prediction market", other: "Other" };
// Clearly labeled sample entries (note: "sample") so a first-time visitor can see the card fill in.
// Parlay odds are the 50/50-at-−110 book prices from spec §5 (+596 at 3 legs, +1228 at 4).
const SAMPLE = [
{ date: "2026-09-05", type: "straight", stake: 20, odds: -110, result: "loss", note: "sample" },
{ date: "2026-09-05", type: "parlay", legs: 4, stake: 10, odds: 1228, result: "loss", note: "sample" },
{ date: "2026-09-12", type: "straight", stake: 20, odds: -110, result: "win", note: "sample" },
{ date: "2026-09-19", type: "prop", stake: 10, odds: 150, result: "loss", note: "sample" },
{ date: "2026-09-26", type: "parlay", legs: 4, stake: 10, odds: 1228, result: "loss", note: "sample" },
{ date: "2026-10-03", type: "straight", stake: 25, odds: -115, result: "win", note: "sample" },
{ date: "2026-10-10", type: "live", stake: 15, odds: -120, result: "loss", note: "sample" },
{ date: "2026-10-17", type: "parlay", legs: 3, stake: 10, odds: 596, result: "win", note: "sample" },
{ date: "2026-10-24", type: "straight", stake: 20, odds: -110, result: "loss", note: "sample" },
{ date: "2026-10-31", type: "straight", stake: 20, odds: -110, result: "push", note: "sample" },
{ date: "2026-11-07", type: "futures", stake: 10, odds: 800, result: "pending", note: "sample" },
{ date: "2026-11-14", type: "straight", stake: 20, odds: -110, result: "loss", note: "sample" },
];
const pad = (n) => String(n).padStart(2, "0");
const todayStr = () => { const t = new Date(); return `${t.getFullYear()}-${pad(t.getMonth() + 1)}-${pad(t.getDate())}`; };
const fmtOdds = (o) => (o == null ? "" : o > 0 ? `+${o}` : `${AE.fmt.minus}${Math.abs(o)}`);
// "+150", "150", "-110", "−110" -> number; "" -> null; anything else -> NaN
const parseOdds = (s) => {
const t = String(s).trim().replace(/[−–]/g, "-").replace(/^\+/, "");
if (!t) return null;
return /^-?\d+(\.\d+)?$/.test(t) ? Number(t) : NaN;
};
const parseMoney = (s) => {
const t = String(s).trim().replace(/[$,\s]/g, "");
if (!t) return null;
return /^\d+(\.\d{1,2})?$/.test(t) ? Number(t) : NaN;
};
AE.lab({
id: "bet-log",
title: "Bet Log + Wrapped",
chapter: "c9",
blurb: "Log real bets: date, type, stake, odds, result. See what came back, what they kept, and save your Wrapped card.",
mount(el, ctx) {
if (!AE.c9) { el.innerHTML = `<p class="ae-lab-error">The ledger chapter didn’t load, so the log can’t compute its card.</p>`; return; }
el.innerHTML = `
<div class="bl">
<section class="bl-main" aria-label="Your bet log">
<div class="bl-form" role="group" aria-labelledby="bl-form-title">
<h3 class="bl-h" id="bl-form-title" data-bl="form-title">Add a bet</h3>
<div class="bl-grid">
<label class="bl-f"><span>Date</span><input type="date" name="date" required min="2000-01-01" max="2100-12-31"></label>
<label class="bl-f"><span>Type</span><select name="type">${TYPES.map((t) => `<option value="${t}">${TYPE_LABEL[t]}</option>`).join("")}</select></label>
<label class="bl-f bl-legs" hidden><span>Legs</span><input type="number" name="legs" min="2" max="25" step="1" inputmode="numeric" value="4"></label>
<label class="bl-f"><span>Stake</span><input type="text" name="stake" inputmode="decimal" autocomplete="off" placeholder="20"></label>
<label class="bl-f"><span>Odds <i>American</i></span><input type="text" name="odds" inputmode="text" autocomplete="off" placeholder="−110"></label>
<label class="bl-f"><span>Payout <i>total back, optional</i></span><input type="text" name="payout" inputmode="decimal" autocomplete="off" placeholder="from odds"></label>
</div>
<div class="bl-result" data-bl="result"></div>
<label class="bl-f bl-note"><span>Note <i>optional</i></span><input type="text" name="note" maxlength="140" autocomplete="off" placeholder="UK at Louisville, first half"></label>
<div class="bl-actions">
<button type="button" class="bl-submit" data-bl="submit">Add bet</button>
<button type="button" class="ae-quiet" data-bl="cancel" hidden>Cancel</button>
<p class="bl-err" role="alert" aria-live="assertive"></p>
</div>
</div>
<div class="bl-listhead">
<h3 class="bl-h">Your bets <span class="bl-count" data-bl="count"></span></h3>
<div class="bl-listacts">
<button type="button" class="ae-quiet" data-bl="sample">Try sample bets</button>
<button type="button" class="ae-quiet" data-bl="clear">Clear all</button>
</div>
</div>
<ol class="bl-list" data-bl="list"></ol>
<p class="bl-empty" data-bl="empty">No bets yet. Add one above, or try the sample bets. Until you log a settled bet, the card uses the habit you set in <em>It’s just $20</em>.</p>
</section>
<aside class="bl-side" aria-label="Your Wrapped card">
<div class="bl-sum">
<div class="bl-hero" data-bl="net"></div>
<div class="bl-cap" data-bl="netcap"></div>
<p class="bl-line" data-bl="line"></p>
</div>
<canvas class="bl-card" role="img" width="1080" height="1350"></canvas>
<div class="bl-save"></div>
<p class="bl-fine">Saved as a PNG on your device. Nothing is uploaded. Your log itself goes in the save file (Save, top right).</p>
</aside>
</div>`;
const $ = (s) => el.querySelector(s);
const form = $(".bl-form");
// No form element (the rules test forbids the tag): fields by name, Enter in a field submits.
const f = {};
for (const n of ["date", "type", "legs", "stake", "odds", "payout", "note"]) f[n] = form.querySelector(`[name="${n}"]`);
const legsWrap = $(".bl-legs"), err = $(".bl-err"), list = $('[data-bl="list"]');
const cv = $(".bl-card");
let editing = -1; // index into state.bets, or -1 for a new bet
let result = "loss";
const seg = AE.ui.segmented({ label: "Result", value: result, options: RESULTS, onChange: (v) => { result = v; } });
$('[data-bl="result"]').appendChild(seg.el);
const save = AE.ui.button({ label: "Save as image", onClick: () => AE.c9.savePNG(AE.c9.summarize(ctx.state.get())) });
$(".bl-save").appendChild(save.el);
const syncLegs = () => { legsWrap.hidden = f.type.value !== "parlay"; };
f.type.addEventListener("change", syncLegs);
function resetForm() {
editing = -1;
for (const n of ["stake", "odds", "payout", "note"]) f[n].value = "";
f.type.value = "straight";
f.date.value = todayStr();
f.legs.value = "4";
result = "loss"; seg.set(result);
$('[data-bl="form-title"]').textContent = "Add a bet";
$('[data-bl="submit"]').textContent = "Add bet";
$('[data-bl="cancel"]').hidden = true;
err.textContent = "";
syncLegs();
}
function readForm() {
const fail = (msg, field) => { err.textContent = msg; if (field) field.focus(); return null; };
const date = f.date.value;
if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) return fail("Pick a date.", f.date);
const type = f.type.value;
const stake = parseMoney(f.stake.value);
if (stake == null || Number.isNaN(stake)) return fail("Enter the stake in dollars, like 20 or 12.50.", f.stake);
if (stake < 0.01 || stake > 1_000_000) return fail("Stake should be between $0.01 and $1,000,000.", f.stake);
const bet = { date, type, stake: Math.round(stake * 100) / 100, result };
if (type === "parlay") {
const legs = Number(f.legs.value);
if (!Number.isInteger(legs) || legs < 2 || legs > 25) return fail("A parlay has 2 to 25 legs.", f.legs);
bet.legs = legs;
}
const odds = parseOdds(f.odds.value);
if (Number.isNaN(odds)) return fail("Odds should be American odds, like −110 or +150.", f.odds);
if (odds != null) {
if ((odds > -100 && odds < 100) || Math.abs(odds) > 100000) return fail("American odds are −100 or lower, or +100 or higher.", f.odds);
bet.odds = odds;
}
const payout = parseMoney(f.payout.value);
if (Number.isNaN(payout)) return fail("Payout should be a dollar amount (the total you got back).", f.payout);
if (payout != null) {
if (payout > 100_000_000) return fail("That payout is too large.", f.payout);
bet.payout = Math.round(payout * 100) / 100;
}
if (result === "win" && odds == null && payout == null && type !== "straight" && type !== "parlay") {
return fail("For a win, add the odds or the payout so we know what came back.", f.odds);
}
const note = f.note.value.trim();
if (note.length > 140) return fail("Keep the note to 140 characters.", f.note);
if (note) bet.note = note;
return bet;
}
// Write through the core validator so state.bets always matches the save-file schema.
function commit(next, msg) {
const v = AE.file.validate({ app: AE.file.APP, version: AE.file.VERSION, bets: next });
if (!v.ok) { err.textContent = v.error; return false; }
ctx.state.set({ bets: v.state.bets });
if (msg) AE.ui.toast(msg);
return true;
}
function submit() {
const bet = readForm();
if (!bet) return;
const bets = ctx.state.get().bets.slice();
if (editing >= 0 && editing < bets.length) bets[editing] = bet; else bets.push(bet);
if (bets.length > 5000) { err.textContent = "The log holds up to 5,000 bets."; return; }
if (commit(bets, editing >= 0 ? "Bet updated." : "Bet added.")) { resetForm(); f.stake.focus({ preventScroll: true }); }
}
$('[data-bl="submit"]').addEventListener("click", submit);
form.addEventListener("keydown", (e) => { if (e.key === "Enter" && e.target.matches("input")) { e.preventDefault(); submit(); } });
$('[data-bl="cancel"]').addEventListener("click", resetForm);
function startEdit(i) {
const b = ctx.state.get().bets[i];
if (!b) return;
editing = i;
f.date.value = b.date;
f.type.value = b.type;
f.legs.value = b.legs != null ? String(b.legs) : "4";
f.stake.value = String(b.stake);
f.odds.value = b.odds != null ? (b.odds > 0 ? `+${b.odds}` : String(b.odds)) : "";
f.payout.value = b.payout != null ? String(b.payout) : "";
f.note.value = b.note || "";
result = b.result; seg.set(result);
syncLegs();
err.textContent = "";
$('[data-bl="form-title"]').textContent = "Edit bet";
$('[data-bl="submit"]').textContent = "Save changes";
$('[data-bl="cancel"]').hidden = false;
form.scrollIntoView({ behavior: AE.reduced ? "auto" : "smooth", block: "start" });
f.stake.focus({ preventScroll: true });
}
// Two-tap confirm for destructive buttons (no modal).
function confirmTap(btn, label, run) {
if (btn.dataset.armed === "1") { run(); return; }
btn.dataset.armed = "1";
const old = btn.textContent;
btn.textContent = label;
btn.classList.add("is-armed");
setTimeout(() => { if (btn.isConnected) { btn.dataset.armed = ""; btn.textContent = old; btn.classList.remove("is-armed"); } }, 3200);
}
list.addEventListener("click", (e) => {
const btn = e.target.closest("button[data-act]");
if (!btn) return;
const i = Number(btn.dataset.i);
if (btn.dataset.act === "edit") startEdit(i);
else if (btn.dataset.act === "del") confirmTap(btn, "Sure?", () => {
const bets = ctx.state.get().bets.slice();
bets.splice(i, 1);
if (editing === i) resetForm(); else if (editing > i) editing--;
commit(bets, "Bet deleted.");
});
});
$('[data-bl="clear"]').addEventListener("click", (e) => {
if (!ctx.state.get().bets.length) return;
confirmTap(e.currentTarget, "Clear every bet?", () => { resetForm(); commit([], "Bet log cleared."); });
});
$('[data-bl="sample"]').addEventListener("click", () => {
const bets = ctx.state.get().bets.concat(SAMPLE);
commit(bets, `Added ${SAMPLE.length} sample bets. Edit or delete them any time.`);
});
function row(b, i) {
const settled = b.result !== "pending";
const net = settled ? AE.c9.returnOf(b) - b.stake : null;
const assumed = b.result === "win" && b.odds == null && b.payout == null;
const typ = TYPE_LABEL[b.type] + (b.legs ? ` · ${b.legs} legs` : "");
const netCls = net == null ? "" : net > 0.004 ? "g" : net < -0.004 ? "r" : "";
const netTxt = net == null ? "open" : AE.fmt.money(net, { cents: true, sign: true });
return `<li class="bl-row is-${b.result}">
<span class="bl-date">${AE.esc(b.date)}</span>
<span class="bl-what"><span class="bl-type">${AE.esc(typ)}</span>${b.note ? `<span class="bl-note-t">${AE.esc(b.note)}</span>` : ""}</span>
<span class="bl-stake">${AE.fmt.money(b.stake, { cents: b.stake % 1 !== 0 })}${b.odds != null ? ` <i>at ${fmtOdds(b.odds)}</i>` : ""}</span>
<span class="bl-res">${b.result}</span>
<span class="bl-net ${netCls}" title="${assumed ? "No odds or payout logged: priced at −110 per leg" : ""}">${netTxt}${assumed ? "*" : ""}</span>
<span class="bl-rowacts"><button type="button" class="ae-quiet" data-act="edit" data-i="${i}" aria-label="Edit bet from ${AE.esc(b.date)}">Edit</button><button type="button" class="ae-quiet" data-act="del" data-i="${i}" aria-label="Delete bet from ${AE.esc(b.date)}">Delete</button></span>
</li>`;
}
let lastNet = null;
function paint() {
const s = ctx.state.get(), bets = s.bets;
// newest first; keep each bet's index into state.bets for edit/delete
const order = bets.map((b, i) => i).sort((a, b) => (bets[b].date < bets[a].date ? -1 : bets[b].date > bets[a].date ? 1 : b - a));
list.innerHTML = order.map((i) => row(bets[i], i)).join("");
$('[data-bl="count"]').textContent = bets.length ? `· ${AE.fmt.int(bets.length)}` : "";
$('[data-bl="empty"]').hidden = bets.length > 0;
$('[data-bl="clear"]').hidden = bets.length === 0;
$('[data-bl="sample"]').hidden = bets.length > 0;
const S = AE.c9.summarize(s);
const hero = $('[data-bl="net"]');
hero.className = "bl-hero " + (S.net < -0.005 ? "r" : S.net > 0.005 ? "g" : "");
AE.ui.counter(hero, { to: S.net, from: lastNet == null ? 0 : lastNet, dur: lastNet == null ? 900 : 500, fmt: (v) => AE.fmt.money(v, { sign: true }) });
lastNet = S.net;
$('[data-bl="netcap"]').textContent = S.netLabel;
const line = $('[data-bl="line"]');
if (S.mode === "log") {
const r = S.record;
// P0-3: expected cost covers only bet types with a sourced edge; the rest are named, not guessed.
line.innerHTML = `${AE.esc(`${r.w}–${r.l}${r.p ? `–${r.p}` : ""}`)} on ${AE.fmt.money(S.wagered)} wagered. Expected cost <span class="r">${AE.fmt.money(S.expected)}</span>` +
(S.unestimated.n ? `, which ${AE.esc(S.expectedNote)}.` : ".") +
` After an estimated ${AE.fmt.money(S.tax)} of tax on winnings: <span class="${S.afterTax < -0.005 ? "r" : S.afterTax > 0.005 ? "g" : ""}">${AE.fmt.money(S.afterTax, { sign: true })}</span>.` +
(S.pending ? ` ${S.pending} pending, left out.` : "") +
(S.assumed ? ` * ${S.assumed} ${S.assumed === 1 ? "win has" : "wins have"} no odds or payout, priced at −110 per leg.` : "");
} else {
line.innerHTML = `No settled bets yet, so this is a typical season at your habit (${AE.esc(S.basis)}). After an estimated ${AE.fmt.money(S.tax)} of tax on winnings: <span class="r">${AE.fmt.money(S.afterTax, { sign: true })}</span>.` + (S.pending ? ` ${S.pending} pending, left out.` : "");
}
AE.c9.paintCard(cv, S);
cv.setAttribute("aria-label", `Wrapped card. You said ${AE.c9.GUESS[S.guess].toLowerCase()}. Net ${AE.fmt.money(S.net, { sign: true })}. Wagered ${AE.fmt.money(S.wagered)}. Expected cost ${AE.fmt.money(S.expected)}${S.unestimated.n ? `, which ${S.expectedNote}` : ""}. Tax on winnings, estimate, ${AE.fmt.money(S.tax)}. After tax ${AE.fmt.money(S.afterTax, { sign: true })}. ${S.basis}.`);
}
resetForm();
paint();
ctx.subscribe(() => paint(), ["bets", "habit", "guess", "tax"]);
},
});
} catch (e) { console.error("[About Even] labs/bet-log.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/cover-charge.js ---- */
;(function (AE) {
"use strict";
try {
// Cover Charge lab (spec §4, C10). His monthly cover charge against what he actually bets, month
// by month: from the bet log (state.bets) when he has one, otherwise one seeded year of his habit.
// Writes only state.commitment.coverCharge (on slider release). UI choices (count, source) stay local.
//
// Counting:
// "Money bet" = the sum of stakes placed that month (winnings bet again count too).
// "Money lost" = what the month cost him: −(net result) when the month was down, $0 when up.
// Bet log net per bet (local helper; no core function covers a logged bet):
// win -> payout − stake when `payout` is logged (payout read as the total returned, stake included);
// else stake × (decimal(odds) − 1) when `odds` is logged; else the −110 / n-leg 50-50 table
// (stake × (1.90909^legs − 1), legs = 1 when not logged). Labeled as an assumption in the lab.
// loss -> −stake · push -> 0 · pending -> stake counts as money bet, not in the net.
// Habit year: AE.math.simulateSeason({ ...habit, seed: 2026 }); week w belongs to month floor(w × 12 ÷ 52).
// Same value list as C10: friendly steps, with the step nearest the habit's exact month replaced
// by that exact month, so the lab and the chapter suggest the same unrounded figure.
const BASE_VALUES = (() => {
const v = [];
for (let x = 0; x < 500; x += 10) v.push(x);
for (let x = 500; x < 1000; x += 50) v.push(x);
for (let x = 1000; x < 5000; x += 100) v.push(x);
for (let x = 5000; x <= 20000; x += 500) v.push(x);
return v;
})();
let CC_VALUES = BASE_VALUES.slice(), habitIdx = -1;
const nearestIn = (arr, val) => { let b = 0; for (let i = 1; i < arr.length; i++) if (Math.abs(arr[i] - val) < Math.abs(arr[b] - val)) b = i; return b; };
const nearestIdx = (val) => nearestIn(CC_VALUES, val);
const habitMonth = (h) => Math.round((AE.math.yearlyWagered(h) / 12) * 100) / 100;
function syncValues(h) { CC_VALUES = BASE_VALUES.slice(); const m = habitMonth(h); habitIdx = nearestIn(BASE_VALUES, m); CC_VALUES[habitIdx] = m; }
const money = (v) => AE.fmt.money(v, { cents: Math.abs(v) < 100 });
const moneyS = (v) => AE.fmt.money(v, { sign: true, cents: Math.abs(v) < 100 });
const MON = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const SEED = 2026;
const SVGNS = "http://www.w3.org/2000/svg";
function betNet(b) {
if (b.result === "loss") return -b.stake;
if (b.result === "push" || b.result === "pending") return 0;
if (b.payout != null) return b.payout - b.stake;
if (b.odds != null) return b.stake * (AE.math.americanToDecimal(b.odds) - 1);
return b.stake * (AE.math.parlayBook(b.legs || 1) - 1);
}
function monthsFromBets(bets) {
const by = new Map();
for (const b of bets) {
const k = b.date.slice(0, 7);
if (!by.has(k)) by.set(k, { key: k, n: 0, bet: 0, net: 0 });
const m = by.get(k);
m.n++; m.bet += b.stake; m.net += betNet(b);
}
const keys = [...by.keys()].sort();
if (!keys.length) return [];
// fill gaps between the first and last month so quiet months show as $0
const out = [];
let [y, mo] = keys[0].split("-").map(Number);
const last = keys[keys.length - 1];
for (let guard = 0; guard < 240; guard++) {
const k = `${y}-${String(mo).padStart(2, "0")}`;
out.push(by.get(k) || { key: k, n: 0, bet: 0, net: 0 });
if (k === last) break;
mo++; if (mo > 12) { mo = 1; y++; }
}
return out.slice(-24).map((m, i) => ({ ...m, label: `${MON[+m.key.slice(5) - 1]}${m.key.slice(5) === "01" || i === 0 ? " \u2019" + m.key.slice(2, 4) : ""}` }));
}
function monthsFromHabit(h) {
const sim = AE.math.simulateSeason({ stake: h.stake, perWeek: h.perWeek, type: h.type, seed: SEED });
const dec = AE.math.parlayBook(sim.legs);
const out = MON.map((label, i) => ({ key: String(i), label, n: 0, bet: 0, net: 0 }));
for (let w = 0; w < 52; w++) {
const m = out[Math.floor((w * 12) / 52)];
for (let j = 0; j < h.perWeek; j++) {
const hit = sim.outcomes[w * h.perWeek + j] === 1;
m.n++; m.bet += h.stake; m.net += hit ? h.stake * (dec - 1) : -h.stake;
}
}
return out;
}
AE.lab({
id: "cover-charge",
title: "Cover Charge",
chapter: "c10",
blurb: "Your monthly betting budget against what you actually bet, month by month.",
mount(el, ctx) {
el.innerHTML = `
<div class="cc-wrap">
<div class="cc-controls">
<div class="cc-slot" data-slot="cover"></div>
<div class="cc-slot" data-slot="count"></div>
<div class="cc-slot" data-slot="source"></div>
</div>
<div class="cc-head" aria-live="polite">
<h3 class="cc-hero"></h3>
<p class="cc-sub"></p>
</div>
<figure class="cc-chart"><svg class="cc-svg" role="img"></svg><div class="cc-tip" hidden></div></figure>
<p class="cc-note"></p>
<div class="cc-rows" role="table" aria-label="Month by month"></div>
</div>`;
const svg = el.querySelector(".cc-svg"), tip = el.querySelector(".cc-tip");
let count = "bet", source = null;
syncValues(AE.state.get().habit);
const habitDefault = () => habitMonth(AE.state.get().habit);
const cover = () => { const c = AE.state.get().commitment.coverCharge; return c == null ? habitDefault() : c; };
const slider = AE.ui.slider({
label: "Cover charge", min: 0, max: CC_VALUES.length - 1, step: 1, value: nearestIdx(cover()),
format: (i) => `${money(CC_VALUES[i])} / mo${i === habitIdx ? " · what you bet now" : ""}`,
aria: "Your monthly cover charge for betting",
onInput: (i) => draw(CC_VALUES[i]),
onChange: (i) => AE.state.merge("commitment", { coverCharge: CC_VALUES[i] }),
});
el.querySelector('[data-slot="cover"]').appendChild(slider.el);
const countSeg = AE.ui.segmented({ label: "Count", value: count, options: [{ value: "bet", label: "Money bet" }, { value: "lost", label: "Money lost" }], onChange: (v) => { count = v; draw(); } });
el.querySelector('[data-slot="count"]').appendChild(countSeg.el);
const srcHost = el.querySelector('[data-slot="source"]');
let srcSeg = null, hadBets = null;
function paintSource() {
const has = AE.state.get().bets.length > 0;
if (has !== hadBets) source = has ? "log" : "habit"; // a log appearing (or being cleared) picks the default again
hadBets = has;
srcHost.textContent = "";
srcSeg = AE.ui.segmented({ label: "From", value: source, options: has ? [{ value: "log", label: "Bet log" }, { value: "habit", label: "Habit" }] : [{ value: "habit", label: "Habit" }], onChange: (v) => { source = v; draw(); } });
srcHost.appendChild(srcSeg.el);
}
function draw(previewCover) {
const s = AE.state.get();
const cc = previewCover != null ? previewCover : cover();
const months = source === "log" ? monthsFromBets(s.bets) : monthsFromHabit(s.habit);
const val = (m) => (count === "bet" ? m.bet : Math.max(0, -m.net));
const over = months.filter((m) => val(m) > cc).length;
const net = months.reduce((a, m) => a + m.net, 0);
const hero = el.querySelector(".cc-hero"), sub = el.querySelector(".cc-sub");
if (!months.length) { hero.textContent = "No months to show yet."; sub.textContent = ""; }
else {
hero.innerHTML = over === 0
? `Under your cover charge every month.`
: `Over your cover charge in <span class="cc-n">${over}</span> of ${months.length} months.`;
sub.innerHTML = `${source === "log" ? "Your log" : "This year of your habit"} finished <span class="${net >= 0 ? "g" : "r"}">${moneyS(net)}</span>.`;
}
el.querySelector(".cc-note").textContent = source === "log"
? "From your bet log. Money bet counts every stake, including winnings bet again. A win with no payout logged is priced from its odds, or at −110 per leg if no odds were logged. Pending bets count as money bet but not in the result."
: `One simulated year of your habit (${AE.fmt.money(s.habit.stake)} × ${s.habit.perWeek} a week, ${s.habit.type === "parlay" ? "4-leg parlays" : "straight bets at −110"}, one fixed, repeatable year). A single year varies; the expected cost is the math. Illustration: each leg a true 50/50 game priced at −110.`;
const c = AE.state.get().commitment.coverCharge;
if (c == null && previewCover == null) el.querySelector(".cc-note").textContent += " Your cover charge isn’t set yet: the slider starts at your habit’s monthly bets. Move it to set it.";
chart(months, val, cc);
rows(months, val, cc);
}
function chart(months, val, cc) {
const W = Math.max(300, svg.parentNode.clientWidth || 600), mobile = W < 560, H = mobile ? 230 : 300;
const padL = mobile ? 6 : 10, padR = mobile ? 6 : 10, padT = 40, padB = 30;
svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
svg.setAttribute("aria-label", `Month by month ${count === "bet" ? "money bet" : "money lost"} against a cover charge of ${money(cc)}.`);
svg.textContent = "";
if (!months.length) return;
const max = Math.max(cc * 1.15, ...months.map(val), 1);
const n = months.length, slot = (W - padL - padR) / n, bw = Math.max(3, Math.min(34, slot * 0.62));
const y = (v) => padT + (H - padT - padB) * (1 - v / max);
const mk = (tag, a) => { const e = document.createElementNS(SVGNS, tag); for (const k in a) e.setAttribute(k, a[k]); svg.appendChild(e); return e; };
mk("line", { x1: padL, x2: W - padR, y1: y(0), y2: y(0), class: "cc-base" });
months.forEach((m, i) => {
const v = val(m), x = padL + slot * i + (slot - bw) / 2, isOver = v > cc;
const h = Math.max(v > 0 ? 2 : 0, y(0) - y(v));
const cls = count === "lost" ? (v > 0 ? "cc-bar is-lost" : "cc-bar") : "cc-bar is-bet";
const r = mk("path", { d: barPath(x, y(0), bw, h), class: cls + (isOver ? " is-over" : "") });
const hit = mk("rect", { x: padL + slot * i, y: padT, width: slot, height: H - padT - padB, class: "cc-hit", tabindex: "0" });
const label = `${m.label}: ${m.n} bet${m.n === 1 ? "" : "s"}, ${money(m.bet)} bet, ${moneyS(m.net)} result${isOver ? ", over" : ""}`;
hit.setAttribute("aria-label", label);
const show = () => { tip.hidden = false; tip.textContent = label; const bx = (x + bw / 2) / W * 100; tip.style.left = Math.min(82, Math.max(18, bx)) + "%"; r.classList.add("is-hot"); };
const hide = () => { tip.hidden = true; r.classList.remove("is-hot"); };
hit.addEventListener("mouseenter", show); hit.addEventListener("focus", show);
hit.addEventListener("mouseleave", hide); hit.addEventListener("blur", hide);
const every = Math.ceil(n / (mobile ? (source === "habit" ? 12 : 6) : 12));
if (i % every === 0) mk("text", { x: padL + slot * i + slot / 2, y: H - 10, class: "cc-tick", "text-anchor": "middle" }).textContent = mobile && source === "habit" ? m.label[0] : m.label;
});
mk("line", { x1: padL, x2: W - padR, y1: y(cc), y2: y(cc), class: "cc-line" });
// legend above the plot (never over a bar): a short dashed sample + the amount
mk("line", { x1: W - padR - 22, x2: W - padR, y1: 12, y2: 12, class: "cc-line" });
mk("text", { x: W - padR - 30, y: 16, class: "cc-line-l", "text-anchor": "end" }).textContent = `cover charge ${money(cc)}`;
}
// bar with 4px rounded top, square at the baseline
function barPath(x, base, w, h) {
if (h <= 0) return "";
const r = Math.min(4, w / 2, h);
return `M${x},${base}V${base - h + r}Q${x},${base - h} ${x + r},${base - h}H${x + w - r}Q${x + w},${base - h} ${x + w},${base - h + r}V${base}Z`;
}
function rows(months, val, cc) {
const host = el.querySelector(".cc-rows");
host.innerHTML = `<div class="cc-row cc-row--h" role="row"><span role="columnheader">Month</span><span role="columnheader">Bets</span><span role="columnheader">Money bet</span><span role="columnheader">Result</span><span role="columnheader">Vs. cover</span></div>` +
months.map((m) => {
const v = val(m), isOver = v > cc;
return `<div class="cc-row" role="row"><span role="cell">${AE.esc(m.label)}</span><span role="cell">${m.n}</span><span role="cell">${money(m.bet)}</span><span role="cell" class="${m.net > 0 ? "g" : m.net < 0 ? "r" : ""}">${moneyS(m.net)}</span><span role="cell" class="${isOver ? "cc-over" : "cc-under"}">${isOver ? `over by ${money(v - cc)}` : "under"}</span></div>`;
}).join("");
}
paintSource();
draw();
ctx.subscribe((s, changed) => {
if (changed.includes("bets")) paintSource();
if (changed.includes("habit")) syncValues(s.habit);
slider.set(nearestIdx(cover()));
draw();
}, ["commitment", "bets", "habit"]);
const onResize = () => draw();
addEventListener("resize", onResize);
ctx.onClose(() => removeEventListener("resize", onResize));
},
});
} catch (e) { console.error("[About Even] labs/cover-charge.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/data-room.js ---- */
;(function (AE) {
"use strict";
try {
// Kentucky Data Room lab (spec §4, C1). Every Kentucky number About Even uses, as charts and rows,
// each with a public citation (title + URL). Only rows backed by a primary source (or arithmetic on one) are listed.
// Rows are a static copy of the docs/sources.md rows (fact, value, source, URL, status flag, note),
// rewritten for readers: no research-file references or ledger ids on screen (review P1-7).
// Source may be one title + URL, or a list of [title, url] pairs (URL column then empty).
// At runtime we also list every Kentucky row any chapter registered with AE.source, say which
// chapters use each row, and fold rows the story doesn't use under "More we checked".
const LEDGER = {
"MKT-01": ["Total sports wagering handle, 2025", "\"$3 BILLION\" (printed rounded)", "KHRGC 2025 Annual Report, p. 27", "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf", 1, "Primary. The report prints it rounded."],
"MKT-03": ["Adjusted gross revenue (what bettors lost, after winners were paid), 2025", "$330.1 million", "KHRGC 2025 Annual Report, p. 27", "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf", 1, "Primary."],
"MKT-04": ["Market hold, 2025", "≈ 11.0%; about $1 of every $9 bet", "Arithmetic on the KHRGC 2025 Annual Report: $330.1M ÷ $3.0B = 0.110; $3.0B ÷ $330.1M = 9.09", "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf", 1, "Arithmetic."],
"MKT-21": ["Excise tax rates on adjusted gross revenue","retail 9.75%; mobile 14.25%","KHRGC 2025 Annual Report, p. 27","https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf",1,"Primary."],
"MKT-23": ["Transfers to the Kentucky Permanent Pension Fund","$40,706,409.23","KHRGC 2025 Annual Report, p. 27","https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf",1,"Primary."],
"MKT-24": ["Transfers to the Problem Gambling Assistance Account","$1,128,488.75","KHRGC 2025 Annual Report, p. 27","https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf",1,"Primary."],
"MKT-25": ["Pension vs problem-gambling ratio", "≈ $36 to pensions per $1 to problem gambling; 2.7% of transfers shown", "Arithmetic on the KHRGC 2025 Annual Report: $40.71M ÷ $1.13M = 36.1; $1.13M ÷ $41.83M = 2.7%", "https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf", 1, "Arithmetic."],
"MKT-32": ["Kentucky money equivalent: UK in-state tuition", "$7,088.50 per semester including mandatory fees, 2026–27 (+$135, ≈ +1.94%)", [["UKNow", "https://uknow.uky.edu/node/262566"], ["UK Board of Trustees, FCR 8", "https://www.uky.edu/trustees/sites/www.uky.edu.trustees/files/FCR%208%20AY%202026-27%20Tuition%20and%20Mandatory%20Fees.pdf"]], "", 1, "Primary."],
"MKT-33": ["Kentucky money equivalent: UK residential parking permit", "$504", "UKNow", "https://uknow.uky.edu/node/264026", 1, "Primary."],
"RACE-01": ["Max takeout, single-horse bets (win/place/show), Thoroughbred","17.5% (includes the KRS 138.510 tax and breaks)","KRS 230.3615(1)","https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137",1,"Primary."],
"RACE-02": ["Max takeout, bets on two or more horses (exotics)","22% of gross handle","KRS 230.3615(2)","https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137",1,"Primary."],
"RACE-03": ["Minimum wager; minimum payoff","min bet $0.10; min payoff $1.10 per $1 ($2.20 on $2); $1.05 per $1 ($2.10 on $2) only in a minus pool","KRS 230.3615(3)","https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137",1,"Primary."],
"RACE-06": ["Breakage","to the penny since 2022 (HB 607); noncash (ADW/app) settled to the cent; cash may round to the nearest $0.05 when pennies aren't available (KRS 230.295, eff. 7/15/2026)","KRS 230.295","https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58139",1,"Primary."],
"RACE-08": ["Pool formula","takeout = gross × takeout %; net pool = gross − takeout","810 KAR 6:020","https://www.law.cornell.edu/regulations/kentucky/810-KAR-6-020",1,"Primary."],
"RACE-09": ["Win payout formula","profit = net − bet on winner; profit per $1 = profit ÷ bet on winner; $1 price = profit per $1 + $1, rounded down to the break point; breakage = net − total paid","810 KAR 6:020","https://www.law.cornell.edu/regulations/kentucky/810-KAR-6-020",1,"Primary."],
"RACE-12": ["Worked win pool", "$10,000 gross at 17.5% → takeout $1,750, net $8,250; $2,000 on winner → profit $6,250, 3.125 per $1; $1 = $4.12, $2 ticket $8.24; paid $8,240; breakage $10; bettors get back 82.4% of the pool", [["810 KAR 6:020 (pool and payout formula)", "https://www.law.cornell.edu/regulations/kentucky/810-KAR-6-020"], ["KRS 230.3615 (17.5% cap)", "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137"]], "", 1, "Arithmetic on the regulation's formula, checked to the penny."],
"RACE-13": ["Same pool under old dime breakage", "$1 = $4.10, $2 = $8.20, breakage $50 (penny breakage returns $40 more to bettors in this pool)", [["810 KAR 6:020", "https://www.law.cornell.edu/regulations/kentucky/810-KAR-6-020"], ["HB 607 (2022), penny breakage", "https://apps.legislature.ky.gov/record/22RS/HB607.html"]], "", 1, "Arithmetic; a historical comparison only."],
"RACE-17": ["Churchill Downs takeout, Fall Meet 2026","W/P/S and Odd vs Even 17.50%; Derby City-6, Pick 5, Late Pick-3 15.00%; all other wagers (exacta, trifecta, superfecta, Super High-5, DD, P3, P4) 22.00%; Jackpot 8 22.0%","Churchill Downs event information","https://www.churchilldowns.com/come-to-the-track/visiting-information/event-information/",1,"Primary."],
"RACE-19": ["Keeneland takeout","win/place 16%; show 10% on-track (Keeneland/Red Mile), 16% off-track; exacta 19.5%; daily double 15%; trifecta, superfecta, Super High 5, Pick 3, Pick 4, Pick 6 22%; Turf/Late Pick 3 15%; Pick 5 15%","Keeneland wagering details","https://www.keeneland.com/racing/wagering/details",1,"Primary."],
"RACE-20": ["Kentucky Derby 2026 (152nd, Golden Tempo) all-sources handle","Derby Day $340M; Derby race $225M; Derby Week $487M (record)","CDI press release, May 2, 2026","https://www.churchilldownsincorporated.com/?p=5367",1,"Primary."],
"RACE-27": ["Kentucky-regulated pari-mutuel totals, 2025","HHR $11.2B; live on-track $95.2M; ADW (KY residents) $381.8M; simulcast $81M; total up $1.1B (+10.7%), mostly HHR; return to player live + HHR > $10.2B; excise distributed $171.6M","KHRGC 2025 Annual Report","https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf",1,"Primary. Not all-sources handle on Kentucky races (most of that is bet out of state)."],
"RACE-32": ["What HHR is","electronic terminals wagering pari-mutuel style on previously run races, identifying details hidden","KHRGC 2025 Annual Report, p. 22","https://apps.legislature.ky.gov/AgencyReports/IJC/AR/KHRG/2025%20Annual%20Report.pdf",1,"Primary."],
"RACE-40": ["Racing age", "18+ (age of majority, KRS 2.015); Kentucky has no separate racing age statute", "2026 Ky. Acts ch. 184 (HB 904) sec. 40", "https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf", 1, "Primary."],
"RACE-41": ["First Kentucky Derby","May 17, 1875; Aristides won; betting by auction pools (the winning bidder on the winner took the pot)","kentuckyderby.com history, Apr 1, 2024","https://www.kentuckyderby.com/horses/news/how-kentucky-derby-betting-traditions-have-changed-over-time-since-1875/",1,"Track-owned source."],
"RACE-42": ["Pari-mutuel history at Churchill","introduced 1878 ($5 min); bookmakers from 1882; auction pools and pari-mutuel gone after 1889; bookmaking outlawed in Louisville 1908, pari-mutuel revived for the 1908 Derby and standard since","kentuckyderby.com history","https://www.kentuckyderby.com/horses/news/how-kentucky-derby-betting-traditions-have-changed-over-time-since-1875/",1,"Track-owned source."],
"RACE-47": ["Keeneland opened","October 1936","keeneland.com/about","https://www.keeneland.com/about",1,"Primary."],
"PM-27": ["Minimum ages", "Kentucky sportsbooks 21. Robinhood event contracts 18.", [["Act 184 (HB 904) §22", "https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf"], ["Robinhood event contracts help page", "https://robinhood.com/us/en/support/articles/event-contracts-overview/"]], "", 1, "Primary."],
"PM-28": ["The age split (a policy point)", "Kentucky set sportsbooks at 21. Prediction apps set their own minimum, some at 18. Same bet, different rule.", [["Act 184 (HB 904) §22", "https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf"], ["Robinhood event contracts help page", "https://robinhood.com/us/en/support/articles/event-contracts-overview/"]], "", 1, "Follows from the minimum-age row above."],
"LAW-11": ["HB 904 effective date", "July 15, 2026", "KRS 230.3615 history (amended by 2026 Ky. Acts ch. 184)", "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=58137", 1, "Primary."],
"LAW-15": ["HB 904 prediction-market provision","KY tracks, sportsbook and fantasy licensees and affiliates may not participate in or contract with prediction-market platforms in KY, or hold a beneficial interest (new KRS 230.805(9)(b)–(c)); KHRGC and Revenue may regulate \"in accordance with applicable federal law\" (subsection 10); does not ban Kalshi, Polymarket or Robinhood from serving Kentuckians","Act 184 §22","https://apps.legislature.ky.gov/law/acts/26RS/documents/0184.pdf",1,"Primary."],
"LAW-19": ["Penny breakage law","HB 607 passed the Senate 3/29/2022; signed 4/8/2022 (Acts ch. 124); effective 7/14/2022","HB 607 record","https://apps.legislature.ky.gov/record/22RS/HB607.html",1,"Primary."],
"LAW-26": ["KY AG lawsuits","6/17/2026, Franklin Circuit Court: Commonwealth v. KalshiEX et al. (Kalshi entities, Robinhood, Webull, Coinbase); separate suits vs Polymarket and VGW; theory: sports event contracts are unlicensed \"sports wagering\"; seeks treble recovery under KY's 1890-era loss-recovery statute","KY AG complaint","https://www.ag.ky.gov/Press%20Release%20Attachments/2026.06.17%20As%20Filed%20KYOAG%20v.%20Kalshi%20et%20al%20-%20Final.pdf",1,"Primary."],
"LAW-30": ["Sixth Circuit (binding for federal courts in KY)", "KalshiEx v. Schuler / Orgel, 9/25/2026: sports contracts not shown to be swaps; even if they were, no preemption; rehearing en banc petition 10/9/2026", "Foley & Lardner prediction-market tracker, Nov. 10, 2026", "https://www.foley.com/?p=130779", 1, "A law-firm case tracker, backed by court news."],
"TAX-08": ["Kentucky flat income tax rate","3.5% TY2026 (4.0% TY2025)","Bloomberg Tax","https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026",1,"Bloomberg Tax."],
"TAX-09": ["Kentucky standard deduction, 2026","$3,360 (up from $3,270)","Bloomberg Tax","https://news.bloombergtax.com/payroll/kentucky-income-tax-rate-to-decrease-in-2026",1,"Bloomberg Tax."],
"TAX-10": ["Kentucky allows wagering losses as an itemized deduction","KRS 141.019(2)(b) excludes §165 losses \"except wagering losses allowed under Section 165(d)\"; (2)(i) lets filers elect the KY standard deduction instead","KRS 141.019","https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=57914",1,"Primary."],
"TAX-11": ["Kentucky IRC conformity date","For tax years from Jan 1, 2026, the Internal Revenue Code in effect on Dec 31, 2025 (HB 757, 2026, Acts ch. 161); decoupled from tips, overtime and car-loan interest, not from the §165(d) wagering-loss deduction",[["HB 757, Acts ch. 161", "https://apps.legislature.ky.gov/law/acts/26RS/documents/0161.pdf"], ["EY Tax News", "https://taxnews.ey.com/news/2026-0815-kentucky-legislature-approves-bill-that-would-update-internal-revenue-code-conformity-date-make-other-income-tax-changes"]],"",1,"Primary."],
"TAX-12": ["Kentucky follows the 90% limit", "KRS 141.019 allows wagering losses \"allowed under Section 165(d)\"; HB 757 adopts the federal code as of Dec 31, 2025, which includes the 90% limit", [["KRS 141.019(2)(b)", "https://apps.legislature.ky.gov/law/statutes/statute.aspx?id=57914"], ["HB 757, Acts ch. 161", "https://apps.legislature.ky.gov/law/acts/26RS/documents/0161.pdf"]], "", 1, "Primary: follows from the two laws."],
"TAX-13": ["Itemizing for Kentucky after the federal standard deduction", "Allowed: \"You may itemize your deductions for Kentucky even if you do not itemize for federal purposes\"", [["Kentucky Schedule A (Form 740), 2025", "https://revenue.ky.gov/Forms/740%20Schedule%20A%20(2025).pdf"]], "", 1, "Primary."],
"HARM-16": ["KY helpline before and after launch","2022: 709 contacts (59/mo), 218 reportable services; Aug 2023: 88 contacts, 23 services; Oct 2023: 243 contacts, 41 services; \"contacts quadrupled and the reported services doubled\"; stayed \"consistent at the higher levels\"","KYCPG testimony","https://apps.legislature.ky.gov/CommitteeDocuments/50/35653/LRC%20Presentation.pdf",1,"Primary."],
"HARM-17": ["KY helpline 2025","2,532 contacts extrapolated from 8 months (211/mo); 516 asked about services (43/mo); 408 reportable services (34/mo)","KYCPG testimony","https://apps.legislature.ky.gov/CommitteeDocuments/50/35653/LRC%20Presentation.pdf",1,"Primary; KYCPG extrapolated the year from 8 months."],
"HARM-18": ["The \"~4x\" ratio", "Oct 2023 vs 2022 average: 243 ÷ 59 = 4.1×; 2025 average vs 2022: 211 ÷ 59 = 3.6×", "Arithmetic on KYCPG's testimony to the legislature", "https://apps.legislature.ky.gov/CommitteeDocuments/50/35653/LRC%20Presentation.pdf", 1, "Arithmetic. KYCPG credits part of the rise to awareness, so this measures help-seeking, not the size of the problem."],
"HELP-01": ["1-800-GAMBLER, Kentucky's resource line","1-800-426-2537; call or text, 24/7; info or referral to a counselor or GA meeting; answered by RiverValley Behavioral Health","CHFS DBHDID Problem Gambling Program","https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx",1,"Primary."],
"HELP-02": ["Kentucky Gambling Help (KYCPG)","kygamblinghelp.org (formerly kycpg.org): self-assessment and online chat with a trained counselor","CHFS DBHDID","https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx",1,"Primary."],
"HELP-03": ["988 Suicide and Crisis Lifeline","call, chat or text, 24/7","CHFS DBHDID","https://chfs.ky.gov/agencies/dbhdid/Pages/Problem-Gambling-Program.aspx",1,"Primary."],
"HELP-10": ["Self-exclusion in Kentucky","each sports wagering licensee keeps an approved list; KHRGC compiles one combined list from all licensees, shared at least monthly; request at a premises, online in the app, or by phone","809 KAR 10:007","https://apps.legislature.ky.gov/law/kar/titles/809/010/007/14877/",1,"Primary."],
"HELP-11": ["No universal statewide self-exclusion","\"a facility or organization controlled activity\"; KYCPG pursuing one application for all gambling (as in Ohio, Arkansas); not in place as of Sept 2025","KYCPG testimony","https://apps.legislature.ky.gov/CommitteeDocuments/50/35653/LRC%20Presentation.pdf",1,"Primary, as of KYCPG's Sept 2025 testimony."],
"HELP-12": ["Operator tools a user can turn on", "FanDuel: Player Activity Statement, deposit/time/loss/wager limits, \"My Spend\", Reality Check", "FanDuel Responsible Play", "https://account.www.fanduel.com/responsible-play", 1, "Primary."],
};
const GROUPS = [
{ key: "market", title: "Sports betting in Kentucky", ids: ["MKT-01", "MKT-03", "MKT-04"], charts: ["kept"] },
{ key: "equiv", title: "Kentucky money, for scale", ids: ["MKT-33", "MKT-32"] },
{ key: "tax", title: "Where the tax goes", ids: ["MKT-21", "MKT-23", "MKT-24", "MKT-25"], charts: ["split"] },
{ key: "racing", title: "Horse racing", match: /^RACE-/, ids: ["RACE-01", "RACE-02", "RACE-03", "RACE-06", "RACE-08", "RACE-09", "RACE-12", "RACE-13", "RACE-17", "RACE-19", "RACE-20", "RACE-27", "RACE-32", "RACE-40", "RACE-41", "RACE-42", "RACE-47", "LAW-19"], charts: ["takeout"] },
{ key: "law", title: "Prediction markets and the law", match: /^LAW-/, ids: ["PM-27", "PM-28", "LAW-11", "LAW-15", "LAW-26", "LAW-30"] },
{ key: "taxes", title: "Kentucky income tax", ids: ["TAX-08", "TAX-09", "TAX-10", "TAX-11", "TAX-12", "TAX-13"] },
{ key: "helpseek", title: "Help-seeking", match: /^HARM-/, ids: ["HARM-16", "HARM-17", "HARM-18"], charts: ["calls"] },
{ key: "help", title: "Kentucky help", match: /^HELP-/, ids: ["HELP-01", "HELP-02", "HELP-03", "HELP-10", "HELP-11", "HELP-12"] },
];
const KY_PREFIX = /^(MKT|RACE|LAW|HELP)-/; // any registered row with these prefixes is Kentucky by definition
const CHART_IDS = { kept: ["MKT-01", "MKT-03", "MKT-04"], split: ["MKT-23", "MKT-24", "MKT-25"], takeout: ["RACE-01", "RACE-02", "RACE-17", "RACE-19"], calls: ["HARM-16", "HARM-17", "HARM-18"] };
const MON = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const SVGNS = "http://www.w3.org/2000/svg";
const pad2 = (n) => String(n).padStart(2, "0");
function usage() {
const map = new Map();
for (const c of AE._chapters.slice().sort((a, b) => a.order - b.order)) {
for (const id of c.sources || []) {
if (!map.has(id)) map.set(id, []);
map.get(id).push(`${pad2(c.order)} ${c.title}`);
}
}
for (const [chart, ids] of Object.entries(CHART_IDS)) for (const id of ids) {
if (!map.has(id)) map.set(id, []);
if (!map.get(id).includes("this Data Room")) map.get(id).push("this Data Room");
}
return map;
}
// ---------- tiny SVG chart kit (thin marks, 4px rounded data ends, recessive axes, direct labels) ----------
function svgEl(tag, a, parent) { const e = document.createElementNS(SVGNS, tag); for (const k in a) e.setAttribute(k, a[k]); if (parent) parent.appendChild(e); return e; }
function hBar(x, y, w, h) { // rounded right end, square at the baseline (left)
if (w <= 0) return "";
const r = Math.min(4, h / 2, w);
return `M${x},${y}H${x + w - r}Q${x + w},${y} ${x + w},${y + r}V${y + h - r}Q${x + w},${y + h} ${x + w - r},${y + h}H${x}Z`;
}
function vBar(x, base, w, h) {
if (h <= 0) return "";
const r = Math.min(4, w / 2, h);
return `M${x},${base}V${base - h + r}Q${x},${base - h} ${x + r},${base - h}H${x + w - r}Q${x + w},${base - h} ${x + w},${base - h + r}V${base}Z`;
}
const CHART_SRC = {
kept: "Source: KHRGC 2025 Annual Report, p. 27", split: "Source: KHRGC 2025 Annual Report, p. 27",
takeout: "Sources: KRS 230.3615; Churchill Downs; Keeneland",
calls: "Source: KYCPG testimony to the Kentucky legislature",
};
function figure(host, { title, sub, ids, aria }) {
const key = Object.keys(CHART_IDS).find((k) => CHART_IDS[k] === ids);
const fig = AE.h(`<figure class="dr-fig"><figcaption><span class="dr-fig-t">${title}</span>${sub ? `<span class="dr-fig-s">${sub}</span>` : ""}</figcaption><div class="dr-fig-ctl"></div><div class="dr-plot"><svg role="img" aria-label="${AE.esc(aria)}"></svg><div class="dr-tip" hidden></div></div><p class="dr-fig-src">${AE.esc(CHART_SRC[key] || "")}</p></figure>`);
host.appendChild(fig);
return fig;
}
function tipOn(fig, target, text, xPct) {
const tip = fig.querySelector(".dr-tip");
const show = () => { tip.hidden = false; tip.textContent = text; tip.style.left = Math.min(80, Math.max(20, xPct)) + "%"; target.classList.add("is-hot"); };
const hide = () => { tip.hidden = true; target.classList.remove("is-hot"); };
target.setAttribute("tabindex", "0"); target.setAttribute("aria-label", text);
target.addEventListener("mouseenter", show); target.addEventListener("focus", show);
target.addEventListener("mouseleave", hide); target.addEventListener("blur", hide);
}
const widthOf = (fig) => Math.max(280, fig.querySelector(".dr-plot").clientWidth || 560);
const CHARTS = {
// MKT-01/03/04: the whole $3.0B as one bar, the $330.1M kept as a red end segment.
kept(host) {
const fig = figure(host, { title: "Bet in 2025, and what bettors lost", sub: "Per the KHRGC annual report.", ids: CHART_IDS.kept, aria: "One bar: about $3.0 billion bet on sports in Kentucky in 2025. A red end segment, about 11%, is the $330.1 million bettors lost after winners were paid." });
const draw = () => {
const svg = fig.querySelector("svg"), W = widthOf(fig), H = 92; svg.textContent = ""; svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
const bw = W - 2, kept = bw * (330.1 / 3000), y = 30, h = 22;
svgEl("path", { d: hBar(0, y, bw - kept - 2, h), class: "dr-mark" }, svg);
const red = svgEl("path", { d: hBar(bw - kept, y, kept, h), class: "dr-mark is-red" }, svg);
svgEl("text", { x: 0, y: y - 10, class: "dr-lab" }, svg).textContent = "≈ $3.0B bet";
svgEl("text", { x: bw, y: y - 10, class: "dr-lab is-red", "text-anchor": "end" }, svg).textContent = "$330.1M lost";
svgEl("text", { x: bw, y: y + h + 22, class: "dr-cap", "text-anchor": "end" }, svg).textContent = "hold ≈ 11.0%";
tipOn(fig, red, "Lost by bettors: $330.1M of ≈ $3.0B (≈ 11.0%)", 90);
};
return draw;
},
// MKT-23/24/25: transfers shown on the same KHRGC page.
split(host) {
const fig = figure(host, { title: "Where the excise tax went", sub: "Per the KHRGC 2025 annual report.", ids: CHART_IDS.split, aria: "Two bars: $40.7 million to the Kentucky Permanent Pension Fund, $1.13 million to the Problem Gambling Assistance Account, about 36 to 1." });
const draw = () => {
const svg = fig.querySelector("svg"), W = widthOf(fig), H = 128; svg.textContent = ""; svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
const rows = [["Kentucky Permanent Pension Fund", 40706409.23, "$40.7M"], ["Problem Gambling Assistance Account", 1128488.75, "$1.13M"]];
rows.forEach(([name, v, lab], i) => {
const y = 22 + i * 54, w = Math.max(3, (W - 70) * (v / rows[0][1]));
svgEl("text", { x: 0, y: y - 7, class: "dr-cap" }, svg).textContent = name;
const bar = svgEl("path", { d: hBar(0, y, w, 14), class: "dr-mark" }, svg);
svgEl("text", { x: w + 8, y: y + 12, class: "dr-lab" }, svg).textContent = lab;
tipOn(fig, bar, `${name}: ${AE.fmt.money(v)}`, 30);
});
svgEl("text", { x: W, y: H - 4, class: "dr-cap", "text-anchor": "end" }, svg).textContent = "≈ $36 to $1";
};
return draw;
},
// RACE-01/02 caps vs RACE-17/19 track rates (caps and track rates are different things).
takeout(host) {
const fig = figure(host, { title: "The track’s cut, off the top", sub: "State caps (KRS 230.3615) next to two tracks’ posted rates.", ids: CHART_IDS.takeout, aria: "Takeout rates: Kentucky caps 17.5% single-horse and 22% exotics; Churchill Downs 17.5% win, 22% exacta and trifecta; Keeneland 16% win, 19.5% exacta, 22% trifecta." });
const rows = [
["Cap · win, place, show", 17.5, true], ["Cap · two or more horses", 22, true],
["Churchill · win, place, show", 17.5], ["Churchill · exacta, trifecta", 22],
["Keeneland · win, place", 16], ["Keeneland · exacta", 19.5], ["Keeneland · trifecta", 22],
];
const draw = () => {
const svg = fig.querySelector("svg"), W = widthOf(fig), mobile = W < 520, rh = 30, H = rows.length * rh + 28; svg.textContent = ""; svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
const x0 = mobile ? 0 : 230, x1 = W - 54, sx = (v) => x0 + (x1 - x0) * (v / 25);
[0, 10, 20].forEach((t) => { svgEl("line", { x1: sx(t), x2: sx(t), y1: 6, y2: H - 20, class: "dr-grid" }, svg); svgEl("text", { x: sx(t), y: H - 4, class: "dr-tick", "text-anchor": "middle" }, svg).textContent = t + "%"; });
rows.forEach(([name, v, cap], i) => {
const y = 16 + i * rh + (mobile ? 6 : 0);
svgEl("text", mobile ? { x: 0, y: y - 9, class: "dr-cap" } : { x: 0, y: y + 4, class: "dr-cap" }, svg).textContent = name;
svgEl("line", { x1: sx(0), x2: sx(v), y1: y, y2: y, class: cap ? "dr-stem is-cap" : "dr-stem" }, svg);
const dot = svgEl("circle", { cx: sx(v), cy: y, r: 5, class: cap ? "dr-dot is-cap" : "dr-dot" }, svg);
svgEl("text", { x: sx(v) + 10, y: y + 4, class: "dr-lab" }, svg).textContent = v + "%";
tipOn(fig, dot, `${name}: ${v}%`, ((sx(v)) / W) * 100);
});
};
return draw;
},
// HARM-16/17/18: helpline contacts per month. Wording guard: "help-seeking roughly quadrupled".
calls(host) {
const fig = figure(host, { title: "Contacts to Kentucky’s helpline, per month", sub: "Help-seeking roughly quadrupled after launch (KYCPG). It counts contacts, not people.", ids: CHART_IDS.calls, aria: "Columns: about 59 contacts a month in 2022, 243 in October 2023, about 211 a month in 2025." });
const data = [["2022 avg", 59], ["Oct 2023", 243], ["2025 avg", 211]];
const draw = () => {
const svg = fig.querySelector("svg"), W = widthOf(fig), H = 190; svg.textContent = ""; svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
const base = H - 24, max = 260, slot = Math.min(150, W / 3), bw = Math.min(46, slot * 0.5), x0 = (W - slot * 3) / 2;
svgEl("line", { x1: x0, x2: x0 + slot * 3, y1: base, y2: base, class: "dr-axis" }, svg);
data.forEach(([lab, v], i) => {
const x = x0 + slot * i + (slot - bw) / 2, h = (base - 24) * (v / max);
const bar = svgEl("path", { d: vBar(x, base, bw, h), class: "dr-mark" }, svg);
svgEl("text", { x: x + bw / 2, y: base - h - 8, class: "dr-lab", "text-anchor": "middle" }, svg).textContent = v;
svgEl("text", { x: x + bw / 2, y: H - 6, class: "dr-tick", "text-anchor": "middle" }, svg).textContent = lab;
tipOn(fig, bar, `${lab}: ${v} contacts a month`, ((x + bw / 2) / W) * 100);
});
};
return draw;
},
};
// Source column: a public citation (title + URL), or several as [[title, url], ...]. No internal
// research-file references or ledger ids are shown (review P1-7); the row id stays as the anchor.
function srcLinks(src, url) {
const list = Array.isArray(src) ? src : [[src, url]];
return list.filter((x) => x[0] || x[1]).map(([t, u]) => (u ? `<a href="${AE.esc(u)}" target="_blank" rel="noopener">${AE.esc(t || u)}</a>` : `<span>${AE.esc(t)}</span>`)).join(" · ");
}
function rowHTML(id, use) {
const L = LEDGER[id], reg = AE._sources.get(id);
const fact = L ? L[0] : reg ? reg.label : id;
const value = L ? L[1] : reg && reg.note ? reg.note : "";
const src = L ? srcLinks(L[2], L[3]) : reg && reg.url ? srcLinks("Source", reg.url) : "";
const st = "";
const note = L ? L[5] : "";
return `<li class="dr-row" id="dr-${AE.esc(id)}">
<div class="dr-main">
<span class="dr-fact">${AE.esc(fact)}</span>
${value ? `<span class="dr-val">${AE.esc(value)}</span>` : ""}
${src ? `<span class="dr-meta">${src}</span>` : ""}
${st || note ? `<span class="dr-status">${st}${note ? `<span class="dr-why">${AE.esc(note)}</span>` : ""}</span>` : ""}
${use && use.length ? `<span class="dr-use">Used in ${AE.esc(use.join(", "))}</span>` : ""}
</div>
</li>`;
}
// Rows the story or a chart uses come first; the rest of what we checked folds under "More".
function groupRows(g, use) {
const on = g.ids.filter((id) => (use.get(id) || []).length), off = g.ids.filter((id) => !(use.get(id) || []).length);
return `${on.length ? `<ol class="dr-rows">${on.map((id) => rowHTML(id, use.get(id))).join("")}</ol>` : ""}
${off.length ? `<details class="dr-more"><summary>${off.length} more we checked, not used in the story</summary><ol class="dr-rows">${off.map((id) => rowHTML(id, null)).join("")}</ol></details>` : ""}`;
}
AE.lab({
id: "data-room",
title: "Kentucky Data Room",
chapter: "c1",
blurb: "Every Kentucky number in the story, with its source and a link.",
mount(el, ctx) {
const use = usage();
// Rows: the ledger groups, plus any Kentucky row a chapter registered that isn't listed yet.
const listed = new Set(GROUPS.flatMap((g) => g.ids));
const extra = [...AE._sources.keys()].filter((id) => !listed.has(id) && KY_PREFIX.test(id));
const groups = GROUPS.map((g) => ({ ...g, ids: g.ids.concat(g.match ? extra.filter((id) => g.match.test(id)) : []) }));
const leftover = extra.filter((id) => !groups.some((g) => g.ids.includes(id)));
if (leftover.length) groups.push({ key: "other", title: "Also cited", ids: leftover });
const total = groups.reduce((a, g) => a + g.ids.length, 0);
el.innerHTML = `
<div class="dr-wrap">
<header class="dr-intro">
<p class="dr-lede">Every Kentucky number About Even uses, with its source and a link.</p>
<p class="dr-count"><span class="ae-num">${total}</span> rows · checked 2026-11-20</p>
<nav class="dr-toc" aria-label="Topics">${groups.map((g) => `<a href="#dr-g-${g.key}" data-dr-jump="${g.key}">${AE.esc(g.title)}</a>`).join("")}</nav>
</header>
${groups.map((g) => `
<section class="dr-group" id="dr-g-${g.key}" aria-labelledby="dr-h-${g.key}">
<h3 id="dr-h-${g.key}" class="dr-h">${AE.esc(g.title)}</h3>
<div class="dr-charts" data-charts="${(g.charts || []).join(" ")}"></div>
${groupRows(g, use)}
</section>`).join("")}
</div>`;
// In-lab jumps (the hash belongs to the lab router, so scroll instead of navigating).
el.querySelector(".dr-toc").addEventListener("click", (e) => {
const a = e.target.closest("[data-dr-jump]");
if (!a) return;
e.preventDefault();
const t = el.querySelector(`#dr-g-${a.dataset.drJump}`);
if (t) t.scrollIntoView({ behavior: AE.reduced ? "auto" : "smooth", block: "start" });
});
const draws = [];
for (const host of el.querySelectorAll("[data-charts]")) {
for (const k of host.dataset.charts.split(" ").filter(Boolean)) if (CHARTS[k]) draws.push(CHARTS[k](host));
}
const drawAll = () => draws.forEach((d) => { try { d(); } catch (e) { console.error("[About Even] data-room chart", e); } });
requestAnimationFrame(drawAll);
let t = 0;
const onResize = () => { clearTimeout(t); t = setTimeout(drawAll, 120); };
addEventListener("resize", onResize);
ctx.onClose(() => { removeEventListener("resize", onResize); clearTimeout(t); });
},
});
} catch (e) { console.error("[About Even] labs/data-room.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/parlay-xray.js ---- */
;(function (AE) {
"use strict";
try {
// Lab: Parlay X-ray (spec §4, chapter C4). Enter American odds for up to 8 legs; see what the
// book pays against a no-vig fair payout, the true chance, the cut and the expected cost.
//
// De-vig method (documented on screen; local, not in AE.math):
// Book payout = stake × Π decimal(odds_i) (AE.math.parlayFromOdds)
// Fair chance per leg, p_i:
// - other side's price given: proportional de-vig of the pair, p = implied(A) ÷ (implied(A) + implied(B))
// - only this side given (ASSUMPTION): the line carries the same vig as a standard −110 / −110
// pair, i.e. both sides add to 2 × 110/210 = 104.76%, so p = implied(A) ÷ 1.047619
// (exact for −110: p = 0.5; an estimate for any other price).
// Fair payout = stake × Π (1 / p_i); true chance = Π p_i; cut = 1 − book ÷ fair; expected cost = stake × cut.
// Legs are treated as independent (no correlated or same-game legs). Nothing here is saved.
const MX = AE.math;
const XR_OVR = 2 * MX.impliedProb(-110); // 1.047619…, the overround of a −110 / −110 pair (PAR-04)
const XR_MAX = 8;
function xrParseOdds(str) {
const t = String(str).trim().replace(/[−–—]/g, "-").replace(/^\+/, "");
if (t === "") return undefined; // empty
if (!/^-?\d+(\.\d+)?$/.test(t)) return null;
const v = +t;
if (v > -100 && v < 100) return null;
return v;
}
const xrFmtOdds = (v) => (v > 0 ? "+" + Math.round(v) : AE.fmt.minus + Math.abs(Math.round(v)));
const xrOneIn = (p) => (1 / p >= 100 ? AE.fmt.int(1 / p) : (Math.round(10 / p) / 10).toFixed(1));
// Pure: legs = [{ odds, other? }] (valid American numbers). Returns the whole X-ray.
function xray(legs, stake) {
let book = 1, fair = 1, chance = 1;
const rows = legs.map(({ odds, other }) => {
const iA = MX.impliedProb(odds);
const assumed = other == null;
const p = assumed ? iA / XR_OVR : iA / (iA + MX.impliedProb(other));
book *= MX.americanToDecimal(odds); fair *= 1 / p; chance *= p;
return { p, assumed, implied: iA };
});
const cut = 1 - book / fair;
return { rows, bookDec: book, fairDec: fair, chance, cut, bookPay: stake * book, fairPay: stake * fair, cost: stake * cut };
}
AE.lab({
id: "parlay-xray",
title: "Parlay X-ray",
chapter: "c4",
blurb: "Enter real odds for up to 8 legs and see the payout against a no-vig fair payout.",
mount(el, ctx) {
const st = { n: 4, stake: 10, odds: Array(XR_MAX).fill("-110"), other: Array(XR_MAX).fill("") };
el.innerHTML = `
<div class="xr-wrap">
<div class="xr-controls">
<p class="xr-lede">Type the odds on each leg as the app shows them. Add the other side’s price if you have it.</p>
<div class="xr-top"></div>
<div class="xr-legs" role="group" aria-label="Odds for each leg"></div>
<div class="xr-reset"></div>
<p class="xr-err" role="alert" aria-live="assertive"></p>
</div>
<div class="xr-right">
<div class="xr-hero">
<div><span class="xr-k">They pay</span><span class="xr-v g" data-o="book"></span><span class="xr-s" data-o="bookA"></span></div>
<div><span class="xr-k">Fair, no vig</span><span class="xr-v" data-o="fair"></span><span class="xr-s" data-o="fairA"></span></div>
</div>
<div class="xr-stage"></div>
<dl class="xr-out">
<div><dt>True chance it hits</dt><dd data-o="chance"></dd></div>
<div><dt>Their cut</dt><dd data-o="cut"></dd></div>
<div><dt>Costs you per ticket, on average</dt><dd data-o="cost"></dd></div>
</dl>
</div>
<div class="xr-method">
<span class="xr-k">How “fair” is figured</span>
<p>Each leg’s odds become an implied chance: −110 → 110 ÷ 210 = 52.38%. Those chances include the book’s cut, so we remove it:</p>
<p><strong>Both sides entered:</strong> scale the pair to 100%. <code>fair = implied ÷ (implied + other side’s implied)</code>.</p>
<p><strong>One side only (assumption):</strong> we assume the line carries the same cut as a standard −110 / −110 pair, whose two sides add to 104.76%. <code>fair = implied ÷ 1.0476</code>. Exact for −110 (50%); an estimate for anything else. Rows marked <em>assumed</em> use this.</p>
<p>Fair payout = stake × the product of <code>1 ÷ fair</code> for every leg. Legs are treated as independent; same-game legs that move together break that. Their cut = <code>1 − they pay ÷ fair</code>.</p>
</div>
</div>`;
const errEl = el.querySelector(".xr-err");
const out = (k) => el.querySelector(`[data-o="${k}"]`);
const top = el.querySelector(".xr-top");
const legsSeg = AE.ui.segmented({
label: "Legs", value: st.n,
options: Array.from({ length: XR_MAX }, (_, i) => ({ value: i + 1, label: String(i + 1), aria: `${i + 1} ${i ? "legs" : "leg"}` })),
onChange: (v) => { st.n = v; paintRows(); draw(); },
});
const stake = AE.ui.slider({
label: "Stake", min: 1, max: 200, step: 1, value: st.stake,
aria: "Stake on the parlay", format: (v) => AE.fmt.money(v),
onInput: (v) => { st.stake = v; draw(); },
});
top.append(legsSeg.el, stake.el);
const legsBox = el.querySelector(".xr-legs");
const rowEls = [];
for (let i = 0; i < XR_MAX; i++) {
const row = AE.h(`<div class="xr-row">
<span class="xr-n">Leg ${i + 1}</span>
<label class="xr-f"><span>Odds</span><input type="text" inputmode="text" autocomplete="off" spellcheck="false" data-k="odds" value="${AE.esc(st.odds[i])}" aria-label="Leg ${i + 1} odds"></label>
<label class="xr-f"><span>Other side</span><input type="text" inputmode="text" autocomplete="off" spellcheck="false" data-k="other" placeholder="optional" aria-label="Leg ${i + 1}, the other side's odds (optional)"></label>
<span class="xr-tag" aria-live="off"></span>
</div>`);
row.querySelectorAll("input").forEach((inp) => inp.addEventListener("input", () => { st[inp.dataset.k][i] = inp.value; draw(); }));
legsBox.appendChild(row);
rowEls.push(row);
}
el.querySelector(".xr-reset").appendChild(AE.ui.button({
label: "Reset to −110 coin flips",
onClick: () => {
st.odds.fill("-110"); st.other.fill("");
rowEls.forEach((r) => { r.querySelector('[data-k="odds"]').value = "-110"; r.querySelector('[data-k="other"]').value = ""; });
draw();
},
}).el);
function paintRows() { rowEls.forEach((r, i) => { r.hidden = i >= st.n; }); }
paintRows();
const stage = ctx.stage(el.querySelector(".xr-stage"), { capacity: 200, seed: 4 });
stage.on("resize", () => { draw(); stage.snap(); });
// 160 dots = the fair payout (16 × 10). Green = the share the book pays; red = its cut.
const GC = 16, GR = 10, GN = GC * GR;
function scene(x) {
const { R, mobile } = stage.geom, f = stage.fonts();
const gs = Math.min((R.w * 0.96) / GC, (R.h - 56) / GR, 30);
const gw = GC * gs, gh = GR * gs, gx0 = R.x + gs * 0.2, gy0 = R.y + 8 + Math.max(0, (R.h - 56 - gh) / 2), pad = gs * 0.2;
const red = Math.max(0, Math.min(GN, Math.round(GN * x.cut))), green = GN - red;
stage.set(GN, (i) => {
const col = (i / GR) | 0, row = i % GR, paid = i < green;
return { x: gx0 + (col + 0.5) * gs, y: gy0 + (row + 0.5) * gs, r: gs * (paid ? 0.33 : 0.3), color: paid ? "green" : "red", alpha: paid ? 0.95 : 1, ease: paid ? "inout" : "drop", dur: 320 };
}, { quick: true });
const ly = gy0 + gh + pad + (mobile ? 20 : 24);
stage.overlays([
{ key: "xr-fair", type: "rect", x: gx0 - pad, y: gy0 - pad, w: gw + pad * 2, h: gh + pad * 2, color: AE.rgba("bone", 0.28), dash: [2, 4] },
{ key: "xr-gp", type: "text", x: gx0 - pad, y: ly, text: "what they pay", font: f.label, color: AE.rgba("green", 0.9), align: "left" },
{ key: "xr-gk", type: "text", x: gx0 + gw + pad, y: ly, text: x.cut >= 0 ? "their cut" : "no cut on these prices", font: f.label, color: AE.rgba("red", 1), align: "right" },
], { delay: 0 });
stage.label(`A fair payout as 160 dots: ${green} green dots are what the book pays, ${red} red dots are its cut (${AE.fmt.pct(x.cut)}).`);
}
function draw() {
const legs = [], errs = [];
for (let i = 0; i < st.n; i++) {
const o = xrParseOdds(st.odds[i]), b = xrParseOdds(st.other[i]);
const r = rowEls[i], tag = r.querySelector(".xr-tag");
r.querySelector('[data-k="odds"]').setAttribute("aria-invalid", String(o == null || o === undefined));
r.querySelector('[data-k="other"]').setAttribute("aria-invalid", String(b === null));
if (o == null) { errs.push(`leg ${i + 1}`); tag.textContent = ""; continue; }
if (b === null) { errs.push(`leg ${i + 1} other side`); }
const other = b == null ? null : b;
legs.push({ odds: o, other, i });
}
errEl.textContent = errs.length ? `Check ${errs.join(", ")}: American odds are −100 or lower, or +100 or higher (like −110 or +150). Skipping those for now.` : "";
if (!legs.length) { ["book", "fair", "bookA", "fairA", "chance", "cut", "cost"].forEach((k) => (out(k).textContent = "")); stage.set(0, null, { quick: true }); stage.overlays([]); return; }
const x = xray(legs, st.stake);
legs.forEach((l, k) => {
const row = x.rows[k], tag = rowEls[l.i].querySelector(".xr-tag");
tag.textContent = `fair ${AE.fmt.pct(row.p, 1)}${row.assumed ? " · assumed" : ""}`;
tag.classList.toggle("is-assumed", row.assumed);
});
out("book").textContent = AE.fmt.money(x.bookPay, { cents: true });
out("fair").textContent = AE.fmt.money(x.fairPay, { cents: true });
out("bookA").textContent = `odds ${xrFmtOdds(MX.decimalToAmerican(x.bookDec))}`;
out("fairA").textContent = `odds ${xrFmtOdds(MX.decimalToAmerican(x.fairDec))}`;
out("chance").textContent = `1 in ${xrOneIn(x.chance)} (${AE.fmt.pct(x.chance, x.chance < 0.1 ? 2 : 1)})`;
out("cut").innerHTML = x.cut >= 0 ? `<span class="r">${AE.fmt.pct(x.cut)}</span>` : `none: these prices pay more than fair (${AE.fmt.pct(-x.cut)})`;
out("cost").innerHTML = x.cost >= 0 ? `<span class="r">${AE.fmt.money(x.cost, { cents: true })}</span> on ${AE.fmt.money(st.stake)}` : `${AE.fmt.money(0, { cents: true })}`;
scene(x);
}
draw();
stage.snap();
},
});
} catch (e) { console.error("[About Even] labs/parlay-xray.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/run-the-book.js ---- */
;(function (AE) {
"use strict";
try {
// Lab: Run the Book (spec §4, chapter C3). Set the money on each side and each side's line;
// see the book's result if UK wins and if Louisville wins, the hold, and the split of money that
// would lock in the book's cut either way. Math: AE.math.runTheBook / bookBothWays / impliedProb.
// UI-only: nothing here is saved (the save file has no Run the Book field).
//
// Local helper (not in AE.math): the "safe split". Money in the ratio a : b = decB : decA makes
// a × decA = b × decB, so the payout is the same whoever wins; the book then keeps
// 1 − 1 / (impliedA + impliedB) of the handle (4.55% for −110 / −110, matching PAR-05).
const MR = AE.math;
const RB_NAME = { a: "UK", b: "Louisville" };
const RB_DEFAULT = { a: 1100, b: 1100, oddsA: -110, oddsB: -110 };
const RB_UNITS = [10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 25000, 50000];
function rbParseOdds(str) {
const t = String(str).trim().replace(/[−–—]/g, "-").replace(/^\+/, "");
if (!/^-?\d+(\.\d+)?$/.test(t)) return null;
const v = +t;
if (v > -100 && v < 100) return null;
return v;
}
const rbFmtOdds = (v) => (v > 0 ? "+" + v : AE.fmt.minus + Math.abs(v));
AE.lab({
id: "run-the-book",
title: "Run the Book",
chapter: "c3",
blurb: "Set the money on each side and the line. See what the book keeps, whoever wins.",
mount(el, ctx) {
const st = { ...RB_DEFAULT };
el.innerHTML = `
<div class="rb-wrap">
<div class="rb-controls">
<p class="rb-lede">You’re the book. Take bets on both sides and see what you keep, whoever wins.</p>
<div class="rb-side" data-side="a"><h3 class="rb-h">${RB_NAME.a}</h3></div>
<div class="rb-side" data-side="b"><h3 class="rb-h">${RB_NAME.b}</h3></div>
<div class="rb-presets"></div>
<p class="rb-err" role="alert" aria-live="assertive"></p>
<dl class="rb-out">
<div><dt>Money in</dt><dd data-o="handle"></dd></div>
<div><dt>If ${RB_NAME.a} wins</dt><dd data-o="ifA"></dd></div>
<div><dt>If ${RB_NAME.b} wins</dt><dd data-o="ifB"></dd></div>
<div><dt>The two lines add to</dt><dd data-o="over"></dd></div>
<div><dt>Split that locks in the cut</dt><dd data-o="safe"></dd></div>
</dl>
<p class="rb-note">Lines in American odds: −110 means risk $110 to win $100; +150 means risk $100 to win $150. The “add to” line is the two implied chances summed: anything over 100% means the book has a cut (104.76% at −110 both ways works out to 4.55% of the money bet). UK and Louisville are stand-ins, not a real posted game.</p>
</div>
<div class="rb-stagebox"><div class="rb-stage"></div><p class="rb-cap" aria-hidden="true"></p></div>
</div>`;
const errEl = el.querySelector(".rb-err");
const out = (k) => el.querySelector(`[data-o="${k}"]`);
const ui = {};
for (const side of ["a", "b"]) {
const box = el.querySelector(`.rb-side[data-side="${side}"]`);
const money = AE.ui.slider({
label: "Money bet", min: 0, max: 10000, step: 100, value: st[side],
aria: `Money bet on ${RB_NAME[side]}`,
format: (v) => AE.fmt.money(v),
onInput: (v) => { st[side] = v; draw(); },
});
const id = `rb-odds-${side}`;
const line = AE.h(`<div class="rb-line"><label for="${id}">Line</label><input id="${id}" type="text" inputmode="text" autocomplete="off" spellcheck="false" value="${rbFmtOdds(st[side === "a" ? "oddsA" : "oddsB"])}" aria-describedby="rb-line-help"></div>`);
const input = line.querySelector("input");
input.addEventListener("input", () => {
const v = rbParseOdds(input.value);
input.setAttribute("aria-invalid", String(v == null));
if (v != null) { st[side === "a" ? "oddsA" : "oddsB"] = v; }
draw();
});
box.append(money.el, line);
ui[side] = { money, input };
}
el.querySelector(".rb-note").id = "rb-line-help";
const presets = [
{ label: "Balanced", v: { a: 1100, b: 1100, oddsA: -110, oddsB: -110 } },
{ label: "Lopsided", v: { a: 1600, b: 600, oddsA: -110, oddsB: -110 } },
{ label: "Everyone on UK", v: { a: 2200, b: 0, oddsA: -110, oddsB: -110 } },
];
const pbox = el.querySelector(".rb-presets");
presets.forEach((p) => pbox.appendChild(AE.ui.button({ label: p.label, onClick: () => apply(p.v) }).el));
function apply(v) {
Object.assign(st, v);
ui.a.money.set(st.a); ui.b.money.set(st.b);
ui.a.input.value = rbFmtOdds(st.oddsA); ui.b.input.value = rbFmtOdds(st.oddsB);
ui.a.input.setAttribute("aria-invalid", "false"); ui.b.input.setAttribute("aria-invalid", "false");
draw();
}
const stage = ctx.stage(el.querySelector(".rb-stage"), { capacity: 480, seed: 3 });
const capEl = el.querySelector(".rb-cap");
stage.on("resize", () => draw(true));
function scene(both, quick) {
const { R, mobile } = stage.geom, f = stage.fonts();
const maxAbs = Math.max(Math.abs(both.ifA.kept), Math.abs(both.ifB.kept), 1);
const unit = RB_UNITS.find((u) => maxAbs / u <= 200) || RB_UNITS[RB_UNITS.length - 1];
const CC = 14, CG = 4;
const nA = Math.round(Math.abs(both.ifA.kept) / unit), nB = Math.round(Math.abs(both.ifB.kept) / unit);
const up = Math.max(1, Math.ceil(Math.max(both.ifA.kept >= 0 ? nA : 0, both.ifB.kept >= 0 ? nB : 0) / CC));
const down = Math.max(1, Math.ceil(Math.max(both.ifA.kept < 0 ? nA : 0, both.ifB.kept < 0 ? nB : 0) / CC));
const topPad = mobile ? 84 : 116, mid = 12, botPad = 8;
const s = Math.min(R.w / (CC * 2 + CG), (R.h - topPad - mid - botPad) / Math.max(up + down, 16), 18);
const totalW = (CC * 2 + CG) * s, x0 = R.x + (R.w - totalW) / 2;
const zero = R.y + topPad + Math.max(up, 8) * s + mid / 2;
const xs = { a: x0, b: x0 + (CC + CG) * s };
const kept = { a: both.ifA.kept, b: both.ifB.kept }, n = { a: nA, b: nB };
stage.set(440, (id) => {
const side = id < 220 ? "a" : "b", j = id % 220;
if (j >= n[side]) return null;
const gain = kept[side] >= 0, sx = xs[side] + ((CC - Math.min(n[side], CC)) * s) / 2; // short piles centred
const p = gain
? AE.layout.pile(j, { x0: sx, base: zero - mid / 2, cols: CC, size: s })
: AE.layout.grid(j, { x0: sx, y0: zero + mid / 2, cols: CC, size: s });
return { x: p.x, y: p.y, r: s * 0.36, color: gain ? "red" : "green", alpha: gain ? 1 : 0.95, ease: gain ? "drop" : "pop", delay: quick ? 0 : stage.rnd[id] * 300, dur: quick ? 260 : undefined };
}, { quick });
const yN = R.y + 14, yA = yN + (mobile ? 34 : 48), yK = yA + (mobile ? 16 : 20);
const col = (k, a = 1) => (k >= 0 ? AE.rgba("red", a) : AE.rgba("green", a));
const ov = [{ key: "rb-zero", type: "line", x1: x0 - 6, y1: zero, x2: x0 + totalW + 6, y2: zero, color: AE.rgba("bone", 0.22) }];
for (const side of ["a", "b"]) {
const cx = xs[side] + (CC * s) / 2, k = kept[side];
ov.push(
{ key: "rb-n" + side, type: "text", x: cx, y: yN, text: `if ${RB_NAME[side]} wins`, font: f.cap, color: AE.rgba("bone", 0.5), align: "center", upper: true, spacing: "0.14em" },
{ key: "rb-v" + side, type: "text", x: cx, y: yA, text: AE.fmt.money(Math.abs(k)), font: f.hero2, color: col(k), align: "center" },
{ key: "rb-k" + side, type: "text", x: cx, y: yK, text: Math.round(k) === 0 ? "the book breaks even" : k > 0 ? "the book keeps" : "the book loses", font: f.cap, color: col(k, 0.8), align: "center", upper: true, spacing: "0.14em" },
);
}
stage.overlays(ov, { delay: 0 });
capEl.textContent = `Each dot is ${AE.fmt.money(unit)}. Red, above the line: what the book keeps. Green, below: what it pays out of its own pocket.`;
stage.label(`If ${RB_NAME.a} wins the book ${kept.a >= 0 ? "keeps" : "loses"} ${AE.fmt.money(Math.abs(kept.a))}; if ${RB_NAME.b} wins it ${kept.b >= 0 ? "keeps" : "loses"} ${AE.fmt.money(Math.abs(kept.b))}.`);
}
function signed(k) {
const cls = k >= 0 ? "r" : "g";
return `<span class="${cls}">${k >= 0 ? "book keeps" : "book loses"} ${AE.fmt.money(Math.abs(k), { cents: true })}</span>`;
}
function draw(snapAfter) {
const bad = ["a", "b"].filter((s) => rbParseOdds(ui[s].input.value) == null);
errEl.textContent = bad.length ? `Lines are American odds, −100 or lower or +100 or higher (like −110 or +150). Using the last good line for ${bad.map((s) => RB_NAME[s]).join(" and ")}.` : "";
const both = MR.bookBothWays({ a: st.a, b: st.b, oddsA: st.oddsA, oddsB: st.oddsB });
const iA = MR.impliedProb(st.oddsA), iB = MR.impliedProb(st.oddsB);
const dA = MR.americanToDecimal(st.oddsA), dB = MR.americanToDecimal(st.oddsB);
const H = st.a + st.b;
out("handle").textContent = AE.fmt.money(H);
out("ifA").innerHTML = signed(both.ifA.kept) + (H > 0 ? ` <span class="rb-dim">(${AE.fmt.pct(both.ifA.hold)})</span>` : "");
out("ifB").innerHTML = signed(both.ifB.kept) + (H > 0 ? ` <span class="rb-dim">(${AE.fmt.pct(both.ifB.hold)})</span>` : "");
out("over").innerHTML = `${AE.fmt.pct(iA)} + ${AE.fmt.pct(iB)} = <strong>${AE.fmt.pct(iA + iB)}</strong>`;
const shareA = dB / (dA + dB), lock = 1 - 1 / (iA + iB);
out("safe").innerHTML = `${AE.fmt.pct(shareA, 1)} on ${RB_NAME.a}, ${AE.fmt.pct(1 - shareA, 1)} on ${RB_NAME.b} → book ${lock >= 0 ? "keeps" : "loses"} <strong>${AE.fmt.pct(Math.abs(lock))}</strong> either way`;
scene(both, true);
if (snapAfter) stage.snap();
}
draw();
stage.snap();
},
});
} catch (e) { console.error("[About Even] labs/run-the-book.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/tax-check.js ---- */
;(function (AE) {
"use strict";
try {
// Lab: Tax Check (spec §4, C8). The full gambling-tax calculator, rules as of November 2026.
// Stored in state.tax (saved with the file): itemize, lossRate, winnings, losses (null = his habit's
// typical year, same derivation as C8). Lab-only, not saved: whether his other income already uses
// Kentucky's $3,360 standard deduction, and his federal bracket (for a rough federal estimate).
// Math: AE.math.taxableGambling / deductibleLosses / kyTaxOn. Every tax amount is labeled
// "educational estimate".
const TC_BRACKETS = [
{ value: 0.1, label: "10%", aria: "10% bracket: taxable income up to $12,400" },
{ value: 0.12, label: "12%", aria: "12% bracket: over $12,400 to $50,400" },
{ value: 0.22, label: "22%", aria: "22% bracket: over $50,400 to $105,700" },
{ value: 0.24, label: "24%", aria: "24% bracket: over $105,700 to $201,775" },
];
AE.lab({
id: "tax-check",
title: "Tax Check",
chapter: "c8",
blurb: "Your winnings, your losses, standard or itemized, 90% or 100%: what the tax code counts. Educational estimate.",
mount(el, ctx) {
el.innerHTML = `
<p class="tc-banner"><strong>Rules as of November 2026</strong> · every amount is an educational estimate, not tax advice</p>
<div class="tc-wrap">
<div class="tc-side">
<div class="tc-field"><label class="tc-k" for="tc-won">Won this year, counted per bet</label><div class="tc-in"><span>$</span><input id="tc-won" type="number" inputmode="decimal" min="0" max="100000000" step="1"></div></div>
<div class="tc-field"><label class="tc-k" for="tc-lost">Lost this year</label><div class="tc-in"><span>$</span><input id="tc-lost" type="number" inputmode="decimal" min="0" max="100000000" step="1"></div></div>
<p class="tc-from" data-tc="from"></p>
<div class="tc-toggles"></div>
</div>
<div class="tc-main">
<div class="tc-out">
<div class="tc-hero"><span class="tc-k">Taxable gambling income</span><span class="tc-v" data-tc="taxable"></span><span class="tc-s">added to your federal taxable income · educational estimate</span></div>
<div class="tc-row"><span class="tc-k">Your net on the year</span><span class="tc-v2" data-tc="net"></span></div>
<div class="tc-row"><span class="tc-k">Losses deducted</span><span class="tc-v2" data-tc="ded"></span></div>
<div class="tc-row"><span class="tc-k">Federal tax on it <em data-tc="br"></em>, one bracket · estimate</span><span class="tc-v2 r" data-tc="fed"></span></div>
<div class="tc-row"><span class="tc-k">Kentucky tax on it, 3.5% · estimate</span><span class="tc-v2 r" data-tc="ky"></span></div>
<p class="tc-note" data-tc="note"></p>
</div>
<div class="tc-assume">
<p class="tc-k">What this assumes</p>
<ol>
<li>Winnings are counted per bet (the profit on each winning bet), not as your net for the year. <span>IRS Pub. 529: report the full amount of winnings</span></li>
<li>Kentucky follows the federal 90% limit. <span>KRS 141.019 and HB 757 (2026)</span></li>
<li>Kentucky’s $3,360 standard deduction is applied: to your other income first if it covers it, otherwise to your gambling income. <span>Simplification</span></li>
<li>Kentucky lets you itemize even if you take the federal standard deduction (Kentucky Schedule A instructions). <span>2025 Form 740 Schedule A</span></li>
<li>Federal tax: the whole amount at the bracket you pick, assuming your other income already uses the standard deduction (answer “No” below and the $16,100 comes off your winnings first); near a bracket edge it’s rough. Itemizing only pays when all your itemized deductions top the $16,100 standard deduction (2026, single). <span>Simplification</span></li>
<li>100%: cleared the House Ways and Means Committee 38–5 on Sept. 16, 2026. <span>Not law</span></li>
</ol>
</div>
</div>
</div>`;
const $ = (s) => el.querySelector(s);
const derive = (habit) => {
const s = AE.math.simulateSeason({ stake: habit.stake, perWeek: habit.perWeek, type: habit.type, mode: "typical", seed: 1 });
return { winnings: Math.round(s.won * 100) / 100, losses: Math.round(s.lost * 100) / 100 };
};
const inputs = (st) => {
const d = derive(st.habit), t = st.tax;
return { winnings: t.winnings != null ? t.winnings : d.winnings, losses: t.losses != null ? t.losses : d.losses, itemize: !!t.itemize, lossRate: t.lossRate === 1 ? 1 : 0.9, fromHabit: t.winnings == null && t.losses == null };
};
const ui = { kyCovered: true, bracket: 0.12 }; // lab-only, not saved
const money = (v) => AE.fmt.money(v, { cents: Math.abs(v) > 0.004 && Math.abs(v) < 100 });
const tog = $(".tc-toggles");
const filing = AE.ui.segmented({ label: "Filing", options: [{ value: false, label: "Standard" }, { value: true, label: "Itemize" }], onChange: (v) => ctx.state.merge("tax", { itemize: v }) });
const rate = AE.ui.segmented({ label: "Losses", options: [{ value: 0.9, label: "90%", aria: "Losses count at 90%, 2026 law" }, { value: 1, label: "100%", aria: "Losses count at 100%, if Congress restores it" }], onChange: (v) => ctx.state.merge("tax", { lossRate: v }) });
const br = AE.ui.segmented({ label: "Bracket", options: TC_BRACKETS, value: ui.bracket, onChange: (v) => { ui.bracket = v; paint(); } });
const ky = AE.ui.segmented({ label: "Other pay", options: [{ value: true, label: "Yes", aria: "Yes: other income already uses the standard deductions" }, { value: false, label: "No", aria: "No: the standard deductions apply to gambling income" }], value: ui.kyCovered, onChange: (v) => { ui.kyCovered = v; paint(); } });
const kyQ = AE.h(`<p class="tc-q">Does a job or other income already use your standard deductions ($16,100 federal, $3,360 Kentucky)?</p>`);
tog.append(filing.el, rate.el, br.el, kyQ, ky.el);
const habitBtn = AE.ui.button({ label: "Use my habit’s amounts", onClick: () => ctx.state.merge("tax", { winnings: null, losses: null }) });
tog.appendChild(habitBtn.el);
const won = $("#tc-won"), lost = $("#tc-lost");
const commit = () => {
const w = Math.max(0, Math.min(1e8, +won.value || 0)), l = Math.max(0, Math.min(1e8, +lost.value || 0));
ctx.state.merge("tax", { winnings: Math.round(w * 100) / 100, losses: Math.round(l * 100) / 100 });
};
// live preview while typing, store on change (blur / Enter)
won.addEventListener("input", () => paint(true));
lost.addEventListener("input", () => paint(true));
won.addEventListener("change", commit);
lost.addEventListener("change", commit);
function paint(typing) {
const st = ctx.state.get(), x = inputs(st);
if (typing) { x.winnings = Math.max(0, +won.value || 0); x.losses = Math.max(0, +lost.value || 0); }
else {
if (document.activeElement !== won) won.value = String(Math.round(x.winnings * 100) / 100);
if (document.activeElement !== lost) lost.value = String(Math.round(x.losses * 100) / 100);
}
filing.set(x.itemize); rate.set(x.lossRate); br.set(ui.bracket); ky.set(ui.kyCovered);
const taxable = AE.math.taxableGambling(x), ded = AE.math.deductibleLosses(x), net = x.winnings - x.losses;
// Kentucky: 3.5% on the same base; the $3,360 standard deduction absorbs gambling income only
// when there's no other income to use it.
const kyBase = ui.kyCovered ? taxable : Math.max(0, taxable - AE.math.KY_STANDARD_DEDUCTION_2026);
$('[data-tc="taxable"]').textContent = money(taxable);
const netEl = $('[data-tc="net"]');
netEl.textContent = money(net); netEl.className = "tc-v2 " + (net > 0.004 ? "g" : net < -0.004 ? "r" : "");
$('[data-tc="ded"]').textContent = x.itemize ? money(ded) : "$0";
$('[data-tc="br"]').textContent = `at ${Math.round(ui.bracket * 100)}%`;
// Single-bracket federal estimate: core helper when Fixer 1's AE.math.federalGamblingTax lands, else local.
// No other income: the federal standard deduction comes off gambling income first (standard filers).
const fedBase = ui.kyCovered || x.itemize ? taxable : Math.max(0, taxable - AE.math.FED_STANDARD_DEDUCTION_2026);
const fed = typeof AE.math.federalGamblingTax === "function" ? AE.math.federalGamblingTax(fedBase, ui.bracket) : fedBase * ui.bracket;
$('[data-tc="fed"]').textContent = money(fed);
$('[data-tc="ky"]').textContent = money(AE.math.kyTaxOn(kyBase));
$('[data-tc="from"]').textContent = x.fromHabit && !typing ? `From your habit: ${AE.fmt.money(st.habit.stake)} a bet, ${st.habit.perWeek} a week, ${st.habit.type === "parlay" ? "four-leg parlays" : "straight bets"}; a typical year.` : "Your numbers.";
habitBtn.el.hidden = x.fromHabit && !typing;
let note = "";
if (net < -0.004 && taxable > 0.004) note = `Down ${money(-net)} on the year, and still ${money(taxable)} of taxable gambling income.`;
else if (Math.abs(net) <= 0.004 && taxable > 0.004) note = `Dead even on the year, and still ${money(taxable)} of taxable gambling income.`;
else if (x.itemize && taxable > 0.004 && x.lossRate === 0.9) note = "The last 10% of your losses doesn’t count, so a break-even year still leaves taxable income.";
else if (!x.itemize && x.losses > 0) note = "On the standard deduction, losses offset nothing.";
$('[data-tc="note"]').textContent = note;
}
ctx.subscribe(() => paint(false), ["tax", "habit"]);
paint(false);
},
});
} catch (e) { console.error("[About Even] labs/tax-check.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/thousand-seasons.js ---- */
;(function (AE) {
"use strict";
try {
// Lab: A Thousand Seasons (spec §4, C7). Pick legs, stake, Saturdays and bettors; run one season,
// 100 or 1,000. Top: the last season's bettors, each a dot placed by where he finished (green up,
// red down). Bottom: every season's house share as a dot, piling up around the parlay math.
// Seasons come from AE.math.simulateCrowd (mulberry32), seeds 78 + k × 7,919, the same sequence as
// C7's "Run it again", so the first default season is C7's seed-78 season (54 up, 16.98%).
// Everyone starts with $500 and sits out once he can't cover a ticket. UI-only; nothing is saved.
const SEED = 78, SEED_STEP = 7919, BANK = 500, SHOW_MAX = 1000, BET_MAX = 500;
AE.lab({
id: "thousand-seasons",
title: "A Thousand Seasons",
chapter: "c7",
blurb: "Run a crowd of parlay bettors through a season, then a thousand. One season, even the house can lose. Over many, its share settles on the math.", // fix round 1 (P0-1): the old "the house share doesn’t [move]" was contradicted by the lab’s own lost seasons
mount(el, ctx) {
el.innerHTML = `
<div class="ts-wrap">
<div class="ts-side">
<div class="ts-controls"></div>
<p class="ts-note">Everyone starts with $500 and sits out once they can’t cover a ticket. Illustration: each leg a true 50/50 game priced at −110.</p>
<div class="ts-run"></div>
</div>
<div class="ts-main">
<div class="ts-read" aria-live="polite">
<div class="ts-hero"><span class="ts-k">Kept by the house</span><span class="ts-v r" data-ts="share">—</span><span class="ts-s" data-ts="shareSub">Run a season.</span></div>
<div class="ts-cell"><span class="ts-k">The math</span><span class="ts-v2" data-ts="math"></span><span class="ts-s">of every dollar wagered</span></div>
<div class="ts-cell"><span class="ts-k">Finished up, per season</span><span class="ts-v2 g" data-ts="up">—</span><span class="ts-s" data-ts="upSub"></span></div>
</div>
<div class="ts-stage" role="img" aria-label="Top: the last season's bettors, placed by how much each finished up or down. Bottom: one dot per season, placed by the share of money wagered the house kept."></div>
</div>
</div>`;
const $ = (s) => el.querySelector(s);
const cfg = { legs: 4, stake: 10, weeks: 12, bettors: 100 };
const mk = (key, label, min, max, step, fmt) => {
const s = AE.ui.slider({ label, min, max, step, value: cfg[key], format: fmt, onChange: (v) => { cfg[key] = v; reset(); } });
$(".ts-controls").appendChild(s.el);
return s;
};
mk("legs", "Legs per parlay", 1, 8, 1, (v) => `${v} · ${AE.fmt.pct(AE.math.parlayCut(v))} cut`);
mk("stake", "Stake per ticket", 5, 100, 5, (v) => AE.fmt.money(v));
mk("weeks", "Saturdays", 4, 52, 1, (v) => `${v}`);
mk("bettors", "Bettors", 10, BET_MAX, 10, (v) => `${v}`);
const btn = (label, n) => { const b = AE.ui.button({ label, onClick: () => run(n) }); $(".ts-run").appendChild(b.el); return b; };
const buttons = [btn("Run 1 season", 1), btn("Run 100", 100), btn("Run 1,000", 1000)];
const resetBtn = AE.ui.button({ label: "Start over", kind: "link", onClick: () => reset() });
$(".ts-run").appendChild(resetBtn.el);
const stage = ctx.stage($(".ts-stage"), { capacity: BET_MAX + SHOW_MAX, region: (W, H, m) => ({ x: m ? 4 : 12, y: 10, w: W - (m ? 8 : 24), h: H - 20 }) });
let seasons = [], last = null, wag = 0, kept = 0, busy = false, token = 0;
function reset() {
token++; busy = false; seasons = []; last = null; wag = 0; kept = 0;
buttons.forEach((b) => (b.el.disabled = false));
draw(false); read();
}
function run(n) {
if (busy) return;
busy = true; buttons.forEach((b) => (b.el.disabled = true));
const tok = token, target = seasons.length + n;
const cost = cfg.bettors * cfg.weeks; // bets per season
const chunk = Math.max(1, Math.floor(400000 / cost));
const step = () => {
if (tok !== token) return;
const end = Math.min(target, seasons.length + chunk);
for (let k = seasons.length; k < end; k++) {
const c = AE.math.simulateCrowd({ bettors: cfg.bettors, bankroll: BANK, stake: cfg.stake, legs: cfg.legs, weeks: cfg.weeks, perWeek: 1, seed: SEED + k * SEED_STEP });
seasons.push({ share: c.houseShare, up: c.up });
wag += c.wagered; kept += c.houseKept;
if (k === target - 1) last = c;
}
read();
if (seasons.length < target) { draw(true); setTimeout(step, 0); }
else { busy = false; buttons.forEach((b) => (b.el.disabled = false)); draw(n > 1); }
};
step();
}
function read() {
const cut = AE.math.parlayCut(cfg.legs);
$('[data-ts="math"]').textContent = AE.fmt.pct(cut);
if (!seasons.length) {
$('[data-ts="share"]').textContent = "—";
$('[data-ts="shareSub"]').textContent = "Run a season.";
$('[data-ts="up"]').textContent = "—";
$('[data-ts="upSub"]').textContent = "";
return;
}
const share = wag > 0 ? kept / wag : 0;
$('[data-ts="share"]').textContent = AE.fmt.pct(share);
const n = seasons.length;
$('[data-ts="shareSub"]').textContent = `of ${AE.fmt.money(wag)} wagered, ${AE.fmt.int(n)} season${n === 1 ? "" : "s"}`;
const avgUp = seasons.reduce((a, s) => a + s.up, 0) / n;
const lost = seasons.filter((s) => s.share < 0).length;
$('[data-ts="up"]').textContent = n === 1 ? `${seasons[0].up} of ${cfg.bettors}` : `${avgUp.toFixed(1)} of ${cfg.bettors}`;
$('[data-ts="upSub"]').textContent = n === 1 ? "this season" : `on average${lost ? ` · the house lost ${AE.fmt.int(lost)} season${lost === 1 ? "" : "s"}` : ""}`;
}
// Stacked dot histogram: values -> positions inside a band. Returns { pos(i), lo, hi }.
function histogram(values, lo, hi, band, bins) {
const binW = band.w / bins, counts = new Int32Array(bins), slot = new Int32Array(values.length), bi = new Int32Array(values.length);
values.forEach((v, i) => {
let b = Math.floor(((v - lo) / (hi - lo || 1)) * bins);
b = b < 0 ? 0 : b >= bins ? bins - 1 : b;
bi[i] = b; slot[i] = counts[b]++;
});
const maxC = Math.max(1, ...counts);
let best = { s: 0, c: 1 };
for (let c = 1; c <= 8; c++) { const s = Math.min(binW / c, band.h / Math.ceil(maxC / c)); if (s > best.s) best = { s, c }; }
const s = Math.min(best.s, 16), c = best.c;
return {
s,
pos: (i) => {
const b = bi[i], k = slot[i], x0 = band.x + b * binW + (binW - c * s) / 2;
return { x: x0 + ((k % c) + 0.5) * s, y: band.y + band.h - (((k / c) | 0) + 0.5) * s };
},
x: (v) => band.x + ((Math.min(hi, Math.max(lo, v)) - lo) / (hi - lo || 1)) * band.w,
};
}
function draw(quick) {
const { R, mobile } = stage.geom, f = stage.fonts();
const gapY = mobile ? 54 : 66;
const topH = (R.h - gapY - 44) * 0.42, botH = (R.h - gapY - 44) * 0.58;
const bandA = { x: R.x, y: R.y + 22, w: R.w, h: topH };
const bandB = { x: R.x, y: bandA.y + topH + gapY, w: R.w, h: botH };
const ov = [
{ key: "ts-ta", type: "text", x: R.x, y: R.y + 10, text: mobile ? (last ? "Last season's bettors, by result" : "Bettors, by result") : last ? "Last season: each dot a bettor, by where they finished" : "Each dot a bettor, by where they finished", font: f.cap, color: AE.rgba("bone", 0.55), upper: true, spacing: "0.12em" },
{ key: "ts-tb", type: "text", x: R.x, y: bandB.y - 12, text: "Every season: what the house kept", font: f.cap, color: AE.rgba("bone", 0.55), upper: true, spacing: "0.12em" },
{ key: "ts-ba", type: "line", x1: R.x, y1: bandA.y + topH + 3, x2: R.x + R.w, y2: bandA.y + topH + 3, color: AE.rgba("bone", 0.14) },
{ key: "ts-bb", type: "line", x1: R.x, y1: bandB.y + botH + 3, x2: R.x + R.w, y2: bandB.y + botH + 3, color: AE.rgba("bone", 0.14) },
];
const bins = mobile ? 24 : 40;
// --- band A: last season's bettors ---
let nA = 0, posA = null, colA = null, sA = 4;
if (last) {
const nets = last.bettors.map((b) => b.net);
let lo = Math.min(0, ...nets), hi = Math.max(0, ...nets);
if (hi - lo < 1) hi = lo + 1;
const pad = (hi - lo) * 0.03; lo -= pad; hi += pad;
const h = histogram(nets, lo, hi, bandA, bins);
nA = nets.length; posA = h.pos; sA = h.s; colA = (i) => (nets[i] > 0.005 ? "green" : "red");
const zx = h.x(0);
ov.push(
{ key: "ts-za", type: "line", x1: zx, y1: bandA.y - 4, x2: zx, y2: bandA.y + topH + 3, color: AE.rgba("bone", 0.35) },
{ key: "ts-zal", type: "text", x: zx, y: bandA.y + topH + 18, text: "even", font: f.cap, color: AE.rgba("bone", 0.6), align: "center", upper: true, spacing: "0.12em" },
{ key: "ts-loa", type: "text", x: R.x, y: bandA.y + topH + 18, text: AE.fmt.money(lo + pad), font: f.small, color: AE.rgba("red", 0.85), align: "left" },
{ key: "ts-hia", type: "text", x: R.x + R.w, y: bandA.y + topH + 18, text: AE.fmt.money(hi - pad, { sign: true }), font: f.small, color: AE.rgba("green", 0.85), align: "right" },
);
}
// --- band B: one dot per season, house share ---
const cut = AE.math.parlayCut(cfg.legs), dec = AE.math.parlayBook(cfg.legs), p = AE.math.parlayChance(cfg.legs);
const sd = dec * Math.sqrt((p * (1 - p)) / (cfg.bettors * cfg.weeks));
const lo = Math.max(-3, cut - 4 * sd), hi = Math.min(1, cut + 4 * sd);
const shown = seasons.slice(-SHOW_MAX).map((s) => s.share);
const hB = histogram(shown, lo, hi, bandB, bins);
const mx = hB.x(cut);
ov.push(
{ key: "ts-m", type: "line", x1: mx, y1: bandB.y - 4, x2: mx, y2: bandB.y + botH + 3, color: AE.rgba("bone", 0.6) },
{ key: "ts-ml", type: "text", x: mx, y: bandB.y + botH + 18, text: `the math, ${AE.fmt.pct(cut)}`, font: f.cap, color: AE.rgba("bone", 0.8), align: "center", upper: true, spacing: "0.12em" },
{ key: "ts-lob", type: "text", x: R.x, y: bandB.y + botH + 18, text: AE.fmt.pct(lo, 0), font: f.small, color: AE.rgba("bone", 0.5), align: "left" },
{ key: "ts-hib", type: "text", x: R.x + R.w, y: bandB.y + botH + 18, text: AE.fmt.pct(hi, 0), font: f.small, color: AE.rgba("bone", 0.5), align: "right" },
);
if (lo < 0 && hi > 0) {
const zx = hB.x(0);
ov.push({ key: "ts-zb", type: "line", x1: zx, y1: bandB.y + botH - 10, x2: zx, y2: bandB.y + botH + 8, color: AE.rgba("green", 0.6) });
if (zx - R.x > 130 && mx - zx > 60) ov.push({ key: "ts-zbl", type: "text", x: zx - 6, y: bandB.y + botH + 18, text: "← house lost", font: f.cap, color: AE.rgba("green", 0.8), align: "right", upper: true, spacing: "0.1em" });
}
const newest = shown.length - 1;
stage.set(BET_MAX + shown.length, (i) => {
if (i < BET_MAX) {
if (i >= nA) return null;
const q = posA(i), up = colA(i) === "green";
return { x: q.x, y: q.y, r: sA * 0.38, color: up ? "green" : "red", alpha: up ? 1 : 0.6, ease: up ? "pop" : "drop", delay: quick ? 0 : stage.rnd[i] * 400, dur: quick ? 250 : 900 };
}
const j = i - BET_MAX, q = hB.pos(j), house = shown[j] >= 0;
return { x: q.x, y: q.y, r: hB.s * 0.38, color: house ? "red" : "green", alpha: 0.9, ease: "drop", flash: !quick && j === newest, from: { x: q.x, y: bandB.y - 30 }, delay: quick ? 0 : 200, dur: quick ? 200 : 700 };
});
stage.overlays(ov, { delay: 0 });
stage.glow({ red: seasons.length ? 0.35 : 0 });
}
stage.on("resize", () => draw(true));
reset();
},
});
} catch (e) { console.error("[About Even] labs/thousand-seasons.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/track-takeout.js ---- */
;(function (AE) {
"use strict";
try {
// Track Takeout (spec §4, C6). Set a win pool, the money on the winner and the bet type (or a custom
// takeout) and see what a $2 winning ticket pays after the cut, with penny breakage and the $2.20
// minimum, plus what the track kept. Payouts come from AE.math.pariMutuel (810 KAR 6:020).
// Local helper (not in core math): dimePrice(), the pre-2022 dime breakage, for a history line only
// (RACE-13). No state is written.
AE.source({ id: "RACE-12", label: "Worked win pool (arithmetic on 810 KAR 6:020): $10,000 at 17.5% → $8,250; $2,000 on the winner → $2 pays $8.24; breakage $10" });
const TT_TYPES = {
win: { label: "Win", rate: AE.math.TAKEOUT.win, note: "Kentucky’s cap on win, place and show bets (KRS 230.3615; the cap counts breakage too). Churchill Downs posts exactly this." },
exotic: { label: "Trifecta", rate: AE.math.TAKEOUT.exotic, note: "Kentucky’s cap on bets on two or more horses. For an exotic, “the winner” means the winning combination." },
kee: { label: "Keeneland win", rate: 0.16, note: "Keeneland’s posted win and place rate, under the cap (page undated; rates have changed before)." },
custom: { label: "Custom", rate: null, note: "Any takeout you like. Kentucky’s caps are 17.5% and 22%." },
};
const ttPct = (r) => (Math.round(r * 1000) / 10) + "%";
// Pre-2022 Kentucky breakage rounded the $1 price down to the dime (history only; RACE-13).
function dimePrice(pool, takeout, w) {
const raw = (pool * (1 - takeout) - w) / w;
return Math.max(AE.math.MIN_PRICE_PER_DOLLAR, Math.floor(raw * 10 + 1e-7) / 10 + 1);
}
AE.lab({
id: "track-takeout",
title: "Track Takeout",
chapter: "c6",
blurb: "Build a win pool, set the money on the winner and the cut, and see what a $2 ticket pays and what the track keeps.",
mount(el, ctx) {
el.innerHTML = `
<div class="tt-wrap">
<div class="tt-controls">
<div class="tt-c" data-tt="pool"></div>
<div class="tt-c" data-tt="share"></div>
<div class="tt-c" data-tt="type"></div>
<p class="tt-note" data-tt="typenote"></p>
<div class="tt-c" data-tt="custom" hidden></div>
</div>
<div class="tt-out">
<div class="tt-hero">
<div><span class="tt-big g" data-tt="pay">$8.24</span><span class="tt-cap">a $2 winning ticket pays</span></div>
<div class="tt-fair"><span class="tt-mid" data-tt="fair">$10.00</span><span class="tt-cap">with no cut</span></div>
</div>
<div class="tt-stage" aria-hidden="true"></div>
<dl class="tt-rows" aria-live="polite">
<div><dt>Pool</dt><dd data-tt="r-pool"></dd></div>
<div class="r"><dt data-tt="r-cutl">To the track</dt><dd data-tt="r-cut"></dd></div>
<div><dt>Left for the winners</dt><dd data-tt="r-net"></dd></div>
<div class="g"><dt>Paid to the winners</dt><dd data-tt="r-paid"></dd></div>
<div class="r" data-tt="row-brk"><dt>Breakage (rounding, kept)</dt><dd data-tt="r-brk"></dd></div>
<div data-tt="row-top" hidden><dt>Track tops it up</dt><dd data-tt="r-top"></dd></div>
<div class="r tt-total"><dt>The track kept</dt><dd data-tt="r-kept"></dd></div>
</dl>
<p class="tt-note" data-tt="minnote" hidden></p>
<p class="tt-note" data-tt="dime"></p>
<p class="ae-assume">Illustration: one pool, not a real race. Payout per 810 KAR 6:020, penny breakage, $2.20 minimum ($2.10 in a minus pool).</p>
</div>
</div>`;
const $ = (k) => el.querySelector(`[data-tt="${k}"]`);
let type = "win", customRate = 0.2;
const pool = AE.ui.slider({ label: "Win pool", min: 1000, max: 100000, step: 500, value: 10000, format: (v) => AE.fmt.money(v), onInput: draw });
const share = AE.ui.slider({ label: "Money on the winner", min: 1, max: 100, step: 0.5, value: 20,
format: (v) => `${AE.fmt.money(winnerMoney(v))} · ${v}%`, onInput: draw, aria: "Share of the pool bet on the winner" });
const custom = AE.ui.slider({ label: "Custom takeout", min: 0, max: 25, step: 0.5, value: customRate * 100, format: (v) => v + "%", onInput: (v) => { customRate = v / 100; draw(); } });
const seg = AE.ui.segmented({
label: "Bet",
options: Object.entries(TT_TYPES).map(([value, t]) => ({ value, label: t.label + (t.rate != null ? " " + ttPct(t.rate) : "") })),
value: type,
onChange: (v) => { type = v; $("custom").hidden = v !== "custom"; draw(); },
});
$("pool").appendChild(pool.el);
$("share").appendChild(share.el);
$("type").appendChild(seg.el);
$("custom").appendChild(custom.el);
function winnerMoney(sh) { return Math.max(1, Math.round((pool.get() * sh) / 100)); }
const stage = ctx.stage(el.querySelector(".tt-stage"), { capacity: 260, seed: 1936 });
const N = 200;
function draw() {
share.set(share.get()); // repaint the dollar readout when the pool changes
const P = pool.get(), W = winnerMoney(share.get());
const t = TT_TYPES[type], rate = t.rate != null ? t.rate : customRate;
const r = AE.math.pariMutuel({ pool: P, takeout: rate, onWinner: W });
const paid = AE.math.roundCent(r.price1 * W);
const brk = Math.max(0, AE.math.roundCent(r.net - paid));
const top = Math.max(0, AE.math.roundCent(paid - r.net));
const kept = AE.math.roundCent(P - paid);
const m = (v) => AE.fmt.money(v, { cents: Math.abs(v) < 1000 && v % 1 !== 0 });
$("pay").textContent = AE.fmt.money(r.payout, { cents: true });
$("fair").textContent = AE.fmt.money(r.fairPayout, { cents: true });
$("typenote").textContent = t.note;
$("r-pool").textContent = AE.fmt.money(P);
$("r-cutl").textContent = `To the track (${ttPct(rate)})`;
$("r-cut").textContent = "−" + m(r.takeoutAmount);
$("r-net").textContent = m(r.net);
$("r-paid").textContent = m(paid);
$("r-brk").textContent = brk > 0 ? "−" + m(brk) : "$0";
$("row-top").hidden = top <= 0;
$("r-top").textContent = "+" + m(top);
$("r-kept").textContent = kept < 0 ? `−${m(-kept)} · out of pocket` : `${m(kept)} · ${ttPct(kept / P)}`;
$("row-brk").classList.toggle("r", brk > 0);
const minNote = $("minnote");
minNote.hidden = !r.minusPool;
if (r.minusPool) {
minNote.textContent = `A minus pool: the pool can’t pay the usual $2.20 minimum, so Kentucky law drops it to $2.10${top > 0 ? ` and the track pays ${m(top)} out of its cut` : ""}.`;
}
const dp = dimePrice(P, rate, W) * 2;
$("dime").textContent = `Before 2022 (dime breakage), the same ticket paid ${AE.fmt.money(dp, { cents: true })}.`;
// dots: the pool, 200 dots. Red = what the track kept (moved off the top to its pile); green = paid.
const red = Math.max(0, Math.min(N, Math.round((kept / P) * N)));
const { W: SW, H: SH, mobile } = stage.geom;
const c = 20, tc = 6, rows = N / c, trows = Math.ceil(Math.max(red, 1) / tc), gapC = 3;
const s = Math.min((SW - 32) / (c + gapC + tc), (SH - 48) / Math.max(rows, trows), mobile ? 16 : 22);
const x0 = (SW - (c + gapC + tc) * s) / 2, base = SH - 36, tx0 = x0 + (c + gapC) * s, rr = s * 0.34;
stage.set(N, (i) => {
if (i >= N - red) {
const p = AE.layout.pile(N - 1 - i, { x0: tx0, base, cols: tc, size: s });
return { x: p.x, y: p.y, r: rr, color: "red", alpha: 1, ease: "drop", dur: 380, delay: 0 };
}
const p = AE.layout.pile(i, { x0, base, cols: c, size: s });
return { x: p.x, y: p.y, r: rr, color: "green", alpha: 0.92, dur: 380, delay: 0 };
});
const f = stage.fonts();
stage.overlays([
{ key: "tt-fl", type: "rect", x: x0 - s * 0.25, y: base - rows * s, w: c * s + s * 0.5, h: 0, dash: [3, 4], color: AE.rgba("bone", 0.35) },
{ key: "tt-pl", type: "text", x: x0, y: base + 22, text: "paid to the winners", font: f.label, color: AE.rgba("green", 0.9), align: "left" },
{ key: "tt-tl", type: "text", x: tx0 + tc * s, y: base + 22, text: "track kept", font: f.label, color: AE.rgba("red", 1), align: "right" },
]);
}
draw();
stage.on("resize", draw);
},
});
} catch (e) { console.error("[About Even] labs/track-takeout.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- labs/trade-or-bet.js ---- */
;(function (AE) {
"use strict";
try {
// Trade or Bet (spec §4, chapter C5). Enter a contract price, a number of contracts and an optional
// bid-ask spread; see the implied probability, the fee, the spread cost and the expected value next
// to the same money staked at −110 on a true coin flip.
//
// Math (same as the chapter, AE.math):
// cost = C × P P = the price you pay (the ask)
// fee = AE.math.predictionFee(C, P).fee Kalshi-style, round up to the cent (unit unverified: DNU-20)
// mid = P − spread/2 (floored at 0.5¢) treated as the fair chance (assumption, labeled)
// spread cost = C × (P − mid)
// EV = C × mid − (cost + fee) = −(fee + spread cost)
// sportsbook: same outlay at −110 on a 50/50 game, EV = −outlay × AE.math.STRAIGHT_EDGE (4.545%)
// Checks: 193 @ 50¢, no spread → fee $3.38, EV −$3.38 (−3.4%) (PM-14).
// 189 @ 51¢, 2¢ spread → fee $3.31, outlay $99.70, EV −$5.20 (−5.2%) (PM-13).
// Holds no saved state (nothing here goes into the save file).
AE.lab({
id: "trade-or-bet",
title: "Trade or Bet",
chapter: "c5",
blurb: "Enter a contract price and size. See the fee, the spread and what you expect back, next to a −110 bet.",
mount(el, ctx) {
el.innerHTML = `
<div class="tob">
<div class="tob-controls"></div>
<div class="tob-main">
<div class="tob-hero">
<span class="tob-k">The price implies</span>
<span class="tob-big" data-o="prob"></span>
<span class="tob-sub" data-o="probsub"></span>
</div>
<dl class="tob-list">
<div><dt>Contracts × price</dt><dd data-o="cost"></dd></div>
<div><dt>Fee <i>illustrative</i></dt><dd class="r" data-o="fee"></dd></div>
<div><dt>Spread cost <i>illustrative</i></dt><dd class="r" data-o="spread"></dd></div>
<div class="tob-total"><dt>You put in</dt><dd data-o="outlay"></dd></div>
<div><dt>If YES, you get back</dt><dd class="g" data-o="pays"></dd></div>
<div class="tob-ev"><dt>Expected value, contract</dt><dd class="r" data-o="ev"></dd></div>
<div class="tob-ev"><dt>Same money at −110</dt><dd class="r" data-o="sb"></dd></div>
</dl>
</div>
<div class="tob-viz">
<div class="tob-stage" aria-live="off"></div>
<p class="tob-cap">Each grid is $100 put in. <span class="g">Green</span>: what you expect back. <span class="r">Red</span>: what you expect to lose to the fee, the spread or the book’s cut.</p>
</div>
<div class="tob-notes ae-math">
<div><span class="ae-label">Assumptions</span>Expected value treats the middle of the spread as the true chance, a fair price. The fee is the Kalshi-style taker fee <code>round up(0.07 × C × P × (1 − P))</code>; whether it rounds to the cent or a hundredth of a cent isn’t confirmed, so it’s illustrative. Spreads aren’t published for any game; 1–2¢ on busy NFL games and 4–6¢ on thin ones is how guides describe them.</div>
<div><span class="ae-label">The sportsbook line</span>The same money bet at <code>−110</code> on a true 50/50 game: expected <code>−4.55%</code>. It doesn’t change with the price above; it’s the yardstick.</div>
<div><span class="ae-label">Selling early</span>Selling before the game ends is a second trade, with a second fee.</div>
</div>
</div>`;
const $o = (k) => el.querySelector(`[data-o="${k}"]`);
const S = { price: 50, contracts: 100, spread: 0 };
const price = AE.ui.slider({ label: "Contract price", min: 1, max: 99, step: 1, value: S.price, aria: "Contract price in cents",
format: (v) => `${v}¢`, onInput: (v) => { S.price = v; draw(); } });
const contracts = AE.ui.slider({ label: "Contracts", min: 1, max: 1000, step: 1, value: S.contracts, aria: "Number of contracts",
format: (v) => AE.fmt.int(v), onInput: (v) => { S.contracts = v; draw(); } });
const spread = AE.ui.segmented({ label: "Spread", value: 0, onChange: (v) => { S.spread = v; draw(); },
options: [{ value: 0, label: "none" }, { value: 1, label: "1¢" }, { value: 2, label: "2¢" }, { value: 4, label: "4¢" }, { value: 6, label: "6¢" }] });
const presets = AE.h(`<div class="tob-presets"><span class="tob-k">Worked examples</span></div>`);
const preset = (label, p, c, sp) => presets.appendChild(AE.ui.button({ label, onClick: () => {
S.price = p; S.contracts = c; S.spread = sp; price.set(p); contracts.set(c); spread.set(sp); draw();
} }).el);
const ctr = el.querySelector(".tob-controls");
ctr.append(price.el, contracts.el, spread.el, presets);
preset("Fair 50¢, 100 contracts", 50, 100, 0);
preset("51¢ in a 2¢ market", 51, 189, 2);
const host = el.querySelector(".tob-stage");
const stage = ctx.stage(host, { capacity: 200, region: (W, H) => ({ x: 8, y: 8, w: W - 16, h: H - 16 }) });
function calc() {
const C = S.contracts, P = S.price / 100;
const mid = Math.max(P - S.spread / 200, 0.005);
const cost = C * P;
const fee = AE.math.predictionFee(C, P).fee;
const spreadCost = C * (P - mid);
const outlay = cost + fee;
const ev = C * mid - outlay;
const sb = -outlay * AE.math.STRAIGHT_EDGE;
return { C, P, mid, cost, fee, spreadCost, outlay, ev, evPct: ev / outlay, sb, pays: C };
}
const money = (v) => AE.fmt.money(v, { cents: true });
const signed = (v) => AE.fmt.money(v, { cents: true, sign: true });
const pct = (v) => (v < 0 ? "−" : "") + (Math.abs(v) * 100).toFixed(2) + "%";
const pctOf = (v) => { const c = Math.round(v * 1000) / 10; return (Number.isInteger(c) ? c : c.toFixed(1)) + "%"; };
function draw() {
const r = calc();
$o("prob").textContent = Math.round(r.P * 100) + "%";
$o("probsub").textContent = S.spread > 0
? `at the price you pay; about ${pctOf(r.mid)} at the middle of a ${S.spread}¢ spread`
: "chance that YES happens, at the price you pay";
$o("cost").textContent = `${AE.fmt.int(r.C)} × ${S.price}¢ = ${money(r.cost)}`;
$o("fee").textContent = money(r.fee);
$o("spread").textContent = money(r.spreadCost);
$o("outlay").textContent = money(r.outlay);
$o("pays").textContent = money(r.pays);
$o("ev").textContent = `${signed(r.ev)} · ${pct(r.evPct)}`;
$o("sb").textContent = `${signed(r.sb)} · ${pct(-AE.math.STRAIGHT_EDGE)}`;
paint(r);
}
// Two 10×10 grids, $1 a dot of every $100 put in. Red = expected loss; a partial red dot is
// drawn with area proportional to the fraction (radius × √fraction).
function paint(r) {
const { R, mobile } = stage.geom;
const gap = mobile ? 0.14 : 0.18, labH = mobile ? 24 : 28;
const s = Math.min((R.w * (1 - gap)) / 20, (R.h - labH * 2) / 10, 24);
const gw = 10 * s, totalW = gw * 2 + R.w * gap * 0.6;
const xA = R.x + (R.w - totalW) / 2, xB = xA + totalW - gw;
const y0 = R.y + labH + Math.max(0, (R.h - labH * 2 - 10 * s) / 2);
const grids = [{ x0: xA, loss: Math.min(100, -r.evPct * 100) }, { x0: xB, loss: AE.math.STRAIGHT_EDGE * 100 }];
stage.set(200, (i) => {
const gi = i < 100 ? 0 : 1, j = i % 100, G = grids[gi];
const p = AE.layout.grid(99 - j, { x0: G.x0, y0, cols: 10, size: s }); // red fills from the bottom-right
const full = Math.floor(G.loss), frac = G.loss - full;
let red = j < full, rad = s * 0.36;
if (j === full && frac > 0.02) { red = true; rad *= Math.sqrt(frac); }
return red
? { x: p.x, y: p.y, r: rad, color: "red", alpha: 1, ease: "drop", dur: 380 }
: { x: p.x, y: p.y, r: s * 0.36, color: "green", alpha: 0.6, dur: 380 };
}, { quick: true });
const f = stage.fonts(), ty = y0 - (mobile ? 9 : 11), by = y0 + 10 * s + (mobile ? 18 : 22);
stage.overlays([
{ key: "tob-la", type: "text", x: xA, y: ty, text: "contract", font: f.cap, color: AE.rgba("bone", 0.6), align: "left", upper: true, spacing: "0.14em" },
{ key: "tob-lb", type: "text", x: xB, y: ty, text: "sportsbook, −110", font: f.cap, color: AE.rgba("bone", 0.6), align: "left", upper: true, spacing: "0.14em" },
{ key: "tob-va", type: "text", x: xA, y: by, text: "lose " + pct(-r.evPct).replace("−", ""), font: f.label, color: AE.rgba("red", 1), align: "left" },
{ key: "tob-vb", type: "text", x: xB, y: by, text: "lose " + pct(AE.math.STRAIGHT_EDGE), font: f.label, color: AE.rgba("red", 1), align: "left" },
], { delay: 0 });
stage.label(`Per $100 put in: the contract expects to lose ${pct(-r.evPct).replace("−", "")}; the same money at minus 110 expects to lose ${pct(AE.math.STRAIGHT_EDGE)}.`);
}
stage.on("resize", () => draw());
draw();
},
});
} catch (e) { console.error("[About Even] labs/trade-or-bet.js failed to load", e); }
})(window.AE = window.AE || {});
/* ---- core/boot.js ---- */
;(function (AE) {
"use strict";
// boot.js: loaded LAST (after every chapter and lab file). Creates the story stage, renders the
// chapters, wires the shell, and starts the scroll observer.
// Where scenes draw on the story stage. Desktop: the right ~60% (cards sit on the left).
// Phone: the area between the header and the card sheet at the bottom. The sheet is the active
// card's real height (at least 204px; steps.js measures it and calls AE.stage.setSheet), so a tall
// card shrinks the drawing area instead of covering the graphic.
const HEADER_D = 56, HEADER_M = 84, SHEET_MIN = 204, GAP_M = 12; // phone header: wordmark row + tab row (base.css --header-h)
let sheet = SHEET_MIN;
function storyRegion(W, H, mobile) {
if (mobile) {
const top = HEADER_M + 8, bottom = H - sheet - GAP_M;
return { x: 16, y: top, w: W - 32, h: Math.max(160, bottom - top) };
}
return { x: W * 0.4, y: HEADER_D + 16, w: W * 0.6 - 60, h: H - HEADER_D - 16 - 48 };
}
// Hard limits for anything drawn: below the header, above the card sheet (phone) / page edge (desktop).
function storySafe(W, H, mobile) {
if (mobile) return { top: HEADER_M + 2, bottom: H - sheet - 4, sheet };
return { top: HEADER_D + 4, bottom: H - 12, sheet: 0 };
}
function start() {
if (AE._started) return;
AE._started = true;
AE.stage = AE.Stage(document.getElementById("ae-stage"), { region: storyRegion, safe: storySafe, capacity: 1200 });
AE.stage.storyRegion = storyRegion;
AE.stage.SHEET_MIN = SHEET_MIN;
// Set the phone card-sheet height (px). Re-measures and returns true when the region changed.
AE.stage.setSheet = (px) => {
const v = Math.round(Math.max(SHEET_MIN, px || 0));
if (Math.abs(v - sheet) < 4) return false;
sheet = v;
if (!AE.stage.geom.mobile) return false;
AE.stage.measure();
return true;
};
AE.file._init();
AE.steps.build();
AE.shell.init();
AE.steps.start();
AE.route.start(); // shows the tab in the hash (#story by default), opens a #lab/<id>
document.documentElement.classList.add("ae-ready");
}
// Canvas text needs the embedded fonts decoded before the first draw. Cap the wait so a slow
// device never blocks the page.
const fontLoads = document.fonts && document.fonts.load
? Promise.all([
document.fonts.load('300 40px "Geist Mono"'), document.fonts.load('500 10px "Geist Mono"'), document.fonts.load('400 13px "Geist Mono"'),
document.fonts.load('400 13px "Geist"'), document.fonts.load('600 30px "Geist"'),
]).catch(() => {})
: Promise.resolve();
Promise.race([fontLoads, new Promise((r) => setTimeout(r, 1200))]).then(start);
AE.start = start;
})(window.AE = window.AE || {});
</script>
</body>
</html>
Websites this page contacts when it runs — fonts, chart libraries, data. Found by reading its source.
Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.
Copyright © 2026 Ryan Beam. Licensed under the MIT License. Published on Globefin.
Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →
Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.