/* ============================================================
   Cause List — the web design system, second layer.

   tokens.css holds the palette, type scale and spacing; nothing here invents a
   colour or a size. If a value is needed twice, it belongs in tokens.css.
   Loaded AFTER tokens.css — without it every colour below resolves to nothing.

   DESIGN.md, applied to a desktop surface:
     · one accent (navy), hairline borders, no shadows, no gradients
     · red only for lapsing orders and destructive actions
     · green only for a posted court result
     · legibility beats density — but a laptop earns a real table, and text on
       it is REAL BROWSER TEXT: selectable, findable with Ctrl+F, printable.
       That is the whole reason this site is HTML and not the Flutter build
       (WEB.md §2).
   ============================================================ */

* { box-sizing: border-box; }

/* [hidden] is the weakest rule in CSS, so any `display:` set on the same
   element silently defeats it. Several panels here are flex or grid AND are
   toggled with `el.hidden = true`. This puts `hidden` back in charge, once. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: var(--t-headline); font-weight: 800; }
h2 { font-size: 1.1875rem; font-weight: 800; }
h3 { font-size: var(--t-title); font-weight: 700; }
h4 {
  font-size: 0.75rem; font-weight: 800;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--slate);
}
p { margin: 0; }

a { color: var(--navy); }
.muted { color: var(--slate); }
.lead { max-width: 68ch; color: var(--slate); }
.error { color: var(--danger); font-weight: 600; }
.num { text-align: right; }
.stamp { color: var(--slate); font-size: var(--t-caption); font-weight: 600; }

/* ---------- controls ---------- */

label {
  display: flex; flex-direction: column; gap: var(--s-1);
  font-size: var(--t-caption); font-weight: 700; color: var(--slate);
}

input, select, textarea {
  font: inherit;
  padding: 10px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--navy-tint);
  border-color: var(--navy);
}

button { font: inherit; cursor: pointer; }
button.primary {
  background: var(--navy); color: #fff; border: 0;
  padding: 12px 16px; border-radius: var(--r-input);
  font-weight: 700;
}
button.primary:disabled { opacity: 0.55; cursor: default; }
button.ghost {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--hairline);
  padding: 8px 12px; border-radius: var(--r-input);
  font-weight: 600;
}
button.ghost:hover { background: var(--grey-tint); }
button.google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--hairline);
  padding: 12px 16px; border-radius: var(--r-input);
  font-weight: 700;
}
button.google:hover { background: var(--grey-tint); }
button.google:disabled { opacity: 0.55; cursor: default; }

.orDivider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0;
  color: var(--slate); font-size: var(--t-caption); font-weight: 700;
}
.orDivider::before, .orDivider::after {
  content: ''; flex: 1; height: 1px; background: var(--hairline);
}
button.link {
  background: none; border: 0; padding: 0;
  color: var(--navy); font-weight: 700; text-decoration: underline;
}

/* Keyboard focus must be visible on every interactive thing — a desktop app
   that cannot be tabbed through is a desktop app half-built. */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- surfaces ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-4) var(--s-5);
}
.card + .card { margin-top: var(--s-3); }
.card > h2 + .lead, .card > h1 + .lead { margin-top: var(--s-2); }
.card.placeholder .stamp { margin-top: var(--s-4); display: block; }

.head {
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap; margin-bottom: var(--s-4);
}
.head .actions { margin-left: auto; display: flex; gap: var(--s-2); }

.pill {
  display: inline-block;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.4px;
  padding: 3px 9px; border-radius: var(--r-chip);
  white-space: nowrap;
}
.pill.navy    { background: var(--navy-tint);    color: var(--navy); }
.pill.grey    { background: var(--grey-tint);    color: var(--grey); }
.pill.amber   { background: var(--amber-tint);   color: var(--amber); }
.pill.success { background: var(--success-tint); color: var(--success); }
.pill.danger  { background: var(--danger-tint);  color: var(--danger); }

/* A short list of label/value facts — the account card, and later the identity
   column on Case Detail. Labels are the quiet half; the value is what is being
   read out over the phone, so it is the bold one. */
.kv-list { margin-top: var(--s-4); display: flex; flex-direction: column; gap: 2px; }
.kv { font-size: var(--t-label); }
.kv span { color: var(--slate); }
.kv b { font-weight: 700; }

.empty {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  color: var(--slate);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
}
.empty.error-state { color: var(--danger); }

/* ---------- dense table ----------
   The desktop's reason to exist. Rows stay 40px so a full day fits on one
   screen, but the type never drops below 13px and nothing is ellipsized into
   ambiguity (DESIGN.md: a case number is never truncated). */

.tablewrap {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  /* PC first (WEB_DESIGN.md): nothing smaller than 0.75rem, and in rem so
     it follows the browser's own text size. Was 10.5px. */
  font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--slate);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
  /* 0.875rem (14px) — read at a desk for hours. Was 13px. */
  font-size: 0.875rem;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FCFCFD; }

/* ============================================================
   The shell — header, sidebar, content.

   Kept in the shared file with the components rather than in a private
   stylesheet, because the console will want the same frame the day it grows a
   sidebar, and two frames that drift is exactly what tokens.css was written to
   prevent.
   ============================================================ */

#shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: 'bar bar' 'side main';
  min-height: 100vh;
}

#bar {
  grid-area: bar;
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0 var(--s-4);
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
/* The shipped app icon, not initials in a coloured box. It is a white-and-gold
   serif LF on a near-black plate, so it needs no background of its own — the
   hairline is only there to stop the plate reading as a hole punched in the
   white header bar. Same asset as the front page uses, at 256px so it stays
   sharp on a 2x screen at this size. */
.brand .mark {
  width: 26px; height: 26px; border-radius: 6px;
  display: block;
  border: 1px solid var(--hairline);
}
.who {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--slate); font-size: var(--t-label);
}
.who b, .who #whoName { color: var(--ink); font-weight: 700; text-decoration: none; }
.who #whoName:hover { color: var(--navy); text-decoration: underline; }
#keysBtn { width: 32px; padding: 8px 0; text-align: center; }

/* ---------- the finder ----------
   Header search over the advocate's own cases. Results appear under it as a
   list you walk with the arrow keys — no mouse anywhere in the path from
   "where is that writ" to reading it. */
#finder { position: relative; flex: 1 1 380px; max-width: 460px; }
#finder input {
  width: 100%;
  padding: 8px 34px 8px 12px;
  background: var(--mist);
  border-radius: var(--r-chip);
}
#finder input:focus { background: var(--paper); }
/* Chrome draws its own clear button on type=search; ours would sit under it. */
#finder input::-webkit-search-cancel-button { display: none; }

#qHint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font); font-size: 0.75rem; font-weight: 800;
  color: var(--slate); background: var(--paper);
  border: 1px solid var(--hairline); border-radius: 5px;
  padding: 1px 6px; pointer-events: none;
}
#finder input:focus + #qHint { display: none; }

#qResults {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-1);
  max-height: 60vh; overflow-y: auto;
  z-index: 20;
}
.qrow {
  display: block; width: 100%; text-align: left;
  background: none; border: 0;
  padding: 8px 10px; border-radius: var(--r-input);
  cursor: pointer;
}
.qrow:hover, .qrow.on { background: var(--navy-tint); }
.qrow b { display: block; font-size: var(--t-label); font-weight: 700; }
.qrow span { display: block; font-size: var(--t-caption); color: var(--slate); }
/* The wider finder: a heading over each kind, and how many more there are. */
.qgroup { padding: 8px 10px 2px; font-size: var(--t-caption); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.qgroup:not(:first-child) { margin-top: var(--s-1); border-top: 1px solid var(--hairline); padding-top: 10px; }
.qmore { padding: 2px 10px 6px; font-size: var(--t-caption); color: var(--slate); }
.qnote {
  padding: 8px 10px; font-size: var(--t-caption); color: var(--slate);
  border-top: 1px solid var(--hairline); margin-top: var(--s-1);
}

/* The same row, on a full screen rather than in the dropdown. One component,
   so a case reads identically wherever it is found. */
.hitlist { display: flex; flex-direction: column; margin-top: var(--s-3); }
.hitlist .qrow { border-bottom: 1px solid var(--hairline); border-radius: 0; padding: 10px; }
.hitlist .qrow:last-child { border-bottom: 0; }

/* ---------- overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(16, 20, 30, 0.34);
  display: grid; place-items: center;
  padding: var(--s-4);
}
.overlay-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-5);
  width: min(520px, 96vw);
  max-height: 86vh; overflow-y: auto;
}
.overlay-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.overlay-head button { margin-left: auto; }
.keygroup { margin-bottom: var(--s-4); }
.keygroup h4 { margin-bottom: var(--s-2); }
.keyrow {
  display: flex; align-items: baseline; gap: var(--s-3);
  padding: 5px 0; font-size: var(--t-label);
}
.keyrow kbd {
  font-family: var(--font); font-size: 0.75rem; font-weight: 800;
  min-width: 34px; text-align: center;
  border: 1px solid var(--hairline); border-radius: 5px;
  padding: 2px 7px; background: var(--mist);
}

/* The menu stays put while the page scrolls under it: on a long cause list the
   way to the next screen should not be at the top of the document. */
#side {
  grid-area: side;
  align-self: start;
  position: sticky; top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: #F5F7FB;
  border-right: 1px solid var(--hairline);
  padding: var(--s-3) var(--s-2);
  display: flex; flex-direction: column; gap: 2px;
}
#side a, #side .sidebtn {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 12px;
  border-radius: var(--r-input);
  color: var(--ink);
  font-weight: 700; font-size: var(--t-label);
  text-decoration: none;
}
#side a svg, #side .soon svg, #side .sidebtn svg { flex: none; color: var(--slate); }
#side a:hover, #side .sidebtn:hover { background: #E8ECF5; }
#side a.on { background: var(--navy-tint); color: var(--navy); }
#side a.on svg { color: var(--navy); }
/* Named, visible and unusable — an advocate can see what is coming without
   clicking into a dead screen. */
#side .soon {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px;
  color: var(--grey);
  font-weight: 700; font-size: var(--t-label);
  cursor: default;
}
#side .soon > span:not(.navlabel) {
  margin-left: auto;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--grey);
}
#side hr {
  border: 0; border-top: 1px solid var(--hairline);
  margin: var(--s-3) var(--s-2);
}

#main {
  grid-area: main;
  padding: var(--s-5);
  max-width: 1180px;
  width: 100%;
}

/* ============================================================
   Schedule
   ============================================================ */

.eyebrow {
  font-size: 0.75rem; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s-2);
}
/* The one sentence the whole screen exists to say. Large, but not the w800
   reserved for a serial number (DESIGN.md). */
.big-line {
  font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em;
  margin: var(--s-3) 0 var(--s-1);
}
.dayhead h1 { font-size: var(--t-title); font-weight: 700; color: var(--slate); }
.note-amber {
  margin-top: var(--s-3);
  padding: 9px 12px;
  background: var(--amber-tint); border: 1px solid var(--amber-line);
  border-radius: var(--r-input);
  color: var(--amber); font-weight: 700; font-size: var(--t-label);
}

/* The four counts. Always four, always in the app's order, and an empty one
   shows a grey 0 rather than disappearing — structural honesty. */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
  margin: var(--s-3) 0;
}
.countcard { padding: var(--s-4); }
.countcard h3 { font-size: var(--t-label); font-weight: 700; }
.countcard .countnum {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.15; margin: var(--s-2) 0 2px;
}
.countcard .countsub { font-size: var(--t-caption); color: var(--slate); }
.countcard.navy .countnum { color: var(--navy); }
.countcard.grey .countnum { color: var(--grey); }
/* Not published yet: no number at all, because a zero here would be a claim. */
.countcard.amber { background: var(--amber-tint); border-color: var(--amber-line); }
.countcard.amber .countnum { color: var(--amber); }
.countcard.amber .countsub { color: var(--amber); font-weight: 700; }

/* Deadlines — red is only ever this and destructive confirmations. */
.deadlines { display: flex; flex-direction: column; gap: var(--s-2); }
.deadline {
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  padding: 9px 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-input);
  font-size: var(--t-label);
}
.deadline.danger { background: var(--danger-tint); border-color: var(--danger-line); }
.deadline.danger b { color: var(--danger); }
.danger-text { color: var(--danger); }

/* A court's own block: name, division, judges, then its rows in serial order. */
.courtgroup { margin-top: var(--s-4); }
.courthead {
  display: flex; align-items: baseline; gap: var(--s-2);
  flex-wrap: wrap; margin-bottom: var(--s-2);
}
.courthead .judges { font-size: var(--t-caption); color: var(--slate); }

/* The dense table. 13px, tight rows, real selectable text — the whole reason
   this site is HTML: a case number can be dragged over, copied into a draft and
   found with Ctrl+F. */
table.dense { min-width: 720px; }
table.dense td { padding: 7px 12px; }
table.dense th { padding: 8px 12px; }
table.dense .serialcol { text-align: right; width: 68px; white-space: nowrap; }
/* The serial is the number an advocate scans a list for, so it is the one
   figure that gets weight. */
table.dense td.serialcol { font-weight: 800; font-size: 0.9375rem; }
table.dense .sub { display: block; font-size: var(--t-caption); color: var(--slate); }
table.dense a { font-weight: 700; text-decoration: none; }
table.dense a:hover { text-decoration: underline; }

/* The week strip — seven days, closed ones included and labelled. */
.week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.weekday {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-input);
  background: var(--paper); color: var(--ink);
  text-decoration: none;
}
.weekday:hover { border-color: var(--navy-line); }
.weekday.on { border-color: var(--navy); background: var(--navy-tint); }
.weekday.closed { background: var(--mist); }
.weekdate { font-weight: 800; font-size: var(--t-label); }
.weekfull { font-size: var(--t-caption); color: var(--slate); }
.weekcount { font-size: var(--t-label); font-weight: 700; margin-top: var(--s-1); }
.weeknote { font-size: var(--t-caption); color: var(--slate); }
.weekday.unpublished { background: var(--amber-tint); border-color: var(--amber-line); }
.amber-text { color: var(--amber); }

/* ============================================================
   My Cases
   ============================================================ */

/* The buckets. Filters on a desk, where the phone has a list of rooms to walk
   into. None is hidden at zero — a bucket that vanishes when empty makes a
   lawyer wonder where their cases went. */
