:root {
  --bg: #f7f1e7;
  --paper: #fbf7ef;
  --card: #fffdf8;
  --ink: #1c241f;
  --ink-2: #3a433d;
  --muted: #6d7068;
  --line: #e5dccb;
  --green: #7a1524; /* primary: court maroon */
  --green-2: #931f30;
  --maroon-d: #4d0c16;
  --gold: #d6a74e;
  --gold-l: #f2d394;
  --brass: #b8893b;
  --brass-l: #e9c46a;
  --accent: #cf5426;
  --accent-2: #e2703f;
  --danger: #b3262b;
  --wood: #3b2414;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 20, 10, 0.05), 0 8px 28px rgba(30, 20, 10, 0.07);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.4em; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 0.8em; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.lead { font-size: 1.08rem; }
.mt { margin-top: 1.1rem; }
.mt-l { margin-top: 3rem; }
.eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.35rem; }
.eyebrow.light { color: var(--brass-l); }
.fine, .disclaimer { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid transparent; border-radius: 12px; padding: 0.7rem 1.1rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: transform 0.15s, background 0.2s, box-shadow 0.2s, border-color 0.2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-dark { background: var(--green); color: #fff; }
.btn-dark:hover { background: var(--green-2); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(207, 84, 38, 0.3); }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cfc2a8; background: #fff; }
.btn-light { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.3); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, 0.2); }
.btn.full { width: 100%; margin-top: 0.5rem; }
.btn.danger { color: var(--danger); }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.82rem; color: var(--ink-2); text-decoration: none; transition: all 0.15s; }
.chip:hover { border-color: #cbbd9f; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip-danger { border-color: rgba(179, 38, 43, 0.35); color: #7d1a1e; background: #fff6f4; }
.chip-danger:hover { background: var(--danger); color: #fff; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, var(--maroon-d) 0%, #5e0f1c 45%, #4a0a14 100%); color: #f3e6d0; padding: 1.5rem 1rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25); }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; padding: 0 0.4rem 1.1rem; border-bottom: 1px solid rgba(242, 211, 148, 0.18); }
.brand-mark { width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.brand-mark svg { width: 58px; height: 58px; fill: none; stroke: var(--gold-l); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.brand-mark .laurel ellipse { fill: var(--gold); stroke: none; }
.brand-mark .laurel path { stroke: var(--gold); stroke-width: 1.6; }
.brand-mark .scales circle { fill: var(--gold-l); }
.brand-name { display: block; font-family: var(--serif); font-size: 1.62rem; font-weight: 700; letter-spacing: -0.01em; color: #fff7ea; line-height: 1.05; }
.brand-sub { display: block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: #ead7b6; margin-top: 0.3rem; line-height: 1.5; max-width: 9.5rem; }
.menu-btn { display: none; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #f0dcc0; font-weight: 700; margin: 0.6rem 0.75rem 0.35rem; }
.nav-label + a { margin-top: 0.1rem; }
.nav a { display: flex; align-items: center; gap: 0.85rem; padding: 0.68rem 0.85rem; border-radius: 10px; text-decoration: none; color: #f6ead6; font-weight: 500; font-size: 0.97rem; transition: background 0.15s; }
.nav a svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { background: rgba(255, 236, 200, 0.08); }
.nav a.active { background: linear-gradient(180deg, #f6dc9f, var(--gold)); color: var(--maroon-d); font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.nav-label:nth-of-type(2) { border-top: 1px solid rgba(242, 211, 148, 0.18); padding-top: 1rem; margin-top: 0.9rem; }
.promo { margin-top: auto; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, #6a1220, #3f0911); border: 1px solid rgba(242, 211, 148, 0.25); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.promo-art { background: radial-gradient(ellipse at 50% 30%, #a3561f 0%, #5a1c0d 70%); height: 96px; }
.promo-art svg { width: 100%; height: 100%; display: block; }
.promo h3 { font-size: 1.28rem; margin: 0.9rem 1rem 0.5rem; color: #fff6e6; line-height: 1.2; }
.promo p { font-size: 0.86rem; color: #ecdcc3; margin: 0 1rem 0.9rem; line-height: 1.45; }
.promo-btn { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 0 1rem 1rem; padding: 0.62rem 0.9rem; border-radius: 10px; background: linear-gradient(180deg, #f8e2a8, var(--gold)); color: var(--maroon-d); font-weight: 700; font-size: 0.92rem; text-decoration: none; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); }
.promo-btn:hover { filter: brightness(1.05); }
.side-fine { display: flex; gap: 0.5rem; align-items: center; font-size: 0.72rem; color: #d9c3a3; margin: 0 0.3rem; }
.side-fine svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.view { min-width: 0; flex: 1; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem clamp(1rem, 2.4vw, 2.2rem); }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 0.6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 0.9rem; box-shadow: 0 1px 2px rgba(60, 20, 10, 0.04); }
.top-search svg { width: 19px; height: 19px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.top-search input { flex: 1; border: 0; background: transparent; padding: 0.72rem 0; font: inherit; min-width: 0; }
.top-search input:focus { outline: none; }
.top-search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(122, 21, 36, 0.12); }
.top-actions { display: flex; align-items: center; gap: 0.6rem; }
.pop-wrap { position: relative; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); }
.bell:hover { background: #efe6d6; }
.bell svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #e0322f; box-shadow: 0 0 0 2px var(--bg); }
.me { display: flex; align-items: center; gap: 0.6rem; border: 0; background: transparent; padding: 0.3rem 0.5rem 0.3rem 0.3rem; border-radius: 999px; padding-left: 1rem; border-left: 1px solid var(--line); border-radius: 0; }
.me:hover .me-name { text-decoration: underline; text-underline-offset: 3px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.92rem; letter-spacing: 0.02em; }
.me-name { font-weight: 700; font-size: 0.97rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(40, 15, 10, 0.18); padding: 0.6rem; animation: rise 0.2s; }
.pop-head { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0.4rem 0.5rem 0.5rem; }
.notice { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.6rem 0.6rem 1.1rem; border-radius: 10px; text-decoration: none; position: relative; font-size: 0.86rem; }
.notice[href]:hover { background: #f6eee0; }
.notice span { color: var(--muted); font-size: 0.82rem; }
.notice.new::before { content: ''; position: absolute; left: 0.4rem; top: 0.95rem; width: 6px; height: 6px; border-radius: 50%; background: #e0322f; }
.me-form { display: flex; gap: 0.4rem; padding: 0 0.5rem; }
.me-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; font: inherit; }
.pop .small { padding: 0 0.5rem; margin: 0.4rem 0; }

/* ---------- Home ---------- */
.home { padding: 0 clamp(1rem, 2.4vw, 2.2rem) 3rem; }
/* Split hero: the copy on a solid wood panel, the live courtroom on the right in full colour.
   Nothing is laid over the animation (no fade, vignette or grain). */
.hero { position: relative; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 470px; overflow: hidden; border-radius: 22px; background: linear-gradient(155deg, #3b1b0c 0%, #26110a 60%, #1e0d07 100%); box-shadow: 0 18px 40px rgba(50, 20, 10, 0.22); isolation: isolate; }
.hero-scene { position: relative; grid-column: 2; grid-row: 1; overflow: hidden; background: #2b1b10; border-left: 2px solid rgba(214, 167, 78, 0.55); }
.hero .vignette, .hero .grain { display: none; }
.hero .actor .tag { display: none; }
.hero-copy { position: relative; grid-column: 1; grid-row: 1; align-self: center; z-index: 4; color: #fff; padding: 2.4rem clamp(1.2rem, 3vw, 2.8rem); }
.hero-copy .eyebrow { color: var(--gold); letter-spacing: 0.2em; margin-bottom: 0.9rem; }
.hero-copy h1 { font-size: clamp(1.9rem, 3vw, 3rem); color: #fff8ea; line-height: 1.04; letter-spacing: -0.015em; margin-bottom: 1rem; }
.hero-copy h1 em { color: var(--gold); font-style: italic; }
.hero-copy p { color: #f0e3cd; font-size: 1.02rem; max-width: 520px; line-height: 1.5; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin: 1.5rem 0 1.4rem; }
.hero-stats { display: flex; gap: 0.6rem 1.3rem; flex-wrap: wrap; font-size: 0.82rem; color: #eadbc2; }
.hero-stats span { display: flex; align-items: center; gap: 0.45rem; }
.hero-stats .i { width: 20px; height: 20px; }
.hero-stats strong { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.hero .cam { transition-duration: 3.2s; }
.btn-maroon { background: linear-gradient(180deg, #8f1d2e, var(--green)); color: #fff; border-color: rgba(242, 211, 148, 0.55); box-shadow: 0 6px 16px rgba(90, 10, 20, 0.35); }
.btn-maroon:hover { background: linear-gradient(180deg, #a3243a, #861a2a); }
.btn-cream { background: #fbf2e1; color: var(--maroon-d); border-color: #f0dfbd; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.btn-cream:hover { background: #fff; }
.btn-lg .i { width: 21px; height: 21px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.3rem 0 2.2rem; }
.step { position: relative; display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.15rem 1.1rem; box-shadow: var(--shadow); }
.step-i { width: 38px; height: 38px; fill: none; stroke: #7a3b16; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-top: 0.15rem; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #e2b25a, #b9832d); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 0.95rem; margin-top: 0.2rem; box-shadow: 0 2px 5px rgba(120, 70, 10, 0.3); }
.step h4 { font-size: 1.12rem; margin: 0.2rem 0 0.3rem; }
.step p { font-size: 0.82rem; color: var(--ink-2); margin: 0; line-height: 1.45; }

/* cause list */
.cause-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.cause-title { border-left: 4px solid var(--green); padding-left: 1.1rem; }
.cause-title .eyebrow { color: var(--green); }
.cause-title h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0.1rem 0 0.2rem; }
.cause-title p { margin: 0; color: var(--ink-2); }
.cause-search { display: flex; align-items: center; gap: 0.55rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 0.9rem; min-width: min(340px, 100%); }
.cause-search .i { width: 19px; height: 19px; color: var(--ink-2); }
.cause-search input { flex: 1; border: 0; background: transparent; padding: 0.75rem 0; font: inherit; min-width: 0; }
.cause-search input:focus { outline: none; }
.cause-search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(122, 21, 36, 0.12); }
.filters .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.cause-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.ct-row { display: grid; grid-template-columns: 6.5rem minmax(14rem, 2.2fr) 11rem 1.2fr 7.5rem 7rem 9.5rem; align-items: center; gap: 1rem; padding: 0.7rem 1.4rem; border-top: 1px solid #f0e7d7; cursor: pointer; transition: background 0.15s; }
.ct-row:hover { background: #fcf6ec; }
.ct-head { background: #f6ecdb; border-top: 0; font-weight: 700; font-size: 0.86rem; color: var(--ink); cursor: default; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.ct-head:hover { background: #f6ecdb; }
.ct-id { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.92rem; }
.ct-title a { font-weight: 600; text-decoration: none; display: block; }
.ct-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ct-title small { display: block; color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-title small b { color: var(--green); }
.ct-court { color: var(--ink-2); font-size: 0.92rem; }
.ct-dur { display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; color: var(--ink-2); }
.ct-dur .i { width: 19px; height: 19px; }
.ct-go { text-align: right; }
.ct-go .btn { border-radius: 8px; padding: 0.5rem 0.9rem; }
.ct-empty { padding: 1.4rem; margin: 0; color: var(--muted); }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 500; padding: 0.22rem 0.7rem; border-radius: 7px; white-space: nowrap; }
.pill-money-cheques { background: #ecdcf7; color: #5b2b7a; }
.pill-property-rent { background: #d8e8fb; color: #1f4f86; }
.pill-consumer { background: #fbe6c8; color: #8a4a0c; }
.pill-family { background: #fbdde6; color: #8c2047; }
.pill-criminal { background: #fbd5d2; color: #9b1f1a; }
.pill-employment { background: #dff0de; color: #2f6a2c; }
.pill-cyber { background: #d6eff2; color: #155f69; }
.pill-accident { background: #fde9cf; color: #94500c; }
.pill-neighbours { background: #e6efd3; color: #4d6a1c; }
.pill-petty-fun { background: #f5e3f5; color: #7b2d7b; }
.dots-diff { display: inline-flex; gap: 5px; }
.dots-diff i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #c9b8a0; }
.dots-diff i.on { background: var(--green); border-color: var(--green); }

/* laws page */
.laws-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.act { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.act h3 { font-size: 1.1rem; border-left: 3px solid var(--gold); padding-left: 0.7rem; }
.act ul { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.act li { padding: 0.55rem 0; border-top: 1px solid #f1e8d9; }
.act li:first-child { border-top: 0; }
.law { display: block; font-weight: 600; font-size: 0.92rem; }
.used { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.used a { color: var(--green); }

/* ---------- Case grid ---------- */
.section { padding: 2.6rem clamp(1rem, 3vw, 2.6rem); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.search { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 0.75rem 1rem; min-width: 280px; font: inherit; }
.search:focus, input:focus, textarea:focus, select:focus { outline: 2px solid rgba(122, 21, 36, 0.25); border-color: var(--green-2); }
.filters { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.sub-h { font-size: 0.78rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 1.2rem 0 0.8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.2rem; }
.case-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(30, 20, 10, 0.06), 0 18px 40px rgba(30, 20, 10, 0.1); }
.card-top { display: flex; justify-content: space-between; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.status { display: flex; align-items: center; gap: 0.45rem; color: var(--green-2); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #3f8f5a; box-shadow: 0 0 0 3px rgba(63, 143, 90, 0.18); }
.code { color: var(--muted); letter-spacing: 0.06em; }
.cat { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); font-weight: 700; margin: 0.9rem 0 0.35rem; }
.case-card h3 { font-size: 1.5rem; line-height: 1.18; }
.case-card h3 a { text-decoration: none; }
.case-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-sum { color: var(--ink-2); font-size: 0.9rem; }
.card-court { display: flex; gap: 0.45rem; align-items: center; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.8rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.1rem; }
.tag { font-size: 0.74rem; padding: 0.25rem 0.55rem; border-radius: 7px; background: #f7efdf; border: 1px solid #eadfc6; color: #6b5427; }
.tag-easy { background: #eaf3ec; border-color: #cfe2d4; color: #2f6a43; }
.tag-hard { background: #fbeceb; border-color: #f0cfcc; color: #8f2a26; }
.card-actions { margin-top: auto; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------- Pages ---------- */
.page { padding: 2.2rem clamp(1rem, 3vw, 2.6rem) 4rem; max-width: 1240px; }
.page.narrow { max-width: 760px; }
.back-link { display: inline-block; text-decoration: none; color: var(--muted); font-size: 0.86rem; margin-bottom: 1.2rem; }
.back-link:hover { color: var(--ink); }
.file-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.6rem; }
.file-actions { display: flex; gap: 0.6rem; }
.file-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.4rem; align-items: start; }
.paper-sheet { background: #fffef9; border: 1px solid var(--line); padding: 2.4rem 2.6rem; border-radius: 6px; box-shadow: 0 1px 0 #efe6d2, 0 2px 0 #fffef9, 0 3px 0 #e8dec8, var(--shadow); font-family: Georgia, serif; position: relative; }
.paper-sheet::before { content: ''; position: absolute; left: 1.4rem; top: 0; bottom: 0; border-left: 1px solid #f0c9c0; }
.sheet-title { text-align: center; font-weight: 700; letter-spacing: 0.06em; font-size: 0.9rem; }
.sheet-no { text-align: center; margin: 0.3rem 0 1.4rem; color: var(--muted); }
.parties { text-align: center; margin-bottom: 1rem; }
.parties div { display: flex; justify-content: space-between; max-width: 460px; margin: 0 auto; }
.parties span { color: var(--muted); font-style: italic; }
.parties .vs { justify-content: center; margin: 0.4rem auto; letter-spacing: 0.3em; font-size: 0.8rem; }
.sheet-nature { text-align: center; font-style: italic; color: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.6rem 0; margin-bottom: 1.2rem; }
.paper-sheet h3 { font-family: Georgia, serif; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1.3rem; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.ex-row { display: flex; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px dashed var(--line); }
.ex-row:first-of-type { border-top: 0; }
.ex-row p { margin: 0.1rem 0 0; color: var(--muted); }
.ex-mark { flex: none; font-size: 0.68rem; font-weight: 700; background: #f3e7cc; color: #6b4e17; border-radius: 6px; padding: 0.2rem 0.45rem; height: fit-content; white-space: nowrap; }

/* chamber */
.chamber-hero { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 20px; overflow: hidden; background: #24170d; color: #fff; margin-bottom: 1.4rem; }
.chamber-art { width: 100%; height: 100%; min-height: 240px; display: block; }
.chamber-art .breath { animation: breathe 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.chamber-copy { padding: 2rem; }
.chamber-copy h1 { color: #fff8e8; }
.chamber-copy p { color: #e0d5c2; }
.side-switch { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.side-switch .chip { background: transparent; color: #e8dcc5; border-color: rgba(255, 255, 255, 0.25); }
.side-switch .chip.on { background: var(--brass); border-color: var(--brass); color: #20140a; }
.chamber-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.2rem; align-items: start; }
.card-like { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.pick { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.pick:hover { border-color: var(--brass); }
.pick .cat { margin: 0; }

/* chat */
.chat { display: flex; flex-direction: column; min-height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; max-height: 60vh; }
.bubble { max-width: 82%; padding: 0.8rem 1rem; border-radius: 16px; font-size: 0.92rem; }
.bubble p:last-child, .bubble ol:last-child, .bubble ul:last-child { margin-bottom: 0; }
.bubble ol, .bubble ul { padding-left: 1.2rem; margin: 0.3rem 0 0.6rem; }
.bubble.lawyer { background: #f4ede0; border: 1px solid #eadfc8; border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.me { background: var(--green); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble.error { background: #fbeceb; color: #8f2a26; align-self: center; font-size: 0.82rem; }
.bubble-name { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.3rem; }
.typing-dots { display: flex; gap: 4px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: #b9a57f; animation: bounce 1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
.chat-suggest { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0 1.2rem 0.8rem; }
.chat-form { display: flex; gap: 0.6rem; padding: 0.9rem 1.2rem 1.2rem; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; font: inherit; background: #fff; }

/* forms */
.file-form, .join-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.4rem; }
.join-form { flex-direction: row; }
.file-form label, .opts label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.86rem; }
.file-form textarea, .file-form input, .file-form select, .join-form input, .opts select, .comp-row select { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.9rem; font: inherit; font-weight: 400; background: #fff; }
.join-form input { flex: 1; font-size: 1.3rem; letter-spacing: 0.2em; text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label.check { flex-direction: row !important; align-items: center; gap: 0.55rem !important; font-weight: 500 !important; }

/* learn */
.learn-scene { position: relative; aspect-ratio: 16/8; border-radius: 18px; overflow: hidden; margin: 1.4rem 0; background: #1a110a; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.legend-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.legend-item p { font-size: 0.88rem; color: var(--ink-2); margin: 0; }
.timeline { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.timeline li { display: flex; gap: 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.timeline li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--brass-l); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.timeline p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.myths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.myth { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.myth .m { color: var(--danger); font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }
.myth .r { color: var(--green-2); margin-top: 0.3rem; }
.tips { columns: 2; gap: 2rem; }
.tips li { margin-bottom: 0.6rem; break-inside: avoid; }
.cta-band { margin-top: 3rem; padding: 2rem; border-radius: 18px; background: var(--green); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.cta-band h3 { color: #fff; font-size: 1.6rem; margin: 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(28, 36, 31, 0.55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem; animation: fade 0.2s; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 22px; padding: 2rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.modal-card.wide { width: min(860px, 100%); }
.modal-x { position: absolute; top: 1rem; right: 1rem; }
.modal-title { font-size: 2rem; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.7rem; margin: 1.2rem 0; }
.role-card { display: flex; gap: 0.8rem; align-items: center; padding: 0.8rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; transition: all 0.15s; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card:hover { border-color: #cdbd9c; }
.role-card.on { border-color: var(--green); background: #eef4ef; box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.1); }
.role-av { flex: none; width: 58px; height: 64px; border-radius: 12px; background: linear-gradient(180deg, #7b5a3b, #4a2f1b); overflow: hidden; display: grid; place-items: center; }
.role-av svg { width: 100%; height: 100%; }
.role-av svg.eye { width: 28px; height: 28px; fill: none; stroke: #f0dfb8; stroke-width: 1.6; }
.role-t { font-weight: 700; font-size: 0.9rem; }
.role-n { font-size: 0.78rem; color: var(--brass); font-weight: 600; }
.role-d { font-size: 0.76rem; color: var(--muted); line-height: 1.35; margin-top: 0.15rem; }
.opts { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; padding: 1rem 0; border-top: 1px solid var(--line); }
.modal-actions { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Court page ---------- */
.court-page { padding: 1.2rem clamp(0.8rem, 2vw, 1.8rem) 2rem; }
.court-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; }
.court-head .back-link { margin: 0; }
.court-title { flex: 1; min-width: 0; }
.court-title h1 { font-size: clamp(1.2rem, 2vw, 1.7rem); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.court-title h1 span { color: var(--muted); font-style: italic; font-weight: 500; }
.court-title .eyebrow { margin: 0; }
.you-are { text-align: right; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.you-are strong { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.court-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }

.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #1a110a; box-shadow: 0 20px 50px rgba(30, 18, 8, 0.35); isolation: isolate; user-select: none; }
.stage.shake { animation: shake 0.45s; }
.scene-host { position: absolute; inset: 0; overflow: hidden; }
.cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.6s cubic-bezier(0.45, 0.05, 0.2, 1); will-change: transform; }
.court-svg { width: 100%; height: 100%; display: block; }
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(10, 6, 2, 0.6) 100%), linear-gradient(180deg, rgba(255, 190, 110, 0.06), rgba(40, 20, 0, 0.12)); }
.grain { position: absolute; inset: -50%; pointer-events: none; z-index: 2; opacity: 0.07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 0.6s steps(3) infinite; }

/* scene animation */
.actor { transition: transform 0.9s cubic-bezier(0.4, 0.1, 0.2, 1), opacity 0.45s; }
.actor.leaving { opacity: 0; }
.actor .pose { transition: transform 0.65s cubic-bezier(0.3, 0.1, 0.2, 1.2), opacity 1.2s; }
.actor.standing .pose { transform: translateY(-36px); }
.actor.entering { opacity: 0; }
.actor.entering .pose { transform: translateY(46px); }
.actor-judge { transition: transform 0.9s, opacity 1.4s; }
.actor .breath { animation: breathe 4.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.actor .eyes { animation: blink 5.3s infinite; transform-box: fill-box; transform-origin: center; }
.actor:nth-child(2n) .eyes { animation-duration: 6.7s; animation-delay: -2s; }
.actor:nth-child(3n) .eyes { animation-duration: 4.4s; animation-delay: -1s; }
.actor .mouth-open { opacity: 0; transform-box: fill-box; transform-origin: center; }
.actor.talking .mouth-open { animation: talk 0.24s ease-in-out infinite alternate; }
.actor.talking .mouth-closed { opacity: 0; }
.actor .head { transform-box: fill-box; transform-origin: 50% 100%; }
.actor.talking .head { animation: nod 2.4s ease-in-out infinite; }
.actor .arm { transform-box: fill-box; transform-origin: 50% 6%; }
.actor.talking .arm-r { animation: gesture 3s ease-in-out infinite; }
.actor-judge.talking .arm-r { animation: gesture-sm 3.6s ease-in-out infinite; }
.actor.talking[data-tone='angry'] .arm-r, .actor.talking[data-tone='firm'] .arm-r { animation-duration: 1.6s; }
.actor.talking[data-tone='nervous'] .head { animation: jitter 0.5s ease-in-out infinite; }
.actor.typing .arm { animation: type 0.18s ease-in-out infinite alternate; }
.actor.typing .arm-r { animation-delay: 0.09s; }
.actor .glow { fill: #ffd98a; opacity: 0; transition: opacity 0.5s; filter: blur(10px); }
.actor.talking .glow { opacity: 0.35; }
.actor .tag { opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.actor .tag rect { fill: rgba(18, 12, 6, 0.82); stroke: rgba(233, 196, 106, 0.5); }
.actor .tag text { fill: #f6e7c1; font: 600 15px var(--sans); }
.actor.talking .tag { opacity: 1; }
.fan-blades { animation: spin 0.8s linear infinite; transform-box: fill-box; transform-origin: center; }
.beam { mix-blend-mode: screen; animation: beam 9s ease-in-out infinite; }
.beam.b2 { animation-delay: -4s; }
.mote { animation: mote 16s linear infinite; opacity: 0; }
.flag { animation: flag 3.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 0 50%; }
.screen { animation: screen 3s ease-in-out infinite; }

/* stage overlays */
.stage-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; padding: 0.9rem 1rem; pointer-events: none; }
.phase-pill, .timer { background: rgba(14, 9, 4, 0.6); backdrop-filter: blur(8px); color: #f3e3bd; border: 1px solid rgba(233, 196, 106, 0.25); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 0.5rem; }
.timer { font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #e04a3a; animation: pulse 1.6s infinite; }
.caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 3rem clamp(1rem, 3vw, 2.2rem) 1.2rem; background: linear-gradient(0deg, rgba(10, 6, 2, 0.94) 30%, rgba(10, 6, 2, 0.6) 70%, transparent); color: #fff; animation: fade 0.3s; }
.cap-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.cap-name { font-family: var(--serif); font-size: 1.05rem; color: var(--brass-l); font-weight: 600; }
.cap-role { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: #bfae8a; }
.cap-tone { font-size: 0.68rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #e7dcc4; text-transform: lowercase; font-style: italic; }
.cap-tone:empty { display: none; }
.cap-text { font-family: var(--serif); font-size: clamp(0.95rem, 1.45vw, 1.28rem); line-height: 1.45; max-height: 7.5em; overflow-y: auto; color: #fffaf0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); padding-right: 4.5rem; }
.caption.cap-wait .cap-text::before { content: ''; display: inline-block; width: 2.4em; height: 0.5em; background: radial-gradient(circle, #e9c46a 40%, transparent 42%) 0 50% / 0.8em 0.5em repeat-x; opacity: 0.8; animation: pulse 1s infinite; }
.caption.objection .cap-name { color: #ff8f7a; }
.caption.order .cap-text { font-size: clamp(0.88rem, 1.25vw, 1.1rem); }
.cap-skip { position: absolute; right: 1rem; bottom: 1rem; background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.caption.await .cap-skip { background: var(--accent); border-color: var(--accent); animation: pulse-btn 1.4s infinite; }
.caption.await .cap-skip::after { content: ' (continue)'; }
.title-card { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff6dc; opacity: 0; pointer-events: none; transition: opacity 0.5s; padding: 1rem; }
.title-card::before, .title-card::after { content: ''; position: absolute; left: 0; right: 0; height: 13%; background: #000; transition: transform 0.6s cubic-bezier(0.3, 0.1, 0.2, 1); }
.title-card::before { top: 0; transform: translateY(-100%); }
.title-card::after { bottom: 0; transform: translateY(100%); }
.title-card.show { opacity: 1; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25)); }
.title-card.show::before, .title-card.show::after { transform: none; }
.tc-main { font-family: var(--serif); font-size: clamp(1.4rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: 0.02em; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }
.tc-sub { margin-top: 0.4rem; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-l); }
.objection-flash { position: absolute; z-index: 8; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-6deg) scale(0); font: 800 clamp(2.2rem, 7vw, 5.5rem) / 1 var(--serif); color: #fff; -webkit-text-stroke: 3px #7d0f12; text-shadow: 6px 6px 0 #b3262b, 0 0 40px rgba(255, 60, 40, 0.6); pointer-events: none; opacity: 0; letter-spacing: -0.02em; }
.objection-flash.show { animation: objection 1.3s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
.thinking { position: absolute; z-index: 6; left: 50%; top: 4rem; transform: translateX(-50%); background: rgba(14, 9, 4, 0.75); backdrop-filter: blur(8px); color: #f3e3bd; border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.82rem; display: flex; gap: 0.6rem; align-items: center; animation: fade 0.3s; white-space: nowrap; }
.dots { display: flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass-l); animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.obj-window { position: absolute; z-index: 9; right: 1rem; top: 3.6rem; width: min(360px, 90%); background: rgba(255, 252, 245, 0.97); border-radius: 16px; padding: 1rem; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); animation: rise 0.3s; }
.obj-q { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin: 0.5rem 0; }
.obj-grounds { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.obj-bar { height: 4px; border-radius: 4px; background: #eadfc8; overflow: hidden; }
.obj-bar i { display: block; height: 100%; width: 100%; background: var(--danger); transform-origin: left; }
.obj-window.run .obj-bar i { animation: countdown 7s linear forwards; }

/* phase bar */
.phasebar { background: #3f0a13; color: #f1e3cc; border-radius: 0 0 18px 18px; margin-top: -18px; padding: 1.6rem 1.3rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.phase-meta .round { display: block; font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: #d9b98a; }
.phase-meta strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.phase-steps { list-style: none; display: flex; gap: 0.3rem; margin: 0; padding: 0; flex-wrap: wrap; }
.phase-steps li { font-size: 0.74rem; padding: 0.3rem 0.65rem; border-radius: 999px; color: #8fa397; border: 1px solid rgba(255, 255, 255, 0.08); }
.phase-steps li.done { color: #c9d6cd; }
.phase-steps li.done::before { content: '✓ '; color: #7fc59a; }
.phase-steps li.on { background: var(--brass); color: #1d140a; border-color: var(--brass); font-weight: 700; }

/* composer */
.composer { margin-top: 1rem; background: var(--card); border: 2px solid var(--accent); border-radius: 18px; padding: 1.2rem; box-shadow: 0 10px 30px rgba(207, 84, 38, 0.15); animation: rise 0.3s; }
.your-turn { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 999px; padding: 0.2rem 0.6rem; margin-bottom: 0.5rem; }
.comp-head h4 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.comp-head p { font-size: 0.86rem; color: var(--muted); }
.composer textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; font: 1rem/1.5 var(--serif); resize: vertical; background: #fff; }
.comp-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.7rem; flex-wrap: wrap; }
.comp-row { margin-bottom: 0.7rem; }
.comp-row label { font-weight: 600; font-size: 0.86rem; display: flex; gap: 0.6rem; align-items: center; }
.rec-on { color: var(--danger); border-color: var(--danger); }

/* controls */
.controls { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; padding: 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.ctl { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.95rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 0.84rem; color: var(--ink-2); transition: all 0.15s; }
.ctl svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ctl:hover { border-color: #cdbd9c; }
.ctl[aria-pressed='true'] { background: #fbf0e6; border-color: #e3c3b0; color: var(--green); }
.ctl[aria-pressed='false'] { color: var(--muted); }
.ctl[aria-pressed='false'] svg .wave { opacity: 0; }
.ctl-engine { padding-top: 0.35rem; padding-bottom: 0.35rem; cursor: pointer; }
.ctl-engine select { border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; cursor: pointer; padding: 0.3rem 0; max-width: 13rem; }
.engine-note { font-weight: 400; max-width: 17rem; line-height: 1.35; }
.ctl-lawyer { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctl-lawyer:hover { background: var(--accent-2); border-color: var(--accent-2); }
.ctl-leave { color: var(--danger); background: #fff6f4; border-color: #f0d2cd; }

/* side panels */
.side-col { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.case-panel h2 { font-size: 1.25rem; }
.case-panel details summary { cursor: pointer; font-weight: 600; font-size: 0.86rem; color: var(--green); }
.case-panel details p { font-size: 0.86rem; color: var(--ink-2); margin-top: 0.5rem; }
.exhibit-list { display: flex; flex-direction: column; gap: 0.4rem; }
.exhibit { display: flex; align-items: center; gap: 0.6rem; text-align: left; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 0.82rem; }
.exhibit:hover { border-color: var(--brass); }
.record-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 0.4rem; }
.panel-head h3 { margin: 0; font-size: 1.05rem; }
.record { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 52vh; }
.rec { padding: 0.7rem 0 0.7rem 0.9rem; border-left: 2px solid var(--line); position: relative; animation: fade 0.4s; }
.rec-who { font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; }
.rec-dot { position: absolute; left: -5px; top: 0.95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.rec-judge .rec-dot { background: var(--green); }
.rec-clerk .rec-dot { background: #8d8d84; }
.rec.objection .rec-dot { background: var(--danger); }
.rec.objection .rec-text { color: #8f2a26; font-weight: 600; }
.rec.sustained .rec-text::before { content: 'SUSTAINED · '; color: var(--danger); font-weight: 700; font-size: 0.72rem; }
.rec.overruled .rec-text::before { content: 'OVERRULED · '; color: var(--green); font-weight: 700; font-size: 0.72rem; }
.rec-role { font-weight: 500; color: var(--muted); font-size: 0.7rem; }
.rec-who time { margin-left: auto; font-weight: 400; color: #a19a8a; font-size: 0.68rem; }
.rec-text { font-size: 0.84rem; color: var(--ink-2); margin-top: 0.15rem; }

/* drawer */
.drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25); transform: translateX(105%); transition: transform 0.4s cubic-bezier(0.3, 0.1, 0.2, 1); display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 1.3rem 1.3rem 0.6rem; }
.drawer-head h3 { margin: 0; }
.drawer-note { margin: 0 1.3rem; padding: 0.6rem 0.8rem; background: #f4ede0; border-radius: 10px; font-size: 0.8rem; color: var(--ink-2); }
.drawer .chat { flex: 1; min-height: 0; }
.drawer .chat-log { max-height: none; }

/* evidence modal */
.ex-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.8rem 0 1rem; }
.ex-doc { position: relative; background: #fffef8; border: 1px solid #e8dec8; padding: 1.6rem; border-radius: 6px; font-family: Georgia, serif; box-shadow: 4px 4px 0 #efe6d2; }
.ex-stamp { position: absolute; right: 1rem; top: 1rem; border: 2px solid #9a2323; color: #9a2323; font-weight: 700; padding: 0.15rem 0.5rem; transform: rotate(8deg); font-family: var(--sans); font-size: 0.8rem; opacity: 0.85; }
.ex-foot { margin-top: 1rem; font-size: 0.75rem; color: var(--muted); font-family: var(--sans); }

/* verdict */
.verdict { position: fixed; inset: 0; z-index: 70; background: rgba(15, 12, 8, 0.7); backdrop-filter: blur(8px); overflow-y: auto; padding: 2rem 1rem; animation: fade 0.4s; }
.verdict-card { position: relative; max-width: 1100px; margin: 0 auto; background: var(--paper); border-radius: 24px; padding: clamp(1.3rem, 3vw, 2.6rem); animation: rise 0.5s; }
.verdict-top { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; margin-bottom: 1.4rem; }
.verdict-top h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.stamp { flex: none; border: 4px double #1e3a2f; color: #1e3a2f; padding: 0.7rem 1rem; text-align: center; font: 800 1.3rem/1.1 var(--serif); letter-spacing: 0.2em; transform: rotate(-8deg); animation: stamp 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 0.3s both; border-radius: 8px; }
.stamp span { font: 700 0.62rem var(--sans); letter-spacing: 0.12em; }
.stamp-r { border-color: #9a2323; color: #9a2323; }
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.verdict-grid section h3 { margin-top: 1.1rem; font-size: 1.05rem; }
.verdict-grid ul { padding-left: 1.1rem; margin: 0.3rem 0; }
.verdict-grid li { margin-bottom: 0.35rem; font-size: 0.9rem; }
.paper { background: #fffef8; border: 1px solid #e8dec8; padding: 1.1rem 1.3rem; border-radius: 6px; font-family: Georgia, serif; font-size: 0.92rem; max-height: 300px; overflow-y: auto; }
.score { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.score h3 { margin: 0 !important; }
.ring { --p: 50; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #eadfc8 0); display: grid; place-items: center; flex: none; }
.ring span { width: 66px; height: 66px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font: 700 1.6rem var(--serif); }
.ring small { font-size: 0.7rem; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.laws dt { font-weight: 700; font-size: 0.86rem; margin-top: 0.7rem; }
.laws dd { margin: 0.1rem 0 0; font-size: 0.86rem; color: var(--ink-2); }
.verdict-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: 1.2rem; }

/* toast */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--ink); color: #fff; padding: 0.75rem 1.2rem; border-radius: 12px; font-size: 0.88rem; transition: transform 0.3s; max-width: 90vw; }
.toast.show { transform: translate(-50%, 0); }

/* ---------- Accounts ---------- */
.auth { display: grid; grid-template-columns: minmax(300px, 0.95fr) 1.05fr; max-width: 1080px; margin: 1.5rem auto 3rem; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(50, 20, 10, 0.12); }
.auth-side { position: relative; background: linear-gradient(165deg, #6a1220 0%, var(--maroon-d) 55%, #3a0910 100%); color: #f6ead6; padding: 2.4rem 2.2rem; display: flex; flex-direction: column; gap: 1.4rem; }
.auth-side::after { content: ''; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 2px solid rgba(242, 211, 148, 0.18); box-shadow: 0 0 0 26px rgba(242, 211, 148, 0.05); pointer-events: none; }
.auth-brand { display: flex; align-items: center; gap: 0.7rem; }
.auth-side h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); color: #fff7ea; line-height: 1.1; margin: 0.4rem 0 0; }
.auth-side h2 em { color: var(--gold); }
.auth-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.auth-perks li { position: relative; padding-left: 1.7rem; font-size: 0.92rem; color: #ecdcc3; line-height: 1.45; }
.auth-perks li::before { content: ''; position: absolute; left: 0; top: 0.25rem; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, var(--gold) 0 35%, transparent 38%), rgba(242, 211, 148, 0.18); }
.auth-perks b { color: #fff6e6; }
.auth-fine { margin-top: auto; font-size: 0.75rem; color: #d2b997; }
.auth-main { padding: 2.4rem clamp(1.4rem, 3vw, 2.8rem); }
.auth-main h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 0.2rem; }
.auth-form { display: grid; gap: 0.95rem; margin-top: 1.3rem; }
.auth-form label:not(.check) { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.86rem; }
.auth-form input:not([type=checkbox]) { border: 1px solid var(--line); border-radius: 11px; padding: 0.75rem 0.9rem; font: inherit; font-weight: 400; background: #fff; width: 100%; }
.auth-form label.bad input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179, 38, 43, 0.12); }
.auth-form .check { font-size: 0.84rem; color: var(--ink-2); align-items: flex-start !important; }
.auth-form .check input { margin-top: 0.2rem; accent-color: var(--green); }
.pw { position: relative; display: block; }
.pw input { padding-right: 2.8rem !important; }
.pw-eye { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: 0.4rem; border-radius: 8px; }
.pw-eye:hover { color: var(--ink); background: #f3ebde; }
.pw-rules { list-style: none; padding: 0; margin: -0.3rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.78rem; color: var(--muted); }
.pw-rules li::before { content: '○ '; }
.pw-rules li.ok { color: #2f6a43; }
.pw-rules li.ok::before { content: '✓ '; }
.captcha { background: #fbf4e8; border: 1px solid #eedfc4; border-radius: 12px; padding: 0.8rem 0.9rem; }
.cap-label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.5rem; }
.cap-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.cap-row img { border-radius: 8px; border: 1px solid #ead7b6; background: #f6ecdb; }
.cap-row input { width: 5.5rem !important; text-align: center; font-weight: 700 !important; }
.form-error { margin: 0; background: #fdeeee; color: #8f1f24; border: 1px solid #f3cdcd; border-radius: 10px; padding: 0.65rem 0.8rem; font-size: 0.88rem; }
.auth-switch { margin-top: 1.2rem; font-size: 0.92rem; }
.auth-switch a, .auth-main .small a { color: var(--green); font-weight: 600; }
.notice-card { background: #fbf2e1; border: 1px solid #efd9b0; border-left: 4px solid var(--gold); border-radius: 12px; padding: 0.9rem 1rem; margin: 0.4rem 0 1.2rem; font-size: 0.92rem; }
.notice-card a { color: var(--green); font-weight: 700; }
.me .avatar { transition: box-shadow 0.2s; }
.me:not(.signed-in) .avatar { background: #cdb79a; }
.me-card { display: flex; gap: 0.7rem; align-items: center; padding: 0.3rem 0.5rem 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.me-card div { display: flex; flex-direction: column; min-width: 0; }
.me-card span:not(.avatar) { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.me-perks { padding: 0 0.5rem; margin: 0 0 0.8rem; }
.me-actions { display: flex; gap: 0.5rem; padding: 0 0.5rem 0.3rem; }
.pop .btn.full { margin-top: 0.4rem; }
.account-head { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.account-head h1 { margin: 0; }
.account-head p { margin: 0.2rem 0 0; }
.account-head > div { flex: 1; min-width: 220px; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.stat strong { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--green); }
.stat span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.hist-row { grid-template-columns: 5.5rem minmax(12rem, 2fr) 7rem 1.4fr 4.5rem; }
.score-pill { display: inline-block; min-width: 2.6rem; text-align: center; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.86rem; }
.score-pill.good { background: #e3f1e5; color: #2f6a43; }
.score-pill.mid { background: #fbecd2; color: #8a5a0c; }
.score-pill.low { background: #fbe0de; color: #9b1f1a; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; margin: 0.8rem; }
  .auth-side { padding: 1.6rem 1.4rem; }
  .auth-perks { display: none; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scaleY(1.012) translateY(-0.5px); } }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.08); } }
@keyframes talk { 0% { opacity: 1; transform: scaleY(0.25) scaleX(0.9); } 100% { opacity: 1; transform: scaleY(1.15); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 65% { transform: rotate(2deg) translateY(1px); } }
@keyframes jitter { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.5deg) translateX(-0.5px); } }
@keyframes gesture { 0%, 100% { transform: rotate(0); } 22% { transform: rotate(-30deg); } 48% { transform: rotate(-14deg); } 74% { transform: rotate(-38deg); } }
@keyframes gesture-sm { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-12deg); } }
@keyframes type { to { transform: translateY(2px) rotate(2deg); } }
@keyframes beam { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.75; } }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 0.7; } 80% { opacity: 0.5; } 100% { opacity: 0; transform: translate(30px, -90px); } }
@keyframes flag { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(2.5deg) scaleX(0.97); } }
@keyframes screen { 50% { opacity: 0.8; } }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } }
@keyframes pulse { 50% { opacity: 0.3; } }
@keyframes pulse-btn { 50% { box-shadow: 0 0 0 6px rgba(207, 84, 38, 0.3); } }
@keyframes bounce { 50% { transform: translateY(-4px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes objection { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(2.4); } 25% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); } 75% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1.04); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(1.1); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(2.2); } }
@keyframes countdown { to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .cam, .actor, .actor .pose { transition: none !important; }
  .fan-blades, .mote, .grain, .beam, .flag, .actor .breath, .actor.talking .head, .actor.talking .arm-r { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .court-grid { grid-template-columns: 1fr; }
  .side-col { position: static; max-height: none; display: grid; grid-template-columns: 1fr 1fr; }
  .how-strip, .steps { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  /* cause list: rows become cards */
  .ct-head { display: none; }
  .ct-row { grid-template-columns: 1fr auto; grid-template-areas: 'title title' 'type id' 'court diff' 'dur go'; gap: 0.45rem 1rem; padding: 1rem 1.1rem; }
  .ct-row > :nth-child(1) { grid-area: id; justify-self: end; font-size: 0.8rem; }
  .ct-row > :nth-child(2) { grid-area: title; }
  .ct-row > :nth-child(3) { grid-area: type; }
  .ct-row > :nth-child(4) { grid-area: court; }
  .ct-row > :nth-child(5) { grid-area: diff; justify-self: end; }
  .ct-row > :nth-child(6) { grid-area: dur; }
  .ct-row > :nth-child(7) { grid-area: go; }
  .ct-title small { white-space: normal; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; gap: 0.5rem; overflow: visible; }
  .brand { border: 0; padding: 0; }
  .brand-mark, .brand-mark svg { width: 42px; height: 42px; }
  .brand-name { font-size: 1.3rem; }
  .brand-sub { font-size: 0.55rem; max-width: none; margin-top: 0.1rem; }
  .menu-btn { display: flex; flex-direction: column; gap: 4px; background: none; border: 1px solid rgba(242, 211, 148, 0.4); border-radius: 10px; padding: 10px; }
  .menu-btn span { width: 18px; height: 2px; background: #f6ead6; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #5a0e1b; padding: 0.6rem 1rem 1rem; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
  .topbar { padding: 0.7rem 1rem; }
  .me-name, .me .chev { display: none; }
  .me { border-left: 0; padding-left: 0.2rem; }
  body.nav-open .nav { display: flex; }
  .promo, .side-fine { display: none; }
  .file-grid, .chamber-grid, .chamber-hero, .verdict-grid, .two { grid-template-columns: 1fr; }
  .legend, .myths { grid-template-columns: 1fr; }
  .tips { columns: 1; }
  /* phones and tablets: courtroom on top at 16:9, copy below */
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-scene { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 9; border-left: 0; border-bottom: 2px solid rgba(214, 167, 78, 0.55); }
  .hero-copy { grid-row: 2; }
  .court-head { flex-wrap: wrap; }
  .you-are { text-align: left; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .grid { grid-template-columns: 1fr; }
  .how-strip, .steps, .timeline, .side-col, .form-row, .laws-list { grid-template-columns: 1fr; }
  .home { padding: 0 0.8rem 2rem; }
  .hero { border-radius: 16px; }
  .hero-stats { gap: 0.6rem 1.2rem; }
  .cause-search { min-width: 0; width: 100%; }
  .pop { width: min(300px, calc(100vw - 2rem)); }
  .search { min-width: 0; width: 100%; }
  .stage { border-radius: 12px; }
  .court-svg { height: 100%; }
  .cap-text { padding-right: 0; font-size: 0.92rem; max-height: 5.6em; }
  .cap-skip { top: 0.6rem; bottom: auto; }
  .caption { padding-top: 2.4rem; }
  .ctl span { display: none; }
  .ctl-lawyer span { display: inline; }
  .phasebar { border-radius: 0 0 12px 12px; }
  .phase-steps { display: none; }
  .join-form { flex-direction: column; }
  .verdict-top { flex-direction: column; }
  .paper-sheet { padding: 1.6rem 1.4rem 1.6rem 2rem; }
  .cta-band { flex-direction: column; gap: 1rem; text-align: center; }
}

/* history table: keep it a simple two-column list on narrow screens (overrides the cause-list card layout) */
@media (max-width: 1180px) {
  .hist-row { grid-template-areas: none; grid-template-columns: 4.5rem 1fr auto; }
  .hist-row > * { grid-area: auto !important; justify-self: start !important; }
  .hist-row > :nth-child(3), .hist-row > :nth-child(4) { display: none; }
  .hist-row.ct-head { display: none; }
}
