/* AI Jungle, saison 1 : un diorama isométrique de jour, des panneaux ivoire posés dessus, la nuit pour l'accueil. */
:root {
  --nuit: #14110E; --nuit-2: #1C1814; --ivoire-t: #EFE6D6;
  --papier: #FFFDF8; --ivoire: #F8F6F1; --encre: #221A14; --encre-2: #6B5E52; --ligne: #E3DCD1; --ligne-2: #D6CCBD;
  --vert: #3F6B47; --sauge: #8DB38A; --or: #C9A45C; --or-2: #A9833A; --brique: #C8754F; --teal: #2FA39A; --bleu: #5D8FB5; --violet: #8A6FB3;
  --glass: rgba(255, 253, 248, .86); --glass-b: rgba(255, 255, 255, .7);
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px -12px rgba(60, 40, 20, .35), 0 2px 6px rgba(60, 40, 20, .08);
  --serif: "Fraunces", Georgia, serif; --sans: "Instrument Sans", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 16px; --panel-w: 440px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--sans); color: var(--encre); background: radial-gradient(120% 90% at 30% 10%, #FBF6EC 0%, #F1E8D6 45%, #E2D9C2 100%); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.muted { color: var(--encre-2); }
.ok { color: var(--vert); } .ko { color: var(--brique); }
.kicker { font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--vert); }
.gs { font-size: 12.5px; color: var(--encre-2); }
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--glass-b); box-shadow: var(--shadow); border-radius: var(--r); }

