/* The fraction bench: the homepage's one interactive scene. Ideas are pieces, and they have to fit. */
.ex{--bench:#191C28;--q:#F6C53B;--h:#EF6B47;--t:#7FC8C2}
.ex .w{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:52px;align-items:start;padding-top:44px;padding-bottom:44px}
.ex h1{font-size:clamp(40px,5.6vw,74px);line-height:1.02;letter-spacing:-.03em}
.ex-line{font-family:var(--serif);font-size:clamp(21px,2.1vw,26px);line-height:1.3;margin:20px 0 0}
.ex-acts{display:flex;gap:14px 22px;align-items:center;flex-wrap:wrap;margin-top:26px}
.ex button{font:inherit;cursor:pointer}
.ex .go{cursor:pointer}
.ex-try{background:var(--mark);color:var(--ink);border:2px solid var(--ink);font-weight:700;padding:13px 22px;font-size:18px;min-height:50px}
.ex-try:hover{background:var(--ink);color:#fff}
.ex-tag{font-size:15px;font-weight:600;color:var(--soft);margin:0 0 12px}
#prompt{font-family:var(--serif);font-size:clamp(25px,2.7vw,33px);line-height:1.22;margin:0;outline:0}
#prompt.end{font-size:clamp(34px,4.2vw,54px);line-height:1.06;letter-spacing:-.02em}
.ex-ch{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.ex-ch button{background:#fff;border:1.5px solid var(--ink);padding:12px 18px;min-height:50px;font-size:19px;font-weight:600;color:var(--ink);text-align:left}
.ex-ch button:hover{background:var(--mark)}
.ex-ctl{display:flex;gap:18px;flex-wrap:wrap;margin-top:24px;font-size:16px}
.ex-ctl button,.ex-ctl a{background:none;border:0;padding:8px 0;color:var(--soft);text-decoration:underline;text-underline-offset:4px;min-height:40px}
.ex-ctl button:hover,.ex-ctl a:hover{color:var(--ink)}
.ex-why{margin-top:20px;font-size:17.5px;max-width:34em}
.ex-why summary{font-weight:700;cursor:pointer;min-height:40px}
.ex-why dl{margin:10px 0 0}.ex-why dt{font-weight:700;margin-top:10px}.ex-why dd{margin:2px 0 0;color:var(--soft)}

.stage{background:var(--bench);color:#fff;padding:24px 22px;min-height:400px;display:flex;flex-direction:column}
.rows{flex:1;display:flex;flex-direction:column;justify-content:center;gap:20px;animation:fade .22s ease}
.rw b{display:block;font-weight:600;font-size:16px;margin-bottom:6px;color:#F4F1EA}
.bars{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bars.one{grid-template-columns:1fr}
.bars.one .bar{height:92px}
.bar{display:flex;height:66px;outline:2px solid #6E7384;outline-offset:0}
.sg{flex-basis:0;min-width:0;display:grid;place-items:center;font-size:14px;font-weight:700;color:var(--ink);border-right:2px solid var(--bench);transition:transform .15s}
.sg:last-child{border-right:0}
.sg.q{background:var(--q)}.sg.h{background:var(--h)}.sg.t{background:var(--t)}
.sg.gap{background:repeating-linear-gradient(135deg,transparent 0 6px,rgba(255,255,255,.1) 6px 8px);color:transparent}
.sg.new{animation:snap .28s cubic-bezier(.2,1.4,.5,1)}
.is-intro .stage{cursor:pointer}
.is-intro .stage:hover .sg:not(.gap){transform:translateY(-5px)}
.bench{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;min-height:58px;align-items:center}
.bench button{width:58px;height:56px;background:var(--q);color:var(--ink);border:0;font-weight:700;font-size:15px;touch-action:none}
.bench button:hover{outline:3px solid #fff}
.bench button.drag{position:relative;z-index:5;box-shadow:0 8px 18px rgba(0,0,0,.5)}
.hint{font-family:var(--hand);color:#F6E8B8;font-size:24px;margin:18px 0 0;text-align:center}
.strip{display:flex;gap:6px;margin-top:20px;padding-top:16px;border-top:1px solid #4A4F60}
.strip i{width:36px;height:36px;display:grid;place-items:center;font:700 19px/1 var(--serif);font-style:normal;border:1.5px dashed #6E7384;color:transparent}
.strip i.on{background:var(--q);border:1.5px solid var(--q);color:var(--ink);animation:snap .28s cubic-bezier(.2,1.4,.5,1)}
.strip-note{font-family:var(--hand);color:#F6E8B8;font-size:20px;line-height:1.25;margin:10px 0 0;min-height:2.5em}
@keyframes fade{from{opacity:0}}
@keyframes snap{from{transform:scale(.7)}}

.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin:0}
.facts dt{font-weight:700;font-size:15px;color:var(--soft)}
.facts dd{margin:4px 0 0;font-family:var(--serif);font-size:22px;line-height:1.25}
.facts a{text-underline-offset:3px}

@media (max-width:880px){
  .ex .w{grid-template-columns:minmax(0,1fr);gap:22px;padding-top:26px;padding-bottom:30px}
  .ex.running .stage{order:-1}
  .stage{min-height:270px;padding:16px 14px}
  .rows{gap:14px}
  .bar{height:54px}
  .bars.one .bar{height:66px}
  .sg{font-size:12.5px}
  .strip i{width:32px;height:32px;font-size:17px}
  .strip-note{font-size:18px;min-height:0}
  .facts{grid-template-columns:1fr 1fr}
}
@media (prefers-reduced-motion:reduce){.ex *{animation:none!important;transition:none!important}}

/* Methodology: the MITHRA explorer */
.m-note{font-size:17px;color:var(--soft);margin:10px 0 0;max-width:40em}
.m-lab{font-weight:700;margin:24px 0 8px}
.m-opts{display:flex;flex-wrap:wrap;gap:0}
.m-opts button{font:inherit;font-size:17px;background:#fff;color:var(--ink);border:1.5px solid var(--ink);margin:0 -1.5px -1.5px 0;padding:11px 16px;min-height:48px;cursor:pointer}
.m-opts button[aria-pressed=true]{background:var(--ink);color:#fff;font-weight:700}
.m-tabs{display:flex;gap:8px;margin:22px 0 0}
.m-tabs button{flex:1;max-width:96px;height:68px;background:transparent;border:2px dashed var(--ink);font:700 34px/1 var(--serif);color:var(--ink);cursor:pointer}
.m-tabs button.seen{border-style:solid}
.m-tabs button[aria-selected=true]{background:var(--mark);border-style:solid}
.m-panel{display:grid;grid-template-columns:minmax(0,6fr) minmax(0,5fr);gap:40px;margin-top:22px;align-items:start}
.m-copy h3{font-size:clamp(28px,3vw,38px);margin:0 0 12px}
.m-skip{font-family:var(--hand);font-size:24px;color:var(--blue);margin:0}
.m-fb{min-height:1.5em;font-weight:600;margin:14px 0 0}
.m-why{font-size:19px;margin:12px 0 0}
.m-real{font-size:17px;color:var(--soft);border-left:3px solid var(--mark);padding-left:12px;margin:14px 0 0}
.m-nav{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:20px}
.m-nav button,.m-all{font:inherit;background:none;border:0;padding:10px 0;min-height:44px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.m-nav button:disabled{color:#A9A69C;text-decoration:none;cursor:default}
.ex .stage.m{min-height:0}
.m-panel .stage{min-height:300px}
@media (max-width:880px){.m-panel{grid-template-columns:minmax(0,1fr);gap:18px}.m-panel .stage{order:-1;min-height:200px}.m-tabs{gap:4px}.m-tabs button{height:54px;font-size:26px}}

/* The comic, as a story: Mithra and the student are the visitor's own comic art, cut out pose by pose */
.chr{display:block;width:100%;background:url("/assets/mithra-story.webp") no-repeat}
.chr.k1{aspect-ratio:210/275;background-size:799.05% auto;background-position:11.92% 31.29%}
.chr.k2{aspect-ratio:215/255;background-size:780.47% auto;background-position:63.23% 34.60%}
.chr.k3{aspect-ratio:300/415;background-size:559.33% auto;background-position:9.43% 88.40%}
.chr.k4{aspect-ratio:295/390;background-size:568.81% auto;background-position:71.22% 88.80%}
.chr.m1{aspect-ratio:335/365;background-size:500.90% auto;background-position:33.13% 27.08%}
.chr.m2{aspect-ratio:335/322;background-size:500.90% auto;background-position:96.43% 32.25%}
.chr.m3{aspect-ratio:305/355;background-size:550.16% auto;background-position:29.13% 94.52%}
.chr.m4{aspect-ratio:275/385;background-size:610.18% auto;background-position:92.66% 93.62%}

.ex{background-color:#FFF4CC;background-image:radial-gradient(rgba(25,28,40,.09) 1.3px,transparent 1.4px);background-size:14px 14px;border-bottom:3px solid var(--ink)}
.ex h1{font-family:var(--hand);font-weight:700;font-size:clamp(46px,6.4vw,84px);line-height:1;letter-spacing:-.01em}
.ex-line{font-family:var(--hand);font-size:clamp(24px,2.4vw,30px)}
.ex .go,.ex-try,.ex-ch button{border:3px solid var(--ink);box-shadow:4px 4px 0 var(--ink);transition:transform .1s,box-shadow .1s}
.ex .go{background:#fff;color:var(--ink);font-weight:700;padding:12px 20px;min-height:50px}
.ex .go:hover,.ex-try:hover{background:var(--mark);color:var(--ink);border-color:var(--ink)}
.ex .go:active,.ex-try:active,.ex-ch button:active{transform:translate(3px,3px);box-shadow:1px 1px 0 var(--ink)}
.ex-ch button{font-family:var(--hand);font-weight:700;font-size:23px;background:#fff}
.ex-ch button:nth-child(odd){transform:rotate(-1.2deg)}.ex-ch button:nth-child(even){transform:rotate(1deg)}
.ex-ch button:hover{background:var(--mark);transform:rotate(0) translateY(-3px)}
.ex-tag{font-size:14px}

.say,.reply{display:grid;gap:10px;align-items:end}
.say{grid-template-columns:165px minmax(0,1fr)}
.reply{grid-template-columns:minmax(0,1fr) 150px;margin-top:18px}
.who-btn{all:unset;display:block;cursor:pointer;border-radius:6px;transform-origin:50% 100%}
.who-btn:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.who-btn:hover .chr{transform:translateY(-4px) rotate(-2deg)}
.who-btn .chr{transition:transform .15s}
.who-btn.pop{animation:hop .4s cubic-bezier(.2,1.5,.5,1)}
.bub{position:relative;background:#fff;border:3px solid var(--ink);padding:16px 18px;border-radius:26px 30px 24px 32px/30px 24px 32px 26px;box-shadow:5px 5px 0 var(--ink);margin-bottom:18px}
.say .bub:after{content:"";position:absolute;left:-17px;bottom:18px;width:24px;height:24px;background:#fff;border-left:3px solid var(--ink);border-bottom:3px solid var(--ink);transform:skewY(32deg)}
#prompt{font-family:var(--hand);font-weight:700;font-size:clamp(23px,2.4vw,29px);line-height:1.2}
#prompt.end{font-size:clamp(30px,3.6vw,44px);line-height:1.08;letter-spacing:0}
.quip{font-family:var(--hand);color:var(--blue);font-size:20px;margin:8px 0 0;min-height:0}
.reply .think{background:#EAF0FF;border:3px dashed var(--ink);padding:12px 14px;border-radius:24px}
.reply .think small{display:block;font-size:14px;font-weight:700;margin-bottom:2px}
.reply .ex-ch{margin-top:8px}
.intro-cast{display:grid;grid-template-columns:150px minmax(0,1fr) 165px;align-items:end;gap:8px;margin-top:10px}
.intro-cast .bub{margin-bottom:26px;font-family:var(--hand);font-weight:700;font-size:21px;line-height:1.2;text-align:center}
.intro-cast .bub:after{content:"";position:absolute;right:-16px;bottom:18px;width:24px;height:24px;background:#fff;border-right:3px solid var(--ink);border-bottom:3px solid var(--ink);transform:skewY(-32deg)}
.stage{border:8px solid #C4894A;box-shadow:6px 6px 0 var(--ink);border-radius:6px}
.bench button{border:2px solid var(--ink);box-shadow:3px 3px 0 #000;animation:bob 2.2s ease-in-out infinite}
.bench button:nth-child(2n){animation-delay:-1s}
.ex.is-intro .stage{min-height:0}
.strip i.on{transform:rotate(-3deg)}
.strip i.on:nth-child(even){transform:rotate(3deg)}
.chapters{display:flex;flex-wrap:wrap;gap:4px 8px;font-family:var(--hand);font-size:18px;margin:0 0 12px;color:var(--soft);list-style:none;padding:0}
.chapters li[aria-current]{color:var(--ink);font-weight:700;background:var(--mark);padding:0 7px}
@keyframes hop{30%{transform:translateY(-16px) rotate(-3deg)}60%{transform:translateY(0) rotate(2deg)}}
@keyframes bob{50%{transform:translateY(-5px) rotate(2deg)}}
@media (max-width:880px){
  .say{grid-template-columns:96px minmax(0,1fr)}
  .reply{grid-template-columns:minmax(0,1fr) 84px}
  .ex.running .w>div:last-child{order:-1}
  .ex.running .stage{min-height:0;padding:10px 12px;border-width:6px}
  .ex.running .rows{gap:8px}
  .ex.running .bars.one .bar,.ex.running .bar{height:42px}
  .ex.running .rw b{font-size:14px;margin-bottom:3px}
  .ex.running .strip{margin-top:10px;padding-top:8px}
  .ex.running .strip-note{display:none}
  .ex.running .strip i{width:26px;height:26px;font-size:15px}
  .ex-tag{margin-bottom:4px}
  .chapters{margin-bottom:6px}
  .chapters li:not([aria-current]){display:none}
  .ex .w{gap:14px}
  .bub{padding:12px 14px}
  .ex-ch button{font-size:21px}
  .intro-cast{grid-template-columns:82px minmax(0,1fr) 88px}
  .intro-cast .bub{font-size:18px;padding:10px}
}
@media (prefers-reduced-motion:reduce){.who-btn,.bench button{animation:none!important}.ex-ch button{transform:none}}

.sumline{font-family:var(--hand);font-weight:700;font-size:clamp(28px,3.4vw,42px);line-height:1.1;margin:0;color:#fff}
.bench button{width:50px}
@media (max-width:880px){.ex.running .sumline{font-size:24px}}

/* the balance scale */
.scale{position:relative;height:190px}
.beam{position:absolute;left:4%;right:4%;top:64px;height:5px;background:#C4894A;display:grid;grid-template-columns:1fr 1fr;gap:14%;transition:transform .5s cubic-bezier(.3,1.4,.5,1);transform-origin:50% 50%}
.scale.tip .beam{transform:rotate(9deg)}
.pan{position:absolute;bottom:5px;width:43%;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;align-content:flex-end;gap:3px;padding:0 2px 3px;border-bottom:0}
.pan:first-child{left:0}.pan:last-child{right:0}
.bag{width:32px;height:36px;display:grid;place-items:center;background:#B9A1F0;color:var(--ink);font:700 19px/1 var(--hand);border-radius:12px 12px 5px 5px}
.blk{width:14px;height:14px;background:var(--q)}
.post{position:absolute;left:50%;top:66px;bottom:0;width:7px;margin-left:-3.5px;background:#C4894A}
.post:after{content:"";position:absolute;left:-40px;right:-40px;bottom:0;height:7px;background:#C4894A}

@media (max-width:760px){.scale{height:150px}.beam{top:42px}.post{top:44px}.bag{width:26px;height:30px;font-size:17px}.blk{width:11px;height:11px}}
@media (prefers-reduced-motion:reduce){.scale *{transition:none!important}}