.buckets { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.bucket {
  display: inline-flex; align-items: baseline; gap: var(--s-2);
  padding: 7px 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-chip);
  background: var(--paper); color: var(--ink);
  font-size: var(--t-label); font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.bucket:hover { border-color: var(--navy-line); }
.bucket.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bucket .bucketcount { font-weight: 800; color: var(--slate); }
.bucket.on .bucketcount { color: #fff; }
.bucket.amber { border-color: var(--amber-line); background: var(--amber-tint); color: var(--amber); }
.bucket.amber .bucketcount { color: var(--amber); }
.bucket.amber.on { background: var(--amber); color: #fff; }
/* The second axis, shown under the first while the Judge Court bucket is open:
   which court, and then what kind of work. Side by side the two read as one
   long list of unrelated filters, and a Judge Court case looks counted twice. */
.subbuckets { margin-top: var(--s-2); padding-left: var(--s-3); }
.subbuckets .bucketlead {
  font-size: var(--t-label); font-weight: 700; color: var(--slate);
  padding-right: var(--s-1);
}

/* The divider the app draws between the fixed buckets and the user's own. */
.bucketsplit {
  width: 1px; align-self: stretch; min-height: 26px;
  background: var(--hairline); margin: 0 var(--s-1);
}

table.cases { min-width: 780px; }
/* A sortable heading is a button, so it is reachable by Tab and announces its
   direction — a table you can only sort with a mouse is half a table. */
.sortbtn {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--slate); cursor: pointer;
}
.sortbtn:hover { color: var(--navy); }
.sortbtn .arrow { color: var(--navy); }
/* Tomorrow or today. Not red — red is for a lapsing order, and a hearing you
   are ready for is not an emergency. */
.soon b { color: var(--navy); }

/* ============================================================
   Matters (B8)

   The five-rung ladder, stacked down the page as a list rather than laid out
   as a board. Each rung is a card with its own count and its own table.
   ============================================================ */

.rung { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.rung h3 { font-size: var(--t-title); font-weight: 800; }
.rung .rungnote { font-size: var(--t-caption); color: var(--slate); font-weight: 600; }
/* An empty rung is drawn, never hidden — it says "nothing at this stage",
   where a missing section would say "we forgot" (DESIGN.md principle 3). */
.rungempty { margin-top: var(--s-3); font-size: var(--t-label); }

table.matters { min-width: 860px; }
table.matters .pill { white-space: nowrap; }
/* A flagged row is tinted, not outlined: at fifty rows the eye finds a band of
   colour faster than it finds a border, and the pill in the State column says
   which flag it is. */
tr.flagged td { background: var(--amber-tint); }
tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

.pill.tiny { font-size: 0.75rem; padding: 1px 6px; margin-left: var(--s-2); }

/* Past its filing date. This IS red, and it is one of the few places outside a
   lapsing order that earns it: the day to file has gone, which is the same
   class of fact as a stay running out (DESIGN.md principle 4). */
.lapsed b { color: var(--danger); }

/* The loud flag: filed with the court, but no case number recorded yet. Red
   rather than amber because it is not a warning about the future — it is a
   statement that nothing is watching any cause list for this work right now. */
.note-danger {
  margin-top: var(--s-3);
  padding: 11px 14px;
  background: var(--danger-tint); border: 1px solid var(--danger-line);
  border-radius: var(--r-input);
  color: var(--danger); font-size: var(--t-label); line-height: 1.5;
}
.note-danger b { font-weight: 800; }
.note-danger span { font-weight: 600; }

/* ============================================================
   Case Detail
   ============================================================ */

/* Identity left, timeline right. Below 1000px the two stack rather than
   squeezing — a 40-character-wide timeline is not a timeline. */
.twocol {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
}
.col-left, .col-right { display: flex; flex-direction: column; gap: var(--s-3); }
.col-left .card + .card, .col-right .card + .card { margin-top: 0; }
.twocol h1 { font-size: var(--t-headline); }
.flag-amber { background: var(--amber-tint); border-color: var(--amber-line); }
.flag-amber h4, .flag-amber .lead { color: var(--amber); }

/* What the court, or the advocate, actually said. Quoted rather than styled as
   a status: it is somebody's words, not a state we computed. */
.result-line {
  margin-top: var(--s-2);
  padding: 8px 11px;
  background: var(--mist);
  border-left: 2px solid var(--hairline);
  border-radius: 0 var(--r-input) var(--r-input) 0;
  font-size: var(--t-label);
  white-space: pre-wrap;
}

.addnote { display: flex; gap: var(--s-2); align-items: flex-start; margin-bottom: var(--s-2); }
.addnote textarea { flex: 1 1 auto; resize: vertical; font-family: inherit; }
.adddate { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.adddate input[type=date] { flex: 0 0 auto; }
.adddate input:not([type=date]) { flex: 1 1 180px; }

/* One dated column, five kinds of thing in it. The kind is a pill rather than
   a colour, because colour alone would put five meanings on a palette that has
   exactly one accent. */
.timeline { display: flex; flex-direction: column; }
.timeyear {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 1.2px;
  color: var(--slate);
  margin: var(--s-4) 0 var(--s-2);
}
.timeyear:first-child { margin-top: var(--s-2); }
.event {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: var(--s-3);
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.eventdate { display: flex; flex-direction: column; }
.eventdate b { font-size: var(--t-label); font-weight: 700; }
.eventdate span { font-size: var(--t-caption); color: var(--slate); }
.eventtop { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.eventbody .sub { font-size: var(--t-caption); color: var(--slate); margin-top: 2px; }
/* Still to come — the one thing on this screen worth marking. */
.event.ahead .eventdate b { color: var(--navy); }
.event.ahead { background: linear-gradient(to right, var(--navy-tint), transparent 60%); }
.event.order .pill { background: var(--danger-tint); color: var(--danger); }
.event.task-done .eventbody b, .event.order-done .eventbody b { color: var(--slate); }
.event.note .pill { background: var(--navy-tint); color: var(--navy); }

@media (max-width: 1000px) {
  .twocol { grid-template-columns: minmax(0, 1fr); }
  .event { grid-template-columns: 96px minmax(0, 1fr); }
}

/* ---------- sign in ----------

   The signed-out page lives in `shared/landing.css`, which index.html loads
   after this file. It is not merely a login card any more — it is the whole
   front page of lexflowbd.com, and it is the only surface on the web side that
   is dark, so keeping it here would mean every signed-in advocate downloading
   marketing styles they will never see.

   What stays here is only what the sign-in form shares with the rest of the
   app: `input`, `label`, `button.primary`, `button.google`, `.orDivider` and
   `.error`, all defined further up. `#loginCard` itself is laid out in
   landing.css. */

/* ---------- flash ---------- */

.flash {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 30;
  max-width: min(560px, 92vw);
  padding: 11px 16px;
  border-radius: var(--r-btn);
  font-weight: 700; font-size: var(--t-label);
  background: var(--danger-tint); color: var(--danger);
  border: 1px solid var(--danger-line);
}
.flash.success { background: var(--success-tint); color: var(--success); border-color: #B9D3C1; }
.flash.info { background: var(--navy-tint); color: var(--navy); border-color: var(--navy-line); }
/* Saved, but not entirely as asked — a column this database has not got yet.
   Amber, not red: nothing failed and nothing was lost. */
.flash.warn { background: var(--amber-tint); color: var(--amber); border-color: var(--amber-line); }

/* ---------- a narrow laptop ----------
   Not a phone layout: the phone has an app. This only keeps a 13" screen and a
   half-width window usable. */
@media (max-width: 1040px) {
  /* The name goes before the search box does: the account code identifies the
     account just as well and takes a quarter of the room. */
  .who b, .who #whoText { display: none; }
}

@media (max-width: 860px) {
  #finder { flex-basis: 200px; }
  #shell {
    grid-template-columns: minmax(0, 1fr);
    /* Three rows, not two: the nav takes the height of its own content here.
       Left on `1fr` it inherits the whole column and every link stretches to
       the full height of the page. */
    grid-template-rows: 56px auto minmax(0, 1fr);
    grid-template-areas: 'bar' 'side' 'main';
  }
  #side {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--hairline);
  }
  #side hr { display: none; }
  #main { padding: var(--s-4); }
}

/* ============================================================
   subscription

   The one screen in the product that asks for money, and the one place a
   mistyped character costs an advocate 2,500 taka into somebody else's wallet.
   Everything here is sized for reading a number off a screen and typing it into
   a phone: the account code and the bKash number are large, spaced, and
   copyable, because they are transcribed by hand between two devices.
   ============================================================ */

/* The reconciliation key (migration 023). Shown large because it is copied into
   a bKash reference field on a different device — the one step that turns
   matching a payment into a lookup instead of detective work. */
.accountcode {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-4) 0;
  padding: var(--s-3) var(--s-4);
  background: var(--navy-tint);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-input);
}
.accountcode span { color: var(--navy); font-size: var(--t-label); font-weight: 600; }
.accountcode b {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.accountcode button { margin-left: auto; }

.paysteps {
  margin: var(--s-4) 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--t-label);
  line-height: 1.6;
}
/* A wallet number is read off this screen and typed into a phone keypad.
   Tabular figures and a little tracking are what stop 0/8 and 1/7 blurring. */
.paysteps b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* The reason a payment was rejected, under the row it belongs to. A rejection
   without its reason is what generates the angry phone call. */
.noterow td {
  padding-top: 0;
  font-size: var(--t-caption);
  border-top: 0;
}

/* ---------- the case allowance ----------

   A meter rather than a number alone, because "473 of 500" is read at a glance
   as a fraction and "473" is not read as anything. Amber when full or over —
   and those are two different facts: full is normal, over means the ceiling
   moved underneath them (a subscription lapsed), and the wording beside it says
   which, and that nothing was deleted. */

.usage { margin-top: var(--s-4); }
.meterhead { display: flex; align-items: center; gap: var(--s-3); margin-bottom: 7px; }
.meterhead b { font-size: 0.9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.meterhead .pill { margin-left: auto; }

.meter {
  height: 7px;
  border-radius: 999px;
  background: var(--grey-tint);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
}
.meter i.over { background: var(--amber); }

.usage p { margin: 8px 0 0; font-size: 0.8125rem; line-height: 1.6; }

/* ============================================================
   subscription, redesigned

   QUIET AUTHORITY is DESIGN.md principle 5, already written down: one accent,
   hairlines instead of shadows, no gradients, sleekness from spacing and type.
   A page that asks for money is exactly where a product is tempted to shout and
   exactly where an audience of lawyers is least persuaded by it.

   MOBILE FIRST: an advocate paying by bKash is doing it on the phone that has
   bKash on it, usually with the bKash app open in the other hand. Every target
   here clears 44px and the whole flow is one column until there is room.

   MOTION stays inside DESIGN.md's budget — 150-250ms, ease-out, state changes
   only — and is switched off under prefers-reduced-motion at the foot.
   ============================================================ */

.pendhead { display: flex; align-items: center; gap: var(--s-3); margin-bottom: 10px; }
.pendwhen { margin-left: auto; font-size: var(--t-caption); color: var(--slate); }
.pendtitle { margin: 0 0 6px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }

/* The waiting room. Amber because a pending payment is genuinely unresolved —
   it is not an error and not a success, and the app's amber already means
   exactly that (DESIGN.md principle 4 reserves red for lapsing orders). */
.card.pendcard { border-color: var(--amber-line); background: var(--amber-tint); }
.card.pendcard .lead { color: var(--ink); }

.pendfacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: var(--s-4) 0;
  background: var(--amber-line);
  border: 1px solid var(--amber-line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.pendfact { display: flex; align-items: baseline; gap: var(--s-3); padding: 11px 14px; background: var(--paper); }
.pendfact span { color: var(--slate); font-size: var(--t-caption); min-width: 116px; }
.pendfact b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- choosing ---------- */

.periodpick { display: flex; gap: 3px; padding: 3px; margin: var(--s-4) 0 var(--s-4);
              background: var(--grey-tint); border-radius: 999px; }
.periodpick button {
  flex: 1; font: inherit; font-size: 0.8125rem; font-weight: 700;
  color: var(--slate); background: transparent; border: 0; border-radius: 999px;
  padding: 12px 10px; cursor: pointer;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.periodpick button.on { background: var(--paper); color: var(--navy); }
.periodpick button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.tierpick { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.tiercard {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font: inherit; text-align: left; cursor: pointer;
  padding: 15px 16px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  transition: border-color 180ms ease-out, background 180ms ease-out;
}
.tiercard b { font-size: 0.9688rem; font-weight: 800; color: var(--ink); }
.tierprice { margin-left: auto; font-size: 1.0625rem; font-weight: 800; color: var(--ink);
             font-variant-numeric: tabular-nums; }
.tiercases { flex-basis: 100%; font-size: var(--t-caption); color: var(--slate); }
.tiercard.on { border-color: var(--navy); background: var(--navy-tint); }
.tiercard.on b, .tiercard.on .tierprice { color: var(--navy); }
.tiercard:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.compare { margin-top: var(--s-4); }
.compare summary { cursor: pointer; font-size: var(--t-label); font-weight: 700;
                   color: var(--navy); padding: 6px 0; }
.compare summary::-webkit-details-marker { display: none; }
.compare .tablewrap { margin-top: var(--s-3); }
.compare .pill { margin-left: 6px; }

/* The figure to transfer, stated once and large. An advocate typing an amount
   into bKash from memory is how a payment arrives that cannot be matched. */
.sendamount {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: var(--s-4);
  background: var(--navy-tint);
  border-radius: var(--r-card);
  margin-bottom: var(--s-4);
}
.sendamount span { color: var(--navy); font-size: var(--t-label); }
.sendamount b { font-size: 1.625rem; font-weight: 800; color: var(--navy);
                font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sendexact { font-variant-numeric: tabular-nums; }

/* ---------- what has been paid ---------- */

.paylist { display: flex; flex-direction: column; margin-top: var(--s-4); }
.payrow {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: 13px 0; border-bottom: 1px solid var(--hairline);
}
.payrow:last-child { border-bottom: 0; }
.payrow-main b { display: block; font-weight: 700; font-size: 0.9063rem; }
.payrow-main span { display: block; font-size: var(--t-caption); color: var(--slate);
                    font-variant-numeric: tabular-nums; }
.payrow-side { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.receiptlink { font-size: var(--t-label); font-weight: 700; color: var(--navy); }
.payreason { margin: 0 0 12px; font-size: var(--t-caption); color: var(--slate); }

@media (min-width: 720px) {
  .pendfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tierpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .periodpick button, .tiercard { transition: none; }
}

/* On a phone this form is filled in with one thumb while the bKash app is open
   in the other hand. The inputs inherit a desktop height that lands under the
   44px a thumb needs, and a submit button sized to its own text is a small
   target for the single most consequential press on the site. */
@media (max-width: 560px) {
  #trxId, #senderMsisdn { padding: 13px 13px; font-size: 1rem; }
  .card form button.primary { width: 100%; }
  .accountcode b { font-size: 1.25rem; }
}

/* ============================================================
   the checkout (screens/subscription.js payPanel) — owner, 2026-11-07:
   "mobile friendly, easy, should reflect authority… a pay button that works
   and shows progress and stops double click."

   One card. A navy band says whose page this is; under it, three numbered
   steps; the button is the full width and 54px tall. Every target clears
   48px. Nothing gradients, nothing shouts — DESIGN.md's quiet authority.
   ============================================================ */

.card.paycard { padding: 0; overflow: hidden; border-color: var(--navy-line); }
.payband {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--navy); color: #fff;
  border-bottom: 3px solid #C9A227;
}
.paymark { width: 40px; height: 40px; border-radius: 10px; background: #fff; flex: none; }
.paybandtext { display: flex; flex-direction: column; min-width: 0; }
.paybandtext b { font-size: 0.9688rem; font-weight: 800; letter-spacing: 0.01em; }
.paybandtext span { font-size: 0.75rem; color: #C9D3EA; }
.paylock { margin-left: auto; display: inline-grid; place-items: center;
           width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); flex: none; }

.paybody { padding: 18px 18px 20px; }
.paytitle { margin: 0 0 12px; font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.02em; }

/* Courts: one row, a plain dropdown (owner, same day: "just dropdown"). */
.paycourts { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.paycourts label { display: inline; font-size: var(--t-label); font-weight: 600; color: var(--slate); }
.courtselect {
  flex: 1; min-width: 0; max-width: 300px;
  font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--ink);
  padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--hairline); border-radius: var(--r-input); background: var(--paper);
}

.paystep { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.paystep b { font-size: 0.9688rem; font-weight: 800; }
.paystepno {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 0.8125rem; font-weight: 800;
}
.paysummary { margin-left: auto; font-size: var(--t-caption); color: var(--slate); text-align: right; }

.paycard .periodpick { margin: 0 0 10px; }
.paycard .periodpick button { min-height: 44px; font-size: 0.875rem; }

/* A package is a radio row: circle, name and limit, price. */
.paycard .tiercard { align-items: center; flex-wrap: nowrap; gap: 12px; min-height: 60px; padding: 12px 14px; }
.tierradio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--hairline); flex: none;
             transition: border-color 180ms ease-out, box-shadow 180ms ease-out; }
.tiercard.on .tierradio { border-color: var(--navy); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 10px var(--navy); }
.tiername { display: flex; flex-direction: column; min-width: 0; }
.paycard .tiercases { flex-basis: auto; }
.paycard .tierprice { font-size: 1.125rem; }
.paycard .compare { margin-top: 8px; }

/* The slip: what to send, each line with a Copy for a thumb. */
.payslip { list-style: none; margin: 0; padding: 0;
           border: 1px solid var(--navy-line); border-radius: var(--r-card); overflow: hidden; }
.sliprow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  column-gap: 12px; row-gap: 2px;
  padding: 12px 14px; background: var(--paper);
}
.sliprow + .sliprow { border-top: 1px solid var(--navy-line); }
.slipwhat { grid-column: 1; font-size: var(--t-caption); color: var(--slate); }
.payval { grid-column: 1; font-size: 1.1875rem; font-weight: 800; color: var(--navy);
          font-variant-numeric: tabular-nums; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.payval.big { font-size: 1.5rem; letter-spacing: 0; }
.payval.small { font-size: 0.875rem; letter-spacing: 0; }
.sliprow .slipcopy { grid-column: 2; grid-row: 1 / span 2; margin: 0;
                     min-height: 44px; padding: 0 14px; font-size: 0.8125rem; font-weight: 700; }
.slipcopy.copied { color: var(--success); border-color: var(--success); }

/* Step 3 and the button. */
.payform { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.trxlabel { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.trxlabel b { font-size: 0.9688rem; font-weight: 800; color: var(--ink); }
.trxhint { font-size: var(--t-caption); color: var(--slate); }
.trxinput {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--navy-line); border-radius: var(--r-input); background: var(--paper);
}
.trxinput::placeholder { font-weight: 600; letter-spacing: 0.04em; color: #A3ACBA; text-transform: none; }
.trxinput:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint); }
.payfrom summary { cursor: pointer; font-size: var(--t-caption); color: var(--navy); font-weight: 700; padding: 4px 0; }
.payfrom input { margin-top: 8px; width: 100%; min-height: 48px; padding: 10px 12px; font-size: 1rem;
                 border: 1px solid var(--hairline); border-radius: var(--r-input); }

.paysubmit {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 4px;
  font-size: 1.0313rem; font-weight: 800; letter-spacing: 0.01em;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background 180ms ease-out, transform 120ms ease-out;
}
.paysubmit:active:not(:disabled) { transform: scale(0.985); }
/* Working, not broken: solid while it works (beats button.primary:disabled). */
button.primary.paysubmit:disabled { cursor: progress; opacity: 1; }
.paysubmit .spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: payspin 800ms linear infinite;
}
.paysubmit.busy .spinner { display: inline-block; }
button.primary.paysubmit.busy { background: var(--navy); }
button.primary.paysubmit.ok { background: var(--success); border-color: var(--success); }
@keyframes payspin { to { transform: rotate(360deg); } }
.payerr { margin: 0; }

.paysafe { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0;
           font-size: 0.7813rem; line-height: 1.5; color: var(--slate); }
.paysafe svg { flex: none; margin-top: 2px; }

@media (min-width: 720px) {
  .paybody { padding: 22px 26px 26px; }
  .paycard .tierpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .paysubmit, .tierradio { transition: none; }
  .paysubmit .spinner { animation-duration: 2.4s; }
}

/* ============================================================
   the workspace gate

   A free or long-lapsed account can sign in, but the workspace itself is part
   of the paid packages. The phone app is not and never becomes one — that is
   what keeps this honest, and what keeps the Play consumption-only model
   intact (PAYMENTS.md §2-3).
   ============================================================ */

/* Dimmed, not hidden. A missing nav item would read as "this product has no
   case list"; a dimmed one reads as "this exists and is not yours yet", which
   is true and is also the argument for paying. */
#side a.off {
  opacity: 0.42;
  pointer-events: none;
  cursor: default;
}

.card.lockcard { border-color: var(--hairline); }

/* The reassurance carries the most weight on this screen, so it gets a surface
   of its own rather than sitting as another paragraph. Navy, not amber: being
   on the free package is not a warning state, and colouring it as one would
   tell an advocate something is wrong with their account when nothing is. */
.lockapp {
  display: block;
  padding: var(--s-4);
  margin: var(--s-4) 0;
  background: var(--navy-tint);
  border-radius: var(--r-card);
}
.lockapp b { display: block; color: var(--navy); font-weight: 800; margin-bottom: 4px; }
.lockapp span { display: block; color: var(--navy); font-size: 0.8438rem; line-height: 1.6; }

.lockbtn {
  display: inline-block;
  padding: 13px 20px;
  border-radius: var(--r-btn);
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.9063rem;
  text-decoration: none;
  transition: background 180ms ease-out;
}
.lockbtn:hover { background: #16305c; }

@media (max-width: 560px) { .lockbtn { display: block; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .lockbtn { transition: none; } }

/* ============================================================
   The page header — one shape, every screen (B9)

   Where you are, what you are looking at, and what you can do about it. It
   replaced three different screen openings; the rule is that a screen never
   invents its own. Nothing here is a card: a header is the page announcing
   itself, and a rule under it says that better than a border round it.
   ============================================================ */

.pagehead {
  display: flex;
  align-items: flex-end;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--hairline);
}
.pagehead-titles { min-width: 0; }
.pagehead h1 {
  font-size: var(--t-headline);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 2px;
}
.pagehead .kicker { margin-bottom: 0; }
/* A breadcrumb is a link and must look like one you can go back through. */
a.kicker.back { text-decoration: none; display: inline-block; }
a.kicker.back::before { content: '← '; }
a.kicker.back:hover { color: var(--navy); }

.pageacts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* Print day list (Home, Schedule) — the website's answer to the app's
   Download list pill. Navy, icon and words, at the top right, so it is found
   without looking for it (owner, 2026-10-26). Dimmed until the day is read. */
button.printday {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; white-space: nowrap;
}
button.printday:hover:not(:disabled) { background: #16305c; }
button.printday:disabled { cursor: progress; }

/* ============================================================
   Add a case, and bulk import (B9)
   ============================================================ */

/* A form an advocate fills sixty times in a sitting. Rows rather than a grid
   of boxes: the eye runs down one column of fields, and Tab follows it. */
.formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.formgrid .wide { grid-column: 1 / -1; }
.formrow { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.fieldnote { font-size: var(--t-caption); color: var(--slate); font-weight: 500; }

/* Add case: the client, in one prominent card (owner, 2026-10-19). Navy edge
   once a client is chosen, so a filed case reads as settled at a glance. */
.clientcard {
  display: grid; gap: var(--s-2);
  padding: var(--s-4); margin-bottom: var(--s-4);
  border: 1px solid var(--hairline); border-radius: var(--r-input);
  background: var(--paper);
}
.clientcard.filed { border: 1.5px solid var(--navy); background: var(--navy-tint); }
.clientcard-title { font-size: 1.05rem; color: var(--ink); }
.clientcard .fieldnote { margin: 0; }
.clientcard select { flex: 1 1 220px; min-width: 0; }

/* Two or three choices, shown as choices rather than hidden in a dropdown. A
   division picked wrongly means a case that never matches, so it is worth the
   width to have it visible and one click away. */
.segmented { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.segmented button {
  padding: 9px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--t-label);
}
.segmented button:hover { background: var(--grey-tint); }
.segmented button[aria-pressed="true"] {
  background: var(--navy-tint);
  border-color: var(--navy);
  color: var(--navy);
}

/* What has been saved in this sitting. It is the receipt for work that cannot
   be seen anywhere else on the screen — without it an advocate who has typed
   forty cases has nothing telling them the forty went in. */
.sitting { margin-top: var(--s-4); border-top: 1px solid var(--hairline); padding-top: var(--s-3); }
.sitting ol { margin: var(--s-2) 0 0; padding: 0; list-style: none; }
.sitting li {
  display: flex; gap: var(--s-3); align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--hairline);
  font-size: var(--t-label);
}
.sitting li:last-child { border-bottom: 0; }
.sitting li a { font-weight: 700; text-decoration: none; }
.sitting li a:hover { text-decoration: underline; }
.sitting li span { color: var(--slate); font-size: var(--t-caption); }

/* Add a case in two steps (owner, 24 Nov 2026; design/add-case-preview).
   Step 1 is four court buttons; step 2 one compact form, labels over boxes,
   everything optional under one tinted "More details" bar. */
.addcard { max-width: 760px; }
.addcard .dateecho.empty { display: none; }
.addform input, .addform select { padding: 8px 10px; }
.addhead { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); }
.addhead b { font-size: 1.05rem; color: var(--navy); }
.addhead .addback {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1;
}
.addhead .addback:hover { background: var(--grey-tint); }
.addhead .linkish {
  background: none; border: 0; padding: 0 4px; color: var(--navy);
  font-size: var(--t-caption); font-weight: 700; text-decoration: underline;
}
.courtgroup { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.courtgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.courttile {
  display: flex; align-items: center; gap: var(--s-2);
  min-height: 56px; padding: 0 16px; text-align: left;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--paper); color: var(--navy); font-weight: 700; font-size: 1rem;
}
.courttile span { flex: 1; }
.courttile em {
  font-style: normal; font-size: 0.75rem; padding: 2px 8px;
  border-radius: 999px; background: var(--navy-tint);
}
.courttile kbd, .addfoot kbd {
  font-family: inherit; font-size: 0.75rem; font-weight: 600; color: var(--slate);
  border: 1px solid var(--hairline); border-radius: 5px; padding: 1px 6px; background: var(--paper);
}
.courttile:hover, .courttile:focus-visible { border-color: var(--navy); }
.courttile.last { border: 1.5px solid var(--navy); }
/* Add case's one way into Import (owner, 26 Nov 2026). */
.manyline {
  display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2);
  padding: 12px 16px; border-radius: 12px; background: var(--mist);
  color: var(--ink); text-decoration: none;
}
.manyline > svg { color: var(--navy); flex: none; }
.manyline span { flex: 1; display: grid; }
.manyline small { color: var(--slate); font-size: var(--t-label); }
.manyline em { font-style: normal; font-weight: 700; color: var(--navy); white-space: nowrap; }
.manyline:hover { background: var(--navy-tint); }
.modeswitch {
  display: flex; padding: 3px; margin-bottom: var(--s-3); max-width: 340px;
  background: var(--grey-tint); border-radius: 10px;
}
.modeswitch button {
  flex: 1; padding: 7px 0; border: 1px solid transparent; border-radius: 7px;
  background: none; color: var(--slate); font-weight: 700; font-size: var(--t-label);
}
.modeswitch button[aria-pressed="true"] { background: var(--paper); border-color: var(--hairline); color: var(--navy); }
.addform .trackbtn { display: flex; justify-content: center; }
.orrule {
  display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0;
  font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate);
}
.orrule::before, .orrule::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.addgrid { display: grid; grid-template-columns: 1.6fr 1fr 96px; gap: var(--s-3); margin-bottom: var(--s-3); }
.addpair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-3); }
.fieldgroup {
  display: flex; flex-direction: column; gap: var(--s-1);
  font-size: var(--t-caption); font-weight: 700; color: var(--slate);
}
.segmented.pills { flex-wrap: nowrap; }
.segmented.pills button { flex: 1; border-radius: 999px; padding: 8px 10px; }
.clientpickrow { display: flex; gap: var(--s-2); }
.clientpickrow select { flex: 1; min-width: 0; }
.clientpick.filed select { border-color: var(--navy); background: var(--navy-tint); color: var(--navy); font-weight: 700; }
.morebar {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  margin: 0 0 var(--s-3); padding: 9px 12px;
  background: var(--navy-tint); border: 1px solid var(--navy-line); border-radius: 10px; color: var(--navy);
}
.morebar i {
  width: 24px; height: 24px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-style: normal; font-weight: 700; line-height: 1;
}
.morebar .moretext { flex: 1; display: grid; }
.morebar .moretext b { font-size: var(--t-label); }
.morebar .morecaption { font-size: var(--t-caption); color: var(--slate); font-weight: 600; }
.morebar .morechev { font-size: 0.75rem; }
.addfoot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2); flex-wrap: wrap;
  margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--hairline);
}
.addfoot .keys { margin-right: auto; font-size: var(--t-caption); color: var(--slate); white-space: pre; }
@media (max-width: 620px) {
  .courtgrid, .addpair { grid-template-columns: 1fr; }
  .addgrid { grid-template-columns: 1fr 96px; }
  .addgrid > :first-child { grid-column: 1 / -1; }
  .addfoot .keys { display: none; }
}

