/* The Smudge Test (blocks). Soft pastel office UI over the canvas. */
:root {
  --ink: #243447; --muted: #66788c; --card: rgba(255,255,255,.94); --line: #d6dfe9;
  --seal: #2fb59a; --risk: #ec7a62; --gold: #e5ab3a; --accent: #4a9be0; --paper: #f7f4ec; --purple: #8f8de6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; --mono: ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #dbe6f1; color: var(--ink); font: 15px/1.45 var(--font); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
#nogl { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; background: #dbe6f1; font-weight: 700; z-index: 200; }
.nogl #nogl { display: flex; }

/* ----- HUD ----- */
#hud { position: fixed; top: 10px; left: 10px; right: 10px; display: none; gap: 8px; align-items: stretch; z-index: 20; pointer-events: none; flex-wrap: wrap; }
#hud.on { display: flex; }
.hb { background: var(--card); border-radius: 12px; padding: 6px 12px; box-shadow: 0 2px 10px rgba(36,52,71,.12); font-size: 12px; min-width: 96px; pointer-events: auto; }
.hb small { display: block; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hb b { font: 700 15px var(--mono); font-variant-numeric: tabular-nums; }
.hb .bar { height: 6px; border-radius: 4px; background: #e6edf4; overflow: hidden; margin-top: 4px; }
.hb .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.html-reduced .hb .bar i, .reduced .hb .bar i { transition: none; }
#h-conf-wrap .bar i { background: var(--gold); } #h-conf-wrap.low .bar i { background: var(--risk); }
#h-month-wrap.hot b { color: var(--risk); }
.brand { font-weight: 900; font-size: 13px; letter-spacing: .03em; align-self: center; } .brand span { color: var(--gold); }
.chip b.good, #h-roi.good { color: var(--seal); } #h-roi.bad { color: var(--risk); }
.btnh { border: 0; color: var(--ink); text-align: center; font-weight: 700; }
.btnh:hover { background: #fff; }

/* ----- goal, banner, prompt, toasts ----- */
#goal { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); max-width: min(560px, 86vw); background: #fff6d6; border: 2px solid var(--gold); color: #5e4300; padding: 8px 18px; border-radius: 14px; font-weight: 700; text-align: center; z-index: 21; opacity: 0; pointer-events: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; box-shadow: 0 6px 20px rgba(120,90,0,.2); }
#goal.on { opacity: 1; } #goal.pop { animation: pop .35s ease; }
@keyframes pop { from { transform: translateX(-50%) scale(.9); } to { transform: translateX(-50%) scale(1); } }
#banner { position: fixed; top: 64px; left: 12px; max-width: 320px; background: var(--card); border-left: 5px solid var(--accent); border-radius: 10px; padding: 8px 12px; z-index: 19; display: none; box-shadow: 0 4px 14px rgba(36,52,71,.15); }
#banner.on { display: block; } #banner.cb { border-left-color: var(--risk); }
#banner .bk { font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); } #banner.cb .bk { color: var(--risk); }
#banner .bt { font-weight: 800; line-height: 1.25; margin-top: 2px; }
#prompt { position: fixed; left: 50%; bottom: 190px; transform: translateX(-50%); background: rgba(36,52,71,.92); color: #fff; padding: 6px 16px; border-radius: 999px; font: 700 13px var(--mono); z-index: 21; display: none; pointer-events: none; }
#prompt.on { display: block; }
#toasts { position: fixed; top: 70px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 60; max-width: 270px; pointer-events: none; }
.toast { font: 700 12px var(--mono); padding: 8px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--line); box-shadow: 0 8px 22px rgba(36,52,71,.2); animation: tin .25s ease; }
.toast.up { color: #168068; border-color: var(--seal); } .toast.down { color: #c4492f; border-color: var(--risk); } .toast.gold { color: #94650a; border-color: var(--gold); }
@keyframes tin { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; } }

/* ----- dialogue ----- */
#dialogue { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(780px, 94vw); min-height: 96px; background: var(--card); border: 3px solid var(--pc, #aab9c8); border-radius: 18px; padding: 22px 22px 12px; z-index: 40; display: none; box-shadow: 0 12px 34px rgba(36,52,71,.25); cursor: pointer; }
#dialogue.on { display: block; }
#d-name { position: absolute; top: -14px; left: 18px; background: var(--pc, #aab9c8); color: #1c2733; font: 800 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; }
#d-text { font-size: 18px; line-height: 1.4; min-height: 50px; }
#dialogue.adviser { border-style: dashed; } #dialogue.adviser #d-text { font-style: italic; }
#d-hint { text-align: right; font: 700 11px var(--mono); color: var(--muted); height: 16px; opacity: 0; letter-spacing: .06em; text-transform: uppercase; }
#d-hint.on { opacity: 1; animation: nudge 1s ease infinite; } #d-hint.ready { color: #168068; }
@keyframes nudge { 50% { transform: translateX(-3px); } }

/* ----- choice / record panel ----- */
#center { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 45; display: none; width: min(860px, 96vw); }
#center.on { display: block; }
#center .panel { background: var(--card); border-radius: 20px; padding: 18px 20px 16px; box-shadow: 0 16px 50px rgba(36,52,71,.32); border: 3px solid var(--gold); }
#center.record .panel { border-color: var(--gold); }
.pk { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #94650a; }
.pt { font-weight: 800; font-size: 18px; margin: 4px 0 12px; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choice { position: relative; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 12px 12px 44px; color: var(--ink); transition: transform .08s, border-color .1s; }
.choice:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.choice:disabled { opacity: .55; cursor: default; }
.choice .num { position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 13px var(--mono); }
.choice .cl { display: block; font-weight: 800; font-size: 16px; }
.choice .cs { display: block; font: 600 11px var(--mono); color: var(--muted); margin-top: 3px; }
.choice .cq { display: block; font-size: 12px; font-style: italic; color: var(--muted); margin-top: 6px; }
.choice.seal { background: #e4f7f1; border-color: var(--seal); } .choice.seal .num { background: var(--seal); }
.choice.ghost { background: #eef1f5; }
.timer { display: flex; align-items: center; gap: 12px; margin-top: 14px; font: 700 12px var(--mono); color: var(--muted); }
.timer .tl { text-transform: uppercase; letter-spacing: .1em; }
.timer .tb { flex: 1; height: 16px; border-radius: 9px; background: #e6edf4; overflow: hidden; border: 1px solid var(--line); }
.timer .tb i { display: block; height: 100%; width: 100%; background: var(--gold); }
.timer .tn { min-width: 34px; text-align: right; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.timer.hot .tb i { background: var(--risk); } .timer.hot .tn { color: var(--risk); }
.timer.beat .tn { animation: beat .4s ease; } @keyframes beat { 40% { transform: scale(1.35); } }
.panel.waiting .choices { opacity: .6; }
.readybtn { margin-top: 14px; width: 100%; }
.tfield { margin-top: 12px; } .tfield label { display: block; font: 600 11px var(--mono); color: var(--muted); margin-bottom: 4px; }
.tfield input { width: 100%; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; }

/* ----- side tables ----- */
#tablebox { position: fixed; left: 12px; top: 170px; width: 340px; max-width: 46vw; background: var(--card); border-radius: 14px; padding: 10px 12px; z-index: 18; font-size: 12px; display: none; box-shadow: 0 6px 20px rgba(36,52,71,.18); max-height: 55vh; overflow: auto; }
#tablebox.on { display: block; }
#tablebox .th { font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
#tablebox .tr { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
#tablebox .tr.two { grid-template-columns: 1fr auto; } #tablebox .tr .dim { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.rag { padding: 2px 9px; border-radius: 999px; font: 700 10px var(--mono); text-transform: uppercase; }
.rag.g { background: #cdeee1; color: #14624c; } .rag.r { background: #f9d3d3; color: #9a2a3d; } .rag.a { background: #f6e5b8; color: #735812; }
.ok { color: #168068; } .no { color: #c4492f; }

/* ----- ledger drawer ----- */
#ledger { position: fixed; right: 12px; top: 64px; bottom: 12px; width: 300px; background: var(--card); border-radius: 16px; padding: 14px; z-index: 35; overflow: auto; transform: translateX(120%); transition: transform .25s; box-shadow: 0 12px 40px rgba(36,52,71,.25); }
#ledger.on { transform: none; } .reduced #ledger { transition: none; }
#ledger h4 { margin: 6px 0 8px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stackrow { display: grid; grid-template-columns: 86px 1fr 40px; gap: 8px; align-items: center; margin-bottom: 7px; font: 11px var(--mono); }
.stackrow .bar { height: 10px; border-radius: 5px; background: #e6edf4; overflow: hidden; display: flex; }
.stackrow .bar b { display: block; height: 100%; } .stackrow .r { background: var(--seal); }
.stackrow .s { background: repeating-linear-gradient(45deg, var(--risk), var(--risk) 3px, #c26753 3px, #c26753 6px); }
.stackrow .ct { text-align: right; color: var(--muted); }
.note { font: 11px var(--mono); color: var(--muted); margin: 4px 0 8px; }
#ledger-list { display: flex; flex-direction: column; gap: 7px; }
.rec { background: var(--paper); border-left: 4px solid var(--seal); border-radius: 6px; padding: 7px 9px; font: 11px var(--mono); }
.rec .top { display: flex; justify-content: space-between; color: #5b6a7a; font-size: 10px; } .rec .st { color: #148268; font-weight: 700; }
.rec .tt { font-weight: 700; margin-top: 2px; font-size: 11px; }
.rec.gap { background: transparent; border: 1px dashed var(--risk); border-left: 4px solid var(--risk); color: var(--muted); } .rec.gap .st { color: var(--risk); }

/* ----- fx + flash ----- */
#fxlayer { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.fx { font: 900 clamp(34px, 8vw, 78px)/1 var(--font); letter-spacing: .04em; padding: 8px 26px; border-radius: 10px; animation: fxin 1.2s ease forwards; }
.fx.stamp { color: #168068; border: 7px solid #168068; transform: rotate(-8deg); background: rgba(255,255,255,.55); }
.fx.smudge { color: #5c6672; background: rgba(120,130,142,.35); border-radius: 50%; padding: 30px 50px; filter: blur(.4px); }
@keyframes fxin { 0% { opacity: 0; transform: scale(1.8) rotate(-8deg); } 20% { opacity: 1; transform: scale(1) rotate(-8deg); } 80% { opacity: 1; } 100% { opacity: 0; } }
.reduced .fx { animation: none; opacity: .9; }
#flash { position: fixed; inset: 0; z-index: 65; pointer-events: none; display: none; }
#flash.on { display: block; border: 8px solid var(--risk); box-shadow: inset 0 0 90px rgba(236,122,98,.35); animation: fl .3s ease 8; }
.reduced #flash.on { animation: none; }
@keyframes fl { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }

/* ----- modal ----- */
#modal { position: fixed; inset: 0; z-index: 50; display: none; overflow: auto; background: rgba(40,56,76,.5); padding: 4vh 12px; }
#modal.on { display: block; }
#modal > .card { max-width: 760px; margin: 0 auto; background: #fbfcfe; border-radius: 22px; padding: 26px 28px; box-shadow: 0 20px 70px rgba(20,30,50,.4); }
#modal.small > .card { max-width: 480px; margin-top: 12vh; } #modal.wide > .card { max-width: 980px; }
#modal.act > .card { background: var(--paper); text-align: left; margin-top: 8vh; } #modal.report > .card { max-width: 860px; }
.kicker { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 4px 0; } .kicker.cb { color: var(--risk); }
h1 { font-weight: 900; font-size: clamp(26px, 5vw, 40px); line-height: 1.08; margin: 4px 0 12px; text-wrap: balance; }
h2 { font-weight: 900; font-size: clamp(20px, 3.6vw, 28px); line-height: 1.15; margin: 2px 0 10px; } h3 { font-size: 16px; margin: 20px 0 6px; }
.lead { font-size: 16px; max-width: 62ch; } .dim { color: var(--muted); max-width: 62ch; } .sm { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; } .row.center { justify-content: center; }
.btn { border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 800; background: var(--accent); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.btn small { opacity: .8; font: 700 10px var(--mono); margin-left: 6px; } .btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: #e9eef4; color: var(--ink); } .btn:focus-visible, .choice:focus-visible, .chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
label.fl { display: block; font: 700 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
input[type=text], input[type=email] { border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; max-width: 340px; }
.defn { font-size: 12.5px; color: var(--muted); max-width: 60ch; margin: 2px 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; } .chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12px var(--mono); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.footnote, .timing { font: 11px var(--mono); color: var(--muted); max-width: 70ch; }
.bigword { font-weight: 900; font-size: clamp(54px, 15vw, 118px); color: var(--risk); line-height: 1; margin: 8px 0; }
.cost { color: #c4492f; font-family: var(--mono); } .gain { color: #168068; font-family: var(--mono); }
/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.pcard { position: relative; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink); }
.pcard:hover { border-color: var(--accent); } .pcard.on { border-color: var(--seal); background: #e9f8f3; }
.pcard .pick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--seal); color: #fff; font: 700 12px var(--mono); display: none; align-items: center; justify-content: center; } .pcard.on .pick { display: flex; }
.pcard .ic { font-size: 22px; } .pcard h3 { margin: 4px 0 3px; font-size: 15px; padding-right: 24px; } .pcard .pitch { margin: 0; font-size: 12.5px; color: var(--muted); }
.pcard .who { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); font: 600 11px var(--mono); color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.alloc { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.abet { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.abet .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .abet .nm { font-weight: 800; }
.abet .say { font-size: 12.5px; color: var(--muted); font-style: italic; margin-top: 4px; }
.step { display: flex; align-items: center; gap: 8px; } .step button { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: #f1f5f9; font-size: 18px; }
.step .amt { font: 700 16px var(--mono); min-width: 58px; text-align: center; }
.remain { font: 14px var(--mono); margin-top: 12px; } .remain b { color: var(--gold); } .remain b.ok { color: #168068; }
.uclist { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.uc { display: flex; gap: 12px; align-items: center; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--ink); }
.uc .box { flex: none; width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 5px; } .uc.on { border-color: var(--seal); background: #e9f8f3; } .uc.on .box { background: var(--seal); border-color: var(--seal); }
.uc .nm { display: block; font-weight: 800; } .uc .hint { display: block; font-size: 12px; color: var(--muted); }
.fundline { font: 13px var(--mono); color: var(--muted); margin-top: 10px; } .fundline b { color: #94650a; }
/* paper */
.paperwrap > .card { background: transparent; box-shadow: none; padding: 0; max-width: 760px; }
.paper { position: relative; overflow: hidden; background: #f7f4ec; color: #191714; border-radius: 6px; padding: 22px 22px 26px; font-family: Georgia, "Times New Roman", serif; box-shadow: 0 24px 70px rgba(0,0,0,.5); animation: pdrop .7s cubic-bezier(.2,.9,.3,1.15) both; }
@keyframes pdrop { 0% { transform: translateY(-120vh) rotate(-9deg); } 70% { transform: translateY(0) rotate(1.5deg); } 100% { transform: none; } }
.reduced .paper { animation: none; }
.paper .mast { font-weight: 900; font-size: clamp(34px, 8vw, 56px); text-align: center; line-height: 1; border-bottom: 3px double #191714; padding-bottom: 10px; } .paper .mast i { font-style: normal; color: #a3263a; }
.paper .pmeta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid #191714; padding: 6px 0; margin-bottom: 14px; }
.paper .hl { font-weight: 900; font-size: clamp(24px, 5vw, 40px); line-height: 1.05; margin: 4px 0 8px; text-wrap: balance; } .paper .stand { font-size: 16px; font-style: italic; color: #3c372f; margin: 0 0 14px; }
.paper .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; border-top: 1px solid #191714; padding-top: 12px; }
.paper .cols h5 { margin: 0 0 4px; font-size: 15px; } .paper .cols p { margin: 0; font-size: 13px; color: #3c372f; }
.paper .stamp { position: absolute; top: 74px; right: -4px; transform: rotate(12deg); border: 3px solid #a3263a; color: #a3263a; font: 700 18px var(--mono); padding: 6px 14px; border-radius: 4px; background: rgba(247,244,236,.75); opacity: .9; }
.paper .quip { font-size: 13px; font-style: italic; color: #3c372f; border-top: 1px solid #191714; margin-top: 14px; padding-top: 10px; }
.paper .mkt { font: 12px var(--mono); border: 1px solid #191714; padding: 8px 10px; margin-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; } .paper .mkt b.dn { color: #a3263a; } .paper .mkt b.up { color: #1c6b4f; }
/* report */
.score { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.score .v { font: 700 clamp(22px, 5vw, 30px) var(--mono); } .score .k { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.v.good { color: #168068; } .v.bad { color: #c4492f; } .v.gold { color: #94650a; }
.conseq { background: #fff; border-left: 5px solid var(--accent); border-radius: 0 12px 12px 0; padding: 12px 14px; margin: 14px 0; } .conseq.bad { border-left-color: var(--risk); } .conseq.good { border-left-color: var(--seal); }
.verdict { background: var(--paper); border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-size: 15px; }
.ucres .l { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .ucres .mv { font-family: var(--mono); white-space: nowrap; }
.tbox { overflow-x: auto; } table.qmap { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; } table.qmap td, table.qmap th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.qmap th { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } td.qn { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
.cta { background: var(--paper); border-radius: 16px; padding: 18px; margin: 20px 0; } .cta h3 { margin: 10px 0 6px; font-size: 18px; } .cta .septon { font-size: 17px; font-weight: 800; margin: 0; }
.copybar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; } .copybar code { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; user-select: all; }
.copybar .btn { padding: 8px 14px; font-size: 13px; }
.lb { font: 13px var(--mono); } .lb .l { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); } .lb .l.me { background: #e9f8f3; border-radius: 6px; } .lb .r { color: var(--muted); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ----- pause ----- */
#pause { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(30,44,62,.62); color: #fff; text-align: center; }
#pause.on { display: flex; } #pause h2 { font-size: 44px; margin: 0; } #pause p { font: 700 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 700px) { .hb { min-width: 0; padding: 5px 8px; } #tablebox { top: 130px; } #goal { top: 108px; } #banner { top: 108px; } #prompt { bottom: 200px; } #dialogue { bottom: 10px; } }

/* ----- round 2: conversation panel, minimap, briefing, help ----- */
#minimap { position: fixed; top: 62px; right: 12px; z-index: 22; display: none; width: 200px; height: auto; border-radius: 10px; box-shadow: 0 2px 10px rgba(36,52,71,.18); }
#minimap.alt { width: 120px; }
#minimap.on { display: block; }
#convo { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(620px, 94vw); background: var(--card); border: 3px solid var(--pc, #aab9c8); border-radius: 18px; padding: 14px 18px 12px; z-index: 30; display: none; box-shadow: 0 12px 34px rgba(36,52,71,.25); }
#convo.on { display: block; }
#convo .cname { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#convo .ctext { font-size: 17px; font-weight: 600; min-height: 26px; margin: 4px 0 10px; }
#convo .copts { display: flex; flex-direction: column; gap: 6px; }
.copt { display: flex; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; font-weight: 700; color: var(--ink); }
.copt:hover, .copt:focus-visible { border-color: var(--accent); outline: none; }
.copt kbd { font: 800 12px var(--mono); background: #e9eef4; border-radius: 6px; padding: 2px 7px; }
.copt span { flex: 1; } .copt i { color: var(--seal); font-style: normal; font-weight: 900; }
.copt.asked { color: var(--muted); font-weight: 600; }
.copt.cta { background: #fff6d6; border-color: var(--gold); color: #5e4300; }
#d-list { display: none; margin-top: 8px; }
#d-list .li { padding: 6px 0; border-top: 1px solid var(--line); } #d-list .li b { display: block; } #d-list .li span { color: var(--muted); font-size: 13px; }
#dialogue.listing #d-list, #d-list:not(:empty) { display: block; }
#modal.brief { padding: 0; background: #fbfcfe; }
#modal.brief > .card { max-width: none; margin: 0; min-height: 100vh; border-radius: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #fbfcfe, #eaf1f9); }
.bf { max-width: 900px; padding: 24px; text-align: left; }
.bf h1 { font-size: clamp(30px, 5.5vw, 60px); line-height: 1.12; margin: 12px 0; }
.bf .bs { font-size: clamp(18px, 2.6vw, 28px); color: var(--muted); min-height: 1.4em; margin: 8px 0 20px; }
.dots { display: flex; gap: 10px; margin: 18px 0; } .dots i { width: 12px; height: 12px; border-radius: 50%; background: #d6dfe9; } .dots i.seen { background: #9cc4ea; } .dots i.on { background: var(--gold); transform: scale(1.25); }
.bf .btn { font-size: 18px; padding: 14px 26px; }
#modal .now { background: #fff6d6; border: 2px solid var(--gold); border-radius: 12px; padding: 8px 12px; }
#modal h3 { margin: 14px 0 4px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
#helpbtn { font-weight: 900; min-width: 40px; }
@media (max-width: 700px) { #minimap { top: 120px; } #convo { bottom: 10px; } }

/* ----- round 5: touch + small screens ----- */
#joy { position: fixed; left: calc(18px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 120px; height: 120px; border-radius: 50%; background: rgba(36,52,71,.18); border: 2px solid rgba(36,52,71,.35); z-index: 25; display: none; touch-action: none; }
#joy.on { display: block; }
#joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(36,52,71,.35); }
#pausebtn { display: none; }
.touch #pausebtn { display: block; }
.touch #prompt { pointer-events: auto; min-height: 44px; line-height: 30px; padding: 6px 20px; font-size: 14px; }
.touch .copt kbd, .touch .choice .num { display: none; }
.touch button, .touch .copt, .touch .choice { min-height: 44px; }
.touch .hb.btnh { min-height: 40px; min-width: 44px; }
#hud { top: calc(10px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); }
#dialogue { bottom: calc(22px + env(safe-area-inset-bottom)); max-height: 46vh; overflow: auto; }
#convo { bottom: calc(22px + env(safe-area-inset-bottom)); max-height: 60vh; overflow: auto; }
#modal { padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); -webkit-overflow-scrolling: touch; }
#modal.brief > .card { min-height: 100vh; min-height: 100dvh; }
#center { max-height: 70vh; overflow: auto; }
@media (max-width: 700px) {
  #minimap { width: 100px; top: 112px; } #minimap.alt { width: 190px; }
  .hb { padding: 4px 8px; min-width: 0; } .brand { display: none; }
  #hud { gap: 5px; } .hb small { font-size: 9px; }
  #goal { top: 104px; font-size: 13px; max-width: 70vw; left: 38%; }
  #modal > .card { padding: 18px 16px; border-radius: 16px; } #modal.small > .card { margin-top: 6vh; }
  .bf h1 { font-size: 30px; }
  #banner { top: 150px; }
}
@media (max-height: 480px) {
  #hud { gap: 4px; } .hb { padding: 3px 8px; } .brand, #h-month-wrap .bar { display: none; }
  #minimap { width: 90px; top: 52px; } #minimap.alt { width: 170px; }
  #goal { top: 50px; font-size: 12px; padding: 4px 12px; max-width: 46vw; }
  #dialogue { min-height: 0; padding: 12px 16px 8px; max-height: 52vh; } #convo { max-height: 62vh; padding: 8px 14px; width: min(560px, 64vw); left: 58%; }
  #joy { width: 100px; height: 100px; } #modal { padding-top: 2vh; padding-bottom: 2vh; } #modal.small > .card { margin-top: 2vh; }
  .bf h1 { font-size: 26px; } .bf .bs { font-size: 15px; margin: 4px 0 8px; } .dots { margin: 8px 0; }
}

/* ----- goal banner never clips or hides under the minimap ----- */
@media (max-width: 1100px) { #goal { -webkit-line-clamp: 3; left: calc(50% - 110px); max-width: calc(100vw - 260px); } }
@media (max-width: 700px) { #goal { left: calc(50% - 60px); max-width: calc(100vw - 140px); } }
/* v10.5 (24 Nov): never clip a goal that carries a tap button (on phones the button fell on line 4 and could not be tapped) */
#goal:has(.gspace), #goal:has(.gkey) { display: block; -webkit-line-clamp: unset; overflow: visible; pointer-events: auto; }
#goal button.gkey { pointer-events: auto; cursor: pointer; font: 700 11px var(--mono); color: #5e4300; }
#goal button.gkey:hover { background: #fff2c4; }

.pcard .pq { margin: 6px 0 0; font-size: 12px; font-style: italic; color: var(--ink); } .pcard .pr { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); } .pcard .pr b { color: var(--ink); }
#modal .row .btn.ghost { margin-left: 8px; }
.cta .septon + .septon { margin-top: 8px; font-weight: 600; font-size: 15px; }

.cta.hero { background: linear-gradient(160deg, #fff6d6, #ffe9a8); border: 2px solid var(--gold); text-align: center; padding: 20px 18px; }
.cta.hero h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; } .cta.hero .lead { margin: 0 0 12px; }
.leadrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.leadrow input { flex: 1 1 220px; min-height: 48px; font-size: 16px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); }
.leadrow .btn { min-height: 48px; font-size: 17px; flex: 1 1 160px; }
.cta.hero .consent { margin: 8px 0 0; } .cta.hero .row { justify-content: center; margin-top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 480px) { .cta.hero { padding: 14px 12px; } .cta.hero h2 { font-size: 19px; } }
#leadmail { scroll-margin-top: 90px; }

/* v2: flowing lists, camera reset, notes, bridge */
.hb.btnh#viewbtn { min-width: 0; padding: 6px 10px; font-size: 15px; }
#d-list .li.in, .copts .copt.in, #tablebox .trh.in { animation: flowin .25s ease-out both; }
.copts .copt.pre, #tablebox .trh.pre { opacity: 0; pointer-events: none; }
@keyframes flowin { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.reduced #d-list .li.in, .reduced .copts .copt.in, .reduced #tablebox .trh.in { animation: none; }
@media (prefers-reduced-motion: reduce) { #d-list .li.in, .copts .copt.in, #tablebox .trh.in { animation: none; } }
#gl { touch-action: none; }
.pnote { margin-top: 8px; font: 600 12px var(--mono); color: var(--muted); }
.bridgewrap .bridge { font-size: 26px; line-height: 1.25; margin: 6px 0 18px; text-align: center; }
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Septon sign-up block: white card so the wordmark stays unaltered, clear space >= the mark's height */
.cta.hero { background: #fff !important; border: 2px solid var(--gold); }
.cta.hero .brand { padding: 34px 0 28px; display: flex; justify-content: center; }
.cta.hero .brand img { width: 140px; height: auto; display: block; }
.cta.hero .wl { display: block; text-align: left; margin: 0 0 4px 2px; }
.leadrow input::placeholder { color: #8a96a5; opacity: 1; }
@media (max-width: 480px) { .cta.hero .brand { padding: 28px 0 28px; } .cta.hero .brand img { width: 112px; } }
/* choices sit low so tables and people above stay visible */
#center { top: auto; bottom: 112px; transform: translateX(-50%); max-height: 52vh; }
#tablebox { top: 150px; }
@media (max-width: 700px) { #center { bottom: 104px; max-height: 50vh; } #tablebox { top: 122px; max-height: 30vh; } }
#d-hint.on { cursor: pointer; color: var(--ink); background: #eef3f8; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; height: auto; width: fit-content; margin-left: auto; animation: none; }
#d-hint.on:hover { background: #e2ebf4; }
.choice { cursor: pointer; }
@media (max-width: 700px) { #tablebox { left: 10px; right: 10px; width: auto; max-width: none; top: 196px; max-height: 30vh; font-size: 12px; } #tablebox .tr.two { grid-template-columns: 1.1fr 1fr; } }
@media (min-width: 701px) { #tablebox { width: 420px; max-width: 48vw; } #tablebox .tr.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.rcard { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: #fafcfe; font-size: 13px; }
.rcard .rct { font: 700 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rcard .rcr { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line); }
.rcard .rcr span { color: var(--muted); } .rcard .blank { color: #b4452e; border-bottom: 1px dashed #b4452e; font-weight: 600; }
.rcard .st.ok { color: #12724f; } .rcard .st.no { color: #b4452e; }
.rcard.miss { border-color: #e9b9ad; }
/* layout v2.1: HUD row, then minimap, then toasts: nothing overlaps */
#hud { flex-wrap: wrap; }
#minimap { top: var(--hudb, 62px) !important; right: 10px; }
#toasts { top: var(--mapb, 190px) !important; right: 10px; }
.hb { min-width: 0; white-space: nowrap; }
.hb.brand { display: none; }
@media (min-width: 1000px) { .hb.brand { display: block; } }
@media (max-width: 700px) {
  #hud { gap: 4px; } .hb { padding: 4px 8px; } .hb small { font-size: 9px; }
  #goal { top: var(--hudb, 100px) !important; left: 10px !important; transform: none !important; max-width: calc(100vw - 134px) !important; font-size: 13px; padding: 6px 12px; }
  #banner { top: calc(var(--hudb, 100px) + 62px) !important; left: 10px; max-width: calc(100vw - 134px); }
  #tablebox { top: calc(var(--hudb, 100px) + 120px) !important; }
}
@media (max-width: 700px) { #toasts { top: auto !important; bottom: 250px; left: 10px; right: 10px; max-width: none; } }

/* v2.2 */
.panel .plead { font-size: 13px; color: var(--dim, #9aa3b2); margin: 2px 0 10px; line-height: 1.35; }
.paper .gkey { position: absolute; top: 118px; right: 6px; max-width: 250px; text-align: right; font: 11px/1.3 var(--mono); color: #6b6258; }
.septlink { margin: 8px 0 2px; }
.septlink a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) { .paper .gkey { position: static; max-width: none; text-align: left; margin: 6px 0; } }

/* ----- v3: portraits, plan picker, folder fly ----- */
#d-face, .cface { width: 56px; height: 56px; border-radius: 14px; background: color-mix(in srgb, var(--pc, #aab9c8) 35%, #fff); border: 2px solid var(--pc, #aab9c8); object-fit: cover; }
#d-face { position: absolute; left: 16px; top: 18px; }
#d-face[hidden] { display: none; }
#dialogue.face { padding-left: 90px; }
#convo .chead { display: flex; gap: 12px; align-items: center; } #convo .chead .cface { flex: none; } #convo .chead .cname { flex: 1; }
.gface { width: 28px; height: 28px; border-radius: 8px; vertical-align: middle; margin-right: 8px; background: #fff3; }
.choices.plans { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice.plan { padding: 12px 12px 12px 12px; }
.choice.plan .num { position: static; display: inline-flex; margin-bottom: 6px; }
.choice.plan .cl { font-size: 14px; line-height: 1.25; min-height: 52px; }
.choice.plan .cost { display: block; font: 800 18px var(--mono); margin-top: 6px; }
.choice.plan .cs { font: 600 12px var(--mono); }
.choice.plan .risk { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font: 700 11px var(--mono); background: #e4f7f1; color: #127a63; }
.choice.plan .risk.r1 { background: #fff1d6; color: #8a5a00; } .choice.plan .risk.r2 { background: #fde3e0; color: #a3302a; }
.choice.plan.off { opacity: .45; cursor: not-allowed; filter: grayscale(.8); }
.choice.plan .lack { display: block; font: 700 11px var(--mono); color: #a3302a; margin-top: 6px; }
.choice.plan.pre { visibility: hidden; } .choice.plan.in { animation: flowin .25s ease-out both; }
.choice.plan.none { background: #eef1f5; }
.pmoney { font: 700 12px var(--mono); color: var(--muted); margin-bottom: 8px; }
#center.on .panel .phelp { font-size: 12px; color: var(--muted); margin-top: 8px; }
.folderfly { position: fixed; z-index: 90; width: 28px; height: 22px; background: #f2c66d; border-radius: 3px 6px 3px 3px; border: 2px solid #b98c2c; pointer-events: none; }
.folderfly::before { content: ''; position: absolute; left: 0; top: -6px; width: 12px; height: 6px; background: #f2c66d; border: 2px solid #b98c2c; border-bottom: 0; border-radius: 3px 3px 0 0; }
#ledgerbtn.pulse { animation: lpulse .5s ease-out; } @keyframes lpulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); background: #e4f7f1; } 100% { transform: scale(1); } }
@media (max-width: 700px) { #dialogue.face { padding-left: 80px; } #d-face { width: 48px; height: 48px; left: 14px; } .choices.plans { grid-template-columns: 1fr 1fr; } .choice.plan .cl { min-height: 0; } }

#center.picker { top: 64px; transform: translate(-50%, 0); }
@media (max-width: 700px) { #center.picker { top: 112px; } .choice.plan { padding: 8px; } .choice.plan .cl { font-size: 12.5px; } .choice.plan .cost { font-size: 15px; margin-top: 2px; } .choice.plan .cs { font-size: 10.5px; } .choice.plan .num { display: none; } #center.picker .phelp { display: none; } }

/* clicks: nothing decorative steals them; the talk prompt is a real button */
#banner, #goal, #fxlayer, #flash, #toasts { pointer-events: none; }
#prompt.on { pointer-events: auto; cursor: pointer; min-height: 38px; line-height: 24px; padding: 6px 20px; }
#prompt.on:hover { background: #1c2733; }
#ledgerx { float: right; border: 0; background: #e9eef4; border-radius: 8px; padding: 4px 10px; font: 700 12px var(--mono); cursor: pointer; min-height: 32px; }

/* v4: email + pick four */
.email .mailhead{font-size:15px;line-height:1.7;border-bottom:1px solid #dfe6ee;padding-bottom:10px;margin-bottom:12px}.email .mfrom{display:inline-block;width:64px;color:#6b7787;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.email .mailbody{font-size:19px;line-height:1.45;margin:6px 0 16px}
.pf{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:12px 0}
.pfc{text-align:left;border:2px solid #dfe6ee;background:#fff;border-radius:12px;padding:10px 12px;cursor:pointer;font:inherit;color:inherit;display:flex;flex-direction:column;gap:2px}
.pfc .pfl{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#6b7787}.pfc b{font-size:16px}.pfc .pfp{font-size:13px;color:#4a5667}
.pfc.on{border-color:#1f6fb5;background:#eaf3fc}.pfc.off{opacity:.5}
@media(max-width:560px){.pf{grid-template-columns:1fr}.pfc .pfp{font-size:12px}}

.email .mailbar{display:flex;align-items:center;gap:8px;background:#eef2f7;margin:-4px -4px 10px;padding:8px 12px;border-radius:10px;font-size:13px;color:#46566a}.email .mdot{width:9px;height:9px;border-radius:50%;background:#2f7de1}.email .mtime{margin-left:auto;color:#6b7787;font-size:12px}
.email .mfrom.cc{width:auto;margin-left:6px}.email .mailhead div{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.email .mailbody p{font-size:17px;line-height:1.45;margin:0 0 10px}.email .mailbody .msign{color:#46566a;margin-top:12px}
.email .mailbtns{display:flex;gap:10px;justify-content:flex-end;align-items:center}.email .btn.ghost{background:#e6ebf1;color:#9aa6b4;box-shadow:none}

#modal .lostm{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0 12px;padding:12px 14px;border-radius:12px;background:#fff1ee;border:1px solid #f3b8ae;color:#8a2a1b}#modal .lostm b{font-size:18px}#modal .lostm .btn{font-size:18px;padding:10px 22px}#modal .sm.second{font-weight:700;color:#2f4258}

/* ----- v5: start screen blocks, advisor card, hear bar, money splits, projected vs actual ----- */
.sblocks { display: grid; gap: 12px; margin: 14px 0 4px; }
.sblock { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.sblock .sbl { font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sblock .sbb { font-weight: 900; font-size: 20px; line-height: 1.2; margin: 2px 0 4px; }
.sblock p { margin: 0; font-size: 15px; color: #3a4a5d; max-width: 60ch; }
/* the advisor, in Septon navy and teal */
#modal.advcard > .card { background: #14283c; color: #faf7f0; border: 2px solid #009f91; }
.advcard .kicker { color: #4fd1c3; } .advcard h2 { color: #fff; } .advcard .lead { color: #e6edf2; }
.advcard .btn { background: #009f91; } .advcard .btn:focus-visible { outline-color: #faf7f0; }
.advhead { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.advface { width: 56px; height: 56px; border-radius: 14px; background: #1f3b54; border: 2px solid #009f91; flex: none; }
.advname { font-weight: 800; font-size: 15px; color: #faf7f0; }
/* hear the leaders: always on screen, never under a dialogue */
#hearbar { position: fixed; top: var(--hudb, 64px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(620px, calc(100vw - 260px)); display: none; align-items: center; gap: 12px; background: #fff6d6; border: 2px solid var(--gold); border-radius: 14px; padding: 8px 10px 8px 16px; z-index: 36; box-shadow: 0 6px 20px rgba(120,90,0,.2); }
#hearbar.on { display: flex; }
#hearbar .hbt { font-weight: 700; color: #5e4300; font-size: 14px; line-height: 1.3; }
#hearbar .btn { white-space: nowrap; padding: 10px 16px; flex: none; }
@media (max-width: 1100px) { #hearbar { left: calc(50% - 110px); max-width: calc(100vw - 260px); } }
@media (max-width: 700px) { #hearbar { left: 10px; transform: none; max-width: calc(100vw - 134px); flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; } #hearbar .hbt { font-size: 12.5px; } #hearbar .btn { padding: 9px 12px; width: 100%; } }
/* split screens: pots, use cases, claw-back */
.split .srows { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 6px; }
.srow { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.srow.on { border-color: var(--seal); background: #f0faf6; }
.srow .sface { width: 48px; height: 48px; border-radius: 12px; flex: none; border: 2px solid var(--line); background: #eef3f8; object-fit: cover; }
.srow .snm { flex: 1; min-width: 0; } .srow .snm b { display: block; font-size: 16px; } .srow .ssub, .srow .shint, .srow .sleft { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.srow .step { flex: none; } .srow .step button:disabled { opacity: .35; cursor: not-allowed; }
.srow .step .amt { min-width: 62px; }
.split .remain { font-size: 15px; font-weight: 700; margin-top: 10px; } .split .remain.ok b, .split .remain.ok { color: #168068; }
.split .snote { font: 600 12px var(--mono); color: #94650a; min-height: 16px; margin-top: 4px; }
@media (max-width: 560px) { .srow { gap: 8px; padding: 8px; } .srow .sface { width: 38px; height: 38px; } .srow .snm b { font-size: 14px; } .srow .step .amt { min-width: 50px; font-size: 14px; } .srow .step button { width: 34px; height: 34px; } }
/* report: projected vs actual */
.pva { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 18px 14px; margin: 14px 0 8px; text-align: center; }
.pv .pvk { font: 700 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pvn { font: 800 clamp(28px, 7vw, 52px)/1.1 var(--mono); font-variant-numeric: tabular-nums; margin: 4px 0; color: var(--ink); }
.pvn.good { color: #168068; } .pvn.mid { color: #b7791f; } .pvn.bad { color: #c4492f; } .pvx { font-size: 18px; color: var(--muted); font-weight: 600; }
.pv .pvs { font-size: 12.5px; color: var(--muted); }
.gapline { font-size: 16px; font-weight: 700; margin: 8px 0 12px; max-width: 64ch; }
.score.two { grid-template-columns: repeat(2, minmax(110px, 1fr)); padding: 10px 14px; margin: 8px 0; }
.dstats { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.dsrow { display: grid; grid-template-columns: 124px 1fr 96px; gap: 10px; align-items: center; font-size: 13px; }
.dsrow .dsn { font-weight: 800; } .dsrow .dsn small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.dsrow .bar { height: 12px; border-radius: 6px; background: #e6edf4; overflow: hidden; display: flex; } .dsrow .bar b { display: block; height: 100%; } .dsrow .r { background: var(--seal); }
.dsrow .s { background: repeating-linear-gradient(45deg, var(--risk), var(--risk) 3px, #c26753 3px, #c26753 6px); }
.dsrow .dsc { font: 11px/1.35 var(--mono); color: var(--muted); text-align: right; }
@media (max-width: 480px) { .dsrow { grid-template-columns: 92px 1fr 80px; gap: 6px; font-size: 12px; } .pva { padding: 12px 6px; gap: 4px; } }

#toasts { z-index: 49; }   /* toasts sit under a modal screen, never on top of its buttons */
body:has(#modal.on) #toasts { visibility: hidden; }
/* the speaker's name sits inside the dialogue box (the box scrolls, so a pill hanging above it was clipped) */
#dialogue { padding-top: 36px; } #d-name { top: 8px; } #d-face { top: 34px; }
#modal .lostm.none{background:#eaf7f1;border-color:#a9dcc8;color:#146a50}

/* build tag */
#ver { position: fixed; right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 95; font: 700 10px var(--mono); letter-spacing: .08em; color: var(--muted); background: rgba(255,255,255,.75); border-radius: 6px; padding: 2px 6px; pointer-events: none; }

/* hear the leaders: one button per leader (easier than tapping seated figures) */
#hearbar.list { flex-direction: column; align-items: stretch; gap: 8px; width: min(760px, calc(100vw - 260px)); max-width: none; padding: 10px 12px; }
#hearbar .hbtop { display: flex; align-items: center; gap: 12px; }
#hearbar .hbtop .hbt { flex: 1; min-width: 0; }
#hearbar .hbl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#hearbar .hbp { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 5px 8px; color: var(--ink); font: inherit; cursor: pointer; }
#hearbar .hbp:hover { border-color: var(--accent); }
#hearbar .hbp:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
#hearbar .hbf { width: 30px; height: 30px; border-radius: 8px; flex: none; background: #eef3f8; object-fit: cover; }
#hearbar .hbn { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
#hearbar .hbn b { font-size: 13px; } #hearbar .hbn small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hearbar .hbk { display: none; position: absolute; top: 3px; right: 5px; font-style: normal; font-weight: 900; font-size: 12px; color: var(--seal); }
#hearbar .hbp.heard { background: #f0faf6; border-color: var(--seal); } #hearbar .hbp.heard .hbk { display: block; }
#hearbar .hbp.now { border-color: var(--gold); background: #fff6d6; }
@media (max-width: 1100px) { #hearbar.list { left: 10px; transform: none; width: calc(100vw - 230px); } }
@media (max-width: 700px) {
  #hearbar.list { left: 10px; right: 10px; width: auto; max-width: none; padding: 8px; gap: 6px; }
  #hearbar.list .hbtop { flex-direction: column; align-items: stretch; gap: 6px; }
  #hearbar .hbl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  #hearbar .hbf { width: 24px; height: 24px; } #hearbar .hbp { padding: 4px 6px; min-height: 40px; }
}
/* v6: Talk to Septon (top bar) */
#septonbtn { background: #14283c; color: #faf7f0; border: 2px solid #009f91; }
#septonbtn:hover { background: #1d3a55; }
#modal.contact .consent, #modal.contact .sm { color: #c9d6df; } #modal.contact .fl { color: #9fdcd4; } #modal.contact .ok { color: #6fe0c8; }
#modal.contact .btn.ghost { background: #26415a; color: #faf7f0; } #modal.contact .sel { user-select: all; color: #fff; }
#modal.contact .leadrow input { background: #fff; color: #14283c; }
@media (max-width: 700px) { #septonbtn { font-size: 12px; padding: 4px 8px; } }
/* v6: challenge a colleague */
.chal { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 16px 0; }
.chal h3 { margin: 0 0 4px; } .chal .leadrow { justify-content: flex-start; } .chal a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.chal .row { margin-top: 8px; }
.chtext { white-space: pre-wrap; word-break: break-word; font: 12px/1.45 var(--mono); background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0 6px; user-select: all; max-height: 180px; overflow: auto; }
.chin { background: #14283c; color: #faf7f0; border-left: 5px solid #009f91; border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; font-weight: 700; }
/* v6.2: leader faces on the pick-four cards */
.pfc { position: relative; padding-left: 70px; min-height: 76px; }
.pfc .pff { position: absolute; left: 10px; top: 12px; width: 50px; height: 50px; border-radius: 12px; background: #eef3f8; border: 2px solid #dfe6ee; object-fit: cover; }
.pfc.on .pff { border-color: #1f6fb5; }
@media (max-width: 560px) { .pfc { padding-left: 60px; } .pfc .pff { width: 40px; height: 40px; left: 10px; } }

/* v6.3: the share price */
#h-pxc i { font: 700 11px var(--mono); font-style: normal; } #h-pxc i.good { color: #168068; } #h-pxc i.bad { color: #c4492f; }
#h-pxc.tick-up { animation: pxup .9s ease; } #h-pxc.tick-down { animation: pxdn .9s ease; }
@keyframes pxup { 30% { background: #dff5ec; } } @keyframes pxdn { 30% { background: #fbe3de; } }
.reduced #h-pxc.tick-up, .reduced #h-pxc.tick-down { animation: none; }
.pxbox { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; margin: 8px 0 12px; }
.pxbox .pxk { font: 700 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pxbox .pxrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pxbox .pxn { font: 800 clamp(24px, 6vw, 36px)/1.1 var(--mono); font-variant-numeric: tabular-nums; } .pxbox .pxn small { font-size: 15px; }
.pxbox .pxn.good { color: #168068; } .pxbox .pxn.bad { color: #c4492f; }
.pxspark { max-width: 100%; height: auto; }
@media (max-width: 700px) { #h-pxc small { font-size: 8px; } }

/* ---------- v7: share price move, news card, goal key, leaderboard, run line, webgl card ---------- */
#h-pxc.tick-up { animation: pxup 1.3s ease; } #h-pxc.tick-down { animation: pxdn 1.3s ease; }
@keyframes pxup { 0% { transform: scale(1); } 15% { transform: scale(1.14); background: #8ee3c0; box-shadow: 0 0 0 3px #168068, 0 0 22px 6px rgba(22,128,104,.65); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22,128,104,0); } }
@keyframes pxdn { 0% { transform: scale(1); } 15% { transform: scale(1.14); background: #f6a99a; box-shadow: 0 0 0 3px #c4492f, 0 0 22px 6px rgba(196,73,47,.65); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(196,73,47,0); } }
.reduced #h-pxc.tick-up { animation: none; background: #8ee3c0; box-shadow: 0 0 0 3px #168068; } .reduced #h-pxc.tick-down { animation: none; background: #f6a99a; box-shadow: 0 0 0 3px #c4492f; }
.pxchip { position: fixed; z-index: 60; pointer-events: none; font: 900 clamp(24px, 6vw, 38px) var(--mono); letter-spacing: -.02em; transform: translate(calc(-50% + var(--dx, 0px)), 0); padding: 2px 10px; border-radius: 12px; background: rgba(255,255,255,.92); border: 3px solid currentColor; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: pxfloat 1.8s ease-out forwards; white-space: nowrap; }
.pxchip.up { color: #0f7a5f; } .pxchip.dn { color: #c4492f; }
@keyframes pxfloat { 0% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 8px) scale(.7); } 12% { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), 0) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -46px) scale(1); } }
.reduced .pxchip { display: none; }

.news { position: fixed; right: 16px; bottom: 150px; width: min(340px, calc(100vw - 32px)); z-index: 34; padding: 12px 14px; opacity: 0; transform: translateX(40px); transition: opacity .3s ease, transform .3s ease; box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.news.in { opacity: 1; transform: none; } .news.out { opacity: 0; transform: translateX(40px); }
.news .nlab { font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; } .news .nlab b { letter-spacing: 0; text-transform: none; }
.news .nhead { font-weight: 800; font-size: 15px; line-height: 1.25; margin: 3px 0 4px; } .news .nbody { font-size: 13px; line-height: 1.4; }
.news .nbtn { margin-top: 8px; padding: 6px 14px; font-size: 13px; }
.news.paper { background: #f1ead6; color: #191714; border: 1px solid #191714; border-radius: 3px; font-family: Georgia, 'Times New Roman', serif; transform: translateX(40px) rotate(1.2deg); } .news.paper.in { transform: rotate(-.6deg); }
.news.paper .nmast { font-weight: 900; font-size: 24px; text-align: center; line-height: 1; border-bottom: 3px double #191714; padding-bottom: 6px; margin-bottom: 6px; } .news.paper .nmast i { font-style: normal; color: #a3263a; }
.news.email { background: #fff; border: 1px solid var(--line); border-left: 5px solid #2f6fd0; border-radius: 10px; } .news.email .nlab { color: #2f6fd0; opacity: 1; }
.news.text { background: #e9f1ff; color: #12263f; border-radius: 18px 18px 18px 4px; border: 1px solid #c3d6f5; } .news.text .nhead { font-size: 14px; }
@media (max-width: 700px) { .news { right: 10px; left: 10px; bottom: auto; top: calc(var(--mapb, 190px) + 4px); width: auto; max-height: 34vh; overflow: auto; } }
@media (prefers-reduced-motion: reduce) { .news, .news.paper { transition: none; transform: none; } }
.reduced .news, .reduced .news.paper { transition: none; transform: none; }

#goal .gkey { display: inline-block; margin-left: 10px; padding: 1px 8px; font: 700 11px var(--mono); border: 1px solid #5e4300; border-bottom-width: 3px; border-radius: 5px; background: #fff; vertical-align: 1px; }
#goal .gspace { pointer-events: auto; margin-left: 10px; padding: 4px 12px; font-size: 12px; vertical-align: middle; }
#goal:has(.gspace) { pointer-events: auto; }

.lb .lbg { display: block; font-size: 10px; color: var(--muted); text-align: right; }
.runline { font: 700 12px var(--mono); color: var(--muted); margin: 2px 0 8px; }
.namenote { font-size: 12px; color: var(--muted); margin-top: 4px; }
.webglfail { position: fixed; inset: 0; z-index: 999; background: #12202b; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: system-ui, sans-serif; }
.webglfail .card { background: #fff; color: #17212b; border-radius: 18px; padding: 24px; max-width: 460px; width: 100%; text-align: center; } .webglfail h1 { font-size: 22px; margin: 0 0 10px; } .webglfail .lead { font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.webglfail .btn { font: 700 15px system-ui, sans-serif; padding: 10px 22px; border-radius: 12px; border: 0; background: #168068; color: #fff; cursor: pointer; }

/* hear-the-leaders bar on phones: a compact strip at the bottom, above the dialogue, so the Boardroom stays visible */
@media (max-width: 600px) {
  #hearbar, #hearbar.list { top: auto !important; bottom: calc(10px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; max-width: none; transform: none; z-index: 41; padding: 6px 8px; gap: 4px; max-height: 30vh; overflow: auto; }
  #hearbar .hbtop { flex-direction: row; align-items: center; gap: 8px; } #hearbar .hbtop .hbt { font-size: 12px; } #hearbar .hbtop .btn, #hearbar .btn { width: auto; padding: 7px 10px; font-size: 13px; }
  #hearbar .hbl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } #hearbar .hbp { min-height: 34px; padding: 3px 4px; } #hearbar .hbf { display: none; } #hearbar .hbn small { display: none; } #hearbar .hbn b { font-size: 11px; }
}

/* v7.1: news cards are email-sized and centred; the decision file shows the why and the decision types */
.email.newscard .nmast { font: 900 22px/1 Georgia, serif; letter-spacing: .02em; border-bottom: 3px double #1b2633; padding-bottom: 8px; margin-bottom: 10px; text-align: center; }
.email.newscard .nmast i { font-style: normal; font-weight: 400; font-size: 12px; margin-left: 8px; color: #6b7787; }
.email.newscard .nlab { font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6b7787; } .email.newscard .nlab b { letter-spacing: 0; text-transform: none; color: #1b2633; }
.email.newscard .nhead { font-weight: 800; font-size: 24px; line-height: 1.2; margin: 6px 0 10px; }
.email.newscard.paper .nhead { font-family: Georgia, serif; }
.email.newscard .nbody { font-size: 17px; line-height: 1.45; margin-bottom: 16px; }
#ledger .rec .why { font-size: 12px; font-style: italic; color: var(--muted); margin-top: 3px; }
#ledger .rec .ty { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
#ledger .stackbox { margin-top: 14px; border-top: 1px solid #dfe6ee; padding-top: 10px; }
#ledger .stackbox h5 { margin: 0 0 8px; font-size: 13px; }
#center .panel .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.email.newscard.paper .nlab { display: none; }
/* v8: the line at 25 on the board confidence bar */
#h-conf-wrap .bar { position: relative; overflow: visible; }
#h-confline { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #d0453a; border-radius: 1px; }
#h-conf-wrap.low { box-shadow: inset 0 0 0 2px #d0453a; }
.email.mailchoice .mailbtns .btn.ghost { background: #e6ebf1; color: #46566a; box-shadow: none; }

/* ============================================================
   v9: launch build
   ============================================================ */
[hidden] { display: none !important; }
.brand span { color: #009f91; }
#h-buff { background: #fff6d6; border: 2px solid var(--gold); color: #5e4300; font: 700 12px var(--mono); align-self: center; min-width: 0; }

/* the start screen: three fields, once */
.ibrand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .ibrand img { height: 30px; width: auto; mix-blend-mode: multiply; } .ibrand span { font: 800 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #009f91; border-left: 2px solid var(--line); padding-left: 10px; }
#iform .flds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
#iform .fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#iform .fl { font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#iform input { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--ink); font-size: 16px; }
#iform input:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
#iform .row { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; } #iform .itime { font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#iform .consent { margin-top: 8px; color: var(--muted); } .namenote.bad { color: #c4492f; font-weight: 700; }
@media (max-width: 720px) { #iform .flds { grid-template-columns: 1fr; gap: 8px; } }

/* where you rank */
.pctbox { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: #14283c; color: #faf7f0; }
.pctbox .pctk { font: 700 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #9fdcd4; }
.pctbox .pctload { color: #c9d6df; }
.pctrow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.pctn { font: 900 clamp(30px, 7vw, 46px) var(--mono); letter-spacing: -.03em; white-space: nowrap; } .pctn.good { color: #6fe0c8; } .pctn.mid { color: #ffd86b; } .pctn.bad { color: #ff9c8a; }
.pctr { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; min-width: 0; } .pctr .sm { color: #c9d6df; font-size: 12px; }
.pctbar { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #ec7a62, #e5ab3a 50%, #2fb59a); margin: 6px 0 4px; }
.pctbar i { position: absolute; top: -5px; width: 6px; height: 20px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px #14283c; }
.lb.co .l { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: baseline; } .lb.co .l > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.lb.co .l.seed { color: var(--muted); } .lb.co .l.gap { border: 0; padding: 0 4px; color: var(--muted); }
.lb .you { font: 700 9px var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; background: var(--seal); color: #fff; border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: 1px; }
.lb .lbg.l2 { text-align: left; } .lbnote { margin: 0 0 6px; }
.septlink a { color: #9fdcd4; }
@media (max-width: 560px) { .lb.co .l { grid-template-columns: 22px minmax(0, 1fr); } .lb.co .l > span:nth-child(3) { grid-column: 2; color: var(--muted); font-size: 11px; } }

/* the mini games */
#mini { position: fixed; inset: 0; z-index: 55; display: none; align-items: center; justify-content: center; background: rgba(24,38,56,.62); padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); overflow: auto; }
#mini.on { display: flex; }
#mini .mcard { width: min(780px, 100%); background: #fbfcfe; border-radius: 22px; padding: 18px 20px 16px; box-shadow: 0 20px 70px rgba(20,30,50,.45); animation: minipop .25s ease; }
#mini.coffee .mcard { width: min(640px, 100%); }
@keyframes minipop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.reduced #mini .mcard { animation: none; }
#mini .mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } #mini h2 { margin: 0; font-size: 24px; line-height: 1.15; }
#mini .kicker { color: #009f91; margin: 0 0 2px; }
#mini .mx { border: 0; background: #e9eef4; color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; flex: none; } #mini .mx:hover { background: #dbe4ee; }
#mini .mlead { margin: 6px 0 10px; font-weight: 600; min-height: 2.9em; }
#mini .mstage { position: relative; } #mini canvas { display: block; width: 100%; height: auto; border-radius: 18px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
#mini.aquarium canvas { cursor: crosshair; }
#mini .mover { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; border-radius: 18px; background: rgba(15,45,70,.62); color: #fff; padding: 16px; } #mini .mover.on { display: flex; }
#mini .mhow { max-width: 460px; font-weight: 600; } #mini .mhow p { margin: 0 0 8px; } #mini .mhow .plaque { margin-top: 14px; font: italic 600 12px Georgia, serif; color: #f1dfb6; border-top: 1px solid rgba(255,255,255,.3); padding-top: 8px; }
#mini .mstatus { min-height: 24px; margin-top: 8px; text-align: center; font: 700 13px var(--mono); color: var(--muted); letter-spacing: .02em; white-space: pre-wrap; } #mini .mstatus.good { color: #168068; } #mini .mstatus.bad { color: #c4492f; }
#mini .mrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; min-height: 46px; }
@media (max-width: 560px) { #mini .mcard { padding: 14px 12px 12px; border-radius: 18px; } #mini h2 { font-size: 20px; } #mini .mlead { font-size: 14px; } }
#iform label.fl { margin: 0; }

/* ---------- v9.1: playtest fixes ---------- */
/* claw-back: what is taken is a minus, in red, and the buttons say what they do */
.split .step.take button { width: auto; min-width: 0; padding: 8px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.split .amt.neg { color: #c0392b; }
/* resume a saved game */
.resume { display: flex; align-items: center; gap: 12px; background: #eefaf5; border: 2px solid var(--seal, #168068); border-radius: 14px; padding: 10px 14px; margin: 10px 0 4px; }
.resume .rst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; }
.resumeor { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7787); margin: 10px 0 2px; }
@media (max-width: 560px) { .resume { flex-direction: column; align-items: stretch; } }
/* phones: the hear-the-leaders bar sits at the top, so a leader's words at the bottom are never covered */
@media (max-width: 600px) {
  #hearbar, #hearbar.list { top: var(--hudb, 64px) !important; bottom: auto; z-index: 36; max-height: 26vh; }
  body.hearing #dialogue { max-height: 40vh; }
  body.hearing #minimap, body.hearing #goal { display: none; }
}
@media (max-width: 560px) {
  .card[data-kind="claw"] .srow { flex-wrap: wrap; }
  .card[data-kind="claw"] .srow .snm { flex: 1 1 0; min-width: 0; }
  .card[data-kind="claw"] .srow .step.take { flex: 1 1 100%; justify-content: space-between; margin-top: 2px; }
  .card[data-kind="claw"] .srow .step.take button { height: 38px; flex: 1; }
}

/* v9.2: newspaper photograph (black and white, halftone), sized for phones */
.paper .pphoto { margin: 0 0 14px; border: 1px solid #191714; background: #cfcac0; line-height: 0; }
.paper .pphoto img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 38%; display: block; max-height: 36vh; filter: grayscale(1) contrast(1.05); }
@media (max-width: 600px) { .paper .pphoto img { aspect-ratio: 4 / 3; max-height: 34vh; } .paper .gkey { position: static; text-align: left; max-width: none; margin: 4px 0 8px; } }

/* v9.4: the opening film: letterbox, caption, title, skip */
#cine { position: fixed; inset: 0; z-index: 60; opacity: 0; transition: opacity .4s; pointer-events: auto; }
#cine.on { opacity: 1; }
#cine .bar { position: absolute; left: 0; right: 0; background: #12161d; }
#cine .bar.top { top: 0; height: 9vh; }
#cine .bar.bot { bottom: 0; min-height: 19vh; display: flex; align-items: center; justify-content: center; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); box-sizing: border-box; }
#cineCap { margin: 0; max-width: 46em; color: #f6f3ea; font: 500 clamp(16px, 2.2vw, 23px)/1.4 Georgia, 'Times New Roman', serif; text-align: center; opacity: 0; }
#cineCap.in { animation: cineIn .5s ease forwards; }
@keyframes cineIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#cineSkip { position: absolute; top: calc(2.2vh + env(safe-area-inset-top)); right: 16px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(18,22,29,.6); color: #fff; font: 600 14px/1 system-ui, sans-serif; cursor: pointer; }
#cineSkip:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
#cineTitle { position: absolute; left: 0; right: 0; top: 30vh; text-align: center; opacity: 0; transition: opacity .8s; pointer-events: none; }
#cineTitle.on { opacity: 1; }
#cineTitle b { display: block; font: 800 clamp(34px, 7vw, 76px)/1 Georgia, serif; color: #12161d; text-shadow: 0 2px 0 #fff, 0 0 26px rgba(255,255,255,.9); letter-spacing: .01em; }
#cineTitle span { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: #12161d; color: #f6f3ea; font: 600 clamp(13px, 1.6vw, 17px)/1.2 system-ui, sans-serif; }
body.filming #goal, body.filming #prompt, body.filming #ver, body.filming #hint, body.filming #joy { visibility: hidden; }
@media (max-width: 600px) { #cine .bar.top { height: 7vh; } #cine .bar.bot { min-height: 24vh; } }
@media (prefers-reduced-motion: reduce) { #cineCap.in { animation: none; opacity: 1; } }

/* v9.5: the decision clock is a big number counting 10 to 1 */
.timer.big { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 10px; }
.timer.big .tn { min-width: 0; font: 800 clamp(54px, 9vw, 84px)/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; }
.timer.big .tl { font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.timer.big.hot .tn { color: var(--risk); }
.timer.big.beat .tn { animation: beat .35s ease; }
.timer .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) { .timer.big .tn { font-size: 46px; } .timer.big { margin-bottom: 6px; } }

/* v9.5: consents, results (three big things), splash, corner badge, picture button */
#iform .cons { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 10px 0 0; }
#iform .cons legend { font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
#iform .conq { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
#iform .conq + .conq { border-top: 1px solid var(--line); }
#iform .cq2 { font-size: 13px; line-height: 1.35; color: var(--ink); }
#iform .yn { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
#iform .yn label { position: relative; cursor: pointer; }
#iform .yn input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#iform .yn i { display: block; min-width: 46px; padding: 9px 12px; text-align: center; font: 700 12px var(--mono); font-style: normal; color: var(--muted); }
#iform .yn input:checked + i { background: var(--ink); color: #fff; }
#iform .yn input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: -3px; }
.big3 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin: 12px 0 4px; }
.big3 .pctbox { margin: 0; } .big3 .pctn { font-size: clamp(38px, 8vw, 60px); }
.rankbox { padding: 14px 16px; border-radius: 16px; background: #14283c; color: #faf7f0; display: flex; flex-direction: column; justify-content: center; }
.rankbox .pctk { font: 700 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #9fdcd4; }
.rankn { font: 900 clamp(44px, 9vw, 68px)/1.05 var(--mono); letter-spacing: -.03em; } .rankn.good { color: #6fe0c8; } .rankn.mid { color: #ffd86b; } .rankn.bad { color: #ff9c8a; }
.rankbox .sm { color: #c9d6df; }
.lbh { margin-top: 16px; font-size: 20px; }
.lb.co.big { font-size: 16px; } .lb.co.big .l { padding: 11px 6px; } .lb.co.big .r { font-weight: 800; } .lb.co.big .lbn { font-weight: 800; }
.replay { margin: 10px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #f4f1e8; } .replay.good { background: #e9f8f3; border-color: #9fdcd4; }
.replay b { display: block; font-size: 17px; } .replay p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
@media (max-width: 560px) { .big3 { grid-template-columns: 1fr 1fr; } .big3 .pctrow { gap: 8px; } .big3 .pctr { display: none; } .lb.co.big { font-size: 14px; } #iform .cq2 { font-size: 12px; } }
#splash { position: fixed; inset: 0; z-index: 70; background: #12161d; color: #f6f3ea; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .35s; cursor: pointer; padding: 24px; box-sizing: border-box; }
#splash.on { opacity: 1; }
#splash .spin { max-width: 34em; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#splash .spk { font: 700 12px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #9fdcd4; }
#splash img { width: min(248px, 60vw); height: auto; background: #f6f3ea; padding: 12px 18px; border-radius: 14px; }
#splash .spl { margin: 8px 0 0; font: 600 clamp(20px, 3.4vw, 30px)/1.3 Georgia, 'Times New Roman', serif; }
#splash .sps { margin: 0; font-size: clamp(14px, 1.8vw, 17px); color: #c9d6df; }
#splash .spu { color: #6fe0c8; font: 700 16px var(--mono); text-decoration: none; padding: 8px; } #splash .spu:hover { text-decoration: underline; }
#splash .btn { margin-top: 6px; }
#pwr { position: fixed; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 65; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 6px 10px; border-radius: 10px; background: rgba(18,22,29,.82); color: #f6f3ea; text-decoration: none; font: 600 11px/1.2 system-ui, sans-serif; }
#pwr b { font: 700 10px var(--mono); color: #6fe0c8; } #pwr:focus-visible { outline: 3px solid var(--gold); }
#ver { display: none; }
@media (max-width: 600px) { #pwr { padding: 4px 8px; font-size: 10px; right: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); } }
/* v10.5 (24 Nov): the badge steps aside while someone is talking, so it never sits on the Continue button */
#pwr { transition: opacity .2s; } body:has(#dialogue.on) #pwr { opacity: 0; pointer-events: none; }
body.filming #pwr { bottom: auto; top: calc(2.2vh + env(safe-area-inset-top)); right: auto; left: 16px; }

/* v9.6: consents are checkboxes the player ticks */
#iform .conq.chk { display: flex; align-items: flex-start; justify-content: flex-start; gap: 10px; cursor: pointer; padding: 8px 0; position: relative; }
#iform .conq.chk input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
#iform .conq.chk .box { flex: none; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; display: grid; place-items: center; transition: background .12s; }
#iform .conq.chk input:checked + .box { background: var(--ink); }
#iform .conq.chk input:checked + .box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
#iform .conq.chk input:focus-visible + .box { outline: 3px solid var(--gold); outline-offset: 2px; }
#iform .conq.chk .cq2 { padding-top: 2px; }
#iform .conq.chk.none, #iform .conq.chk:last-child { border-top: 1px dashed var(--line); }
.linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--teal, #0f7b6c); font: inherit; text-decoration: underline; cursor: pointer; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* v9.9: a photo over every brief, same halftone look as the lead */
.paper .bphoto { margin: 0 0 6px; border: 1px solid #191714; background: #cfcac0; line-height: 0; }
.paper .bphoto img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; filter: grayscale(1) contrast(1.05); }
@media (max-width: 600px) { .paper .cols > div { display: grid; grid-template-columns: 38% 1fr; column-gap: 10px; align-items: start; } .paper .bphoto { grid-row: span 2; margin: 2px 0 0; } .paper .bphoto img { aspect-ratio: 1 / 1; } }
/* v9.14 share certificate */
#modal .sharebox{margin:18px 0 8px;padding:14px;border:1px solid #d9e2ea;border-radius:14px;background:#f7f9fb;text-align:center}
#modal .sharebox .shk{font:700 12px/1.2 ui-monospace,Menlo,monospace;letter-spacing:.12em;text-transform:uppercase;color:#5b6b7a;margin-bottom:10px}
#modal .sharebox canvas{width:min(100%,340px);aspect-ratio:4/5;border-radius:10px;box-shadow:0 6px 24px rgba(0,0,0,.18);display:block;margin:0 auto}
#modal .sharerow{justify-content:center;flex-wrap:wrap;gap:8px;margin-top:12px}
#modal .iback{margin:6px 0;color:#146a50}
.nphoto{display:block;width:100%;max-height:220px;object-fit:cover;filter:grayscale(1) contrast(1.05);border:1px solid #222;margin:6px 0 8px}
#iform [hidden], #modal [hidden]{display:none!important}
/* v10.1: no rank to show: the percentile takes the whole row, never an empty box */
.big3.solo { grid-template-columns: 1fr; }
.pctbox .pctoff { margin: 8px 0 0; font-size: 16px; line-height: 1.45; color: #c9d6df; }
