/* NightCore courts. Builds on site.css and community.css. The record is paper (the case file, the penal
   code); the docket and the forms are on the street. The one flourish is the court caption: the parties,
   the column of parentheses, the case number set large, the way a pleading opens. Brass is the bench. */
:root {
  --brass: #c8a951;
  --brass-ink: #7a5d12;
  --rule: #d6cfbd;
  --guilty: #9b1c1c;
  --cleared: #1d6b4a;
}

/* --- the docket (street) ---------------------------------------------------------------------- */
.court-head { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.court-head h1 { margin-bottom: .15em; }
.court-head .doc-lede { margin: 0; }
.seal { flex: none; width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--brass); display: grid; place-items: center;
  box-shadow: inset 0 0 0 5px var(--street), inset 0 0 0 6px var(--brass); }
.seal span { font: 900 1.9rem/1 var(--display); color: var(--brass); letter-spacing: .04em; }

.court-search { max-width: 640px; margin: 0 0 30px; }
.court-search .row { flex-wrap: nowrap; }
.court-search input { flex: 1; min-width: 0; }
.court-found { margin-bottom: 34px; }
.caselist { list-style: none; margin: 0; padding: 0; }
.caselist li { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.caselist a { text-decoration: none; }
.caselist a b { margin-right: 10px; }
.caselist span { color: var(--muted); font-size: .92rem; }

.insession { border-left: 3px solid var(--brass); padding: 4px 0 4px 18px; margin: 0 0 34px; }
.insession h2 { display: flex; align-items: center; gap: 4px; font-size: 1.6rem; }

.court-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.dayhead { font: 700 1.25rem var(--display); color: var(--muted); margin: 26px 0 4px; }
.dayhead:first-of-type { margin-top: 8px; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hrow { display: grid; grid-template-columns: 72px 150px minmax(0, 1fr) auto; gap: 4px 18px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hrow-time { font: 800 1.45rem/1 var(--display); }
.hrow.live .hrow-time { color: var(--brass); }
.hrow-kind { color: var(--muted); font-weight: 600; }
.hrow-case { text-decoration: none; display: flex; flex-wrap: wrap; gap: 0 10px; }
.hrow-case b { font-weight: 700; }
.hrow-case:hover span { text-decoration: underline; }
.hrow-judge { color: var(--muted); font-size: .92rem; text-align: right; }
.court-note { font-size: .9rem; margin-top: 18px; }
.court-rail h2 { font-size: 1.6rem; margin-top: 30px; }
.railbox { background: var(--street-2); border: 1px solid var(--line); border-radius: var(--radius-ui); padding: 16px 18px 4px; }
.railbox strong { font: 800 1.25rem var(--display); }
.decided { list-style: none; margin: 0; padding: 0; }
.decided li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.decided a { font-weight: 700; }
.decided .muted { font-size: .84rem; }

/* --- the case file (paper) --------------------------------------------------------------------- */
.casefile { max-width: 920px; padding: 30px 36px 26px; }
.caption { border-bottom: 2px solid var(--paper-ink); padding-bottom: 18px; margin-bottom: 16px; }
.caption-court { text-align: center; font: 800 1.35rem/1.15 var(--display); letter-spacing: .03em; margin: 0 auto 22px; max-width: none; }
.caption-court span { font: 600 .9rem var(--body); letter-spacing: 0; color: var(--paper-muted); }
.caption-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, auto); gap: 0 28px; align-items: center; }
/* The parties take five lines (People / Plaintiff / v. / name / Defendant), each 1.8rem: the column of
   parentheses beside them is exactly five lines, like a pleading's caption. */
.parties { position: relative; padding-right: 44px; }
.parties p { margin: 0; max-width: none; line-height: 1.8rem; }
.parties .party { font-weight: 700; font-size: 1.12rem; }
.parties .prole { padding-left: 2.2em; }
.parties .vs { padding-left: 1em; }
.parties::after { content: ")\A)\A)\A)\A)"; white-space: pre; position: absolute; top: 0; right: 0; font: 600 1.06rem/1.8rem var(--body); color: var(--paper-muted); }
.parties.sealed::after { content: none; }
.caseno { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: .92rem; color: var(--paper-muted); }
.caseno strong { font: 900 clamp(1.7rem, 4.4vw, 2.5rem)/1 var(--display); color: var(--paper-ink); letter-spacing: .01em; margin: 2px 0 6px; white-space: nowrap; }

.cf-status { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; margin: 0 0 14px; max-width: none; font-size: .96rem; }
.st { font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--rule); }
.st-custody, .st-awaiting_sentence { background: #f3dcc0; border-color: #e0bf95; }
.st-sentenced, .st-appeal { background: #ecd2d2; border-color: #dcb1b1; }
.st-closed { background: transparent; }
.cf-parties { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 18px; margin: 0 0 8px; font-size: .95rem; }
.cf-parties dt { color: var(--paper-muted); }
.cf-parties dd { margin: 0; font-weight: 600; }
.ticket { font-weight: 600; }
.cf-section { margin-top: 26px; }
.cf-section h2 { font-size: 1.55rem; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.casefile .table td, .casefile .table th { border-color: var(--rule); }
.charges .code, .pc .code { font: 800 1.15rem var(--display); white-space: nowrap; }
.charges .verdict { font-weight: 800; white-space: nowrap; }
.ch-guilty .verdict { color: var(--guilty); }
.ch-not_guilty .verdict { color: var(--cleared); }
.ch-dismissed td { color: var(--paper-muted); }
.judgment-line { font-size: 1.1rem; font-weight: 700; max-width: 70ch; }
.penalties { margin: 0 0 12px; padding-left: 1.2em; }
.penalties li { margin-bottom: 4px; }
.penalties .ck { color: var(--guilty); font-weight: 700; }
.hearings { list-style: none; margin: 0; padding: 0; }
.hearings li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.hearings .h-vacated, .hearings .h-missed { color: var(--paper-muted); }

/* The docket is a numbered sequence: entry numbers are the clerk's, and they never change. */
.docket { list-style: none; margin: 0; padding: 0; }
.dk { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.dk:first-child { border-top: 0; }
.dk-no { font: 800 1.2rem/1.3 var(--display); color: var(--brass-ink); text-align: right; }
.dk-title { margin: 0; font-weight: 700; max-width: none; }
.dk-meta { margin: 2px 0 0; font-size: .86rem; color: var(--paper-muted); max-width: none; }
.dk-meta .vis { color: var(--stamp); font-weight: 600; }
.dk-private { background: linear-gradient(90deg, rgba(36, 53, 127, .06), transparent 70%); }
.dk-ruling .dk-title, .dk-verdict .dk-title, .dk-sentence .dk-title { color: var(--paper-ink); }
.dk-verdict .dk-no, .dk-sentence .dk-no, .dk-ruling .dk-no { color: var(--guilty); }
.dk-text { white-space: pre-wrap; margin-top: 8px; max-width: 72ch; line-height: 1.6; }
.casefile .tag { background: var(--paper-2); color: var(--paper-muted); }
.casefile .tag.warn { background: #f3dcc0; color: #7a4a00; }
.exhibits { list-style: none; margin: 0; padding: 0; }
.exhibits > li { border-top: 1px solid var(--rule); padding: 9px 0; }
.exhibits summary { cursor: pointer; }
.exhibits summary b { font-family: var(--display); font-size: 1.1rem; margin-right: 6px; }
.chain { margin: 8px 0 4px; padding-left: 1.2em; font-size: .88rem; color: var(--paper-muted); }
.chain span { color: var(--paper-ink); font-weight: 600; }

/* --- acting on a case (street) ------------------------------------------------------------------- */
.court-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 28px; max-width: 920px; }
.court-actions h2 { font-size: 1.5rem; }
.court-actions .ruling { border-color: var(--brass); }
form.inline { display: inline-block; margin: 0; }
.court-actions .row form.inline { margin: 0 8px 8px 0; }
.outbox { max-width: 920px; margin-top: 22px; }
.outbox ul { margin: 0; padding-left: 1.2em; }
.court-subhead { margin-top: 40px; }
.bar-group { margin-bottom: 34px; }
.bar-group h2 { margin-bottom: .1em; }

/* --- the penal code -------------------------------------------------------------------------------- */
.pc-filter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 20px; }
.pc-classes { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-classes a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .92rem; }
.pc-classes a[aria-current] { background: var(--text); color: var(--street); border-color: var(--text); }
.pc-filter input { width: 220px; }
.penal { padding: 26px 30px; }
.pc-classes-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; margin-bottom: 14px; }
.pc-classes-about p { margin: 0 0 8px; font-size: .94rem; }
.pc-title { margin-top: 26px; }
.pc-title h2 { font-size: 1.6rem; }
.penal .table td, .penal .table th { border-color: var(--rule); }
.pc td.num { white-space: nowrap; }
.pc-capital .code { color: var(--guilty); }
.pc small { color: var(--paper-muted); }

@media (max-width: 900px) {
  .court-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .court-head { gap: 14px; }
  .seal { width: 58px; height: 58px; box-shadow: inset 0 0 0 4px var(--street), inset 0 0 0 5px var(--brass); }
  .seal span { font-size: 1.35rem; }
  .hrow { grid-template-columns: 56px minmax(0, 1fr); }
  .hrow-kind { grid-column: 2; grid-row: 1; }
  .hrow-case { grid-column: 2; }
  .hrow-judge { grid-column: 2; text-align: left; }
  .casefile, .penal { padding: 20px 16px; }
  .caption-grid { grid-template-columns: minmax(0, 1fr); }
  .parties { padding-right: 0; }
  .parties::after { content: none; }
  .caseno { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 10px; }
  .court-search .row { flex-wrap: wrap; }
  .court-actions { grid-template-columns: 1fr; }
  .dk { grid-template-columns: 30px minmax(0, 1fr); gap: 0 10px; }
}
.court-actions .row { align-items: flex-end; }
.court-actions .row .field { flex: 1 1 150px; }
.court-actions fieldset .row + .row { margin-top: 0; }