/* ---------- the stage ---------- */
#stage { position: fixed; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 30% 10%, #FBF6EC 0%, #F1E8D6 45%, #E2D9C2 100%); }
#world { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.w-label { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 8px 4px; border-radius: 9px; background: rgba(255, 253, 248, .92); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 4px 12px -6px rgba(60, 40, 20, .45); white-space: nowrap; transition: opacity .3s; will-change: transform; }
.w-label span { font: 600 11px/1.2 var(--sans); color: var(--encre); }
.w-label b { font: 500 10.5px/1.2 var(--mono); color: var(--encre-2); }
.w-label b:empty { display: none; }
.w-label[data-tone="good"] b { color: var(--vert); } .w-label[data-tone="bad"] b { color: var(--brique); }
.w-label[data-tone="gold"] { background: #FFF6DF; } .w-label[data-tone="teal"] b { color: var(--teal); }
.w-label[data-tone="off"] b { color: #9C9084; }
.w-label[data-key^="c:"] { padding: 2px 7px 3px; }
.w-label[data-key^="c:"] span { font-size: 10.5px; }
.w-bubble { position: absolute; left: 0; top: 0; max-width: 200px; padding: 6px 10px; border-radius: 12px 12px 12px 3px; background: #fff; color: var(--encre); font: 500 12px/1.3 var(--sans); box-shadow: 0 8px 20px -8px rgba(40, 30, 20, .45); opacity: 0; transition: opacity .25s; white-space: normal; width: max-content; }
.w-bubble.in { opacity: 1; }
.w-bubble.good { background: #EEF6EA; color: #2F5A37; } .w-bubble.gold { background: #FFF3D6; color: #7A5A1A; } .w-bubble.teal { background: #E2F5F2; color: #1F6F68; } .w-bubble.off { background: #F3EEE6; color: #8A7E72; }

/* ---------- title ---------- */
.title { position: fixed; inset: 0; display: flex; align-items: center; padding: 24px clamp(16px, 4vw, 56px); pointer-events: none; }
.title-card { pointer-events: auto; width: min(520px, 100%); padding: 28px; background: rgba(20, 17, 14, .86); color: var(--ivoire-t); border-color: rgba(255, 255, 255, .08); box-shadow: 0 30px 60px -20px rgba(20, 14, 8, .55); }
.brandline { display: flex; align-items: center; gap: 10px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sauge); }
.brandline img { width: 30px; height: 30px; }
.title h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.04; margin: 16px 0 12px; }
.title h1 em { color: var(--or); font-style: italic; }
.lede { color: #D9CFBF; font-size: 15.5px; margin: 0; }
.modes { display: grid; gap: 10px; margin-top: 22px; }
.mode { display: grid; gap: 3px; text-align: left; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); color: var(--ivoire-t); transition: transform .2s, border-color .2s, background .2s; }
.mode:hover { transform: translateY(-2px); border-color: var(--or); }
.mode b { font: 400 22px/1.2 var(--serif); }
.mode span:last-child { font-size: 13px; color: #BFB3A2; }
.mode .kicker { color: var(--sauge); }
.mode.primary { background: var(--or); border-color: var(--or); color: var(--nuit); }
.mode.primary .kicker, .mode.primary span:last-child { color: #3B2A10; }
.mode.primary:hover { background: #D6B36C; }
.title-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 16px; font-size: 13px; }
.pill { border: 1px solid var(--sauge); color: var(--sauge); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.pill.ghost { border-color: rgba(255, 255, 255, .2); color: #BFB3A2; }
.linkish { background: none; border: 0; padding: 0; color: var(--sauge); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.proof { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 14px 0 0; margin: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; color: #BFB3A2; }
.proof b { font: 500 13px var(--mono); color: var(--ivoire-t); }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 8px 12px; }
.brand { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 0; flex: none; }
.brand img { width: 30px; height: 30px; }
.brand span { display: grid; text-align: left; }
.brand b { font: 400 16px/1.1 var(--serif); }
.brand i { font: normal 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2); }
.timeline { flex: 1; min-width: 0; padding: 16px 6px 4px; }
.tl-track { position: relative; height: 6px; border-radius: 6px; background: #E9E1D2; }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--sauge), var(--vert)); transition: width .5s; }
.tl-turn { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--ligne-2); transform: translate(-50%, -50%); }
.tl-turn.past { border-color: var(--vert); background: var(--vert); } .tl-turn.now { border-color: var(--or); background: var(--or); box-shadow: 0 0 0 4px rgba(201, 164, 92, .25); }
.tl-ev { position: absolute; top: -12px; transform: translateX(-50%); width: 2px; height: 9px; background: var(--ligne-2); }
.tl-ev em { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); font: normal 9.5px/1 var(--mono); color: var(--encre-2); white-space: nowrap; }
.tl-ev:last-child em, .tl-ev.end em { transform: translateX(-100%); }
.tl-ev.past em { color: #B5AA9B; }
.tl-head { position: absolute; top: 50%; width: 4px; height: 18px; border-radius: 3px; background: var(--encre); transform: translate(-50%, -50%); transition: left .5s; }
.datepill { flex: none; font: 500 12.5px var(--mono); padding: 6px 12px; border-radius: 999px; background: var(--encre); color: var(--ivoire); }
.speed { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #EFE8DB; flex: none; }
.speed button { border: 0; background: transparent; border-radius: 999px; padding: 3px 9px; font: 500 12px var(--mono); }
.speed button[aria-pressed="true"] { background: var(--encre); color: var(--ivoire); }

/* ---------- gauges, mission, feed ---------- */
.gauges { position: fixed; left: 12px; top: 86px; z-index: 4; width: 216px; display: grid; gap: 8px; }
.gauge { padding: 9px 12px 10px; display: grid; gap: 3px; border-radius: 13px; }
.gl { font: 500 9.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2); }
.gauge b { font: 500 19px/1.15 var(--mono); white-space: nowrap; }
.gauge.good b { color: var(--vert); } .gauge.bad b { color: var(--brique); }
.gbar { display: block; height: 5px; border-radius: 5px; background: #EAE2D3; overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: 5px; background: var(--encre-2); transition: width .45s; }
.gbar.gold i { background: var(--or); } .gbar.sage i { background: var(--sauge); } .gbar.bad i { background: var(--brique); }
.mission { padding: 10px 12px; border-radius: 13px; display: grid; gap: 4px; background: rgba(255, 249, 234, .92); }
.mission p { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.mission p i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ligne-2); flex: none; }
.mission p i.ok { background: var(--vert); border-color: var(--vert); box-shadow: inset 0 0 0 2px #fff; }
.feed { position: fixed; left: 12px; bottom: 12px; z-index: 4; width: 300px; pointer-events: none; }
.feed-h { font: 500 9.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2); margin: 0 0 4px 4px; }
.feed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed li { display: flex; gap: 8px; align-items: center; font-size: 12px; padding: 5px 9px; border-radius: 10px; background: rgba(255, 253, 248, .85); box-shadow: 0 4px 10px -6px rgba(60, 40, 20, .3); animation: feedin .35s ease-out; }
.feed li .d { font: 11px var(--mono); color: var(--encre-2); flex: none; }
.feed li span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li.signed { background: #EEF6EA; } .feed li.churn, .feed li.lost { color: #8A7E72; }
@keyframes feedin { from { opacity: 0; transform: translateY(6px); } }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--encre-2); }
.dot.gold { background: #D9A441; } .dot.blue { background: var(--bleu); } .dot.violet { background: var(--violet); } .dot.green { background: var(--vert); } .dot.ivory { background: #CFC7B8; } .dot.teal { background: var(--teal); }

/* ---------- the panel ---------- */
.panel { position: fixed; right: 12px; top: 86px; bottom: 12px; z-index: 5; width: var(--panel-w); overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 0; scrollbar-width: thin; }
.panel h2 { font-size: 30px; line-height: 1.1; margin: 6px 0 12px; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tokens { display: flex; align-items: center; gap: 4px; flex: none; }
.tokens i { width: 12px; height: 15px; background: linear-gradient(160deg, #9FF0E8, var(--teal)); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); }
.tokens i.used { background: #DDD5C7; }
.tokens em { font: normal 11px var(--mono); color: var(--encre-2); margin-left: 4px; }
.speaker { display: flex; gap: 10px; align-items: flex-start; }
.ava { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--sans); color: #fff; background: var(--encre-2); }
.ava.sm { width: 24px; height: 24px; font-size: 11px; }
.ava.f { background: var(--encre); color: var(--or); font-family: var(--serif); }
.ava.q { background: var(--vert); } .ava.g { background: #D9A441; } .ava.b { background: var(--bleu); } .ava.h { background: var(--brique); } .ava.e { background: var(--violet); }
.say { background: #fff; border-radius: 4px 14px 14px 14px; padding: 10px 13px; box-shadow: 0 6px 16px -10px rgba(60, 40, 20, .4); font-size: 14px; min-width: 0; }
.say p { margin: 0 0 6px; } .say p:last-child { margin: 0; }
.diag { margin-top: 14px; padding: 13px; border-radius: 14px; background: #FFF6E3; border: 1px solid #F1DFB6; }
.diag.done { background: #FBF8F2; border-color: var(--ligne); }
.diag-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diag-h b { font-size: 14px; } .diag-h .gs { margin-left: auto; }
.diag .q { margin: 8px 0 10px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--ligne-2); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; transition: border-color .15s, transform .15s; }
.chip:hover:not([disabled]) { border-color: var(--encre); transform: translateY(-1px); }
.chip.right { border-color: var(--vert); background: #EEF6EA; color: #2F5A37; } .chip.wrong { border-color: var(--brique); background: #FBEDE6; color: #8E4A2C; }
.chip.pending { border-color: var(--or); }
.chip[disabled] { cursor: default; }
.verdict { margin: 10px 0 0; font-size: 13.5px; }
.verdict b { color: var(--vert); } .verdict.no b { color: var(--brique); }
.dec { margin-top: 14px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--ligne); transition: opacity .3s; scroll-margin-top: 10px; }
.dec.locked { opacity: .5; }
.dec-h { display: flex; gap: 10px; align-items: center; }
.dec-h .num { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--encre); color: var(--ivoire); display: grid; place-items: center; font: 500 12px var(--mono); }
.dec h3 { font: 600 15px/1.3 var(--sans); }
.help { font-size: 13px; color: var(--encre-2); margin: 6px 0 12px; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.opts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; text-align: left; display: grid; align-content: start; gap: 2px; padding: 10px 10px 9px; border-radius: 12px; border: 1.5px solid var(--ligne); background: #FBF8F2; transition: border-color .15s, background .15s, transform .15s; min-width: 0; }
.opt:hover:not([disabled]) { border-color: var(--encre-2); transform: translateY(-1px); }
.opt b { font: 600 14px/1.2 var(--sans); padding-right: 26px; }
.opt span { font-size: 11.5px; line-height: 1.3; color: var(--encre-2); }
.opt[aria-pressed="true"] { border-color: var(--encre); background: #fff; box-shadow: 0 0 0 3px rgba(34, 26, 20, .08); }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.opt .sc { position: absolute; top: 9px; right: 8px; font: normal 500 11px var(--mono); color: var(--encre-2); }
.twinpick { position: absolute; top: -9px; left: 8px; font: 500 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--teal); border-radius: 999px; padding: 2px 7px; }
.opt:has(.twinpick) { border-color: rgba(47, 163, 154, .55); }
.opt:has(.twinpick)[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 163, 154, .15); }
.warn { color: var(--brique); margin: 8px 0 0; }
.sim { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1.5px dashed rgba(47, 163, 154, .6); background: #F1FAF8; color: #1F6F68; font-weight: 600; font-size: 13.5px; transition: background .15s; }
.sim:hover:not([disabled]) { background: #E2F5F2; }
.sim[disabled] { opacity: .6; cursor: default; }
.crys { width: 12px; height: 15px; flex: none; display: inline-block; background: linear-gradient(160deg, #9FF0E8, var(--teal)); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.council { margin-top: 12px; border-top: 1px solid var(--ligne); padding-top: 10px; }
.council-h { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #1F6F68; }
.fanchart { width: 100%; height: auto; display: block; margin: 6px 0 8px; }
.fanchart .ray { fill: none; stroke: var(--teal); stroke-width: .8; opacity: .1; }
.fanchart .band { fill-opacity: .3; stroke: currentColor; stroke-opacity: .35; stroke-width: 1; stroke-dasharray: 3 3; }
.fan-note { font-size: 11.5px; color: var(--encre-2); margin: -2px 0 10px; }
.gauge.pulse { animation: pulse .9s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 107, 71, .55), var(--shadow); transform: scale(1.04); } 100% { box-shadow: 0 0 0 14px rgba(63, 107, 71, 0), var(--shadow); transform: none; } }
.mission #gate-p b { color: var(--teal); }
.fanchart .median { fill: none; stroke: #1F6F68; stroke-width: 2.2; }
.fanchart .other { fill: none; stroke: var(--encre-2); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .7; }
.fanchart .past { fill: none; stroke: var(--encre); stroke-width: 2.2; }
.fanchart .goal { stroke: var(--or); stroke-width: 1; stroke-dasharray: 4 3; }
.fanchart .now { stroke: var(--ligne-2); stroke-width: 1; }
.fanchart .grid { stroke: var(--ligne); stroke-width: .6; }
.ax { font: 10px var(--mono); fill: var(--encre-2); }
.ax.gold { fill: var(--or-2); font-weight: 500; } .ax.teal { fill: #1F6F68; }
.ppl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ppl li { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 6px 8px; border-radius: 11px; background: #FBF8F2; }
.ppl li .ava { width: 28px; height: 28px; font-size: 11.5px; }
.ppl li b { display: block; font-size: 12px; } .ppl li span { display: block; font-size: 12.5px; line-height: 1.3; color: var(--encre); }
.ppl li em { font: normal 500 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; }
.ppl li.pour em { background: #E3F0DF; color: #2F5A37; } .ppl li.mitige em { background: #FFF1D3; color: #7A5A1A; } .ppl li.contre em { background: #FBE3D8; color: #8E4A2C; }
.launch { position: sticky; bottom: 0; margin: 16px -18px 0; padding: 14px 18px 16px; background: linear-gradient(to top, rgba(255, 253, 248, .98) 72%, rgba(255, 253, 248, 0)); }
.launch .gs { margin: 6px 0 0; text-align: center; }
.cta { border: 1.5px solid var(--encre); background: var(--encre); color: var(--ivoire); border-radius: 12px; padding: 11px 18px; font-weight: 600; transition: transform .15s, background .15s; }
@media (hover: hover) { .cta:hover:not([disabled]) { transform: translateY(-1px); background: #3A2E24; } .cta.ghost:hover:not([disabled]) { background: rgba(43, 33, 25, .07); } }
.cta[disabled] { opacity: .45; cursor: not-allowed; }
.cta.big { width: 100%; padding: 14px; font-size: 15.5px; }
.cta.ghost { background: transparent; color: var(--encre); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btns.col { flex-direction: column; padding-bottom: 18px; }
.loading { display: flex; align-items: center; gap: 10px; padding: 20px 0; color: var(--encre-2); }

/* playing: the panel shrinks to a ticker so the world is the show */
.panel.playing { top: auto; height: auto; padding-bottom: 16px; }
.play-h h2 { font-size: 26px; margin: 4px 0 4px; }
.play-h #pl-line { min-height: 2.6em; margin: 0 0 10px; }
.progress { height: 6px; border-radius: 6px; background: #EAE2D3; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sauge), var(--vert)); transition: width .4s; }

/* info card on a click in the world */
.infocard { position: fixed; z-index: 6; left: 240px; top: 86px; width: 280px; padding: 12px 34px 12px 14px; font-size: 13px; }
.infocard b { font-size: 14px; } .infocard p { margin: 4px 0 0; color: var(--encre-2); }
.infocard .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--encre-2); }

/* toasts */
.toasts { position: fixed; z-index: 30; top: 86px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 10px 14px; opacity: 0; transform: translateY(-10px) scale(.96); transition: opacity .35s, transform .35s; }
.toast.in { opacity: 1; transform: none; }
.toast b { display: block; font-size: 14px; } .toast span { font-size: 12.5px; color: var(--encre-2); }
.toast .badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--or); color: #fff; font-size: 16px; flex: none; }

/* modal (recap) */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(34, 26, 20, .32); opacity: 0; transition: opacity .25s; }
.modal.in { opacity: 1; }
.modal-box { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--papier); border-radius: 20px; padding: 24px; box-shadow: 0 30px 80px -20px rgba(20, 14, 8, .5); transform: translateY(8px); transition: transform .3s; }
.modal.in .modal-box { transform: none; }
.modal h2 { font-size: 26px; line-height: 1.15; margin: 8px 0 14px; }
.modal h3 { font: 600 13px var(--sans); margin: 18px 0 8px; }
.deltas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.delta { padding: 9px 11px; border-radius: 12px; background: #F6F1E7; display: grid; gap: 2px; min-width: 0; }
.delta b { font: 500 16px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta b.up { color: var(--vert); } .delta b.down { color: var(--brique); }
.list { font-size: 13.5px; margin: 10px 0 0; }
.list b { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }
.grades { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.grades li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: #F6F1E7; font-size: 13px; }
.grades li b { display: block; font-size: 12.5px; } .grades li span { color: var(--encre-2); }
.stars { flex: none; font: 13px/1.4 var(--mono); letter-spacing: 1px; min-width: 44px; }
.stars.s3 { color: var(--vert); } .stars.s2 { color: var(--or-2); } .stars.s1 { color: var(--brique); }
.learn { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #F1FAF8; color: #1F5F59; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; }
.achs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ach-chip { padding: 5px 11px; border-radius: 999px; background: #FFF3D6; color: #7A5A1A; font-size: 13px; font-weight: 600; }
.hyp { padding-left: 18px; font-size: 13.5px; color: var(--encre-2); } .hyp li { margin: 6px 0; }

/* end */
.panel.end h3 { font: 600 13px var(--sans); margin: 20px 0 8px; }
.end-hero { display: flex; gap: 16px; align-items: center; }
.end-hero h2 { font-size: 28px; margin: 4px 0 4px; } .end-hero p { margin: 0 0 8px; font-size: 14px; }
.ring { width: 120px; height: 120px; flex: none; }
.ring .bg { fill: none; stroke: #EAE2D3; stroke-width: 11; } .ring .fg { fill: none; stroke: var(--or); stroke-width: 11; stroke-linecap: round; }
.ring .big { font: 500 38px var(--mono); fill: var(--encre); }
.verdict-chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: #F3EEE6; font-size: 13px; font-weight: 600; }
.verdict-chip.ok { background: #E3F0DF; color: #2F5A37; } .verdict-chip.ko { background: #FBE3D8; color: #8E4A2C; }
.swarm { width: 100%; height: auto; display: block; }
.swarm .dots circle { fill: var(--teal); opacity: .55; }
.swarm .me { stroke: var(--or); stroke-width: 2.5; } .swarm .twin { stroke: var(--teal); stroke-width: 1.5; stroke-dasharray: 3 3; }
.achgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ach { padding: 8px; border-radius: 12px; background: #F3EEE6; display: grid; gap: 1px; opacity: .55; }
.ach span { color: #B5AA9B; } .ach b { font-size: 12px; line-height: 1.2; } .ach em { font: normal 10.5px/1.3 var(--sans); color: var(--encre-2); }
.ach.on { background: #FFF3D6; opacity: 1; } .ach.on span { color: var(--or-2); }
.parts { display: grid; gap: 6px; }
.part { display: grid; grid-template-columns: 104px 1fr 76px; gap: 8px; align-items: center; font-size: 13px; }
.part .n { font: 12px var(--mono); text-align: right; }

/* ---------- case mode: the world fades behind ivory paper ---------- */
body.case #stage { filter: blur(3px) saturate(.8); opacity: .5; }
body.case { overflow-y: auto; }
body.case #ui { position: relative; z-index: 2; }
.case-bar { position: sticky; top: 12px; margin: 12px; justify-content: space-between; }
.case-main { max-width: 860px; margin: 0 auto; padding: 14px 16px 130px; }
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps span { flex: 1; height: 5px; border-radius: 5px; background: rgba(34, 26, 20, .12); }
.steps span.done { background: var(--vert); } .steps span.now { background: var(--or); }
.bubble { background: var(--papier); border: 1px solid var(--ligne); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.who { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.who b { display: block; } .who span { display: block; font-size: 12.5px; color: var(--encre-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--encre); color: var(--or); font: 400 16px var(--serif); flex: none; }
.case p { margin: 0 0 8px; }
.q { font-size: 15.5px; }
.exhibit { background: var(--papier); border: 1px solid var(--ligne); border-radius: var(--r); padding: 16px; margin-bottom: 14px; overflow-x: auto; box-shadow: var(--shadow); }
.ex-num { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--vert); }
.ex-title { font: 400 21px/1.25 var(--serif); margin: 4px 0 2px; }
.ex-sub { font-size: 12.5px; color: var(--encre-2); margin-bottom: 10px; }
.ex-src { font-size: 11.5px; color: var(--encre-2); margin-top: 10px; }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th, .dt td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.dt th { font: 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); font-weight: 400; }
.dt .n, .dt td.n { font-family: var(--mono); text-align: right; }
.mono { font-family: var(--mono); }
.hb { height: 10px; background: #EAE4D9; border-radius: 6px; overflow: hidden; min-width: 60px; }
.hb i { display: block; height: 100%; background: var(--vert); }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { text-align: left; background: var(--papier); border: 1.5px solid var(--ligne); border-radius: 12px; padding: 11px 13px; color: var(--encre); }
.choice:hover:not([disabled]) { border-color: var(--encre-2); }
.choice[aria-pressed="true"] { border-color: var(--vert); box-shadow: inset 0 0 0 1px var(--vert); }
.choice.right { border-color: var(--vert); background: #EEF3EC; } .choice.wrong { border-color: var(--brique); background: #F8ECE5; }
.case .verdict { padding: 12px 14px; border-radius: 12px; background: #F1EDE5; border-left: 3px solid var(--vert); color: var(--encre); margin-bottom: 14px; }
.case .verdict.no { border-left-color: var(--brique); }
.case .verdict b { color: var(--encre); }
.tag { font: 11.5px var(--mono); color: var(--encre-2); }
.numin { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.numin input { font: 500 20px var(--mono); width: 170px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--ligne); border-radius: 10px; background: #fff; color: var(--encre); }
.case textarea { width: 100%; min-height: 110px; font: 15px/1.5 var(--sans); padding: 12px; border: 1px solid var(--ligne); border-radius: 10px; background: #fff; color: var(--encre); resize: vertical; }
.tree { display: grid; gap: 4px; font-size: 13.5px; }
.tree .root { font-weight: 600; } .tree .br { padding-left: 14px; border-left: 2px solid var(--ligne); }
.checks label { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-size: 14px; }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.score-grid .delta .l { font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); }
.score-grid .delta .v { font: 500 17px var(--mono); }
.commit { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; border-radius: var(--r); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.commit .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; max-width: 860px; margin: 0 auto; }
.commit .note { font-size: 13px; color: var(--encre-2); min-width: 0; }
.timer { font: 500 13px var(--mono); }
.timer.late { background: var(--brique); }

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
  :root { --panel-w: 400px; }
  .gauges { width: 190px; }
  .feed { display: none; }
  .infocard { left: 212px; }
}
/* ---------- phone: the world on top, the panel below ---------- */
@media (max-width: 820px) {
  body.is-game { overflow-y: auto; }
  body.is-game #stage { transition: height .4s; position: fixed; top: 0; left: 0; right: 0; height: 32vh; height: 32svh; z-index: 3; box-shadow: 0 12px 24px -18px rgba(40, 30, 20, .5); }
  body.is-game #ui { padding-top: 32svh; }
  body.is-game .panel { z-index: 2; }
  body.is-game .topbar, body.is-game .gauges { z-index: 6; }
  .dec, #decs, #diag { scroll-margin-top: calc(32svh + 12px); }
  body.is-game:not(.is-playing).scrolled #stage { height: 22svh; }
  body.is-game:not(.is-playing).scrolled .gauges { top: calc(22svh - 52px); }
  body.is-game:not(.is-playing):not(.is-end).scrolled .dec, body.is-game.scrolled #diag { scroll-margin-top: calc(22svh + 12px); }
  body.is-game.is-playing #stage { height: 64svh; }
  body.is-game.is-playing #ui { padding-top: 64svh; }
  body.is-game.is-playing .gauges { top: calc(64svh - 58px); }
  body.is-game .panel.playing { min-height: 0; padding-bottom: 20px; }
  .w-label:not([data-key="qg"]):not([data-key="banque"]):not([data-key="maison"]) { visibility: hidden; }
  .launch { position: static; margin-top: 18px; background: none; }
  body.is-game.is-playing #stage { height: calc(100svh - 196px); }
  body.is-game.is-playing #ui { padding-top: 0; }
  body.is-game.is-playing .gauges { top: calc(100svh - 196px - 58px); }
  body.is-game .panel.playing { position: fixed; left: 0; right: 0; bottom: 0; height: 196px; min-height: 0; padding: 14px 16px; border-radius: 18px 18px 0 0; }
  .play-h h2 { font-size: 22px; } .play-h #pl-line { min-height: 0; max-height: 3.9em; overflow: hidden; }
  .title-card .lede, .title-card .proof { display: none; }
  .title-card { padding: 16px; }
  .title h1 { font-size: 26px; margin: 10px 0 4px; }
  .modes { margin-top: 12px; gap: 8px; }
  .mode { padding: 10px 12px; } .mode b { font-size: 18px; } .mode span:last-child { font-size: 12px; }
  body.is-title #overlay { display: none; }
  .topbar { top: 8px; left: 8px; right: 8px; gap: 10px; padding: 6px 10px; }
  .brand span { display: none; }
  .timeline { padding-top: 6px; }
  .tl-ev em { display: none; }
  .datepill { font-size: 11.5px; padding: 5px 9px; }
  .speed button { padding: 3px 7px; }
  .gauges { position: fixed; top: calc(32svh - 58px); left: 8px; right: 8px; width: auto; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; z-index: 3; }
  .gauges::-webkit-scrollbar { display: none; }
  .gauge { flex: 1 1 0; min-width: 0; padding: 5px 7px 6px; border-radius: 10px; }
  .gauge .gl { font-size: 8.5px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gauge b { font-size: 12.5px; } .gauge .gs { display: none; }
  .mission { display: none; }
  .panel { position: relative; inset: auto; width: auto; margin: 0; border-radius: 20px 20px 0 0; overflow: visible; padding: 16px 16px 0; min-height: 54vh; }
  .panel h2 { font-size: 25px; }
  .panel.playing { position: relative; top: auto; bottom: auto; }
  .launch { margin: 16px -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .opts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .infocard { left: 8px; right: 8px; width: auto; top: 58px; z-index: 7; }
  .toasts { top: 60px; width: calc(100% - 16px); }
  .title { align-items: flex-end; padding: 12px; }
  .title-card { padding: 20px; max-height: calc(100svh - 24px); overflow-y: auto; }
  .title h1 { font-size: 30px; margin: 12px 0 10px; }
  .lede { font-size: 14px; }
  .deltas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .achgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .end-hero { flex-direction: column; align-items: flex-start; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { align-items: end; padding: 0; }
  .modal-box { border-radius: 20px 20px 0 0; max-height: 88svh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .w-label[data-key^="c:"] { display: none; }
}
@media (max-width: 380px) {
  .part { grid-template-columns: 86px 1fr 56px; }
  .dt.stack thead { display: none; }
  .dt.stack tr { display: block; border-bottom: 1px solid var(--ligne); padding: 6px 0; }
  .dt.stack td { display: flex; justify-content: space-between; border: 0; padding: 3px 0; }
  .dt.stack td[data-l]::before { content: attr(data-l); font: 11px var(--mono); color: var(--encre-2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* plain captions on the ground, persona bars */
.w-label.plain { background: none; border: 0; box-shadow: none; padding: 0; }
.w-label.plain::after { display: none; }
.w-label.plain span { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(34, 26, 20, .55); }
.pk { font: 500 9.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--violet); margin: 10px 0 4px; }
.pbar { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12.5px; margin: 5px 0; }
.pbar b { font: 500 12px var(--mono); color: var(--violet); }
.pbar i { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: #ECE6F7; overflow: hidden; }
.pbar i em { display: block; height: 100%; background: var(--violet); border-radius: 5px; }
.ppl li .ava { display: grid; }
.tl-ev.low { top: auto; bottom: -12px; }
.tl-ev.low em { bottom: auto; top: 9px; }
.timeline { padding: 15px 6px 15px; }
.w-label[data-key^="c:"] span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 820px) {
  .w-label span { font-size: 10px; } .w-label b { font-size: 9.5px; }
  .w-label.plain { display: none; }
  .timeline { padding: 6px 4px; }
}
.autobar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: #E2F5F2; color: #1F5F59; font-size: 13px; font-weight: 500; }
.autobar #autosay { flex: 1; min-width: 160px; }
.linkish.dark { color: #1F5F59; }
.title .modes #go-auto { background: rgba(47, 163, 154, .14); border-color: rgba(127, 214, 207, .35); }
.title .modes #go-auto .kicker { color: #7FD6CF; }

.measured { margin: 6px 0 0; font-size: 12px; }
.scale { margin: -4px 0 8px; font-size: 11.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -2px 0 4px; font-size: 12px; color: var(--encre-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span.on { color: var(--encre); font-weight: 600; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.opt .sc { font-size: 10.5px; }

/* ---------- MBA layer: module, workshop, labs, income statement, transcript ---------- */
.opts.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module { margin: 0 0 12px; border-radius: 14px; background: var(--nuit); color: var(--ivoire-t); padding: 10px 12px; }
.module summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.module summary::-webkit-details-marker { display: none; }
.module summary b { display: block; font: 400 17px/1.2 var(--serif); }
.module summary em { display: block; font-style: normal; font-size: 12.5px; color: #CFC4B2; }
.module p { margin: 8px 0 2px; font-size: 13px; color: #E6DCCB; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 8px; }
.mcode { flex: none; font: 500 11px var(--mono); letter-spacing: .08em; padding: 4px 7px; border-radius: 7px; background: var(--or); color: var(--nuit); }
.ava.w { background: var(--teal); } .ava.c { background: var(--nuit); color: var(--or); font-family: var(--serif); }
.cta.sm { padding: 8px 14px; font-size: 13.5px; margin-top: 10px; }
.ws { margin-top: 14px; padding: 13px; border-radius: 14px; background: #EEF7F5; border: 1px solid #CBE7E2; }
.ws.done { background: #FBF8F2; border-color: var(--ligne); }
.ws.locked { opacity: .5; }
.wq { margin-top: 10px; }
.wq .q { margin: 0 0 6px; font-size: 13.5px; display: flex; gap: 8px; }
.qn { flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--teal); color: #fff; display: grid; place-items: center; font: 500 11px var(--mono); margin-top: 1px; }
.ans { display: inline-flex; align-items: center; gap: 8px; margin-left: 28px; }
.ans input { width: 130px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--ligne-2); background: #fff; font: 500 14px var(--mono); color: var(--encre); }
.ans span { font: 500 12px var(--mono); color: var(--encre-2); }
.wq.right input { border-color: var(--vert); background: #EEF6EA; } .wq.wrong input { border-color: var(--brique); background: #FBEDE6; }
.why { margin: 6px 0 0 28px; font-size: 12.5px; color: var(--encre-2); }
.why b { color: var(--encre); }
.lab { margin-top: 14px; padding: 13px; border-radius: 14px; background: #fff; border: 1px solid var(--ligne); }
.lab.locked { opacity: .5; }
.lab-h b { font: 600 15px var(--sans); display: block; } .lab-h .gs { display: block; margin-top: 2px; }
.grid-wrap { overflow-x: auto; margin-top: 10px; }
.pgrid { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: 12px; }
.pgrid th { font: 500 11px var(--mono); color: var(--encre-2); text-align: center; text-transform: capitalize; }
.pgrid th i { display: block; font-style: normal; font-size: 10.5px; color: var(--encre-2); }
.pgrid tbody th { text-align: right; padding-right: 4px; white-space: nowrap; }
.cell { width: 100%; display: grid; gap: 1px; padding: 6px 4px; border-radius: 9px; border: 1.5px solid transparent; background: rgba(63, 107, 71, calc(var(--w) * 0.5)); text-align: center; transition: transform .15s, border-color .15s; }
.cell b { font: 600 13px var(--mono); }
.cell span { font-size: 10.5px; color: #4E4339; white-space: nowrap; }
.cell:hover:not([disabled]) { transform: translateY(-1px); border-color: var(--encre-2); }
.cell.on { border-color: var(--encre); box-shadow: 0 0 0 3px rgba(34, 26, 20, .1); }
.cell[disabled] { cursor: not-allowed; opacity: .55; }
.unit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.unit div { padding: 7px 9px; border-radius: 10px; background: #F6F1E7; display: grid; gap: 1px; min-width: 0; }
.unit b { font: 500 13.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cands { display: grid; gap: 8px; margin-top: 10px; }
.cand { display: grid; gap: 6px; text-align: left; padding: 11px; border-radius: 12px; border: 1.5px solid var(--ligne); background: #FBF8F2; transition: border-color .15s, transform .15s; min-width: 0; }
.cand:hover:not([disabled]) { border-color: var(--encre-2); transform: translateY(-1px); }
.cand.on { border-color: var(--encre); background: #fff; box-shadow: 0 0 0 3px rgba(34, 26, 20, .08); }
.cand[disabled] { cursor: not-allowed; }
.cand-h { display: flex; gap: 10px; align-items: center; }
.cand-h .who { flex: 1; min-width: 0; } .cand-h b { display: block; font-size: 14px; } .cand-h em { display: block; font-style: normal; font-size: 12px; color: var(--encre-2); }
.score { font: 500 20px var(--mono); color: var(--encre); } .score small { font-size: 11px; color: var(--encre-2); }
.cv { font-size: 12.5px; color: var(--encre-2); }
.facts { display: flex; flex-wrap: wrap; gap: 4px; }
.facts span { font: 500 11px var(--mono); padding: 3px 7px; border-radius: 7px; background: #EFE8DB; }
.cand .pbar { margin: 0; }
.cand.none { grid-template-columns: 1fr; }
.pnl-wrap { overflow-x: auto; margin-top: 12px; }
.pnl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.pnl caption { text-align: left; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--encre-2); padding-bottom: 4px; }
.pnl th, .pnl td { padding: 4px 6px; border-bottom: 1px solid var(--ligne); text-align: right; white-space: nowrap; }
.pnl tbody th { text-align: left; font-weight: 400; color: var(--encre-2); }
.pnl thead th { font: 500 11px var(--mono); color: var(--encre-2); }
.pnl td { font: 500 12px var(--mono); }
.pnl tr.strong th, .pnl tr.strong td { font-weight: 700; color: var(--encre); }
.pnl td.neg { color: var(--brique); }
.transcript { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: var(--nuit); color: var(--ivoire-t); }
.transcript b { display: block; font: 400 22px var(--serif); } .transcript .gs { color: #CFC4B2; }
.letter { flex: none; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; font: 400 36px var(--serif); background: var(--or); color: var(--nuit); }
.letter.gC, .letter.gD { background: var(--brique); color: #fff; }
.modules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.modules li { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 5px 8px; border-radius: 10px; background: #F6F1E7; }
.modules li em { margin-left: auto; font: 500 12px var(--mono); font-style: normal; }
.exit { margin-top: 12px; padding: 12px; border-radius: 14px; background: #FFF6E3; border: 1px solid #F1DFB6; display: grid; gap: 2px; }
.exit b { font: 400 26px var(--serif); }
@media (max-width: 820px) {
  .unit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ans { margin-left: 0; } .why { margin-left: 0; }
  .cell span { display: none; }
}
.narrow-only { display: none; }
@media (max-width: 820px) { .wide-only { display: none; } .narrow-only { display: inline; } }
.w-bubble.bad { background: #FBEDE6; color: #8E4A2C; font-weight: 600; }
.opt:has(.twinpick) { padding-top: 18px; }
.memo-k { display: block; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 2px; }
.mopts { display: grid; gap: 5px; margin-left: 28px; }
.mopt { text-align: left; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--ligne-2); background: #fff; font-size: 13px; line-height: 1.35; }
.mopt:hover:not([disabled]) { border-color: var(--encre-2); }
.mopt.on { border-color: var(--encre); box-shadow: 0 0 0 3px rgba(34, 26, 20, .08); }
.mopt.right { border-color: var(--vert); background: #EEF6EA; } .mopt.wrong { border-color: var(--brique); background: #FBEDE6; }
.mopt[disabled] { cursor: default; }
details.ws > summary, details.diag > summary { cursor: pointer; list-style: none; }
details.ws > summary::-webkit-details-marker, details.diag > summary::-webkit-details-marker { display: none; }
details.ws > summary::after, details.diag > summary::after { content: "▾"; margin-left: 6px; color: var(--encre-2); font-size: 12px; }
details[open].ws > summary::after, details[open].diag > summary::after { content: "▴"; }
.guess { display: grid; gap: 4px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: #FFF6E3; border: 1px solid #F1DFB6; }
.guess > span:first-child { font-size: 13.5px; } .guess b { margin-right: 4px; }
.guess .ans { margin-left: 0; }
.bridge, .fcheck { margin-top: 12px; }
.br { display: grid; grid-template-columns: minmax(0, 190px) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; margin: 3px 0; }
.br span { color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br i { display: block; height: 12px; border-radius: 4px; background: var(--encre-2); }
.br.up i { background: var(--vert); } .br.down i { background: var(--brique); } .br.tot i { background: var(--or); }
.br b { font: 500 12px var(--mono); min-width: 70px; text-align: right; }
.fc3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fc3 div { padding: 8px 10px; border-radius: 10px; background: #F6F1E7; display: grid; gap: 1px; min-width: 0; }
.fc3 b { font: 500 15px var(--mono); } .fc3 em { font-style: normal; font: 500 10.5px var(--mono); color: var(--encre-2); }
.pnl tr.memo th, .pnl tr.memo td { font-style: italic; color: var(--encre-2); border-bottom: 0; }
.modules li em.fc { margin-left: 8px; color: var(--encre-2); min-width: 110px; text-align: right; }
.toast .badge.bad { background: var(--brique); color: #fff; }
.toast.bad { border-color: #F0C9B6; }
h2.ok { color: var(--vert); } h2.ko { color: var(--brique); }
@media (max-width: 820px) {
  .mopts { margin-left: 0; }
  .cell span { display: block; font-size: 9px; }
  .br { grid-template-columns: minmax(0, 120px) 1fr auto; }
  .modules li em.fc { display: none; }
}

/* V2.2: hindsight table, mobile bridge */
.hind { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.hind th { font: 500 11px var(--mono); color: var(--encre-2); text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--ligne); }
.hind td { padding: 6px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.hind td:first-child { font: 500 12px var(--mono); color: var(--encre-2); white-space: nowrap; }
.hind td:nth-child(2) { min-width: 120px; }
.ho { display: inline-flex; gap: 4px; align-items: baseline; margin: 2px 4px 2px 0; padding: 3px 7px; border-radius: 8px; background: #F6F1E7; white-space: nowrap; }
.ho b { font: 600 12px var(--mono); } .ho i { font: 400 11px var(--mono); font-style: normal; color: var(--encre-2); }
.ho.me { box-shadow: inset 0 0 0 1.5px var(--encre); background: #fff; }
.ho.best { background: #E4F0E0; box-shadow: inset 0 0 0 1.5px var(--vert); }
@media (max-width: 560px) {
  .br { grid-template-columns: 1fr auto; row-gap: 2px; }
  .br span { grid-column: 1 / -1; white-space: normal; }
  .hind td:nth-child(2) { min-width: 0; }
}

/* V2.3: score in the flow (no overlap), locked and stale readouts, lesson, call to action, boardroom */
.opt b { padding-right: 0; }
.opt .sc, .opt .sc { position: static; display: block; margin-top: 4px; font-size: 11px; }
.opt.lockd .sc { color: var(--brique); }
.dec.is-stale .council { opacity: .55; filter: saturate(.6); }
.stale-note { margin: 4px 0 6px; }
.stale-note .linkish { font-size: 12px; margin-left: 4px; }
.ws-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ws-btns .linkish { color: var(--encre-2); }
.lesson { margin: 14px 0 6px; padding: 14px 16px; border-radius: 14px; background: #10151C; color: #F4EFE6; display: grid; gap: 4px; }
.lesson .gl { color: var(--or); }
.lesson p { margin: 0; font-size: 15px; line-height: 1.45; }
.lesson b.ok { color: #9FE0C2; }
.cta-block { margin: 12px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--or); background: #FFF6E3; display: grid; gap: 10px; }
.cta-block p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--encre); }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cta-row a.cta { text-decoration: none; display: inline-flex; align-items: center; }
.cta-block.foot { border-color: var(--ligne); background: #FBF8F2; }
.title .shared { margin: 8px 0 0; padding: 8px 11px; border-radius: 10px; background: rgba(47, 163, 154, .16); color: #CFF3EE; font-size: 13.5px; }
@media (max-width: 560px) { .cta-row .cta { flex: 1 1 100%; justify-content: center; text-align: center; } }
.modes.sec { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.modes.sec .mode { padding: 10px 12px; }
.modes.sec .mode b { font-size: 17px; }
.share-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-top: 8px; border-top: 1px solid #F1DFB6; }
.share-row .linkish { font-size: 13px; }
@media (max-height: 940px) and (min-width: 821px) {
  .title-card { padding: 22px 26px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .title h1 { font-size: clamp(30px, 3.6vw, 42px); margin: 12px 0 10px; }
  .title-card .lede { font-size: 14.5px; }
  .modes { margin-top: 16px; }
}

/* The Profit Game (public): quarter bars, profit bars, focus mode, sticky play on mobile */
.modes.sec.one { grid-template-columns: 1fr; }
.pbars { margin: 6px 0 10px; display: grid; gap: 4px; }
.pb { display: grid; grid-template-columns: minmax(0, 120px) 1fr auto; align-items: center; gap: 8px; font-size: 12px; }
.pb > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--encre-2); }
.pb.on > span { color: var(--encre); font-weight: 600; }
.pb i { position: relative; height: 12px; border-radius: 6px; background: #F1ECE3; }
.pb i em { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: rgba(47, 163, 154, .35); }
.pb.on i em { background: rgba(47, 163, 154, .7); }
.pb i s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--encre); }
.pb i u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--or); text-decoration: none; }
.pb b { font: 500 12px var(--mono); }
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.qcell { position: relative; padding: 10px 10px 12px; border-radius: 12px; background: #FBF8F2; border: 1px solid var(--ligne); display: grid; gap: 2px; overflow: hidden; }
.qcell b { font: 500 15px var(--mono); }
.qcell .gs { font-size: 11px; }
.qcell i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--or); }
.qcell.ok { border-color: var(--vert); background: #EEF6EA; }
.qcell.ok i { background: var(--vert); }
.more-decs { margin-top: 10px; border: 1px dashed var(--ligne-2); border-radius: 14px; padding: 8px 12px; }
.more-decs > summary { cursor: pointer; font-size: 13px; color: var(--encre-2); list-style: none; }
.more-decs > summary b { color: var(--encre); }
.more-decs[open] > summary { margin-bottom: 8px; }
.vs-banner { margin: 8px 0 0; padding: 8px 11px; border-radius: 10px; background: rgba(201, 164, 92, .18); color: #F3DFB3; font-size: 14px; }
@media (max-width: 820px) {
  .launch { position: sticky; bottom: 0; z-index: 5; margin: 16px -16px 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(255, 253, 248, .98) 78%, rgba(255, 253, 248, 0)); }
  .title-card .lede { display: block; font-size: 13.5px; }
  .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb { grid-template-columns: minmax(0, 90px) 1fr auto; }
}
.part em { grid-column: 1 / -1; font-style: normal; margin-top: -4px; }
.lab-fold { margin: 10px 0; border: 1px solid var(--ligne, rgba(43, 33, 25, .14)); border-radius: 12px; padding: 0 12px; background: rgba(255, 255, 255, .45); }
.lab-fold > summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 13.5px; }
.lab-fold[open] > summary { border-bottom: 1px solid rgba(43, 33, 25, .1); margin-bottom: 8px; }
.pbars .note { margin-top: 8px; background: #FFF6E3; border-left: 3px solid var(--or); padding: 7px 10px; border-radius: 6px; color: var(--encre); }
.myfirm { margin: 14px 0 6px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--ligne-2); background: var(--papier); display: grid; gap: 10px; }
.mf-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mf-in label { display: grid; gap: 4px; font-size: 12.5px; color: var(--encre-2); }
.mf-in .ans { margin-left: 0; }
.mf-in .ans input { width: 100%; min-width: 0; }
.mf-out ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.mf-out .cta { display: inline-flex; text-decoration: none; margin-top: 4px; }
@media (max-width: 820px) { .mf-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .pnl { font-size: 11.5px; } .pnl th, .pnl td { padding-left: 4px; padding-right: 4px; } .pnl tbody th { max-width: 92px; white-space: normal; } }
.leadform { margin: 14px 0 6px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--or); background: #FFF6E3; display: grid; gap: 8px; }
.leadform h3 { margin: 2px 0 0; }
.leadform p { margin: 0; font-size: 13.5px; line-height: 1.45; }
#lf { display: grid; gap: 10px; }
.lf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#lf label { display: grid; gap: 4px; font-size: 12.5px; color: var(--encre-2); }
#lf input[type=text], #lf input[type=email], #lf input[type=tel], #lf select, #lf textarea { width: 100%; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--ligne-2); background: #fff; font: 500 14px system-ui, sans-serif; color: var(--encre); box-sizing: border-box; }
#lf textarea { resize: vertical; }
#lf .lf-check { grid-template-columns: 18px 1fr; align-items: start; gap: 8px; font-size: 13px; color: var(--encre); }
#lf .lf-check input { margin-top: 2px; }
#lf .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#lf-note.ko, .gs.ko { color: #A23B2A; }
.leadform .hidden { display: none; }
@media (max-width: 820px) { .lf-grid { grid-template-columns: minmax(0, 1fr); } }
/* start capture: the firm's game */
.startform { display: grid; gap: 9px; margin: 12px 0 6px; }
.startform label { display: grid; gap: 4px; font-size: 12.5px; color: var(--encre-2); }
.startform label i { font-style: normal; opacity: .7; }
.startform input[type=text], .startform input[type=email], .startform input[type=tel], .startform select { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 11px; border-radius: 10px; border: 1.5px solid var(--ligne-2); background: #fff; font: 500 14.5px system-ui, sans-serif; color: var(--encre); }
.startform .st-email input { font-size: 16px; padding: 12px; border-color: var(--encre); }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.startform .st-check { grid-template-columns: 18px 1fr; align-items: start; gap: 8px; font-size: 12.5px; color: var(--encre); }
.startform .st-check input { margin-top: 2px; }
.startform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.startform .hidden, .st-other.hidden, .st-site.hidden { display: none; }
.st-brand { display: none; }
.st-brand.loading, .st-brand.on { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--brand, var(--or)); font-size: 13px; }
.st-brand.on > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.st-brand.on > div > span { font: 12px var(--mono); color: var(--encre-2); overflow: hidden; text-overflow: ellipsis; }
.st-brand .st-name input { font-weight: 700; }
.bmark { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; flex: none; }
.bmark.lg { width: 48px; height: 48px; border-radius: 10px; padding: 4px; box-sizing: border-box; border: 1px solid var(--ligne); }
.bmark.mono { display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 800 11px system-ui, sans-serif; }
.bmark.mono.lg { font-size: 18px; border: none; }
.title-card #go-skip { justify-self: start; margin-top: 2px; font-size: 13px; }
.topbar .brand .bmark { width: 26px; height: 26px; }
html.branded .mission.glass, html.branded .gauge.glass:first-child { border-top: 3px solid var(--brand); }
@media (max-width: 820px) { .st-grid { grid-template-columns: minmax(0, 1fr); } }
.title-card .startform label, .title-card .startform .st-check { color: rgba(244, 239, 230, .82); }
.title-card .startform label i { color: rgba(244, 239, 230, .55); }
.title-card #st-note { color: rgba(244, 239, 230, .7); }
.title-card #st-note.ko { color: #F2A48F; }
.title-card .st-brand { color: var(--encre); }
.title-card .st-brand .st-name span { color: var(--encre-2); }
.title-card .st-brand.on .linkish { color: var(--encre-2); }
/* review, firm board, booking */
.endreview { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--papier); border: 1px dashed var(--ligne-2); font-size: 13.5px; }
.endreview:empty { display: none; }
.endreview .rv { display: grid; gap: 8px; flex: 1; }
.endreview .rv p { margin: 0; }
.endreview .rv .cta { justify-self: start; text-decoration: none; }
.endreview { flex-wrap: wrap; }
.fboard { flex-basis: 100%; display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--brand, var(--or)); font-size: 13.5px; color: var(--encre); }
.fboard p { margin: 0; }
.fboard ol { margin: 0; padding-left: 22px; display: grid; gap: 3px; }
.fboard li { display: flex; justify-content: space-between; gap: 10px; } .fboard li.me { font-weight: 700; }
.title-card #st-board .fboard { margin-top: 8px; }
.modal.book .modal-box { width: min(760px, 96vw); max-height: 94vh; }
.bookhead { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.bookhead h2 { margin: 4px 0 8px; }
.bookframe { width: 100%; height: min(640px, 70vh); border: 0; border-radius: 12px; background: #fff; }