textarea.paste {
  width: 100%;
  min-height: 190px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  resize: vertical;
  tab-size: 12;
}

/* The two ways in, side by side, because an advocate has one or the other and
   should not have to find the second. */
.twoways { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-3); }

.dropzone {
  border: 1px dashed var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  background: var(--mist);
}
.dropzone.over { border-color: var(--navy); background: var(--navy-tint); }
.dropzone p { font-size: var(--t-label); color: var(--slate); margin-top: var(--s-2); }

/* The upload box (screens/import_file.js): a file in, no paste box. */
.filebox { display: grid; gap: var(--s-2); }
.filezone { border-width: 1.5px; border-color: var(--line, var(--hairline)); padding: var(--s-6) var(--s-4); }
.filezone .fileicon { color: var(--navy); margin-bottom: var(--s-2); }
.filezone > b { display: block; font-size: 1.0625rem; }
.filezone .formrow { justify-content: center; margin-top: var(--s-3); }
.filezone button.primary { display: inline-flex; align-items: center; gap: var(--s-2); }
.filezone .filestatus b { color: var(--ink); }
.filebox > .eyebrow { margin-top: var(--s-2); }
/* "What works" under the box: PDF, Excel/CSV, and the template to download. */
.works { border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.worksrow {
  display: flex; align-items: center; gap: var(--s-3); padding: 10px 14px;
  border-bottom: 1px solid var(--hairline); color: var(--ink); text-decoration: none;
}
.worksrow:last-child { border-bottom: 0; }
.worksrow span:last-child { display: grid; }
.worksrow small { color: var(--slate); font-size: var(--t-label); }
.worksrow.off { opacity: .55; }
.worksrow.tpl { background: var(--navy-tint); }
.worksrow.tpl b { color: var(--navy); }
.worksrow.tpl:hover { background: #dfe5f6; }
.works .kind {
  flex: none; width: 40px; height: 24px; border-radius: 6px; color: #fff;
  font-size: 0.75rem; font-weight: 800; display: grid; place-items: center;
}
.works .kind.pdf { background: #4B5563; }
.works .kind.xls { background: #1D6F42; }
.works .kind.tpl { background: var(--navy); }
.importcourts .courttile { text-decoration: none; }

/* The preview. Counts first, because the question an advocate is answering is
   "is that roughly my practice?" — and then, in full, every line that will NOT
   be imported, with its own text beside the reason. A row silently dropped is
   the failure this whole screen exists to prevent. */
.tally { display: flex; flex-wrap: wrap; gap: var(--s-4); margin: var(--s-3) 0; }
.tallyitem { min-width: 90px; }
.tallyitem b {
  display: block;
  font-size: 1.625rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2;
}
.tallyitem span { font-size: var(--t-caption); color: var(--slate); }
.tallyitem.good b { color: var(--navy); }
.tallyitem.warn b { color: var(--amber); }
.tallyitem.quiet b { color: var(--grey); }

.rejects { margin-top: var(--s-4); }
.rejects h4 { margin-bottom: var(--s-2); }
.reject {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--s-3);
  padding: 8px 0 8px 11px;
  border-left: 3px solid var(--amber-line);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-label);
}
.reject:last-child { border-bottom: 0; }
.reject .lineno { color: var(--slate); font-size: var(--t-caption); font-weight: 700; }
.reject code {
  display: block;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.reject .why { display: block; color: var(--slate); font-size: var(--t-caption); margin-top: 2px; }

/* Imports already done, and the way back out of one. */
.importrow {
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
  font-size: var(--t-label);
}
.importrow:last-child { border-bottom: 0; }
.importrow b { font-weight: 700; }
.importrow .when { color: var(--slate); font-size: var(--t-caption); }
.importrow .actions { margin-left: auto; }

/* An <a> that has to look like a button, because it goes somewhere rather than
   doing something — "Done", "See them in My Cases". A button that navigates
   cannot be middle-clicked into a new tab, and on this site that matters. */
.btnlink {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border-radius: var(--r-input);
  font-weight: 700; font-size: var(--t-label);
  text-decoration: none;
  border: 1px solid var(--hairline);
  background: var(--paper); color: var(--ink);
}
.btnlink:hover { background: var(--grey-tint); }
.btnlink.primary {
  background: var(--navy); border-color: var(--navy); color: #fff;
}
.btnlink.primary:hover { background: #16305c; }

/* The header's primary action follows the nav's rule when the package does not
   cover the workspace: dimmed, not removed. */
.btnlink.off { opacity: 0.42; pointer-events: none; cursor: default; }

/* ============================================================
   To-do, and expiring orders

   Two screens, not one: a task is done once and ticked off, an order is never
   done, only extended. They are styled apart for the same reason they are
   built apart — the one that lapses must not look like the one you can finish.
   ============================================================ */

.checkrow {
  flex-direction: row; align-items: center; gap: var(--s-2);
  font-size: var(--t-label); font-weight: 600; color: var(--ink);
}
.checkrow input { width: 16px; height: 16px; }

/* ---------- to-do ---------- */

.tasklist { display: flex; flex-direction: column; }
.taskrow {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.taskrow:last-child { border-bottom: 0; }

/* Struck through, not hidden. An advocate asking "did I file that" is looking
   for the thing, not for its absence. */
.taskrow.done .taskbody b { text-decoration: line-through; color: var(--slate); font-weight: 600; }

.tickbox {
  width: 20px; height: 20px; margin-top: 2px;
  border: 1.5px solid var(--hairline); border-radius: 6px;
  background: var(--paper); color: var(--navy);
  font-size: 0.8125rem; font-weight: 800; line-height: 1;
  display: grid; place-items: center;
}
.tickbox:hover { border-color: var(--navy); }
.taskrow.done .tickbox { background: var(--navy-tint); border-color: var(--navy-line); }

.taskbody b { display: block; font-size: var(--t-label); font-weight: 700; }
.tasknote { display: block; font-size: var(--t-caption); color: var(--slate); margin-top: 2px; }
.taskmeta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2);
  margin-top: 3px; font-size: var(--t-caption); color: var(--slate);
}
.taskmeta a { font-weight: 700; text-decoration: none; }
.taskmeta a:hover { text-decoration: underline; }
.taskmeta .sep { color: var(--hairline); }
.taskmeta .stamp { font-size: var(--t-caption); }

/* Kept quiet until the row is hovered or focused within: removing a to-do is
   not the thing this screen is for. */
.taskacts button.linkish {
  background: none; border: 0; padding: 2px 4px;
  color: var(--slate); font-size: var(--t-caption); font-weight: 700;
  opacity: 0; transition: opacity 120ms ease-out;
}
.taskrow:hover .taskacts button.linkish,
.taskacts button.linkish:focus-visible { opacity: 1; }
.taskacts button.linkish:hover { color: var(--danger); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .taskacts button.linkish { transition: none; } }

/* ---------- orders ---------- */

.orderlist { display: flex; flex-direction: column; }
.orderrow {
  padding: 12px 0 12px 12px;
  border-left: 3px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.orderrow:last-child { border-bottom: 0; }
/* Red, here and almost nowhere else (DESIGN.md principle 4). */
.orderrow.lapsed { border-left-color: var(--danger); background: var(--danger-tint); }

.orderhead { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.orderhead a { font-weight: 700; font-size: var(--t-label); text-decoration: none; }
.orderhead a:hover { text-decoration: underline; }

.ordermeta {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: 3px; font-size: var(--t-label); color: var(--ink);
}
.ordermeta .stamp { color: var(--slate); }

.orderacts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.orderacts button.ghost { padding: 5px 10px; font-size: var(--t-caption); }

/* Extending is the whole life of an order, so it opens in place rather than on
   a screen of its own. */
details.extend > summary {
  list-style: none; cursor: pointer;
  display: inline-block; padding: 5px 12px;
  border: 1px solid var(--navy-line); border-radius: var(--r-input);
  background: var(--navy-tint); color: var(--navy);
  font-size: var(--t-caption); font-weight: 800;
}
details.extend > summary::-webkit-details-marker { display: none; }
details.extend[open] > summary { border-radius: var(--r-input) var(--r-input) 0 0; }
.extendbody {
  border: 1px solid var(--navy-line); border-top: 0;
  border-radius: 0 0 var(--r-input) var(--r-input);
  padding: var(--s-3);
  background: var(--paper);
}
.extendbody .formgrid { margin-bottom: var(--s-2); }

/* The line under a date field that says which day was actually chosen.
   `<input type="date">` renders in the BROWSER'S locale, so an advocate in
   Dhaka on an English laptop is shown mm/dd/yyyy — and 03/12 then means two
   different months depending on who is reading. The format cannot be changed,
   so the field answers the question instead. */
.dateecho {
  display: block;
  margin-top: 3px;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--navy);
}
.dateecho.empty { color: var(--slate); font-weight: 500; }

/* The quiet "Correct" on a diary row, and the editor it opens. Only diary rows
   have it: a cause-list entry is the court's published record, not the
   advocate's to edit. */
.eventtop button.linkish {
  background: none; border: 0; padding: 0 4px; margin-left: auto;
  color: var(--slate); font-size: var(--t-caption); font-weight: 700;
  opacity: 0; transition: opacity 120ms ease-out;
}
.event:hover .eventtop button.linkish,
.eventtop button.linkish:focus-visible { opacity: 1; }
.eventtop button.linkish:hover { color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .eventtop button.linkish { transition: none; } }

.diaryedit {
  border: 1px solid var(--navy-line);
  border-radius: var(--r-input);
  padding: var(--s-3);
  background: var(--mist);
}
.diaryedit .formgrid { margin-bottom: var(--s-2); }

/* Destructive, and it looks it — but only once, and never as the first thing
   the eye lands on (DESIGN.md principle 4: red is sacred). */
button.ghost.danger-btn { color: var(--danger); border-color: var(--danger-line); }
button.ghost.danger-btn:hover { background: var(--danger-tint); }

/* ============================================================
   Cause lists — browsing the court's own list
   ============================================================ */

.listdivision {
  font-size: var(--t-label); font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--slate);
  margin: var(--s-4) 0 var(--s-2);
}

/* A court is a row you open, so it is a button that looks like a row. */
.benchrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2) var(--s-3);
  width: 100%; text-align: left;
  padding: 10px 12px;
  background: var(--paper);
  border: 0; border-bottom: 1px solid var(--hairline);
  font: inherit;
}
.benchrow:hover { background: var(--mist); }
.benchrow b { font-size: var(--t-label); font-weight: 700; }
.benchrow .benchcount {
  font-size: var(--t-caption); font-weight: 700; color: var(--navy);
  white-space: nowrap; text-align: right;
}
.benchrow .benchjudges {
  grid-column: 1 / -1;
  font-size: var(--t-caption); color: var(--slate);
}

/* Everything starts closed: a court's list is hundreds of cases and an
   advocate wants one block of it, so this opens as a table of contents. */
.sections { display: flex; flex-direction: column; gap: var(--s-2); }
details.section > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: var(--s-3);
  padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-input);
  background: var(--mist);
}
details.section > summary::-webkit-details-marker { display: none; }
details.section[open] > summary {
  border-radius: var(--r-input) var(--r-input) 0 0;
  border-bottom-color: transparent;
}
details.section > summary b { font-size: var(--t-label); font-weight: 700; }
/* The sitting time, exactly as the court wrote it. */
.sectionnote { font-size: var(--t-caption); color: var(--amber); font-weight: 700; }
.sectioncount {
  margin-left: auto;
  font-size: var(--t-caption); font-weight: 800; color: var(--slate);
}
details.section .tablewrap {
  border-radius: 0 0 var(--r-input) var(--r-input);
  border-top: 0;
}

