/* Kangaroo Court, look B: "OBJECTION!" Ace Attorney meets a Sunday comic strip.
   Layout: a slim masthead, then the courtroom as a comic page: a stage panel with the
   kangaroo behind the bench, then one panel per thing to do, then the record as panels.
   The words stay deadpan; the page does the shouting. See STYLE.md. */
:root {
  --newsprint: #F7F3E8;   /* the page */
  --panel: #FFFDF6;       /* inside a panel, a touch brighter than the page */
  --ink: #111111;
  --muted: #4a463e;       /* fine print; 8:1 on newsprint */
  --red: #E63946;         /* objection red: the plaintiff, the main action, stamps */
  --red-ink: #b81f2d;     /* red text on light paper (AA) */
  --yellow: #FFD60A;      /* highlighter: captions, labels */
  --blue: #1D4ED8;        /* counsel blue: the defendant, secondary actions */
  --envelope: #d2ae72;    /* a plain brown envelope */
  --ok: #157347;
  --dots: rgba(17, 17, 17, .15);

  /* The small/body face lives in ONE place, so it can be tuned (Noah wants it "thicker"). */
  --small-font: "Comic Neue", "Comic Sans MS", "Chalkboard SE", system-ui, sans-serif;
  --small-weight: 700;
  --title-font: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --bang-font: "Bangers", Impact, sans-serif;  /* interjections only */

  --line: 3px;
  --shadow: 5px 5px 0 var(--ink);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;   /* a newsprint comic: one look, deliberately no dark variant */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--newsprint);
  background-image: radial-gradient(var(--dots) 1px, transparent 1.3px);
  background-size: 7px 7px;
  color: var(--ink);
  font-family: var(--small-font);
  font-weight: var(--small-weight);
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- masthead */
.masthead {
  max-width: 600px; margin: 0 auto; padding: 14px 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.wordmark { font-family: var(--title-font); font-size: 28px; line-height: 1; letter-spacing: .02em; text-transform: uppercase;
  text-shadow: 2px 2px 0 var(--yellow); }
.tagline { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; background: var(--yellow); border: 2px solid var(--ink); padding: 0 6px; }
.mute {
  flex: none; min-width: 48px; min-height: 48px; padding: 0 12px;
  font: var(--small-weight) 14px var(--small-font); color: var(--ink);
  background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
}
.mute[aria-pressed="false"] { text-decoration: line-through; }

/* ---------------------------------------------------------------- the page */
main { max-width: 600px; margin: 0 auto; padding: 6px 16px 48px; }
.page { will-change: transform; }
.slot:empty { display: none; }

.panel {
  position: relative;
  background: var(--panel);
  border: var(--line) solid var(--ink);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 0 0 20px;
}
.cap {
  display: inline-block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
  background: var(--yellow); border: 2px solid var(--ink); padding: 1px 7px;
}
.cap.red { background: var(--red); color: #fff; }
.cap.blue { background: var(--blue); color: #fff; }
.panel > .cap:first-child { position: absolute; top: -13px; left: 12px; }
.panel > .cap:first-child + * { margin-top: 4px; }

h1, h2, h3, .title {
  font-family: var(--title-font); font-weight: 400; text-transform: uppercase; letter-spacing: .01em;
  line-height: 1.05; margin: 4px 0 10px; text-wrap: balance;
}
h1 { font-size: clamp(30px, 8vw, 40px); }
h2 { font-size: clamp(24px, 6.5vw, 30px); }
h3 { font-size: 21px; }
p { margin: 0 0 10px; }
.fine { font-size: 14px; color: var(--muted); }
.lede { font-size: 17px; }

/* ---------------------------------------------------------------- the stage: kangaroo + case */
.stage { padding: 14px 14px 12px; overflow: hidden; }
.stage::before {   /* comic speed lines behind the bench */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 42%, rgba(17,17,17,.06) 0 2deg, transparent 2deg 9deg);
}
.stage-top { position: relative; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.roo-wrap { position: relative; width: 168px; height: 176px; margin: 4px auto 0; }
.roo-wrap .roo { width: 100%; height: 100%; display: block; overflow: visible; }
.versus { position: relative; text-align: center; font-family: var(--title-font); text-transform: uppercase; font-size: clamp(24px, 7vw, 32px); line-height: 1.05; margin: 8px 0 4px; overflow-wrap: anywhere; }
.versus .p { color: var(--red-ink); }
.versus .d { color: var(--blue); }
.versus .d.pending { color: var(--muted); }
.versus .vs { font-size: .6em; padding: 0 .25em; vertical-align: .2em; }
.you { font-family: var(--small-font); font-size: 12px; letter-spacing: .04em; vertical-align: .4em; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); padding: 0 4px; margin-left: 4px; }
.dispute {
  position: relative; margin: 10px 0 2px; padding: 10px 14px; background: #fff; border: var(--line) solid var(--ink); border-radius: 18px;
  font-size: 19px; text-align: center; overflow-wrap: anywhere;
}
.dispute::before { content: "Re:"; font-family: var(--title-font); text-transform: uppercase; margin-right: .35em; }
.status {
  position: relative; margin: 12px 0 0; padding: 6px 10px; background: var(--yellow); border: 2px solid var(--ink);
  font-size: 15px; display: flex; gap: 8px; align-items: center;
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: #bbb; flex: none; }
.status .dot.on { background: var(--ok); }
.status .dot.typing { background: var(--red); animation: blink 1s steps(1) infinite; }

/* ---------------------------------------------------------------- forms */
label { display: block; margin: 12px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
input[type=text], textarea {
  width: 100%; font: var(--small-weight) 18px/1.4 var(--small-font); color: var(--ink);
  background: #fff; border: var(--line) solid var(--ink); border-radius: 0; padding: 12px; min-height: 52px;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 128px; resize: vertical; }
input[type=text]:focus, textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--yellow), 4px 4px 0 2px var(--ink); }
.count { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }
.error { color: var(--red-ink); background: #fff0f1; border: 2px solid var(--red); padding: 6px 10px; margin: 10px 0 0; font-size: 15px; }

.btn, button.btn, a.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 56px; margin: 14px 0 0; padding: 10px 18px;
  font-family: var(--title-font); font-weight: 400; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; text-decoration: none;
  color: #fff; background: var(--red); border: var(--line) solid var(--ink); box-shadow: var(--shadow); border-radius: 0; cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.btn.blue { background: var(--blue); }
.btn.ghost { background: var(--panel); color: var(--ink); font-size: 19px; min-height: 52px; }
.btn.small { min-height: 48px; font-size: 18px; }
.btn:active:not(:disabled) { transform: translate(4px, 4px) scale(.98); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: 2px 2px 0 var(--ink); }
.linkish {
  min-height: 48px; padding: 8px 4px; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  font: var(--small-weight) 15px var(--small-font); color: var(--ink);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row .btn { margin-top: 14px; }

/* The one big action stays within thumb reach on screens without typing. */
.thumb { position: sticky; bottom: 0; z-index: 3; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 0 -4px; background: linear-gradient(transparent, var(--newsprint) 30%); }
.thumb .btn { margin-top: 0; }

/* ---------------------------------------------------------------- the record */
.record { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.record .panel { margin: 0; padding-top: 18px; min-height: 96px; overflow-wrap: anywhere; }
.record .wide { grid-column: 1 / -1; }
.record .kind { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.record .silhouette { display: grid; place-items: center; min-height: 64px; font-family: var(--title-font); font-size: 34px; color: #bbb; letter-spacing: .1em; }
@media (max-width: 420px) { .record { grid-template-columns: 1fr; } }

.stamp {
  display: inline-block; font-family: var(--title-font); text-transform: uppercase; letter-spacing: .08em; font-size: 20px;
  color: var(--red-ink); border: 3px solid currentColor; padding: 2px 10px; transform: rotate(-6deg); background: rgba(255,255,255,.6);
}
.stamp.ok { color: var(--ok); }
.stamp.grey { color: #555; }
.stamp.big { font-size: 40px; padding: 2px 16px; }
.entered { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- the bribe window */
.bribe-window { background: var(--panel); }
.timer { font-family: var(--title-font); font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tally { display: grid; grid-template-columns: 1fr 1fr; border: var(--line) solid var(--ink); margin: 12px 0; background: #fff; }
.tally > div { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tally > div + div { border-left: var(--line) solid var(--ink); }
.tally .who { font-size: 14px; text-transform: uppercase; overflow-wrap: anywhere; }
.tally .amt { font-family: var(--title-font); font-size: 30px; line-height: 1; }
.tally .p .amt { color: var(--red-ink); }
.tally .d .amt { color: var(--blue); }
.tally .leading { background: var(--yellow); }
.tally .ready { font-size: 13px; color: var(--ok); }
.counter-notice { border: var(--line) solid var(--red); background: #fff0f1; padding: 10px 12px; margin: 12px 0; }
.counter-notice .cap { margin-bottom: 6px; }
button.bribe {
  position: relative; display: grid; gap: 2px; width: 100%; min-height: 96px; margin: 12px 0 0; padding: 16px 14px 14px;
  background: var(--envelope); color: #2a1d08; border: var(--line) solid var(--ink); box-shadow: var(--shadow); cursor: pointer; text-align: center;
  font: var(--small-weight) 15px var(--small-font);
  background-image: linear-gradient(160deg, transparent 49%, rgba(0,0,0,.25) 49.5%, transparent 51%), linear-gradient(20deg, transparent 49%, rgba(0,0,0,.25) 49.5%, transparent 51%);
  background-size: 100% 60%; background-repeat: no-repeat;
}
button.bribe .main { font-family: var(--title-font); font-size: 24px; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
button.bribe .mode { justify-self: center; background: var(--yellow); border: 2px solid var(--ink); padding: 0 6px; font-size: 13px; text-transform: uppercase; }
button.bribe:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
button.bribe:disabled { opacity: .55; cursor: default; }
.iou { font-style: italic; margin: 10px 0 0; }

/* ---------------------------------------------------------------- deliberation */
.deliberation { text-align: center; }
.deliberation .notice { min-height: 3em; font-size: 18px; }
.clock { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- the judgment: verdict first */
.judgment > .stamp { position: absolute; top: -18px; right: 10px; z-index: 2; }
.verdict-box { position: relative; background: #fff; border: var(--line) solid var(--ink); padding: 14px; margin: 10px 0 12px; }
.verdict { font-family: var(--title-font); text-transform: uppercase; font-size: clamp(26px, 7.5vw, 36px); line-height: 1.08; overflow-wrap: anywhere; }
.verdict-type { position: absolute; inset: 14px; pointer-events: none; }
.verdict-type::after { content: "▌"; animation: blink 1s steps(1) infinite; }
.sentence { border-left: 6px solid var(--yellow); padding: 2px 0 2px 10px; margin: 0 0 6px; }
.reasons { margin-top: 18px; border-top: var(--line) solid var(--ink); padding-top: 12px; }
.preamble { font-style: italic; }
.findings { margin: 8px 0 12px; padding-left: 0; list-style: none; counter-reset: f; display: grid; gap: 10px; }
.findings li { counter-increment: f; position: relative; padding-left: 40px; }
.findings li::before { content: counter(f); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center;
  font-family: var(--title-font); background: var(--yellow); border: 2px solid var(--ink); }
.findings .ftitle { text-transform: uppercase; }
.point { display: inline-block; font-size: 13px; text-transform: uppercase; border: 2px solid var(--ink); padding: 0 5px; margin-left: 4px; }
.point.p { background: var(--red); color: #fff; }
.point.d { background: var(--blue); color: #fff; }
.tiebreak { border: 2px dashed var(--ink); padding: 8px 10px; }
.fees { font-size: 15px; }
.signature { font-family: var(--title-font); text-transform: uppercase; text-align: right; margin-top: 10px; }
.findings.reveal li { animation: rise .45s var(--pop) both; }

/* ---------------------------------------------------------------- toast, confirmations */
.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60;
  width: min(92vw, 520px); background: var(--ink); color: #fff; padding: 12px 16px; border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--yellow);
}
.confirm { border: var(--line) solid var(--ink); background: #fff; padding: 12px; margin-top: 10px; }

/* ---------------------------------------------------------------- the moments (fx layer) */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fx .speed { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 40%, rgba(17,17,17,.16) 0 2deg, transparent 2deg 8deg); }
.fx .boom {
  position: absolute; left: 50%; top: 30%; translate: -50% 0; white-space: nowrap;
  font-family: var(--bang-font); font-size: clamp(54px, 16vw, 92px); letter-spacing: .04em; line-height: 1; color: #fff;
  background: var(--red); border: 5px solid var(--ink); padding: 10px 24px 4px; box-shadow: 8px 8px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  animation: pop .14s var(--pop) forwards;
}
.fx .boom.blue { background: var(--blue); }
.fx .boom.yellow { background: var(--yellow); color: var(--ink); -webkit-text-stroke: 0; }
.fx .flash { position: absolute; inset: 0; background: #fff; }
.fx .env {
  position: absolute; top: 58%; width: 120px; height: 76px; background: var(--envelope); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  display: grid; place-items: center; font-family: var(--title-font); font-size: 24px;
  background-image: linear-gradient(160deg, transparent 49%, rgba(0,0,0,.35) 50%, transparent 52%), linear-gradient(20deg, transparent 49%, rgba(0,0,0,.35) 50%, transparent 52%);
  background-size: 100% 55%; background-repeat: no-repeat;
  transition: transform .35s var(--pop);
}
.fx .env.from-left { left: -140px; }
.fx .env.from-right { right: -140px; }
.fx .env.from-left.in { transform: translateX(calc(50vw + 80px)) rotate(-6deg); }
.fx .env.from-right.in { transform: translateX(calc(-50vw - 80px)) rotate(6deg); }

@keyframes pop { 0% { transform: scale(.2) rotate(-14deg); opacity: 0 } 60% { transform: scale(1.12) rotate(-6deg); opacity: 1 } 100% { transform: scale(1) rotate(-6deg) } }
@keyframes shakeS { 0%,100% { transform: translate(0,0) } 25% { transform: translate(-2px,1px) } 50% { transform: translate(2px,-1px) } 75% { transform: translate(-1px,2px) } }
@keyframes shakeM { 0%,100% { transform: translate(0,0) } 25% { transform: translate(-4px,2px) } 50% { transform: translate(4px,-2px) } 75% { transform: translate(-2px,3px) } }
@keyframes shakeL { 0%,100% { transform: translate(0,0) rotate(0) } 20% { transform: translate(-8px,3px) rotate(-1deg) } 40% { transform: translate(7px,-4px) rotate(1deg) } 60% { transform: translate(-5px,2px) rotate(-.5deg) } 80% { transform: translate(4px,-2px) } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes blink { 50% { opacity: 0 } }
.shake-s { animation: shakeS .22s linear 2; }
.shake-m { animation: shakeM .3s linear 1; }
.shake-l { animation: shakeL .45s linear 1; }

@media (prefers-reduced-motion: reduce) {
  .shake-s, .shake-m, .shake-l { animation: none; }
  .fx .boom { animation: none; transform: rotate(-6deg); }
  .fx .env { transition: none; }
  .fx .speed { display: none; }
  .findings.reveal li { animation: none; }
  .btn, button.bribe { transition: none; }
  .status .dot.typing, .verdict-type::after { animation: none; }
}

/* ---------------------------------------------------------------- landing page */
.hero { text-align: center; }
.hero .roo-wrap { width: 150px; height: 158px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; background: var(--panel); border: var(--line) solid var(--ink); padding: 26px 10px 10px; font-size: 15px; }
.steps li::before { content: counter(s); position: absolute; top: -3px; left: -3px; font-family: var(--title-font); font-size: 18px; background: var(--yellow); border: var(--line) solid var(--ink); width: 32px; height: 32px; display: grid; place-items: center; }
@media (max-width: 380px) { .steps { grid-template-columns: 1fr; } }

footer { max-width: 600px; margin: 0 auto; padding: 0 16px 32px; font-size: 13px; color: var(--muted); text-align: center; }

/* AI disclosure (EU AI Act Art. 50): plain, visible, never hidden in fine print */
.ai-label { display: inline-block; margin: 8px 0 4px; padding: 3px 10px; border: 2px solid var(--ink); background: var(--panel);
  font-size: 14px; font-weight: var(--small-weight); }
.ai-label.voice { margin-top: 10px; }

/* The invite gate, the privacy note */
.gate p { margin: 6px 0 14px; }
.gate .btn { margin-top: 14px; }
.privacy h2 { margin: 18px 0 6px; }
.privacy ul { margin: 0; padding-left: 22px; }
.privacy li { margin: 4px 0; }
footer a { color: inherit; }
