/* Lastroom — a courtroom floor plan on a light gradient mesh. The entry form leads; the room is drawn under it. */
:root {
  --ground: #F3EFF6; --ink: #1D1A29; --mute: #6B6480; --rule: #DCD3E6; --card: #FBF9FD;
  --acc: #0F7B8A; --acc-ink: #F4FBFC; --acc-wash: #D3ECEF; --knock: #9A4B63;
  --disp: 'Fraunces', Georgia, serif; --body: 'DM Sans', system-ui, sans-serif; --mono: 'Fragment Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background-color: var(--ground); }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.5 var(--body); background-color: var(--ground);
  background-image:
    radial-gradient(60vmax 50vmax at 8% -6%, #E4D9F4 0%, rgba(228, 217, 244, 0) 62%),
    radial-gradient(48vmax 42vmax at 96% 12%, #F7E2D5 0%, rgba(247, 226, 213, 0) 60%),
    radial-gradient(56vmax 46vmax at 70% 96%, #D7EEE8 0%, rgba(215, 238, 232, 0) 64%);
  background-attachment: fixed; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
code { font-family: var(--mono); }

/* the usher line: name, session, connect — slim, no poster */
.usher { display: flex; align-items: center; gap: 10px; padding: 10px 16px; height: 48px; max-width: 1180px; margin: 0 auto; }
.usher-seal { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 700 17px/1 var(--disp); letter-spacing: -.01em; }
.usher-seal img { border-radius: 7px; }
.usher-case { flex: 1; min-width: 0; font: 12px/1.2 var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usher-key { border: 1px solid var(--rule); background: rgba(251, 249, 253, .7); color: var(--ink); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; }
.usher-key.is-on { border-color: var(--acc); color: var(--acc); }

.court { max-width: 1180px; margin: 0 auto; padding: 0 14px 28px; display: flex; flex-direction: column; gap: 14px; }

/* two columns on a desktop; on a phone they dissolve and the pieces stack in reading order */
.col-a, .col-b { display: contents; }
.motion { order: 1; } .docket { order: 2; } .floor { order: 3; } .tape { order: 4; } .statute { order: 5; }

/* the motion: the form that leads the page */
.motion { margin: 0; padding: 16px 16px 14px; border-radius: 22px; background: rgba(251, 249, 253, .78); border: 1px solid var(--rule); box-shadow: 0 10px 30px -18px rgba(54, 40, 86, .35); }
.motion-knock { margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--knock); font-weight: 500; }
.knock-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--knock); transform: translateY(-1px); }
.motion-knock.is-quiet { color: var(--mute); }
.motion-knock.is-quiet .knock-dot { background: var(--acc); }
.motion-knock.is-fresh { animation: knockin .9s ease-out; }
@keyframes knockin { 0% { transform: translateX(-8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.motion-ruling { margin: 0 0 14px; font: 600 21px/1.28 var(--disp); letter-spacing: -.01em; }
.motion-ruling code { font-size: .8em; background: var(--acc-wash); padding: 0 5px; border-radius: 6px; }
.motion-ruling .t { color: var(--acc); font-variant-numeric: tabular-nums; }
.motion-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.motion-take { flex: 1 1 200px; min-height: 52px; border: 0; border-radius: 16px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 16px; padding: 0 18px; box-shadow: 0 8px 18px -10px rgba(15, 123, 138, .8); transition: transform .15s; }
.motion-take:not(:disabled):active { transform: scale(.98); }
.motion-take:disabled { background: #B9C9CC; box-shadow: none; color: #F4F2F7; }
.motion-how { font-size: 13px; color: var(--mute); }
.motion-fine { margin: 10px 0 0; font-size: 13px; color: var(--mute); }
.motion-fine b { color: var(--ink); }

/* the docket: the CA pill, floating in the middle of the page and pinned as it scrolls */
.docket { position: sticky; top: 10px; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; border-radius: 999px;
  background: rgba(29, 26, 41, .94); color: #F1EDF6; box-shadow: 0 12px 26px -14px rgba(29, 26, 41, .7); backdrop-filter: blur(8px); }
.docket-tag { flex: none; font: 700 11px/1 var(--mono); letter-spacing: .08em; color: #8FD3DB; }
.docket-addr { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.25; word-break: break-all; user-select: all; }
.docket-addr.is-wait { color: #B5ADC4; user-select: none; }
.docket-copy { flex: none; border: 0; border-radius: 999px; background: var(--acc); color: var(--acc-ink); padding: 8px 14px; font-size: 13px; font-weight: 700; }
.docket-copy:disabled { background: #4A4458; color: #A79FB6; }
.docket-copy.is-done { background: #F1EDF6; color: var(--ink); }
.docket-gm { flex: none; font-size: 11px; color: #B5ADC4; padding-right: 6px; }

/* the floor plan */
.floor { position: relative; padding: 14px 14px 12px; border-radius: 26px; background: linear-gradient(180deg, rgba(251, 249, 253, .9), rgba(246, 241, 250, .82)); border: 1px solid var(--rule); }
.bench { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 10px 14px; border-radius: 18px; background: #EAE3F2; border-bottom: 4px solid #CFC4DE; }
.bench-lbl { font: 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.bench-pot { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.bench-pot span { font: 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.bench-pot b { font: 800 24px/1.1 var(--disp); font-variant-numeric: tabular-nums; }
.bench-pot i { font-style: normal; font-size: 11px; color: var(--mute); }
.dial { --f: 1; width: 118px; height: 118px; border-radius: 50%; padding: 8px; background: conic-gradient(var(--acc) calc(var(--f) * 360deg), #D8CFE4 0); transition: background .4s; }
.dial.is-hot { background: conic-gradient(var(--knock) calc(var(--f) * 360deg), #D8CFE4 0); }
.dial-face { width: 100%; height: 100%; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial-face b { font: 800 30px/1 var(--disp); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dial-face i { font-style: normal; font-size: 10px; line-height: 1.2; color: var(--mute); max-width: 82px; margin-top: 4px; }
.dial.is-hot .dial-face b { color: var(--knock); }
.aisle { margin: 12px 2px 8px; font: 11px/1.3 var(--mono); color: var(--mute); text-align: center; }
.pews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.pew { position: relative; min-height: 58px; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); padding: 6px 6px 5px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.pew-n { font: 700 13px/1 var(--disp); }
.pew-w { font: 9.5px/1.15 var(--mono); color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pew-s { font-size: 9px; line-height: 1.1; color: var(--mute); }
.pew.is-sat { background: #EEE8F5; }
.pew.is-lit { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); box-shadow: 0 0 0 4px var(--acc-wash), 0 10px 22px -10px rgba(15, 123, 138, .9); }
.pew.is-lit .pew-w, .pew.is-lit .pew-s { color: var(--acc-ink); }
.pew.is-knocked { background: #F4E7EC; border-color: #E2C3CE; }
.pew.is-knocked .pew-w { text-decoration: line-through; }
.pew.is-knocked .pew-s { color: var(--knock); font-weight: 700; }
.pew.is-next { border: 2px dashed var(--acc); background: rgba(211, 236, 239, .55); }
.pew.is-next .pew-s { color: var(--acc); font-weight: 700; }
.pew.is-void { opacity: .45; border-style: dashed; background: transparent; }
.pew.is-fresh { animation: seatin .8s ease-out; }
@keyframes seatin { 0% { transform: translateY(-10px) scale(.92); } 100% { transform: none; } }
.pews-more { grid-column: 1 / -1; font: 11px var(--mono); color: var(--mute); text-align: center; }
.threshold { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 11px/1.3 var(--mono); color: var(--mute); }
.threshold-door { width: 46px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--acc) 0 6px, transparent 6px 10px); }

/* the tape */
.tape { padding: 14px; border-radius: 22px; background: rgba(251, 249, 253, .72); border: 1px solid var(--rule); }
.tape-h { display: flex; justify-content: space-between; align-items: baseline; font: 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin-bottom: 8px; }
.tape-h2 { margin-top: 16px; }
.tape-roll { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.tape-roll li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 1.35; }
.tape-roll li:first-child { border-top: 0; }
.tape-roll time { font: 11.5px/1.6 var(--mono); color: var(--mute); }
.tape-roll code { font-size: 12px; }
.tape-roll .is-new { animation: tapein 1.2s ease-out; }
@keyframes tapein { 0% { background: var(--acc-wash); } 100% { background: transparent; } }
.tape-roll .tape-none { display: block; color: var(--mute); }
.tape-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tape-btn { flex: 1 1 140px; border: 1px solid var(--rule); background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink); }
.tape-btn:disabled { color: var(--mute); }
.tape-btn.is-hot { border-color: var(--acc); background: var(--acc); color: var(--acc-ink); }
.tape-past { list-style: none; margin: 0; padding: 0; }
.tape-past li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.tape-past li:first-child { border-top: 0; }
.tape-past b { font-variant-numeric: tabular-nums; }

/* the standing rules */
.statute { padding: 16px; border-radius: 22px; background: rgba(251, 249, 253, .6); border: 1px solid var(--rule); }
.statute-h { margin: 0 0 8px; font: 700 20px/1.2 var(--disp); }
.statute-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; }
.statute-case { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--acc-wash); }
.statute-case span { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--acc); }
.statute-case p { margin: 4px 0 0; font-size: 14.5px; }

/* footer */
.coda { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--mute); }
.coda-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.coda-refs { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; }
.coda-refs dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.coda-refs dd { margin: 0; font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.coda-note { margin: 0; }

/* sheet (routed views) + notes */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(29, 26, 41, .38); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-card { width: min(640px, 100%); max-height: 82vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 16px 18px 26px; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font: 700 18px var(--disp); }
.sheet-x { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.sheet-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-body th, .sheet-body td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.sheet-body ol { padding-left: 20px; }
.picks { display: grid; gap: 8px; }
.picks button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--rule); background: var(--ground); border-radius: 12px; padding: 10px 12px; }
.picks img { width: 24px; height: 24px; }
.notes { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; display: grid; gap: 6px; }
.note { background: var(--ink); color: #F1EDF6; padding: 8px 14px; border-radius: 999px; font-size: 13px; }

/* tablet: wider measure, bigger room */
@media (min-width: 640px) {
  .court { max-width: 760px; padding: 0 24px 32px; gap: 18px; }
  .usher { max-width: 760px; padding: 10px 24px; }
  .motion { padding: 22px 22px 18px; }
  .motion-ruling { font-size: 27px; }
  .docket-addr { font-size: 13px; }
  .dial { width: 150px; height: 150px; }
  .dial-face b { font-size: 38px; }
  .bench-pot b { font-size: 32px; }
  .pews { grid-template-columns: repeat(6, 1fr); gap: 9px; }
  .pew { min-height: 70px; padding: 8px; }
  .pew-w { font-size: 11px; }
  .pew-s { font-size: 10px; }
}

/* desktop: the page recomposes — the motion, the CA and the tape in a column, the room as the main field */
@media (min-width: 1000px) {
  .usher { max-width: 1180px; }
  .court { max-width: 1180px; display: grid; grid-template-columns: minmax(360px, 430px) 1fr; align-items: start; gap: 26px; }
  .col-a, .col-b { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .docket { top: 14px; }
  .floor { padding: 22px 22px 18px; }
  .motion-ruling { font-size: 28px; }
  .docket-addr { font-size: 12px; }
  .bench { padding: 16px 20px 20px; }
  .dial { width: 190px; height: 190px; padding: 10px; }
  .dial-face b { font-size: 50px; }
  .dial-face i { font-size: 12px; max-width: 120px; }
  .bench-pot b { font-size: 42px; }
  .pews { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .pew { min-height: 84px; padding: 10px; border-radius: 14px; }
  .pew-n { font-size: 17px; }
  .pew-w { font-size: 12px; }
  .pew-s { font-size: 11px; }
  .tape-roll { max-height: 420px; }
  .coda { max-width: 1180px; }
}
@media (max-width: 639px) { .pews > .pew.is-void:nth-child(n+11) { display: none; } }