/* Matters: moving one along from its row. */
.matteracts { white-space: nowrap; text-align: right; }
.matteracts button.linkish {
  background: none; border: 0; padding: 2px 6px;
  color: var(--navy); font-size: var(--t-caption); font-weight: 800;
}
.matteracts button.linkish:hover { text-decoration: underline; }
.matteracts button.linkish:disabled { opacity: .5; }
.btnlink.tiny { padding: 3px 9px; font-size: 0.75rem; }

/* ============================================================
   The month grid
   ============================================================ */

.monthgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  overflow: hidden;
  margin-top: var(--s-3);
}
.monthhead {
  background: var(--mist); padding: 7px 8px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--slate); text-align: center;
}
.monthpad { background: var(--paper); min-height: 76px; }
.monthday {
  background: var(--paper); min-height: 76px; padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
  color: var(--ink); text-decoration: none;
}
.monthday:hover { background: var(--mist); }
.monthday b { font-size: var(--t-label); font-weight: 700; }
/* Closed is NAMED, never blank: "nothing listed" and "the court is shut" are
   different facts and a blank square says the wrong one. */
.monthday.closed { background: var(--mist); }
.monthday.closed b { color: var(--slate); font-weight: 600; }
.closedwords { font-size: 0.75rem; color: var(--slate); line-height: 1.25; }
.monthday.today { box-shadow: inset 0 0 0 2px var(--navy); }
.monthday.today b { color: var(--navy); font-weight: 800; }

.daymarks { display: flex; flex-wrap: wrap; gap: 3px; }
.daymark {
  min-width: 18px; padding: 1px 5px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 800; text-align: center;
}
i.daymark { display: inline-block; width: 12px; height: 12px; padding: 0; vertical-align: -2px; }
.daymark.listing { background: var(--navy-tint); color: var(--navy); }
.daymark.hearing { background: var(--grey-tint); color: var(--ink); }
.daymark.task    { background: var(--success-tint); color: var(--success); }
/* Red, because an order running out is what red is for. */
.daymark.lapse   { background: var(--danger-tint); color: var(--danger); }

.legend {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  margin-top: var(--s-3); font-size: var(--t-caption); color: var(--slate);
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }

/* ============================================================
   Judgments and notices — live views of the court's own pages
   ============================================================ */

