:root {
  --aub: #321026; --aub2: #4a1a39; --ivory: #FFF6E8; --paper: #FBEBD2; --orange: #F54A08; --orange-d: #c93a05;
  --ink: #281A23; --muted: #6d5664; --gold: #b98a3a; --ok: #1f7a3a; --line: #e8d4b8;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif; --sans: "Source Sans 3", system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 17px/1.5 var(--sans); }
a { color: var(--aub2); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.demobar { background: #ffe1c9; color: #5a2a10; font-size: 13px; padding: 6px 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.demobar b { background: var(--orange); color: #fff; padding: 1px 7px; border-radius: 6px; letter-spacing: .08em; }
.demobar select { font: inherit; padding: 2px 6px; border-radius: 6px; border: 1px solid #d9a07a; background: #fff; }
.top { background: var(--aub); color: var(--ivory); display: flex; align-items: center; padding: 10px 14px; position: sticky; top: 0; z-index: 20; }
.brand { flex: 1; color: var(--ivory); text-decoration: none; font: 800 24px var(--serif); letter-spacing: .03em; }
.scales { color: #f0a35a; }
.burger { background: none; border: 0; color: var(--ivory); font-size: 26px; min-width: 44px; min-height: 44px; cursor: pointer; }
.menu { position: absolute; top: 100%; right: 8px; background: var(--aub2); border-radius: 12px; padding: 8px; display: grid; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.menu[hidden] { display: none; }
.menu a { color: var(--ivory); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.menu a:hover, .menu a:focus { background: rgba(255,255,255,.1); }

.main { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font: 900 34px/1.1 var(--serif); margin: 10px 0 12px; }
h2 { font: 800 24px/1.2 var(--serif); margin: 4px 0 10px; }
h3 { font: 800 19px var(--serif); color: var(--aub2); margin: 0 0 6px; }
.card { background: #fffaf2; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 14px 0;
  box-shadow: 0 2px 0 rgba(50,16,38,.04); background-image: radial-gradient(rgba(185,138,58,.05) 1px, transparent 1px); background-size: 6px 6px; }
.hero { text-align: center; position: relative; padding-top: 6px; }
.judge { width: 100%; max-width: 420px; border-radius: 16px; display: block; margin: 0 auto; }
.judge.small { max-width: 240px; }
.judge.tiny { width: 64px; border-radius: 10px; flex: none; }
.hero h1 { font-size: 42px; margin-top: 8px; }
.lead { color: var(--muted); font-size: 18px; margin-top: -4px; }
.badge { display: inline-block; font: 800 14px var(--sans); letter-spacing: .06em; color: #fff; background: var(--orange); padding: 4px 12px; border-radius: 8px; }
.hero .badge { position: absolute; left: 6px; top: 18px; transform: rotate(-8deg); z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.badge.paid { background: var(--orange); }
.case-title { font: 900 30px var(--serif); text-align: center; letter-spacing: .02em; }
.laurel { color: var(--gold); margin: 0 10px; }
.kicker { text-align: center; color: var(--aub2); font: 700 13px var(--sans); letter-spacing: .25em; margin: 6px 0 2px; }
.charge { text-align: center; font: italic 600 22px/1.3 var(--serif); margin: 0 0 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .two { grid-template-columns: 1fr; } }
.side { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 4px 0; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--sans); color: #fff; font-style: normal; flex: none; }
.av.k { background: var(--aub2); } .av.d { background: var(--orange); } .av.j { background: var(--gold); }
q { font: italic 500 18px/1.4 var(--serif); display: block; }
.tiny { font-size: 14px; color: var(--muted); }
.center { text-align: center; }
.empty { color: var(--muted); font-style: italic; }
.btn { display: flex; width: 100%; justify-content: center; align-items: center; gap: 8px; min-height: 52px; padding: 12px 18px; margin: 10px 0;
  border-radius: 14px; font: 800 19px var(--serif); cursor: pointer; text-decoration: none; border: 2px solid transparent; }
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-d); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--aub2); }
.btn.small { min-height: 44px; font-size: 16px; width: auto; display: inline-flex; margin: 4px 6px 4px 0; padding: 8px 14px; }
.btn.disabled { opacity: .55; }
.link { background: none; border: 0; color: var(--aub2); text-decoration: underline; cursor: pointer; font: inherit; padding: 8px 0; min-height: 44px; }
.row { display: flex; gap: 10px; } .row > .btn { flex: 1; } .row.wrap { flex-wrap: wrap; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 800 16px var(--serif); color: var(--aub2); }
.field { display: grid; gap: 4px; margin: 10px 0; font-weight: 600; }
.field input, .field select, .field textarea, .copybox, .upload input:not([type=file]) { font: 400 17px var(--sans); padding: 12px; border-radius: 12px; border: 1px solid #cdb79a; background: #fff; width: 100%; min-height: 48px; }
.field small { font-weight: 400; color: var(--muted); }
.err { color: #b3261e; font-style: normal; font-weight: 600; }
.tier { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px; border: 2px solid var(--line); border-radius: 14px; margin: 8px 0; cursor: pointer; background: #fff; }
.tier.on { border-color: var(--orange); background: #fff3ea; }
.tier input { grid-row: span 2; width: 22px; height: 22px; accent-color: var(--orange); }
.tier small { color: var(--muted); }
.demo-note { background: #fff1c2; border: 1px dashed #c99a2e; color: #6b4a00; padding: 6px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.credits { display: flex; justify-content: space-between; align-items: center; background: var(--paper); border-radius: 12px; padding: 10px 14px; }
.case-row { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 8px 0; color: var(--ink); text-decoration: none; }
.case-row b { font: 800 19px var(--serif); } .case-row small { color: var(--muted); } .case-row .act { color: var(--orange-d); font-weight: 700; font-style: normal; }
.case-h { text-align: center; margin-bottom: 0; }
.caseno { text-align: center; color: var(--muted); letter-spacing: .15em; font-weight: 700; margin: 2px 0 8px; }
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 8px 0; overflow-x: auto; }
.stepper li { flex: 1; min-width: 68px; text-align: center; font-size: 13px; padding: 6px 4px; border-radius: 8px; background: #efe2cf; color: var(--muted); font-weight: 600; }
.stepper li.done { background: #e2cdb0; color: var(--ink); } .stepper li.now { background: var(--aub); color: #fff; }
main > .badge { display: block; width: fit-content; margin: 6px auto; }
.question { border-top: 1px solid var(--line); padding: 10px 0; }
.qhead { display: flex; gap: 10px; align-items: flex-start; } .qhead p { margin: 2px 0; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 18px; cursor: pointer; flex: none; }
.answer { font-style: italic; margin: 6px 0 0 74px; }
textarea { width: 100%; font: 400 17px var(--sans); padding: 10px; border-radius: 12px; border: 1px solid #cdb79a; }
.jurors { list-style: none; padding: 0; } .jurors li { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.ok { color: var(--ok); }
.ballot { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .ballot .btn { font-size: 16px; padding: 8px; }
.verdict { text-align: center; }
.vh { font: 900 36px var(--serif); margin: 6px 0; }
.chip { display: inline-block; background: #ece0ef; border-radius: 99px; padding: 4px 14px; font-weight: 700; }
.cert { margin: 14px 0; padding: 18px; border: 3px double var(--gold); border-radius: 12px; background: var(--paper); }
.stamp { display: inline-block; margin: 10px 0; padding: 4px 18px; border: 6px solid var(--orange); color: var(--orange); font: 900 48px var(--serif); transform: rotate(-6deg); letter-spacing: .04em; }
.stamp.not_guilty, .stamp.not_enough, .stamp.inconclusive, .stamp.insufficient { font-size: 30px; }
.scales.big { font-size: 36px; color: var(--gold); margin: 0; }
.sentence { font: italic 600 22px var(--serif); }
.preview { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.evidence { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; } .evidence img, .evidence video { width: 100%; border-radius: 10px; }
.upload { border: 2px dashed var(--line); border-radius: 14px; padding: 10px; margin: 10px 0; }
.modal { position: fixed; inset: 0; background: rgba(40,26,35,.6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal .card { max-width: 420px; width: 100%; }
.total { font: 900 28px var(--serif); }
.plain { padding-left: 18px; }
.switch { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.switch input { width: 22px; height: 22px; accent-color: var(--orange); }
footer { text-align: center; font-size: 13px; color: var(--muted); padding: 20px 16px 40px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--aub); color: #fff; padding: 10px 16px; border-radius: 12px;
  opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.on { opacity: 1; }

/* Phase 3: jury + credits */
.badge.jury { background: #5b3a8c; }
.tier.off { opacity: .55; cursor: not-allowed; }
.row.between { justify-content: space-between; align-items: center; margin: 10px 0; }
.row > .copybox { flex: 3; }
.big-num { font: 900 64px var(--serif); text-align: center; margin: 0; color: var(--orange); }
.tally { font-weight: 700; margin: 8px 0 0; }
.speech { font-style: italic; margin: 12px 4px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Phase 4: live hearing */
.badge.live { background: #c0262d; }
.hlog { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.hb { background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); max-width: 92%; }
.hb p { margin: 4px 0; }
.hb.judge { background: #fff3ea; border: 2px solid var(--orange); align-self: flex-start; font-family: var(--serif); font-size: 18px; }
.hb.me { align-self: flex-end; background: #e8f4ff; }
.hb.them { align-self: flex-start; background: #f2f2f2; }
.hb.sys { align-self: center; background: none; box-shadow: none; color: var(--muted); font-size: 14px; text-align: center; }
.hwho { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; font-family: var(--sans); }
.hwho .play { margin-left: auto; }
.hb small { color: var(--muted); font-size: 12px; }
.hcontrols { position: sticky; bottom: 0; background: var(--bg, #fdf6ee); padding: 10px 0 14px; }
.btn.big { font-size: 20px; padding: 18px; width: 100%; }
.rec { color: #c0262d; font-weight: 800; animation: blink 1s infinite; }
.thinking { font-style: italic; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .45; } }
