/* Saul Goodman Courtroom. Walnut, brass and paper: the colours of a real courtroom at night.
 * Flat colour and tone steps only; shadows only on things that truly float (the verdict, the notes drawer). */
:root {
  --ink: #0f0d0b;
  --ink-2: #191512;
  --ink-3: #241e19;
  --bone: #efe7d8;
  --bone-2: #c9bfae;
  --quiet: #998e7d;
  --brass: #d9a54a;
  --brass-ink: #20160a;
  --manila: #dcc79c;
  --manila-2: #cdb582;
  --folder-ink: #2a1d10;
  --p: #e8735a;
  --d: #45b3aa;
  --ok: #8fd19e;
  --no: #f08a7e;
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 400 18px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
b { font-weight: 600; }
.t-p { color: var(--p); }
.t-d { color: var(--d); }
.muted { color: var(--quiet); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brass); color: var(--brass-ink); padding: 10px 16px; border-radius: 6px; }
.skip:focus { left: 16px; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, .foot, .nav { position: relative; z-index: 2; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
@media (max-width: 600px) { .wrap { width: calc(100% - 32px); } }

.section-title { font: 600 clamp(38px, 5vw, 68px)/1 var(--serif); letter-spacing: -.02em; margin: 0 0 20px; }
.lede { font-size: 20px; color: var(--bone-2); max-width: 56ch; margin: 0 0 36px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 28px; border-radius: 6px; border: 0; font-weight: 600; font-size: 17px; text-decoration: none; color: var(--bone); transition: transform .2s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brass); color: var(--brass-ink); }
.btn.primary:hover { background: #e8b65c; transform: translateY(-2px); }
.btn.ghost { background: var(--ink-3); }
.btn.ghost:hover { background: #33291f; }
.btn.big { min-height: 64px; padding: 18px 40px; font-size: 19px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; transition: background .3s; }
.nav.solid { background: var(--ink); }
.brand { color: var(--bone); text-decoration: none; font: 600 22px/1 var(--serif); }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a { color: var(--bone-2); text-decoration: none; font-size: 16px; padding: 10px 14px; border-radius: 6px; transition: color .2s, background .2s; }
.nav nav a:hover { color: var(--bone); background: var(--ink-3); }
.nav nav a.nav-cta { background: var(--brass); color: var(--brass-ink); font-weight: 600; margin-left: 8px; }
@media (max-width: 760px) { .nav nav a:not(.nav-cta) { display: none; } .brand { font-size: 19px; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 120px 24px 80px max(24px, calc((100vw - 1240px) / 2)); }
.hero-title { font: 600 clamp(52px, 8.4vw, 132px)/.94 var(--serif); letter-spacing: -.035em; margin: 0 0 32px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .2em; margin-bottom: -.16em; white-space: nowrap; }
.hero-title .line > span { display: inline-block; }
.hero-sub { font-size: clamp(18px, 1.6vw, 22px); color: var(--bone-2); max-width: 40ch; margin: 0 0 36px; }
@media (max-width: 900px) { .hero { justify-content: flex-end; } .hero-title .line { white-space: normal; } }

/* ---------------------------------------------------------------- how */
.how { padding: 160px 0; background: var(--ink); }
.how-list { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.how-list h3 { font: 600 32px/1.08 var(--serif); margin: 0 0 14px; letter-spacing: -.01em; }
.how-list p { margin: 0; color: var(--bone-2); }
.how-list li { padding-top: 24px; position: relative; }
.how-list li::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 6px; background: var(--brass); }
.how-list li:nth-child(1)::before { background: var(--p); }
.how-list li:nth-child(2)::before { background: var(--d); }
@media (max-width: 900px) { .how-list { grid-template-columns: 1fr; gap: 40px; } .how { padding: 110px 0; } }

/* ---------------------------------------------------------------- docket: manila case folders */
.docket { padding: 150px 0 120px; background: var(--ink-2); }
.docket-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; background: var(--ink); padding: 6px; border-radius: 10px; }
.chip { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 6px; background: transparent; color: var(--bone-2); font-weight: 500; transition: background .2s, color .2s; }
.chip:hover { color: var(--bone); }
.chip[aria-selected="true"] { background: var(--bone); color: var(--ink); }

.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px 28px; padding-top: 30px; }
.folder { position: relative; text-align: left; border: 0; padding: 0; background: none; color: var(--folder-ink); transition: transform .35s var(--ease); }
.folder .tab { position: absolute; top: -30px; left: 0; height: 32px; padding: 6px 18px 0; border-radius: 10px 10px 0 0; background: var(--manila-2); font-size: 14px; font-weight: 600; color: var(--folder-ink); }
.folder .body { display: flex; flex-direction: column; gap: 12px; min-height: 290px; padding: 28px 26px 24px; background: var(--manila); border-radius: 0 10px 10px 10px; position: relative; overflow: hidden; }
.folder .body::after { content: ""; position: absolute; right: 22px; top: 0; width: 34px; height: 46px; background: var(--brass); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); transform: translateY(-100%); transition: transform .35s var(--ease); }
.folder h3 { font: 600 32px/1.02 var(--serif); margin: 0; letter-spacing: -.015em; padding-right: 40px; }
.folder .parties { font-size: 15px; color: #6a5534; margin: -4px 0 0; }
.folder p { margin: 0; font-size: 16.5px; line-height: 1.5; }
.folder .meta { margin-top: auto; padding-top: 10px; font-size: 14px; color: #6a5534; }
.folder:hover { transform: translateY(-6px) rotate(-.4deg); }
.folder[aria-pressed="true"] .body { background: var(--bone); }
.folder[aria-pressed="true"] .tab { background: var(--brass); }
.folder[aria-pressed="true"] .body::after { transform: translateY(0); }

/* ---------------------------------------------------------------- brief */
.brief { padding: 150px 0 110px; background: var(--ink); }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.style-col { margin: 0; padding: 30px; border: 0; border-radius: 12px; display: grid; gap: 8px; }
.style-col.p { background: #2b1812; }
.style-col.d { background: #102423; }
.style-col legend { float: left; width: 100%; font: 600 30px/1.1 var(--serif); padding: 0; margin-bottom: 14px; }
.style-col.p legend { color: var(--p); }
.style-col.d legend { color: var(--d); }
.style-opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; text-align: left; width: 100%; min-height: 64px; padding: 16px 18px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .04); transition: background .2s, transform .2s var(--ease); }
.style-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.style-opt b { font-size: 18px; }
.style-opt small { grid-column: 1; color: var(--bone-2); font-size: 15px; line-height: 1.45; }
.style-opt .tick { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background .2s, box-shadow .2s; }
.p .style-opt[aria-pressed="true"] { background: rgba(232, 115, 90, .2); }
.p .style-opt[aria-pressed="true"] .tick { background: var(--p); box-shadow: inset 0 0 0 7px #2b1812; }
.d .style-opt[aria-pressed="true"] { background: rgba(69, 179, 170, .2); }
.d .style-opt[aria-pressed="true"] .tick { background: var(--d); box-shadow: inset 0 0 0 7px #102423; }
.style-opt:disabled { opacity: .35; cursor: not-allowed; }
.start-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 24px; padding: 22px 30px; border-radius: 12px; background: var(--ink-3); position: sticky; bottom: 16px; z-index: 3; box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .85); }
.start-text { display: grid; gap: 2px; }
.start-case { margin: 0; font: 600 28px/1.1 var(--serif); }
.combo-note { margin: 0; color: var(--bone-2); font-size: 17px; }
.change-case { justify-self: start; margin-top: 6px; color: var(--brass); font-size: 15px; font-weight: 500; text-underline-offset: 3px; }
@media (max-width: 600px) { .start-row { padding: 20px; } .start-row .btn { width: 100%; } }
@media (max-width: 820px) { .styles { grid-template-columns: 1fr; } .style-col { padding: 22px; } }

/* ---------------------------------------------------------------- strategy */
.strategy { padding: 150px 0; background: var(--ink-2); }
.strat-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.select-label { display: inline-flex; align-items: center; gap: 12px; color: var(--bone-2); }
select { min-height: 44px; padding: 8px 12px; border-radius: 6px; border: 0; background: var(--ink-3); color: var(--bone); }
.matrix { display: grid; gap: 10px; grid-template-columns: auto repeat(var(--cols, 2), minmax(0, 1fr)); }
.matrix .h { font-size: 15px; color: var(--bone-2); display: flex; align-items: end; padding: 4px 6px; }
.matrix .h.col { justify-content: center; color: var(--d); font-weight: 600; }
.matrix .h.row { color: var(--p); font-weight: 600; align-items: center; }
.cell { position: relative; overflow: hidden; border-radius: 10px; padding: 28px 14px; text-align: center; background: var(--ink-3); }
.cell .bg { position: absolute; inset: 0; background: rgba(232, 115, 90, .35); transform-origin: bottom; }
.cell.def .bg { background: rgba(110, 150, 220, .35); }
.cell b { position: relative; display: block; font: 600 46px/1 var(--serif); }
.cell small { position: relative; color: var(--bone-2); font-size: 14px; }
.cell small.pay { display: block; margin-top: 8px; font-size: 12px; }
.cell.nodata b { font-size: 22px; color: var(--bone-2); }
.strat-note { font-size: 16px; color: var(--bone); max-width: 46ch; margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--brass); background: var(--ink-3); border-radius: 0 8px 8px 0; }
.cell.eq { box-shadow: inset 0 0 0 3px var(--brass); }
.cell.eq small::after { content: " · stable pick"; color: var(--brass); font-weight: 600; }
.takeaway { font-size: 19px; color: var(--bone-2); max-width: 46ch; margin-top: 22px; }
@media (max-width: 900px) { .strat-grid { grid-template-columns: 1fr; gap: 36px; } }

.foot { padding: 48px 24px 64px; text-align: center; color: var(--bone-2); font-size: 16px; background: var(--ink); }
.foot p { margin: 4px 0; }
.noscript { position: fixed; inset: auto 16px 16px; z-index: 99; background: var(--ink-3); padding: 14px; border-radius: 8px; }

/* ================================================================ the courtroom */
.court { position: fixed; inset: 0; z-index: 60; background: #0d0a08; overflow: hidden; }
#court-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.doors { position: absolute; inset: 0; z-index: 9; display: flex; pointer-events: none; }
.door { flex: 1; background: #3a2216; position: relative; }
.door.l { box-shadow: inset -8px 0 0 #2a170e; }
.door.r { box-shadow: inset 8px 0 0 #2a170e; }
.door::before { content: ""; position: absolute; inset: 8% 14%; background: #432819; border-radius: 4px; box-shadow: inset 0 0 0 10px #2f1b10; }
.door .handle { position: absolute; top: 50%; width: 14px; height: 120px; margin-top: -60px; border-radius: 7px; background: var(--brass); }
.door.l .handle { right: 26px; }
.door.r .handle { left: 26px; }

.hud-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px; background: linear-gradient(rgba(13, 10, 8, .75), rgba(13, 10, 8, 0)); }
.hud-case h2 { font: 600 clamp(24px, 2.6vw, 36px)/1.05 var(--serif); margin: 0; }
.hud-case p { margin: 4px 0 0; color: var(--brass); font-size: 16px; font-weight: 500; }
.hud-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tbtn { min-height: 44px; padding: 10px 16px; border-radius: 6px; border: 0; background: rgba(36, 30, 25, .9); font-weight: 500; font-size: 15px; transition: background .2s; }
.tbtn:hover { background: #3a2f25; }
.tbtn[aria-pressed="false"] { color: var(--quiet); text-decoration: line-through; }
.tbtn[aria-expanded="true"] { background: var(--bone); color: var(--ink); }

.hud-meters { position: absolute; z-index: 5; left: 24px; top: 108px; width: min(300px, 40vw); display: grid; gap: 12px; padding: 16px 18px; border-radius: 10px; background: rgba(15, 13, 11, .82); }
.hud-meters .title { font-size: 14px; color: var(--bone-2); margin: 0; }
.meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; margin-bottom: 6px; }
.meter-head .val { font-variant-numeric: tabular-nums; color: var(--bone-2); white-space: nowrap; }
.meter-head .val.met { color: var(--ok); font-weight: 600; }
.meter-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 50%; border-radius: inherit; background: var(--p); transition: width .9s var(--ease); }
.meter-line { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--brass); }

.caption { position: absolute; z-index: 5; left: 50%; bottom: 104px; transform: translateX(-50%); width: min(860px, calc(100% - 32px)); padding: 22px 28px 24px; border-radius: 12px; background: rgba(15, 13, 11, .9); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8); }
.caption .who { margin: 0 0 6px; font-weight: 600; font-size: 16px; }
.caption .who.w { color: var(--bone); }
.caption .who.p { color: var(--p); } .caption .who.d { color: var(--d); } .caption .who.j { color: var(--brass); }
.caption .said { margin: 0; font: 500 clamp(22px, 2.3vw, 30px)/1.3 var(--serif); min-height: 1.3em; }
.caption .aside { margin: 10px 0 0; color: var(--bone-2); font-size: 16px; }
.caption .aside:empty { display: none; }
.caption .said .yes { color: var(--ok); } .caption .said .no { color: var(--no); }

.hud-bottom { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 18px 24px 22px; background: linear-gradient(rgba(13, 10, 8, 0), rgba(13, 10, 8, .85) 40%); }
.cbtn { min-width: 52px; height: 52px; border-radius: 8px; border: 0; background: rgba(36, 30, 25, .95); display: grid; place-items: center; transition: background .2s, transform .15s; font-weight: 600; }
.cbtn:hover { background: #3a2f25; }
.cbtn:active { transform: scale(.95); }
.cbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cbtn.wide { padding: 0 22px; background: var(--brass); color: var(--brass-ink); min-width: 150px; }
.cbtn.wide:hover { background: #e8b65c; }
.cbtn.wide.on { background: var(--bone); color: var(--ink); }
.progress { flex: 1; min-width: 80px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--brass); transition: width .5s var(--ease); }
.step-count { font-size: 15px; color: var(--bone-2); font-variant-numeric: tabular-nums; min-width: 60px; }
.speed { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--bone-2); }

.notes { position: absolute; z-index: 7; top: 0; right: 0; bottom: 0; width: min(420px, 100%); overflow-y: auto; padding: 88px 24px 120px; background: var(--ink-2); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .9); }
.notes h3 { font: 600 28px/1.1 var(--serif); margin: 0 0 6px; }
.home-btn { width: 100%; margin-bottom: 28px; }
.notes h3:not(:first-child) { margin-top: 32px; }
.notes h4 { font-size: 15px; margin: 18px 0 8px; }
.hint { color: var(--quiet); font-size: 14.5px; margin: 0; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev-list li { font-size: 15px; padding: 10px 12px; border-radius: 8px; background: var(--ink-3); color: var(--bone-2); display: grid; gap: 2px; }
.ev-list li.unshown { opacity: .45; }
.ev-list li.admitted { color: var(--bone); }
.ev-list li.excluded .ev-title { text-decoration: line-through; }
.ev-list .state { font-size: 13px; font-weight: 600; }
.ev-list .state.ok { color: var(--ok); } .ev-list .state.no { color: var(--no); } .ev-list .state.wait { color: var(--brass); }
.transcript { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.transcript button { width: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; font-size: 15px; color: var(--bone-2); }
.transcript button:hover { background: var(--ink-3); }
.transcript li.current button { background: var(--ink-3); color: var(--bone); }
.transcript .s { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.transcript .s.w { background: var(--bone); }
.transcript .s.p { background: var(--p); } .transcript .s.d { background: var(--d); } .transcript .s.j { background: var(--brass); }

.verdict { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100% - 32px)); text-align: center; padding: 40px 32px 34px; border-radius: 14px; background: var(--manila); color: var(--folder-ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9); }
.verdict-label { margin: 0; font-size: 17px; font-weight: 600; color: #6a5534; }
.verdict-word { font: 700 clamp(52px, 9vw, 88px)/1 var(--serif); margin: 8px 0 12px; letter-spacing: -.02em; }
.verdict-word.p { color: #b8452f; } .verdict-word.d { color: #1f7a73; }
.verdict-winner { font-weight: 600; margin: 0 0 6px; }
.verdict-reason { margin: 0 auto 26px; max-width: 44ch; }
.verdict-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.verdict .btn.ghost { background: rgba(42, 29, 16, .1); color: var(--folder-ink); }
.verdict .btn.ghost:hover { background: rgba(42, 29, 16, .18); }

@media (max-width: 760px) {
  .hud-top { padding: 14px 16px; flex-direction: column; }
  .hud-actions { justify-content: flex-start; }
  .hud-meters { display: none; }
  .court.show-meters .hud-meters { display: grid; left: 16px; right: 16px; width: auto; top: 140px; }
  .caption { bottom: 128px; padding: 16px 18px; }
  .hud-bottom { flex-wrap: wrap; padding: 12px 16px 16px; }
  .speed { margin-left: auto; }
  .progress { order: 9; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- the exhibit being handed up */
.exhibit { position: absolute; z-index: 6; top: 96px; right: 32px; width: min(340px, 42vw); margin: 0; padding: 22px 22px 20px; border-radius: 6px; background: var(--manila); color: var(--folder-ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); transform-origin: 50% 0; }
.exhibit::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; margin-left: -35px; background: rgba(239, 231, 216, .55); transform: rotate(-3deg); }
.ex-tag { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 14px; font-weight: 600; color: var(--bone); background: #8a3a28; }
.exhibit.d .ex-tag { background: #1f6f69; }
.ex-art { height: 120px; margin: 14px 0 12px; border-radius: 4px; background: #efe3c6; display: grid; place-items: center; }
.ex-art svg { height: 92px; width: auto; fill: none; stroke: var(--folder-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ex-art svg .fill { fill: rgba(42, 29, 16, .14); stroke: none; }
.exhibit figcaption { display: grid; gap: 4px; }
.ex-kind { font-size: 14px; font-weight: 500; color: #6a5534; }
.ex-title { font: 600 23px/1.15 var(--serif); }
.ex-flaw { font-size: 14.5px; color: #9c3b26; font-weight: 500; }
.ex-flaw:empty { display: none; }
.ex-stamp { position: absolute; left: 50%; top: 46%; padding: 8px 18px; border: 5px solid currentColor; border-radius: 8px; font: 700 34px/1 var(--serif); letter-spacing: .04em; white-space: nowrap; transform: translate(-50%, -50%) rotate(-12deg); mix-blend-mode: multiply; }
.ex-stamp.ok { color: #2e7d4a; }
.ex-stamp.no { color: #b3261e; }
@media (max-width: 760px) {
  .exhibit { top: auto; left: 0; right: 0; margin-inline: auto; bottom: 300px; width: min(300px, calc(100% - 48px)); padding: 16px; }
  .ex-art { height: 70px; }
  .ex-art svg { height: 56px; }
  .ex-title { font-size: 19px; }
}

/* ---------------------------------------------------------------- exhibits drawn as the real thing */
.caption .who.b { color: #a9bde0; }
.transcript .s.b { background: #a9bde0; }
.exhibit.has-artifact { width: min(400px, 46vw); }
.exhibit.has-artifact .ex-art { height: auto; min-height: 120px; padding: 14px; display: block; background: #e9dcbd; }
.art { color: #1d1610; font-size: 14px; line-height: 1.4; }
.art p { margin: 0; }
.art.note { padding: 16px 18px; background: #fff7c2 repeating-linear-gradient(transparent 0 25px, rgba(60, 90, 160, .25) 25px 26px); transform: rotate(-1.5deg); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); font: 600 22px/26px "Caveat", "Segoe Print", cursive; color: #22305c; }
.art.phone { width: 230px; margin: 0 auto; padding: 12px 12px 14px; border-radius: 22px; background: #15171c; display: grid; gap: 6px; }
.art.phone .contact { color: #f2f2f2; font-weight: 600; text-align: center; font-size: 13px; padding-bottom: 6px; display: grid; }
.art.phone .contact small { color: #9aa0aa; font-weight: 400; font-size: 11px; }
.art.phone .bubble { max-width: 82%; padding: 7px 11px; border-radius: 16px; font-size: 13.5px; }
.art.phone .bubble.them { background: #3a3d45; color: #fff; justify-self: start; border-bottom-left-radius: 4px; }
.art.phone .bubble.me { background: #2f7cf6; color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.art.receipt, .art.log { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.art.receipt { width: 250px; margin: 0 auto; padding: 14px 14px 18px; background: #fffdf6; clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 97%, 84% 100%, 76% 97%, 68% 100%, 60% 97%, 52% 100%, 44% 97%, 36% 100%, 28% 97%, 20% 100%, 12% 97%, 4% 100%, 0 97%); }
.art.receipt .shop { text-align: center; font-weight: 700; text-transform: uppercase; }
.art.receipt .date { text-align: center; color: #6b6255; margin-bottom: 8px; }
.art table { width: 100%; border-collapse: collapse; }
.art td { padding: 3px 0; vertical-align: top; }
.art.receipt td:last-child, .art.ledger td:last-child { text-align: right; }
.art.receipt .total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 6px; border-top: 2px dashed #8a8170; font-weight: 700; }
.art.log { padding: 12px; background: #0f1a14; color: #9fe0b0; border-radius: 4px; }
.art.log .title { color: #d8f3e0; font-weight: 700; margin-bottom: 6px; }
.art.log td:first-child { color: #6fb886; padding-right: 12px; white-space: nowrap; }
.art.log tr.mark { background: rgba(255, 214, 102, .18); color: #ffe6a0; }
.art.log tr.mark td:first-child { color: #ffe6a0; }
.art.ledger { padding: 14px 16px; background: #fffdf6; }
.art.ledger .title, .art.ad .title, .art.doc .title { font: 600 18px/1.2 var(--serif); margin-bottom: 6px; }
.art.ledger td { border-bottom: 1px dotted #b9ad94; }
.art.ledger .foot { margin-top: 6px; color: #6b5a3c; font-style: italic; }
.art.cctv { position: relative; padding: 0; background: #1d2320; color: #cfe8d6; border-radius: 3px; overflow: hidden; filter: contrast(1.1); }
.art.cctv svg, .art.photo svg { display: block; width: 100%; height: 130px; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.art.cctv svg { stroke: #9cc4a8; }
.art.cctv svg .fill { fill: rgba(156, 196, 168, .2); stroke: none; }
.art.cctv svg .red { fill: #c0392b; stroke: #e57368; }
.art.cctv::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .25) 2px 3px); pointer-events: none; }
.art.cctv .osd { display: flex; justify-content: space-between; padding: 6px 8px 0; font: 600 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.art.cctv .osd span:first-child { color: #ff6b6b; }
.art.cctv .cap, .art.photo .cap { padding: 4px 8px 8px; font-size: 12.5px; }
.art.photo { padding: 10px 10px 4px; background: #fbfaf6; transform: rotate(1.2deg); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
.art.photo svg { background: #cfe0e6; stroke: #2a3a40; }
.art.photo svg .fill, .art.photo svg .fill-all { fill: #6b5a3c; stroke: none; }
.art.photo svg .dots { fill: #a0672d; stroke: none; }
.art.photo .cap { font: 600 18px/1.2 "Caveat", "Segoe Print", cursive; color: #2a2a40; text-align: center; }
.art.doc { padding: 14px 16px; background: #fffef9; display: grid; gap: 4px; }
.art.doc .head { color: #6b5a3c; font-size: 12px; font-weight: 600; padding-bottom: 6px; border-bottom: 2px solid #2a1d10; margin-bottom: 4px; }
.art.doc .sign { margin-top: 6px; font: 600 18px/1.2 "Caveat", "Segoe Print", cursive; color: #22305c; }
.art.ad { padding: 14px 16px; background: #f6f1e4; border: 2px dashed #8a7a5a; }
.art.ad .price { font: 700 22px/1 var(--serif); color: #8a3a28; margin-bottom: 6px; }
.art.forum { padding: 12px 14px; background: #fff; border-left: 5px solid #ff6a3d; display: grid; gap: 4px; }
.art.forum .site { font-size: 11px; color: #888; }
.art.forum .user { font-weight: 700; font-size: 13px; color: #3a6ea5; }

/* music volume in the courtroom header */
.tbtn.vol { display: inline-flex; align-items: center; gap: 10px; cursor: default; }
.tbtn.vol input { width: 96px; accent-color: var(--brass); cursor: pointer; }
@media (max-width: 760px) {
  .exhibit.has-artifact { width: min(330px, calc(100% - 32px)); }
  .exhibit.has-artifact .ex-art { max-height: 170px; overflow: hidden; }
}

/* the team name in brass on the courtroom doors */
.door-word { position: absolute; top: 50%; transform: translateY(-50%); font: 700 clamp(30px, 6vw, 88px)/1 var(--serif); letter-spacing: .12em; color: var(--brass); text-shadow: 0 2px 0 #2a170e, 0 0 1px #000; z-index: 1; }
.door.l .door-word { right: 76px; }
.door.r .door-word { left: 76px; }
@media (max-width: 600px) { .door.l .door-word { right: 40px; } .door.r .door-word { left: 40px; } .door-word { font-size: 26px; letter-spacing: .06em; } }

/* the case notes drawer has its own close button (it covers the header buttons) */
.notes { padding-top: 20px; }
.notes-bar { position: sticky; top: -20px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -20px -24px 20px; padding: 16px 24px; background: var(--ink-2); }
.notes-title { font: 600 22px/1 var(--serif); }
.notes-close { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 6px; background: var(--ink-3); font-weight: 600; font-size: 15px; transition: background .2s; }
.notes-close:hover { background: #3a2f25; }
.notes-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* narrow screens: nothing may push the page wider than the screen */
@media (max-width: 640px) {
  .matrix { gap: 4px; grid-template-columns: 58px repeat(var(--cols, 2), minmax(0, 1fr)); }
  .matrix .h { font-size: 11px; padding: 2px; }
  .cell { padding: 10px 2px; }
  .cell b { font-size: 20px; }
  .cell small { font-size: 10px; }
  .cell small.pay { display: none; }
  select { max-width: 100%; min-width: 0; }
  .select-label { display: flex; align-items: center; gap: 8px; max-width: 100%; }
  .select-label select { flex: 1; min-width: 0; }
  .strat-grid { grid-template-columns: minmax(0, 1fr); }
  .strat-grid > * { min-width: 0; }
  .nav { padding: 10px 12px; gap: 8px; }
  .nav nav { gap: 0; }
  .nav nav a.nav-cta { white-space: nowrap; margin-left: 2px; padding: 8px 10px; font-size: 14px; }
  .brand { font-size: 17px; }
}