.notices { display: flex; flex-direction: column; }
.judgment, .notice {
  padding: 11px 0; border-bottom: 1px solid var(--hairline);
}
.judgment:last-child, .notice:last-child { border-bottom: 0; }
.judgtop, .noticetop {
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
}
.judgtop b, .noticetop b { font-size: var(--t-label); font-weight: 700; }
.judgtop .stamp, .noticetop .stamp { margin-left: auto; white-space: nowrap; }
.judglinks { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.judglinks .btnlink { padding: 4px 10px; font-size: var(--t-caption); }

/* ============================================================
   Your courts — the three-way court choice (migration 054)
   ============================================================
   A radio group drawn as cards rather than as <input type=radio>, because the
   thing being chosen needs a sentence of explanation under it and a bare radio
   label cannot carry one. Real <button>s, so the keyboard reaches them and
   aria-pressed says which is on. */

.scopelist {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.scopeopt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.scopeopt:hover:not(.on) { border-color: var(--navy); }
.scopeopt.on {
  border-color: var(--navy);
  background: var(--navy-tint);
  /* The selected card carries two borders' worth of weight without moving the
     text: a 2px border would reflow every other card by a pixel. */
  box-shadow: inset 0 0 0 1px var(--navy);
}
.scopeopt b { font-size: var(--t-label); font-weight: 700; }
.scopeopt.on b { color: var(--navy); }
.scopeopt span { font-size: var(--t-caption); color: var(--slate); line-height: 1.45; }
.scopeopt[disabled] { opacity: .6; cursor: default; }

/* ============================================================
   Home — the first screen after signing in
   ============================================================
   A launcher, not a report. It opens instantly, states the one action worth
   taking, and lays the rest of the workspace out as cards. The counts on it are
   only the ones already in hand; nothing here fires a read per tile. */

.homegrid { display: flex; flex-direction: column; gap: var(--s-4); }

/* The lead card. Navy-tinted so it reads as the product speaking rather than as
   another panel of data — it is the one card on this screen that is asking for
   something. */
.card.homehero {
  background: linear-gradient(180deg, var(--navy-tint), var(--paper) 70%);
  border-color: #D8E0F4;
}
.homelead {
  font-size: var(--t-headline);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: var(--s-3) 0 var(--s-2);
}

/* A real target, sized for a thumb as well as a mouse. */
.bigbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 var(--s-5);
  border-radius: var(--r-btn);
  background: var(--navy); color: #fff;
  font-weight: 700; font-size: var(--t-label);
  text-decoration: none; border: 0; cursor: pointer;
}
.bigbtn:hover { background: #16306E; }
.bigbtn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.bigbtn.quiet {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--hairline);
}
.bigbtn.quiet:hover { background: var(--mist); border-color: var(--slate); }

.tilegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: var(--s-4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  min-height: 104px;
}
.tile:hover { border-color: var(--navy); background: var(--navy-tint); }
.tile:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tileicon { color: var(--navy); display: flex; margin-bottom: 4px; }
.tile b { font-size: var(--t-label); font-weight: 700; }
.tilehint { font-size: var(--t-caption); color: var(--slate); line-height: 1.45; }
/* The count sits in the corner rather than beside the label: it is a fact about
   the screen behind the card, not part of its name. */
.tilecount {
  position: absolute; top: var(--s-3); right: var(--s-3);
  font-size: var(--t-caption); font-weight: 800;
  color: var(--navy); background: var(--navy-tint);
  border-radius: var(--r-chip); padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

.phonehead { margin-bottom: var(--s-2); }

/* ============================================================
   First-time setup — three short steps (2026-10-17)
   ============================================================
   The same flow as the app's registration, for the oldest advocate who will
   use it: one centred column, bigger type than the rest of the workspace
   (this is the first screen anybody sees), labels above every box, and the
   buttons always directly under the question. */

.wiz {
  width: 100%;
  max-width: 560px;
  margin: var(--s-4) auto var(--s-6);
  display: flex; flex-direction: column; gap: 22px;
  font-size: 1rem;
}
.wiz-progress { display: flex; align-items: center; gap: 14px; }
.wiz-stepof { font-size: 0.9375rem; font-weight: 700; color: var(--navy); white-space: nowrap; }
.wiz-bars { flex: 1; display: flex; gap: 6px; }
.wiz-bars span { flex: 1; height: 6px; border-radius: 3px; background: var(--hairline); transition: background .25s; }
.wiz-bars span.on { background: var(--navy); }

.wiz-title {
  font-size: 1.875rem; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; margin: var(--s-2) 0 -10px; color: var(--ink);
}
.wiz-title:focus { outline: none; }
.wiz-sub { font-size: 1.0625rem; color: #3F4652; line-height: 1.45; margin: 0; }

.wiz-field { display: flex; flex-direction: column; gap: 8px; }
.wiz-label { font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.wiz-box {
  display: flex; align-items: center;
  min-height: 58px; padding: 0 16px; gap: 12px;
  background: var(--paper);
  border: 1.5px solid #B9BDC5; border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.wiz-box:focus-within { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.wiz-box.bad { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.wiz-box.readonly { background: var(--grey-tint); border-color: var(--hairline); }
.wiz-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1.1875rem; font-weight: 600; color: var(--ink);
  padding: 14px 0;
}
.wiz-box input::placeholder { color: #7A808B; font-weight: 400; font-size: 1.125rem; }
.wiz-static { font-size: 1.125rem; color: #3F4652; overflow-wrap: anywhere; padding: 14px 0; }
.wiz-prefix {
  font-size: 1.1875rem; font-weight: 700; color: var(--ink);
  padding-right: 12px; border-right: 1.5px solid var(--hairline);
}
.wiz-icon { display: flex; color: #3F4652; }
.wiz-help { font-size: 0.9375rem; color: #3F4652; line-height: 1.45; margin: 0; }
.wiz-help.ok { color: var(--success); font-weight: 600; }
.wiz-error {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 1rem; font-weight: 600; color: var(--danger);
}
.wiz-erricon {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: 0.8125rem; font-weight: 800; display: grid; place-items: center;
}

/* The bar list sits under its box, in the flow (not floating), so nothing
   it shows can be hidden behind the footer. */
.wiz-barlist {
  border: 1.5px solid var(--navy-line); border-radius: 10px;
  background: var(--paper); max-height: 340px; overflow-y: auto;
}
.wiz-barrow {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  text-align: left; padding: 12px 16px; border: 0; background: none;
  border-bottom: 1px solid var(--hairline); cursor: pointer; font: inherit;
}
.wiz-barrow:last-child { border-bottom: 0; }
.wiz-barrow:hover, .wiz-barrow.on { background: var(--navy-tint); }
.wiz-barrow b { font-size: 1.0625rem; color: var(--ink); }
.wiz-barrow span { font-size: 0.875rem; color: #3F4652; }

.wiz-choices { display: flex; flex-direction: column; gap: 10px; }
.wiz-choice {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  text-align: left; padding: 15px 16px; cursor: pointer; font: inherit;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid #B9BDC5; border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.wiz-choice:hover:not(.on) { border-color: var(--navy); }
.wiz-choice.on { border-color: var(--navy); background: var(--navy-tint); box-shadow: inset 0 0 0 1px var(--navy); }
.wiz-radio {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  border: 2px solid #7A808B; display: grid; place-items: center;
}
.wiz-choice.on .wiz-radio { border-color: var(--navy); background: var(--navy); }
.wiz-choice.on .wiz-radio::after {
  content: ''; width: 7px; height: 12px; margin-top: -3px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.wiz-choicetext { display: flex; flex-direction: column; gap: 4px; }
.wiz-choicetext b { font-size: 1.125rem; font-weight: 700; }
.wiz-choice.on .wiz-choicetext b { color: var(--navy); }
.wiz-choicetext span { font-size: 0.9688rem; color: #3F4652; line-height: 1.45; }

.wiz-foot {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--hairline); padding-top: 20px; margin-top: 4px;
}
.wiz-banner {
  margin: 0; padding: 12px 14px; border-radius: 10px;
  background: var(--danger-tint); color: var(--danger);
  font-size: 1rem; font-weight: 700;
}
.wiz-banner::before { content: '↑  '; }
.wiz-buttons { display: flex; gap: 12px; align-items: center; }
.wiz-back {
  min-height: 56px; padding: 0 20px; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 1.0625rem; font-weight: 600; color: var(--navy);
  background: var(--paper); border: 1.5px solid var(--navy-line);
}
.wiz-back:hover { background: var(--navy-tint); }
.wiz-next {
  flex: 1; min-height: 56px; border-radius: 12px;
  font-size: 1.1875rem; font-weight: 700;
}
.wiz-helpline { margin: 0; text-align: center; font-size: 1rem; color: #3F4652; }
.wiz-helpline a { color: var(--navy); font-weight: 700; }
/* "Show password" under the box: a link, not a second button. ("Skip for now"
   used to sit here; it went on 2026-10-18 — registration must be finished.) */
.wiz-skip { margin: 0; text-align: right; }
.wiz-pwtoggle {
  background: none; border: 0; padding: 6px 4px; cursor: pointer; font: inherit;
  font-size: 0.9375rem; font-weight: 600; color: var(--navy); text-decoration: underline;
}
.wiz-pwtoggle:hover { color: var(--ink); }
.wiz-google { width: 100%; min-height: 56px; font-size: 1.0625rem; }

/* Read-only, and it must LOOK read-only. An input that can be focused and not
   typed into reads as broken. */
input.readonly {
  background: var(--mist); color: var(--slate); cursor: default;
}

/* ============================================================
   Mobile: a drawer, not a strip of sixteen links
   ============================================================
   The nav used to wrap into a block of links across the top of every narrow
   screen, which pushed the actual page down the fold and made the shell feel
   like a menu with a page attached. It is now off-canvas, and the header keeps
   the two things that belong to the PAGE rather than to navigation — finding a
   case, and adding one. */

#menuBtn { display: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; }

#scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(16, 24, 40, .45);
}

@media (max-width: 860px) {
  #menuBtn { display: inline-flex; }

  /* One row, not three: the nav no longer occupies any of the page. */
  #shell {
    grid-template-rows: 56px minmax(0, 1fr);
    grid-template-areas: 'bar' 'main';
  }

  #side {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    /* THE WHOLE HEIGHT OF THE SCREEN. The laptop rule above gives the menu
       align-self: start, and a browser sizes a fixed box with that to its
       contents — so the drawer stopped where its links stopped. With the old
       24-link menu that was below the bottom of a phone and nobody saw it;
       with seven workspaces it stopped halfway down (17 Nov 2026). */
    align-self: stretch;
    height: 100vh; height: 100dvh;
    z-index: 50;
    width: min(280px, 84vw);
    /* align-items is reset explicitly: the old narrow-screen rule laid the nav
       out as a ROW and centred its items, and `center` on a column container
       centres every link horizontally instead. */
    flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    border-right: 1px solid var(--hairline); border-bottom: 0;
    padding: var(--s-4) var(--s-3);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
  }
  #side hr { display: block; }
  #shell.drawer-open #side { transform: none; }

  /* Large enough for a thumb — the whole reason the strip was unusable. */
  #side a { padding: 13px 14px; font-size: var(--t-label); }

  /* The page's own actions stay OUT of the drawer, per the brief: finding and
     adding a case are things you do TO the screen you are on. The name and the
     keyboard-help button are not, on a device with no keyboard. */
  #bar .who b, #bar #whoText, #bar #keysBtn, #bar #signout .navlabel { display: none; }
  /* A drawer has no use for a narrower version of itself. */
  #side .sidebtn { display: none; }
  #bar #whoCode { display: none; }
}

@media (max-width: 560px) {
  .tilegrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .bigbtn { width: 100%; }
  .wiz-title { font-size: 1.625rem; }
  .formrow { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  #side { transition: none; }
}

/* The three things on the payment screen that get typed into a bKash app on
   another screen: the wallet number, the amount, and the account code. Each has
   its own copy button, and each is set in a face where 0 and O cannot be
   confused — this is the one screen where a misread character costs an advocate
   real money into a stranger's wallet. */
.paysteps .copyable {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.copybtn {
  margin-left: var(--s-2);
  padding: 3px 10px;
  font-size: var(--t-caption);
  vertical-align: 1px;
}
@media (max-width: 560px) {
  /* On a phone the step and its button stop competing for one line, and the
     button gets a real target — this is the control an advocate presses with a
     thumb while holding the phone they are about to type the number into. */
  .paysteps li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .copybtn { margin-left: 0; min-height: 40px; padding: 0 14px; }
}


/* An account code with a copy button beside it, on Profile. Same face as the
   payment screen's copyable values — this is a code read down a telephone, and
   a 0 that could be an O is a call that goes nowhere. */
.kv.kvcopy { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.kv.kvcopy .copyable {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.kv.kvcopy .copybtn { margin-left: 0; }

/* ============================================================
   MY CHAMBER (screens/chamber.js, migrations 078-082).
   Same shape as the phone: the Needs-you strip, then tabs. Every colour is a
   token; nothing here introduces a new one.
   ============================================================ */

button.danger {
  background: var(--danger); color: #fff; border: 0;
  padding: 12px 16px; border-radius: var(--r-input); font-weight: 700;
}
button.danger:disabled { opacity: 0.55; cursor: default; }
button[aria-pressed="true"].ghost { background: var(--navy-tint); color: var(--navy); }

.field { margin-bottom: var(--s-3); }
.dlg-actions { justify-content: flex-end; margin-top: var(--s-4); }
.overlay-card { width: min(640px, 96vw); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.03em; }
.small { font-size: var(--t-caption); }
.warn { color: var(--amber); font-weight: 700; }
td.danger { color: var(--danger); font-weight: 700; }
tr.dim td { opacity: 0.55; }

.tabs { margin: var(--s-4) 0 var(--s-3); }

/* Needs you: three counts that open what they counted. Grey when nought —
   a zero is good news and must not shout. */
.statrow { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.stat {
  flex: 1 1 140px; display: flex; flex-direction: column; align-items: center;
  padding: var(--s-3); border-radius: var(--r-card);
  background: var(--grey-tint); color: var(--slate); text-decoration: none;
}
.stat b { font-size: 1.625rem; font-weight: 800; }
.stat span { font-size: var(--t-caption); font-weight: 700; }
.stat.amber  { background: var(--amber-tint);  color: var(--amber); }
.stat.danger { background: var(--danger-tint); color: var(--danger); }
.stat.navy   { background: var(--navy-tint);   color: var(--navy); }
.personlines { list-style: none; padding: 0; margin: var(--s-4) 0 0; }
.personlines li { padding: 6px 0; border-top: 1px solid var(--hairline); font-size: var(--t-label); }
.personlines a { color: var(--ink); text-decoration: none; }
.personlines a:hover { color: var(--navy); }

/* Bulk: the bar is always there so the page does not jump when a box is ticked. */
.bulkbar {
  display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center;
  padding: var(--s-2) var(--s-3); margin-bottom: var(--s-3);
  background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r-card);
  min-height: 48px;
}
.checklist { max-height: 46vh; overflow-y: auto; margin-top: var(--s-3);
  border: 1px solid var(--hairline); border-radius: var(--r-input); padding: var(--s-2); }

/* Conversations: messages and task comments. */
.thread { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-3) 0; }
.thread.tall { max-height: 52vh; overflow-y: auto; padding-right: var(--s-2); }
.bubble {
  align-self: flex-start; max-width: 78%;
  padding: 8px 12px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--hairline);
  white-space: pre-wrap;
}
.bubble.mine { align-self: flex-end; background: var(--navy-tint); }
.bubble-meta { font-size: 0.75rem; color: var(--slate); margin-bottom: 2px; }
.msggrid { display: grid; grid-template-columns: 260px 1fr; gap: var(--s-4); }
@media (max-width: 760px) { .msggrid { grid-template-columns: 1fr; } }
.threadlist { display: flex; flex-direction: column; border-right: 1px solid var(--hairline); }
.threadrow { display: block; padding: 10px; border-radius: var(--r-input); color: var(--ink); text-decoration: none; }
.threadrow:hover { background: var(--grey-tint); }
.threadrow.on { background: var(--navy-tint); }
.threadpane textarea { flex: 1; min-width: 200px; }

.actline { display: flex; gap: var(--s-3); padding: 5px 0; font-size: var(--t-label); }
.actline .mono { min-width: 64px; }
.plainlist { padding-left: var(--s-4); line-height: 1.9; }
.report-person { margin-top: var(--s-4); }
.report-person ul { padding-left: var(--s-4); font-size: var(--t-label); }

/* PRINT: the Report tab on paper — the report and nothing else. Real,
   selectable text through the browser's own print, which is WEB.md §2's
   whole reason for a plain-HTML site. */
@media print {
  /* Never on paper, on any screen: the shell and the controls. */
  #bar, #side, #scrim, #flash, #keys, .noprint, .pageacts { display: none !important; }
  /* A screen that names a report (Clients, the chamber Report) prints the
     report and nothing else. This used to apply to EVERY screen, so the
     browser's own Print gave a blank page on My Cases, the Schedule, a case
     and everything else that has no `.print-report` — it hid all their cards. */
  #main:has(.print-report) .pagehead,
  #main:has(.print-report) .tabs,
  #main:has(.print-report) .card:not(:has(.print-report)) { display: none !important; }
  #main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .card { border: 0 !important; padding: 0 !important; }
  .tablewrap { border: 0; overflow: visible; }
  body { background: #fff; }
}

/* ---------- Client portal (CLIENT_PORTAL.md §8.3) ---------- */
.list { display: flex; flex-direction: column; }
.list > .kv {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-3) 0; border-top: 1px solid var(--hairline);
}
.list > .kv:first-child { border-top: 0; }
.list > .kv .checkrow { margin-left: auto; }
.row-link { color: var(--ink); text-decoration: none; }
.row-link:hover b { color: var(--navy); text-decoration: underline; }
.warn-text { color: var(--amber); }
.pick-list {
  max-height: 50vh; overflow-y: auto; margin-top: var(--s-3);
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--hairline); border-radius: var(--r-input); padding: var(--s-2);
}
.pick-list .checkrow { padding: 6px 4px; }
.portal-line { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); font-size: var(--t-label); }

/* ---------- Clients (CLIENTS.md §5) ---------- */
.print-only { display: none; }
@media print { .print-only { display: block; } }
.client-block { margin-top: var(--s-5); }
.client-block h3 { margin-bottom: var(--s-2); }
table.clients { min-width: 640px; }
.print-only-inline { display: none; }
@media print { .print-only-inline { display: inline; } }
table.clients td.phone { white-space: nowrap; }
input[aria-label="Search clients"] { min-width: 260px; }
.tickcol { width: 36px; text-align: center; }
.selectbar { align-items: center; gap: var(--s-3); flex-wrap: wrap; }
h2.group-head { margin: var(--s-5) 0 var(--s-1); }
/* ============================================================
   "You're all set" — one-time welcome after setup (screens/welcome.js)
   ============================================================
   Same column, type and colours as the setup steps it follows. */
.wel-done {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--success-tint); color: var(--success);
}
.wel-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.wel-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1.5px solid #B9BDC5;
  transition: border-color .15s, background .15s;
}
.wel-card:hover { border-color: var(--navy); background: #FBFCFE; }
.wel-card:focus-visible { outline: 3px solid var(--navy-line); outline-offset: 2px; }
.wel-icon {
  flex: none; width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--navy-tint); color: var(--navy);
}
.wel-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wel-text b { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; }
.wel-text span { font-size: 1rem; color: #3F4652; line-height: 1.45; }
.wel-text em { font-style: normal; font-size: 0.9375rem; font-weight: 600; color: var(--navy); margin-top: 2px; }
.wel-chev { flex: none; font-size: 1.875rem; line-height: 1; color: #3F4652; margin-top: 8px; }
.wel-skip { flex: 1; }

/* ---------- Settings (owner, 2026-10-19) ----------
   The same page as the app's Settings: a navy profile card on top, then one
   card per section, each headed by the navy icon tile the app's rows use.
   Two columns on a laptop, one on a narrow window. */
.set-hero {
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: linear-gradient(135deg, #0A1A4A, var(--navy));
  color: #fff;
  margin-bottom: var(--s-4);
}
.set-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--navy-tint); color: var(--navy);
  font-weight: 800; font-size: 1.375rem;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
}
.set-hero-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.set-hero-text b { font-size: 1.1875rem; font-weight: 800; }
.set-hero-text span { color: #C9D6F5; font-size: var(--t-label); }
.set-hero-text .set-hero-mail { opacity: .85; }
.set-hero-code {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--r-chip); padding: 6px 8px 6px 14px; font-size: var(--t-label);
}
.set-hero-code span { color: #C9D6F5; }
.set-hero-code .ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }

.set-grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
.set-grid .card + .card { margin-top: 0; }
@media (max-width: 1040px) { .set-grid { grid-template-columns: minmax(0, 1fr); } }

.set-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: var(--s-3); }
.set-head h2 { margin: 0; }
.set-head .stamp { margin: 2px 0 0; }
.set-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--navy-tint); color: var(--navy);
}

.set-times { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.set-times li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 0; border-top: 1px solid var(--hairline);
  font-size: var(--t-label);
}
.set-times li b { color: var(--ink); }
.set-times li span { color: var(--slate); }

.set-foot { display: flex; justify-content: flex-end; margin-top: var(--s-4); }
.set-signout { min-width: 160px; }

.btnlink.danger-btn { color: var(--danger); border-color: var(--danger-line); }
.btnlink.danger-btn:hover { background: var(--danger-tint); }

/* ---------- Documents (DOCUMENTS.md §5, session 4) ---------- */
.docs-head { display: flex; align-items: center; gap: var(--s-2); }
.docs-list > .kv.docs-row { align-items: flex-start; }
.docs-text { flex: 1 1 260px; min-width: 0; }
.docs-text b { overflow-wrap: anywhere; margin-right: var(--s-2); }
.docs-acts { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.docs-formbox {
  border-top: 1px solid var(--hairline);
  margin-top: var(--s-3); padding-top: var(--s-3);
}
.docs-formbox input:not([type="checkbox"]) { width: 100%; }
/* The matter's name opens its papers in place (session 5). */
.matter-name { padding: 0; text-align: left; color: var(--ink); background: none; border: 0; font: inherit; }
.matter-name:hover b { color: var(--navy); text-decoration: underline; }
tr.matter-docs > td { background: var(--mist); padding: var(--s-3); }
tr.matter-docs .docs-card { margin: 0; }

/* ============================================================
   The menu in three groups, with icons, and collapsible (2026-10-19)
   ============================================================
   From the dashboard mockup the owner approved: Workspace / Court tracking /
   Chamber & admin, each link with a line icon (shared/icons.js), and a
   Collapse button at the foot that shrinks the menu to its icons on a laptop.
   Collapsed, every icon carries its name as a tooltip (app.js sideTooltips),
   so nothing becomes an unlabelled picture. */

.sidegroup { display: flex; flex-direction: column; gap: 2px; }
.sidegroup + .sidegroup { margin-top: var(--s-3); }
.sidehead {
  padding: 6px 12px 4px;
  font-size: 0.75rem; color: var(--slate);
  white-space: nowrap;
}
.sidefoot {
  margin-top: auto;
  /* Pinned to the bottom of the menu, so Collapse is always in reach even on
     a short laptop screen where the links scroll. */
  position: sticky; bottom: calc(-1 * var(--s-3));
  margin-bottom: calc(-1 * var(--s-3));
  padding-bottom: var(--s-3);
  background: #F5F7FB;
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 2px;
}
#side .sidebtn {
  width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  font-family: inherit;
}
.navlabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Header pieces. */
#bar [data-icon] { display: inline-flex; align-items: center; gap: 6px; }
#bar .btnlink.primary[data-icon] { padding-left: 12px; }
#whoName { display: inline-flex; align-items: center; gap: 9px; }
.avatar {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 0.75rem; font-weight: 800; letter-spacing: .3px;
}
#whoName:hover .avatar { box-shadow: 0 0 0 3px var(--navy-tint); }

@media (min-width: 861px) {
  #shell { transition: grid-template-columns 160ms ease-out; }
  #shell.side-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
  #shell.side-collapsed #side { padding-left: var(--s-2); padding-right: var(--s-2); }
  #shell.side-collapsed #side .navlabel,
  #shell.side-collapsed #side .soon > span:not(.navlabel) { display: none; }
  /* The group names go; a hairline keeps the three groups apart. */
  #shell.side-collapsed .sidehead {
    font-size: 0; padding: 0; height: 1px;
    background: var(--hairline); margin: 4px 10px;
  }
  #shell.side-collapsed .sidegroup:first-child .sidehead { display: none; }
  #shell.side-collapsed #side a,
  #shell.side-collapsed #side .soon,
  #shell.side-collapsed #side .sidebtn { justify-content: center; padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  #shell { transition: none; }
}

/* ============================================================
   Home — the dashboard (2026-10-19)
   ============================================================
   Three counts, then the day's table at about seventy per cent of the width
   and the falling-due column beside it. Hairlines, no shadows (DESIGN.md
   principle 5); colours keep their one meaning each — amber waiting, green a
   posted result, red an order running out. Below 1100px the column drops
   under the table rather than squeezing it. */

/* (The Home dashboard used to widen to 1320px here; every working screen
   now has the PC width — see "PC FIRST" at the end of this file.) */
.dashbox { container-type: inline-size; }

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.kpi {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--ink); text-decoration: none;
  min-width: 0;
}
.kpi:hover { border-color: var(--navy); }
.kpiicon {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy-tint); color: var(--navy);
}
.kpibody { min-width: 0; }
.kpiline { font-size: var(--t-title); font-weight: 700; }
.kpinum { font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.kpisub { margin-top: 2px; font-size: var(--t-label); color: var(--slate); }
.success-text { color: var(--success); font-weight: 700; }
.kpisub.amber-text { font-weight: 700; }

.dashstrip {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-3);
  padding: 11px 14px;
  background: var(--amber-tint); border: 1px solid var(--amber-line);
  border-radius: var(--r-card);
  color: var(--amber); font-size: var(--t-label); font-weight: 600;
  text-decoration: none;
}
.dashstrip b { margin-left: auto; white-space: nowrap; }

.dash {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: var(--s-4);
  margin-top: var(--s-4);
  align-items: start;
}
.dashside { display: flex; flex-direction: column; gap: var(--s-3); }
.dashside .card + .card, .dashmain .card + .card { margin-top: 0; }

.dashhead {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.dashhead .btnlink { margin-left: auto; white-space: nowrap; }
.dashicon {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--navy-tint); color: var(--navy);
}
.dashtitles { min-width: 0; }
.dashtitles h2 { font-size: 1.0625rem; }
.dashtitles p { font-size: var(--t-caption); }
.ordercard .dashicon { background: var(--danger-tint); color: var(--danger); }

.note-grey {
  margin-top: var(--s-3);
  padding: 9px 12px;
  background: var(--grey-tint);
  border-radius: var(--r-input);
  color: var(--grey); font-weight: 700; font-size: var(--t-label);
}
.daycard .note-amber, .daycard .note-grey { margin: 0 0 var(--s-3); }
.daycard .tablewrap { border-radius: var(--r-input); }
table.daytable { min-width: 760px; }
table.daytable.diaryonly { min-width: 560px; }
table.daytable td { vertical-align: top; }
.resultpill {
  display: inline-block; max-width: 220px;
  white-space: normal; line-height: 1.35;
}
.dashmore {
  display: inline-block; margin-top: var(--s-3);
  font-weight: 700; font-size: var(--t-label);
}

.sidecard { padding: var(--s-4); }
.sidelist { list-style: none; margin: 0; padding: 0; }
.sidelist li {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 0 9px 12px;
  border-left: 3px solid var(--hairline);
  font-size: var(--t-label);
}
.sidelist li + li { margin-top: 6px; }
.sidelist li b { font-weight: 700; }
.sidelist li a { text-decoration: none; font-weight: 600; }
.sidelist li a:hover { text-decoration: underline; }
.sidelist .when { font-size: var(--t-caption); color: var(--slate); }
.ordercard .sidelist li { border-left-color: var(--danger-line); }
.ordercard .sidelist li.urgent { border-left-color: var(--danger); }
.ordercard .sidelist li.urgent .when { color: var(--danger); font-weight: 700; }
.sidelist li.late { border-left-color: var(--amber-line); }
.sidelist li.late .when { color: var(--amber); font-weight: 700; }
.sidelist.activity li { border-left-color: var(--navy-line); }

.quicklist { display: flex; flex-direction: column; gap: var(--s-2); }
.quick {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 44px; padding: 0 var(--s-3);
  border: 1px solid var(--hairline); border-radius: var(--r-btn);
  color: var(--ink); font-weight: 700; font-size: var(--t-label);
  text-decoration: none;
}
.quick svg { color: var(--navy); flex: none; }
.quick:hover { border-color: var(--navy); background: var(--navy-tint); }

.dashside .phonecard { padding: var(--s-4); }
.dashside .phonecard .bigbtn { width: 100%; }

/* Side by side only where the table keeps all six columns in view. */
/* PC FIRST: the side column stays beside the lists only when the lists still
   get their full width beside it — on a 1366-wide laptop they did not, and
   every court table scrolled sideways. Below 1200px of room the side cards
   become one row of cards instead. Was 1060px. */
@container (max-width: 1200px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dashside { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); }
  /* On Today that row goes ABOVE the lists: an order running out must not sit
     under forty court rows. (Home keeps it below.) */
  .dash.todaydash .dashside { order: -1; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .dashside { grid-template-columns: minmax(0, 1fr); }
  .dashhead { flex-wrap: wrap; }
}

/* ---------- the day's table on a phone ----------
   A six-column table cannot be read on a phone screen, and scrolling it
   sideways hides the column that matters. Below 760px each row becomes a small
   card: the case first, then each column under its own name (data-label, set
   in screens/home.js). */
@media (max-width: 760px) {
  table.daytable, table.daytable.diaryonly { min-width: 0; }
  table.daytable thead { display: none; }
  table.daytable, table.daytable tbody, table.daytable tr, table.daytable td { display: block; }
  table.daytable tr { padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
  table.daytable tr:last-child { border-bottom: 0; }
  table.daytable td { border: 0; padding: 3px 0; display: flex; gap: var(--s-3); }
  table.daytable td::before {
    content: attr(data-label);
    flex: none; width: 82px;
    font-size: 0.75rem; font-weight: 800; letter-spacing: .8px;
    text-transform: uppercase; color: var(--slate); padding-top: 2px;
  }
  table.daytable .cellbody { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
  table.daytable td.serialcol { width: auto; text-align: left; font-size: var(--t-label); }
  table.daytable tr.diaryrow td.serialcol { display: none; }
  table.daytable td.casecell::before { display: none; }
}

/* The header on a phone: the search box keeps its room. The shortcut hint is
   for a keyboard, which a phone has not got. */
@media (max-width: 560px) {
  #bar { gap: var(--s-2); padding: 0 var(--s-3); }
  #bar .brand span { display: none; }
  #finder { flex: 1 1 auto; min-width: 0; }
  #qHint { display: none; }
  #bar #addCaseBtn .navlabel { display: none; }
  #bar #addCaseBtn { padding: 8px 10px; }
  #bar #payBtn .navlabel { display: none; }
  #bar #payBtn { padding: 8px 10px; }
}

/* The header's way to pay (app.js, paintPayButton). Gold edge so it is found
   without shouting; amber once the package has run out or is in grace. */
#bar .btnlink.paybtn { border-color: #C9A227; color: var(--navy); padding-left: 12px; }
#bar .btnlink.paybtn:hover { background: #FBF5E1; }
#bar .btnlink.paybtn.due { border-color: var(--amber-line); background: var(--amber-tint); color: var(--amber); }

/* ============================================================
   Accounts (ACCOUNTS.md, screens/accounts.js) — the chamber's books,
   locked with the chamber's own key. Navy for the lock and for "holds a
   key"; amber for what needs doing; no green and no red — those belong to a
   court result and to a lapsing order (DESIGN.md principle 4).
   ============================================================ */
.ib { display: inline-flex; align-items: center; gap: 6px; }
button.small { padding: 4px 10px; font-size: var(--t-caption); }
.acmt { margin-top: var(--s-3); }
.aclockbar {
  display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); padding: 10px 14px;
  background: var(--navy-tint); border: 1px solid var(--navy-line); border-radius: var(--r-card); color: var(--navy);
}
.aclockicon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--navy); color: #fff; flex: none; }
.aclockwords { display: flex; flex-direction: column; font-size: var(--t-label); min-width: 0; }
.aclockwords span { color: var(--slate); }
.aclockstate { margin-left: auto; font-size: var(--t-caption); color: var(--slate); font-weight: 600; white-space: nowrap; }
.acplacecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-3); margin-top: var(--s-2); }
.acplacecard { display: flex; gap: 10px; padding: 12px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.acplacecard:hover { border-color: var(--navy); }
.acplacecard.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.acplaceicon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--navy-tint); color: var(--navy); flex: none; }
.acplacename { font-size: var(--t-caption); font-weight: 700; color: var(--slate); margin: 0; }
.acplacebal { font-size: 1.1875rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.acmonth { margin-left: auto; flex-direction: row !important; align-items: center; gap: 8px !important; }
table.actable { min-width: 640px; }
table.actable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.actable .nowrap { white-space: nowrap; }
table.actable .sub { display: block; font-size: var(--t-caption); color: var(--slate); }
table.actable td.outamt { color: var(--amber); font-weight: 700; }
table.actable tfoot td { font-weight: 800; border-top: 2px solid var(--hairline); padding: 10px 12px; }
table.actable tr.reversed td { color: var(--slate); }
table.actable tr.reversed td b, table.actable tr.reversed td.num { text-decoration: line-through; }
table.actable tr.reversednote td { color: var(--slate); font-size: var(--t-caption); padding-top: 0; }
.acdialog { width: min(640px, 96vw); }
.acgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-3); }
.acgrid.one { grid-template-columns: 1fr; max-width: 460px; }
.acgrid.three { grid-template-columns: repeat(3, 1fr); max-width: 520px; }
.acfield { display: flex; flex-direction: column; gap: 4px; }
.acfield.wide { grid-column: 1 / -1; }
.acfield input, .acfield select, .acfield textarea { width: 100%; }
.accheck { flex-direction: row !important; display: flex; align-items: center; gap: 6px; margin-top: var(--s-3); font-size: var(--t-label); font-weight: 600; color: var(--ink); }
.accheck input { width: auto; margin: 0; }
.acactions { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-2); margin-top: var(--s-4); flex-wrap: wrap; }
.acactions.left { justify-content: flex-start; }
.acactions .aclink { margin-right: auto; }
.aclink { font-weight: 700; font-size: var(--t-label); }
.acwarn, .acsafe { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s-4); padding: 10px 12px; border-radius: var(--r-input); font-size: var(--t-label); }
.acwarn { background: var(--amber-tint); color: var(--amber); font-weight: 700; border: 1px solid var(--amber-line); }
.acsafe { background: var(--navy-tint); color: var(--navy); }
.acwarn svg, .acsafe svg { flex: none; margin-top: 2px; }
.acmeter { font-size: var(--t-caption); color: var(--slate); font-weight: 600; margin: 6px 0 0; }
.acsetup { padding: var(--s-5); max-width: 860px; }
.acsetup h2 { margin-bottom: var(--s-2); }
.acsetup .lead + .lead { margin-top: var(--s-2); }
.acstepper { display: flex; gap: var(--s-3); list-style: none; margin: 0 0 var(--s-5); padding: 0; flex-wrap: wrap; }
.acstepper li { display: flex; align-items: center; gap: 8px; font-size: var(--t-label); font-weight: 700; color: var(--slate); }
.acstepper li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--hairline); font-size: 0.75rem; }
.acstepper li.on { color: var(--navy); } .acstepper li.on span { border-color: var(--navy); }
.acstepper li.done span { background: var(--navy); border-color: var(--navy); color: #fff; }
.acwords { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; padding: 0; margin: var(--s-4) 0 var(--s-2); counter-reset: w; }
.acwords li { border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 10px; font-size: 1rem; font-weight: 700; counter-increment: w; }
.acwords li::before { content: counter(w); color: var(--slate); font-size: 0.75rem; font-weight: 600; margin-right: 8px; }
.acplaces { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.acplacerow { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-3); }
.accentre { max-width: 520px; margin: var(--s-5) auto 0; padding: var(--s-6) var(--s-5); }
.accentre h2 { text-align: center; margin: var(--s-3) 0 var(--s-2); }
.accentre > .lead, .acunlock > .lead { text-align: center; margin: 0 auto var(--s-4); }
.acbigicon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; background: var(--navy); color: #fff; }
.acpromise { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.acpromise li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-label); align-items: baseline; }
.acpromise .pm { flex: none; width: 76px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.acpromise li.no .pm { color: var(--navy); }
.acpromise li.yes .pm { color: var(--slate); }
.acheadgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.acheadgroup h4 { margin-bottom: 6px; }
.acheadgroup ul { list-style: none; margin: 0; padding: 0; }
.acheadgroup li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-label); }
.acheadgroup li.archived span { color: var(--slate); text-decoration: line-through; }
.acsplit { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); gap: var(--s-4); margin-top: var(--s-3); align-items: start; }
.acstack { display: flex; flex-direction: column; gap: var(--s-3); }
.acstack .card + .card { margin-top: 0; }
@media (max-width: 860px) {
  .acsplit { grid-template-columns: minmax(0, 1fr); }
  .aclockbar { flex-wrap: wrap; }
  .aclockstate { margin-left: 0; white-space: normal; }
  .acgrid, .acplacerow { grid-template-columns: 1fr; }
  .acwords { grid-template-columns: repeat(2, 1fr); }
}
.dashhead > .ib:last-child, .dashhead > .acmonth { margin-left: auto; }
#main .mlabel { font-size: var(--t-label); font-weight: 700; margin: var(--s-4) 0 6px; color: var(--ink); }
/* Accounts — From the app (the bridge). */
.acrowacts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acchecks { display: flex; flex-direction: column; }
.accheckrow { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; padding: var(--s-3) 0; border-top: 1px solid var(--hairline); }
.accheckrow p { margin: 2px 0 0; font-size: var(--t-label); color: var(--slate); }
.acneeds { border-left: 3px solid var(--amber); }
.bucket .pill.tiny { margin-left: 6px; }
@media (max-width: 860px) { .accheckrow { flex-direction: column; align-items: stretch; } .acrowacts { justify-content: flex-start; } }
/* Accounts — receipts & vouchers. */
.acpapertools { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; flex-wrap: wrap; margin: var(--s-3) 0; }
button.linkbtn { background: none; border: none; padding: 0; font: inherit; color: var(--navy); font-weight: 700; cursor: pointer; text-underline-offset: 2px; }
button.linkbtn:hover { color: var(--ink); }
.dashhead > .ib { white-space: nowrap; flex: none; }
/* Accounts — people & pay. */
table.acpayrun input[type=text] { width: 110px; }
table.acpayrun select { max-width: 160px; }
table.acpayrun tr.acpaid td { color: var(--slate); }
.acactions.spread { justify-content: space-between; align-items: center; }
.acdialog:has(table.acpayrun) { max-width: 980px; width: min(980px, 96vw); }
/* Accounts — client money & reports. */
td.acred, td.acred b { color: var(--danger); }
.acstatsum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-3); }
.acstatsum div { border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; }
.acstatsum span { display: block; font-size: var(--t-label); color: var(--slate); }
.acstatsum b { font-size: 1.125rem; }
table.actable tr.acgrp td { font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); background: var(--grey-tint); }
table.actable tr.actot td { border-top: 1.5px solid var(--ink); }
.acother summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.acother ul { list-style: none; margin: 0; padding: 0; }
.acother li, ul.acdue li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-label); }
ul.acdue { list-style: none; margin: 0; padding: 0; }
ul.acdue li.actot { border-bottom: none; border-top: 1.5px solid var(--ink); font-weight: 700; }
ul.acdue li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
ul.acdue li > span:first-child .sub { font-weight: 400; }

/* ---------- Paper files (CASE_FLOW.md §3; screens/paper_file_card.js,
   screens/paper_files.js) ---------- */
.pf-card h4 { margin: 0 0 var(--s-2); }
.pf-volumes { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.pf-numberrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pf-number { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pf-where { margin: var(--s-2) 0 var(--s-3); font-weight: 700; }
.pf-where.big { font-size: 1.125rem; }
.pf-movebox { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.pf-movebox select, .pf-movebox input, .pf-home select { min-width: 0; max-width: 100%; }
.pf-movebox .formrow input { flex: 1 1 220px; }
.pf-home { display: flex; flex-direction: row; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); font-weight: 700; }
.pf-sticker { border-top: 1px solid var(--hairline); margin-top: var(--s-3); padding-top: var(--s-3); }
.pf-sticker .field input { width: 100%; }
.pf-file h5 { margin: var(--s-3) 0 var(--s-1); font-size: var(--t-label); }
.pf-history { list-style: none; margin: 0; padding: 0; }
.pf-history li { padding: 6px 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-label); color: var(--slate); }
.pf-history li:last-child { border-bottom: 0; }
.pf-more { margin-top: var(--s-3); }
.pf-listhead { justify-content: space-between; margin-bottom: var(--s-3); }
table.pftable { min-width: 640px; }
table.pftable .pick { width: 36px; }
table.pftable .sub { display: block; font-size: var(--t-caption); color: var(--slate); }
table.pftable td .pill { margin-left: var(--s-2); }
.pf-places, .pf-places ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.pf-places ul { margin: var(--s-1) 0 0 var(--s-5, 24px); }
.pf-places > li { border-bottom: 1px solid var(--hairline); padding: var(--s-2) 0; }
.pf-places li.archived { opacity: 0.6; }
.pf-placerow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2); padding: 4px 0; }
.pf-placename { display: flex; align-items: center; gap: var(--s-2); }
.pf-placeacts { display: flex; gap: var(--s-2); }
.pf-addshelf { margin: var(--s-2) 0 0 var(--s-5, 24px); }
.pf-schemes { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-3) 0; }
.pf-scheme { display: flex; flex-direction: row; gap: var(--s-2); align-items: flex-start; cursor: pointer; }
.pf-scheme input { flex: none; margin-top: 3px; }
.pf-scheme .sub { display: block; color: var(--slate); font-size: var(--t-caption); }
.pf-example { margin: 0; font-weight: 700; color: var(--navy); }
.pf-code { width: 9em; }
.pf-codeacts { white-space: nowrap; }
.pf-codeacts button + button { margin-left: var(--s-2); }
.pf-scan { max-width: 560px; }
.pf-scanno { font-size: 2.125rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pf-scancase { display: inline-block; margin-top: var(--s-1); font-weight: 800; font-size: 1.0625rem; }
.pf-moves.big button { flex: 1 1 46%; padding: 14px 12px; font-size: 1rem; }
.pf-note { color: var(--amber); font-weight: 700; margin: var(--s-2) 0; }
.pf-pull { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.pf-pullrow { display: flex; gap: var(--s-3); align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.pf-pullrow:last-child { border-bottom: 0; }
.pf-pullrow.done { opacity: 0.6; }
.pf-pullrow > button { margin-left: auto; flex: none; }
.pf-tick { display: flex; flex-direction: row; padding-top: 2px; }
.pf-tick input { width: 20px; height: 20px; flex: none; }
.pf-pullmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-pullmain .sub { color: var(--slate); font-size: var(--t-caption); }
.pf-pullno { font-weight: 800; font-size: 0.9375rem; margin-right: var(--s-2); text-decoration: none; }
.pf-pullwhere { font-weight: 700; }
.pf-pullrow.out .pf-pullwhere { color: var(--amber); }
.pf-pullcase a { font-weight: 700; }
.pf-pullcase .sub { display: block; }
@media (max-width: 760px) {
  .pf-moves.big button { flex-basis: 100%; }
  .pf-pullrow { flex-wrap: wrap; }
  .pf-pullrow > button { margin-left: 0; }
  .pf-placerow { flex-direction: column; align-items: flex-start; }
}

/* Case folders on the Drive page (CASE_FLOW.md §5, screens/drive.js). */
textarea.pf-template { width: 100%; font: inherit; line-height: 1.5; }

/* Notes (NOTES.md, screens/notes.js): the list beside the editor; one column
   on a narrow screen. */
.notes-search { min-width: 260px; flex: 1; }
.notes-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: var(--s-3); margin-top: var(--s-3); align-items: start; }
@media (max-width: 860px) { .notes-grid { grid-template-columns: 1fr; } }
.notes-list { display: flex; flex-direction: column; gap: var(--s-2); }
.note-row { text-align: left; background: var(--paper); border: 1px solid var(--hairline); border-left: 4px solid transparent;
  border-radius: var(--r-input); padding: var(--s-2) var(--s-3); cursor: pointer; font: inherit; color: var(--ink); }
.note-row:hover { background: var(--mist); }
.note-row.on { border-color: var(--navy-line); background: var(--navy-tint); }
.note-head { display: flex; gap: var(--s-2); align-items: center; }
.note-head .pill.tiny { margin-left: 0; }
.note-card .note-title { width: 100%; font-size: var(--t-title); font-weight: 700; border: 0; padding: 4px 0; }
.note-card .note-body { width: 100%; min-height: 360px; font: inherit; line-height: 1.55; border: 0; padding: 4px 0; resize: vertical; }
.note-card .note-title:focus, .note-card .note-body:focus { box-shadow: none; outline: none; }
.note-colours { display: flex; gap: 6px; }
.note-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--hairline); cursor: pointer; padding: 0; }
.note-swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.note-readonly { white-space: pre-wrap; font: inherit; line-height: 1.55; }

/* Documents (DOCUMENTS.md §13, screens/documents.js). */
.chip { font: inherit; font-size: var(--t-label); border: 1px solid var(--hairline); background: var(--paper);
  color: var(--ink); border-radius: var(--r-chip); padding: 4px 12px; cursor: pointer; }
.chip.on { background: var(--navy-tint); border-color: var(--navy-line); color: var(--navy); font-weight: 600; }
.docrow { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-2) 0; border-top: 1px solid var(--hairline); }
.docrow:first-child { border-top: 0; }

/* ---------- Today › After court (screens/today.js) ----------
   A table of inputs: what happened, the next date, what it is for. The row
   turns the result green once it is written up — green being "an outcome
   exists", the one thing it means anywhere on this site. */
table.aftertable { min-width: 860px; }
table.aftertable td { vertical-align: top; }
table.aftertable td.casecell { min-width: 220px; }
table.aftertable input[type="text"].stepsbox { width: 100%; min-width: 200px; }
table.aftertable input[type="date"] { min-width: 150px; }
table.aftertable input.feebox { width: 96px; }
table.aftertable select { max-width: 170px; }
table.aftertable tr.written td { background: var(--success-tint); }
table.daytable .dateecho { min-height: 1.2em; }
table.daytable td.savecell .cellbody { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
table.daytable .rowstatus .pill { white-space: normal; }
@media (max-width: 760px) {
  table.aftertable { min-width: 0; }
  table.aftertable input[type="text"].stepsbox, table.aftertable input[type="date"], table.aftertable select { width: 100%; max-width: none; }
}

/* ---------- The seven workspaces (shared/workspaces.js, app.js) ---------- */
#navNew a { padding-top: 9px; padding-bottom: 9px; font-weight: 700; }

/* The working column: the bar of screens inside the workspace, then the page.
   #main used to sit in the grid itself; it is now inside #work, which does. */
#work { grid-area: main; min-width: 0; }
#subnav {
  display: flex; flex-wrap: wrap; gap: 2px;
  padding: var(--s-3) var(--s-5) 0;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
#subnav .subtab {
  padding: 8px 12px 9px;
  font-size: var(--t-label); font-weight: 700;
  color: var(--slate); text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  white-space: nowrap;
}
#subnav .subtab:hover { color: var(--ink); }
#subnav .subtab.on { color: var(--navy); border-bottom-color: var(--navy); }
@media (max-width: 860px) {
  #subnav { padding: var(--s-2) var(--s-4) 0; flex-wrap: nowrap; overflow-x: auto; }
}

/* Past the header and the menu, straight to the page — seen only when a
   keyboard reaches it. */
.skiplink { position: absolute; left: -9999px; top: 8px; z-index: 60; }
.skiplink:focus {
  left: 8px; background: var(--paper); color: var(--navy);
  border: 2px solid var(--navy); border-radius: var(--r-input);
  padding: 8px 12px; font: inherit; font-weight: 700;
}
#main:focus { outline: none; }

/* ---------- PC FIRST (owner, 12 Nov 2026; WEB_DESIGN.md) ----------
   The website is the PC product. A working screen uses the width a monitor
   has, up to 1600px, so a table's names and case titles get room before they
   wrap; at 1920 wide the page used to stop at 1180px and leave a quarter of
   the screen empty. A screen that is mainly a FORM keeps the narrower measure
   — a form stretched across a monitor is harder to read, not easier. app.js
   writes the screen's name into #main[data-screen]. */
#main { max-width: 1600px; }
#main[data-screen="add-case"], #main[data-screen="setup"], #main[data-screen="welcome"],
#main[data-screen="profile"], #main[data-screen="subscription"], #main[data-screen="import"],
#main[data-screen="notes"] { max-width: 1180px; }
#subnav { max-width: none; }

/* The register's pages (screens/cases.js): the count and the page buttons. */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2) var(--s-4); margin-top: var(--s-3); font-size: var(--t-label); color: var(--slate); }
.pager .pagebtns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pager .pagebtns span { white-space: nowrap; }

/* ---------- HEADINGS THAT STAY IN VIEW (17 Nov 2026) ----------
   On a PC a long table keeps its column names at the top of the window while
   you scroll down it (a hundred cases is two screens). A heading can only
   stick to the window if no box between it and the window scrolls sideways,
   so on a screen wide enough that no table needs to (every table's minimum
   width fits from 1200px up, measured) the table box stops being a sideways
   scroller. Below 1200px tables keep scrolling sideways inside their box, as
   before, and the headings scroll away with the rows. */
@media (min-width: 1200px) {
  .tablewrap { overflow: visible; }
  .tablewrap > table > thead th {
    position: sticky;
    top: 56px;                 /* under the header bar (#bar), which also sticks */
    z-index: 2;
    background: var(--paper);
    box-shadow: inset 0 -1px 0 var(--hairline);
  }
}

/* A box over the page never wider than the room it is centred in: on a phone
   96vw plus the shade's 16px padding put its right edge on the screen edge. */
.overlay > .overlay-card { max-width: calc(100vw - 2 * var(--s-4)); box-sizing: border-box; }
.confirmcard p { margin: 0 0 var(--s-3); line-height: 1.5; }
.confirmcard .dlg-actions { justify-content: flex-end; margin-top: var(--s-4); }

/* The case page's Orders and to-dos card (screens/case_work.js). */
.casework h4 { margin: var(--s-4) 0 var(--s-2); }
.casework h4:first-of-type { margin-top: var(--s-2); }
.casework details.extend { margin-top: var(--s-2); }
.casework .donebox { margin: var(--s-2) 0; }
.casework .donebox > summary { cursor: pointer; color: var(--slate); font-size: var(--t-caption); }
.casework-add { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hairline); }
.casework .orderhead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

/* Who is on this case (screens/case_team.js). */
.caseteam .kv { margin: var(--s-2) 0 var(--s-1); }
.caseteam .teamlist { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-2); }
.caseteam .teamrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.caseteam .formrow select { min-width: 0; flex: 1 1 12rem; }

/* The case page's Fees card (screens/case_fees.js). */
.casefees .lead { margin: var(--s-1) 0 var(--s-2); }
.casefees .feelist { display: flex; flex-direction: column; margin: var(--s-2) 0; border-top: 1px solid var(--hairline); }
.casefees .feerow { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: var(--s-2); padding: var(--s-1) 0; border-bottom: 1px solid var(--hairline); font-size: var(--t-caption); }
.casefees details.extend { margin: var(--s-2) 0; }

/* A quiet action that reads as a link: Remove, Take off the team, Delete this
   case. Placed so the row-specific rules above (hover reveal) still apply. */
button.linkish { background: none; border: 0; padding: 2px 0; color: var(--slate); font: inherit; font-size: var(--t-caption); cursor: pointer; text-underline-offset: 2px; }
button.linkish:hover { color: var(--danger); text-decoration: underline; }
button.linkish:disabled { opacity: .5; cursor: default; }

/* The Case Desk (screens/desk.js). Two queues side by side on a PC. */
.deskgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: var(--s-4); align-items: start; }
@media (max-width: 760px) { .deskgrid { grid-template-columns: 1fr; } }
.deskq .head h2 { font-size: var(--t-h3, 1.05rem); }
.deskq.clear { opacity: .75; }
.desklist { display: flex; flex-direction: column; }
.deskrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--hairline); }
.deskrow:last-child { border-bottom: 0; }
.deskmain { display: flex; flex-direction: column; min-width: 0; }
.desksub { color: var(--slate); font-size: var(--t-caption); }
.deskacts { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.deskrow > button, .deskrow > .btnlink { flex-shrink: 0; padding: 5px 10px; font-size: var(--t-caption); }
.deskwho { display: flex; align-items: center; gap: var(--s-2); }
.deskwho span { color: var(--slate); font-size: var(--t-caption); }

/* The conflict check on a new matter (screens/matters.js). */
.conflictbox { margin: var(--s-3) 0; padding: var(--s-3); border: 1px solid var(--amber); border-left-width: 4px; border-radius: var(--r-input); background: var(--amber-tint, #fff8e6); }
.conflictbox ul { margin: var(--s-2) 0; padding-left: 1.2rem; }
.conflictbox li { margin: 2px 0; }

/* Saved views on My Cases (shared/saved_views.js). */
.viewsrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 var(--s-3); }
.viewsrow:empty { display: none; }
.viewslabel { color: var(--slate); font-size: var(--t-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.viewwrap { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 999px; background: var(--paper); }
.viewchip { padding: 3px 4px 3px 12px; font-size: var(--t-caption); text-decoration: none; color: var(--navy); }
.viewchip.on { font-weight: 700; }
.viewx { background: none; border: 0; padding: 3px 10px 3px 6px; color: var(--slate); cursor: pointer; }
.viewx:hover { color: var(--danger); }

/* Import › Judge Court & tribunals (screens/import_jc.js). */
.segmented a { padding: 9px 14px; border: 1px solid var(--hairline); border-radius: var(--r-input); background: var(--paper); color: var(--ink); font-weight: 700; font-size: var(--t-label); text-decoration: none; }
.segmented a:hover { background: var(--grey-tint); }
.segmented a[aria-current="true"] { background: var(--navy-tint); border-color: var(--navy); color: var(--navy); }
.importtable td.okmark { color: var(--ok, #1f7a3f); font-weight: 700; }
.importtable td.badmark { color: var(--danger); font-weight: 700; }
.importtable tr.rejected td { background: var(--danger-tint); }
.importtable td { vertical-align: top; }
.importdone { columns: 2 18rem; margin: var(--s-2) 0; }

/* The first-week checklist (screens/first_week.js). */
.firstweek { border-left: 4px solid var(--navy); }
.firstweeklist { list-style: none; margin: var(--s-2) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--s-2) var(--s-4); }
.firstweeklist li { display: flex; gap: var(--s-2); align-items: flex-start; }
.firstweeklist li .stamp { margin: 2px 0 0; }
.fwmark { flex-shrink: 0; width: 1.4rem; height: 1.4rem; border: 1.5px solid var(--navy-line, var(--hairline)); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--navy); font-size: .85rem; }
.firstweeklist li.done .fwmark { background: var(--navy-tint); }
.firstweeklist li.done b { color: var(--slate); font-weight: 600; text-decoration: line-through; }

/* Reports (screens/reports.js, phase 7). Two sections side by side on a
   PC; the wide ones span both. Bars are one hue, 4px rounded ends. */
.reportgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr)); gap: var(--s-4); align-items: start; }
.reportcard.wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .reportgrid { grid-template-columns: 1fr; } }
.reporttable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.reporttable th, .reporttable td { padding: 6px 10px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
.reporttable th.num, .reporttable td.num { text-align: right; white-space: nowrap; }
.reporttable tfoot td { border-bottom: 0; border-top: 1.5px solid var(--ink); }
.reporttable td.barcell { width: 38%; min-width: 6rem; }
.rbar { height: 10px; background: var(--grey-tint); border-radius: 4px; overflow: hidden; }
.rbar > span { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
@media print { .reportgrid { display: block; } .reportcard { break-inside: avoid; margin-bottom: 18px; }
  .rbar { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rbar > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.reporttable td.weekcell { white-space: nowrap; }

/* The bell (screens/notifications.js; badge drawn by app.js paintBell). */
.bellbtn { position: relative; }
.bellbadge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: var(--t-caption); font-weight: 800; line-height: 18px; text-align: center; }
.bellgroup { margin: var(--s-3) 0 var(--s-1); }
.belllist { display: flex; flex-direction: column; }
.bellrow { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--hairline); }
.bellrow:last-child { border-bottom: 0; }
.bellopen { flex: 1; display: flex; gap: var(--s-3); align-items: flex-start; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: var(--r-input); cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.bellopen:hover { background: var(--grey-tint); }
.bellicon { flex-shrink: 0; color: var(--slate); margin-top: 2px; }
.bellwords { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bellwords b { font-weight: 600; }
.bellrow.unread .bellwords b { font-weight: 800; }
.bellrow.unread .bellicon { color: var(--navy); }
.belltop { display: flex; align-items: center; gap: var(--s-2); }
.bellage { color: var(--slate); font-size: var(--t-caption); }
.bellbody { color: var(--slate); font-size: var(--t-label); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bellacts { display: flex; gap: var(--s-3); padding-top: 8px; flex-shrink: 0; }
.bellcard .bellfull { white-space: pre-wrap; line-height: 1.55; margin: var(--s-2) 0 var(--s-3); }

/* The case page (screens/case.js, redesigned 19 Nov 2026 on the app's case
   details): a navy band, one action bar, then two columns on a PC. */
.casehero { background: var(--navy); color: #fff; border-radius: var(--r-card); padding: 22px 28px 20px; margin-bottom: var(--s-3); }
.casehero a { color: #fff; }
.herotop { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); flex-wrap: wrap; }
.herokicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-label); }
.heroback { text-decoration: none; opacity: .85; }
.heroback:hover { opacity: 1; text-decoration: underline; }
.herodiv { opacity: .85; }
.herodiv::before { content: "·"; margin-right: 10px; opacity: .6; }
.herotag { font-size: var(--t-caption); font-weight: 800; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.16); }
.herotag.amber { background: var(--amber); color: #fff; }
.heroacts { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.herobtn { display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: var(--r-input); background: transparent; color: #fff; font: inherit; font-size: var(--t-label); font-weight: 700; text-decoration: none; cursor: pointer; }
.herobtn:hover { background: rgba(255,255,255,.12); }
.herotitle { margin: 10px 0 12px; font-size: 1.75rem; font-weight: 800; color: #fff; line-height: 1.2; }
.heroparties { display: flex; flex-direction: column; gap: 2px; }
.heroparty { font-size: 1.15rem; font-weight: 600; line-height: 1.35; }
.herovs { font-size: var(--t-label); opacity: .7; }
.muted-on-dark { opacity: .8; font-weight: 400; font-size: var(--t-body); }
.herorule { border-top: 1px solid rgba(255,255,255,.28); margin: 16px 0 12px; }
.heronext { display: flex; align-items: center; gap: 10px; font-size: 1rem; text-decoration: none; }
a.heronext:hover span:nth-child(2) { text-decoration: underline; }
.heronext.quiet { opacity: .85; }
.heroicon { display: inline-flex; opacity: .9; }
.herochev { font-size: 1.3rem; line-height: 1; opacity: .8; }
.herofacts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; font-size: var(--t-label); }
.herofact > span { opacity: .72; }
.herofact b, .herofact a { font-weight: 700; }
.casehero .formrow { margin-top: var(--s-3); }
.casehero .stamp { color: rgba(255,255,255,.8); }
.caseactions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-4); }
.actbtn { display: inline-flex; align-items: center; gap: 6px; }
.casegrid { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--s-4); align-items: start; }
@media (max-width: 1100px) { .casegrid { grid-template-columns: minmax(0, 1fr); } }
.casemain, .caseside { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.casemain > .card, .caseside > .card { margin: 0; }
.hearinglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s-3); }
.hcard { border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.hcard.diary { border-left: 3px solid var(--grey-line, var(--hairline)); }
.hcardtop { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.hcarddate { font-size: 1.05rem; }
.hcardrel { color: var(--slate); font-size: var(--t-caption); margin: 0 8px; }
.hcardserial { color: var(--navy); white-space: nowrap; }
.hcardcourt { color: var(--slate); font-size: var(--t-label); }
.hcardlink { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 700; text-decoration: none; margin-top: 4px; }
.hcardlink:hover span:nth-child(2) { text-decoration: underline; }
.hcardlink .herochev { margin-left: auto; color: var(--slate); }
.hcardacts { display: flex; gap: var(--s-3); }
.sideclient { display: block; font-weight: 700; font-size: var(--t-title); margin: 4px 0; }
@media print { .casehero { background: #fff; color: #000; border: 1px solid #000; } .casehero a, .herobtn { color: #000; } .heroacts { display: none; } }
/* A case-type heading inside the Disposed table — the app's type sections. */
table.cases tr.typerow td {
  background: var(--navy-tint); color: var(--navy);
  padding-top: var(--s-2); padding-bottom: var(--s-2);
}

/* ---- Changes on the case page (case_changes.js, migration 132) ---- */
.casechanges .changelog { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.casechanges .changelog > li {
  display: grid; gap: 0.1rem; padding: 0.5rem 0;
  border-top: 1px solid var(--line, #e3e7ee);
}
.casechanges .changelog > li:first-child { border-top: 0; }
.casechanges .changewhen { font-size: 0.75rem; color: var(--muted, #5b6573); }
.casechanges .changewhat { font-size: 0.875rem; }
.casechanges .changedetail {
  margin: 0.15rem 0 0; padding-left: 1rem;
  font-size: 0.8125rem; color: var(--muted, #5b6573);
  overflow-wrap: anywhere;
}
