/* Lizzy Psak — judge / party / topic / court aggregate pages.
   Builds on landing.css's CSS variables and brand chrome. */

.agg-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0 20px;
}
.agg-kind {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); background: var(--accent-light);
  padding: 3px 10px; border-radius: 10px;
}
.agg-kind.judge { background: var(--gold-light); color: var(--gold); }
.agg-kind.party { background: #e8f4ed; color: #2d7d4f; }
.agg-kind.topic { background: var(--accent-light); color: var(--accent); }
.agg-kind.court { background: var(--lizzy-light); color: var(--lizzy); }

.agg-header h1 {
  font-size: 26px; font-weight: 600;
  margin: 8px 0 6px; line-height: 1.25;
  letter-spacing: -0.01em;
}
.agg-meta { color: var(--text-muted); font-size: 14px; }
.agg-meta strong { color: var(--text); font-weight: 600; }
/* shown next to a count that the header filter has narrowed */
.agg-filtered {
  font-size: 11px; font-weight: 600;
  color: var(--lizzy); background: var(--lizzy-light);
  border: 1px solid var(--lizzy-border); border-radius: 10px; padding: 1px 8px;
}

.agg-filter {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin: 16px 0;
}
.agg-filter a {
  font-size: 13px; padding: 4px 10px;
  border-radius: 12px; background: var(--surface-2);
  color: var(--text); text-decoration: none;
}
.agg-filter a.active { background: var(--accent); color: #fff; }
.agg-filter a:hover { background: var(--border); text-decoration: none; }
.agg-filter a.active:hover { background: var(--accent-dark); }

/* ---------- progressive-scroll sentinel ----------
   Placed below a list to trigger IntersectionObserver fetches in
   progressive-list.js. Visible by default (a thin centered spinner) so the
   user knows more content is loading; replaced with an error label on fetch
   failure. Removed entirely from the DOM when the list is exhausted. */
.progressive-sentinel {
  display: flex;
  align-items: center; justify-content: center;
  min-height: 60px;
  margin: 16px 0 32px;
}
.progressive-spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--border, #E7E7E7);
  border-top-color: var(--accent, #25A7FF);
  border-radius: 50%;
  animation: progressive-spin 0.7s linear infinite;
}
.progressive-sentinel.failed .progressive-spinner { display: none; }
.progressive-error {
  font-size: 13px; color: var(--text-muted, #616368);
}
@keyframes progressive-spin {
  to { transform: rotate(360deg); }
}

/* ---------- case timeline (Case page) ----------
   One row per day on which documents were given: the date, then a rail with a
   dot, then that day's documents. Each document is tied to the rail by a short
   stub, so a day with several documents reads as branches off one point.
   Logical properties throughout: in RTL the date is on the right. */
.tl-facts {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 13px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tl-facts-k { color: var(--text-muted); margin-inline-end: 4px; }
.tl-jump { margin-inline-start: auto; font-weight: 600; }

.tl { list-style: none; margin: 0 0 48px; padding: 0; }
.tl-day { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
.tl-date {
  padding-top: 13px; padding-inline-end: 20px;
  text-align: end;
  font-size: 13px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tl-gap { display: block; font-size: 11px; font-weight: 400; color: var(--text-dim); }

.tl-docs, .tl-edge-label {
  position: relative;
  border-inline-start: 2px solid var(--border);
  padding-inline-start: 26px; padding-bottom: 14px;
}
.tl-docs { display: flex; flex-direction: column; gap: 8px; }
/* the day's dot, centred on the rail */
.tl-docs::before, .tl-edge-label::before {
  content: ""; position: absolute; z-index: 1;
  inset-inline-start: -7px; top: 17px;
  width: 12px; height: 12px; box-sizing: border-box;
  border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
}
.tl-major .tl-docs::before {
  inset-inline-start: -9px; top: 15px; width: 16px; height: 16px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}
.tl-edge .tl-edge-label::before { border-color: var(--text-dim); }
/* the rail starts at the first dot and ends at the last one */
.tl-day:first-child > :last-child::after,
.tl-day:last-child > :last-child::after {
  content: ""; position: absolute;
  inset-inline-start: -2px; width: 2px;
  background: var(--bg);
}
.tl-day:first-child > :last-child::after { top: 0; height: 17px; }
.tl-day:last-child > :last-child::after { top: 29px; bottom: 0; }
.tl-day:first-child:last-child > :last-child::after { display: none; }

.tl-edge-label {
  padding-top: 13px;
  font-size: 13px; color: var(--text-muted);
}

.tl-doc {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  scroll-margin-top: calc(var(--header-h, 56px) + 16px);
}
/* stub from the rail to the card */
.tl-doc::before {
  content: ""; position: absolute;
  inset-inline-start: -27px; top: 22px;
  width: 26px; height: 2px;
  background: var(--border);
}
.tl-doc:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(58, 74, 142, 0.06); }
.tl-doc:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.tl-judgment { border-inline-start: 3px solid var(--accent); }

.tl-doc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tl-doc-type { font-size: 14px; font-weight: 600; color: var(--text); }
.tl-doc-type:hover { text-decoration: none; color: var(--accent); }
.tl-judgment .tl-doc-type { font-size: 16px; color: var(--accent); }
/* the whole card opens the document; the other links stay clickable above it */
.tl-doc-type::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.tl-judges, .tl-topics { position: relative; z-index: 1; }
.tl-mat {
  font-size: 10px; color: var(--gold);
  background: var(--gold-light); border: 1px solid var(--gold);
  padding: 1px 6px; border-radius: 3px; font-weight: 600;
}
.tl-judges { margin-inline-start: auto; font-size: 12px; color: var(--text-muted); }
.tl-judges a { color: var(--text-muted); }
.tl-judges a:not(:last-child)::after { content: ","; }
.tl-judges a:hover { color: var(--accent); }
.tl-excerpt {
  margin: 6px 0 0;
  font-size: 13.5px; line-height: 1.6; color: var(--text-muted);
}
.tl-judgment .tl-excerpt { color: var(--text); }
.tl-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-topics a {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface-2); padding: 1px 8px; border-radius: 10px;
}
.tl-topics a:hover { color: var(--accent); text-decoration: none; }

/* Phone — the date moves above its documents, on the same rail. */
@media (max-width: 640px) {
  .tl-day { grid-template-columns: minmax(0, 1fr); }
  .tl-date {
    text-align: start;
    border-inline-start: 2px solid var(--border);
    padding: 10px 0 6px; padding-inline-start: 22px;
  }
  .tl-gap { display: inline; margin-inline-start: 6px; }
  .tl-docs, .tl-edge-label { padding-inline-start: 22px; }
  .tl-edge-label { padding-top: 0; }
  .tl-docs::before, .tl-edge-label::before { top: 14px; }
  .tl-edge-label::before { top: 3px; }
  .tl-major .tl-docs::before { top: 12px; }
  .tl-doc::before { inset-inline-start: -23px; width: 22px; top: 19px; }
  .tl-day:first-child > :last-child::after { display: none; }
  .tl-day:last-child > :last-child::after { top: 26px; }
  .tl-judges { margin-inline-start: 0; flex-basis: 100%; }
}

/* ---------- courts index + court page ("אינדקס – בתי משפט", "עמוד בית משפט" designs) ----------
   A header block with one very large number, then cards / a list. Sizes, weights, radii
   and spacing are the designs'; colours are the site's variables, so the dark theme works. */
.ct-hero {
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px 0 0; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.ct-hero > .ct-chart:last-child, .ct-hero > .ct-hero-top:last-child { padding-bottom: 32px; }
.ct-crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 14px; color: var(--text-muted);
}
.ct-crumbs a { color: var(--text-muted); min-height: 44px; display: inline-flex; align-items: center; }
.ct-hero-top {
  display: flex; flex-wrap: wrap; gap: 24px 48px;
  align-items: flex-end; justify-content: space-between;
}
.ct-hero-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-tag {
  align-self: flex-start;
  font-size: 13px; font-weight: 500;
  color: var(--lizzy); background: var(--lizzy-light);
  border-radius: 12px; padding: 4px 12px;
}
.ct-hero-name { margin: 0; font-size: 20px; font-weight: 500; color: var(--text-muted); }
/* The total. The designs draw it at 96 / 104px; shown smaller, by request. */
.ct-hero-number {
  font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.ct-hero-number.big { font-size: 44px; }
.ct-hero-label { font-size: 16px; font-weight: 500; color: var(--text); }
.ct-stats { display: flex; flex-wrap: wrap; gap: 32px; }
.ct-stat { display: flex; flex-direction: column; gap: 2px; }
.ct-stat-value { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.ct-stat-label { font-size: 14px; color: var(--text-muted); }

/* courts index: one card per court */
.ct-cards { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.ct-card {
  flex: 1 1 380px; min-width: 0; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ct-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(58, 74, 142, 0.06); text-decoration: none; }
.ct-card h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ct-card-count { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 15px; color: var(--text-muted); }
.ct-card-number { font-size: 52px; font-weight: 700; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.ct-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.ct-bar > div { height: 8px; background: var(--accent); border-radius: 4px; }
.ct-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  font-size: 14px; color: var(--text-muted);
}
.ct-card-link { font-size: 14px; font-weight: 500; color: var(--accent-dark); }

/* courts index: each court's years on one time axis */
.ct-coverage {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.ct-coverage h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ct-coverage-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.ct-coverage-name { flex: 0 0 180px; font-size: 14px; font-weight: 500; }
.ct-coverage-track { flex: 999 1 320px; min-width: 0; height: 20px; background: var(--surface-2); border-radius: 4px; }
.ct-coverage-track > div { height: 20px; background: var(--accent); border-radius: 4px; }
.ct-coverage-track > div.alt { background: var(--lizzy); }
.ct-coverage-axis {
  flex: 999 1 320px; min-width: 0;
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}

/* court page: rulings per year; a bar is a link to that year */
.ct-chart { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.ct-chart-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ct-chart-hint { font-size: 14px; color: var(--text-muted); }
.ct-chart-shown {
  min-height: 44px; padding: 0 16px;
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
}
.ct-chart-shown:hover { text-decoration: none; border-color: var(--accent); }
.ct-chart-scroll { overflow-x: auto; overflow-y: hidden; }
.ct-bars { min-width: 760px; height: 210px; display: flex; gap: 4px; align-items: flex-end; }
.ct-bar-col {
  flex: 1 1 0; min-width: 0; height: 210px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px;
  text-decoration: none;
}
.ct-bar-col:hover { text-decoration: none; }
.ct-bar-fill { display: block; background: var(--accent); border-radius: 3px 3px 0 0; }
.ct-bar-year { display: block; font-size: 11px; line-height: 1; color: var(--text-muted); text-align: center; }
.ct-bar-col:hover .ct-bar-fill { background: var(--accent-dark); }
.ct-bar-col.on .ct-bar-fill, .ct-bar-col.on:hover .ct-bar-fill { background: var(--lizzy); }
.ct-bar-col.on .ct-bar-year { color: var(--lizzy); font-weight: 700; }

/* court page: the list, a card per day */
.ct-list-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.ct-list-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.ct-find { display: flex; align-items: center; gap: 8px; }
.ct-find label { font-size: 13px; color: var(--text-muted); }
.ct-find input[type="search"] {
  width: 220px; height: 44px; box-sizing: border-box; padding: 0 12px;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.ct-find input[type="search"]:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.ct-days { display: flex; flex-direction: column; gap: 12px; }
.ct-day { display: flex; flex-direction: column; gap: 8px; }
.ct-day h3 { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--text-muted); }
.ct-rows {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.ct-row {
  min-height: 60px; box-sizing: border-box; padding: 8px 20px;
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.ct-row:last-child { border-bottom: 0; }
.ct-row:hover { background: var(--accent-light); text-decoration: none; }
.ct-row-name { flex: 999 1 280px; min-width: 0; font-size: 16px; font-weight: 500; }
.ct-row-case { flex: 0 0 170px; font-size: 14px; color: var(--text-muted); }
.ct-row-type {
  flex: 0 0 70px; box-sizing: border-box; padding: 4px 0; text-align: center;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--surface-2); border-radius: 4px;
}
.ct-more { display: flex; justify-content: center; padding-top: 20px; }
.ct-more button {
  min-height: 44px; padding: 0 24px;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.ct-more button:hover { border-color: var(--accent); }
.ct-more button:disabled { color: var(--text-muted); cursor: default; }

/* lawyers index: the list's controls and its ranked rows */
.lw-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lw-controls label { font-size: 13px; color: var(--text-muted); }
.lw-controls input[type="search"], .lw-controls select {
  height: 44px; box-sizing: border-box;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.lw-controls input[type="search"] { width: 220px; padding: 0 12px; }
.lw-controls select {
  padding: 0 12px; padding-inline-end: 30px; cursor: pointer;
  /* Own arrow, with room around it (the browser's sat against the edge). */
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23616368' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: left 11px center;
}
.lw-controls input[type="search"]:focus, .lw-controls select:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.lw-rows { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lw-row {
  flex: 1 1 420px; min-width: 0; box-sizing: border-box; min-height: 64px;
  padding: 10px 16px;
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lw-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(58, 74, 142, 0.06); text-decoration: none; }
.lw-rank { flex: 0 0 24px; font-size: 14px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lw-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lw-line { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.lw-name { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-count { flex: none; font-size: 20px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.lw-bar { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.lw-bar > span { display: block; height: 6px; min-width: 2px; background: var(--accent); border-radius: 3px; }
.lw-self {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 10px;
  font-size: 14px; color: var(--text-muted);
}
.lw-self strong { font-weight: 700; color: var(--text); }

/* entity page header ("עמוד עורך דין" design): the name leads, the count sits beside it */
.ct-hero-entity { padding-bottom: 28px; gap: 16px; }
.en-main { gap: 8px; }
.en-kind {
  align-self: flex-start;
  font-size: 13px; font-weight: 500;
  border-radius: 12px; padding: 4px 12px;
  color: var(--accent-dark); background: var(--accent-light);
}
.en-kind.judge, .en-kind.topic { color: var(--lizzy); background: var(--lizzy-light); }
.en-kind.lawyer { color: #166534; background: #E7F6EC; }
[data-theme="dark"] .en-kind.lawyer { color: #86d7a5; background: #173524; }
.en-name { margin: 0; font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--text); }
.en-total { display: flex; flex-direction: column; gap: 4px; }
.en-total-label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 16px; color: var(--text-muted); }

/* rulings as rows of one card (inside .pt-rows) */
.dl-row {
  min-height: 68px; box-sizing: border-box; padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: flex-start;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.dl-row:last-child { border-bottom: 0; }
.dl-row:hover { background: var(--accent-light); text-decoration: none; }
.dl-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl-name { font-size: 17px; font-weight: 500; line-height: 1.35; }
.dl-sub { font-size: 13px; color: var(--text-muted); }
.dl-case { font-weight: 500; color: var(--accent-dark); }
/* the start of the ruling's facts summary, under its case number */
.dl-excerpt {
  font-size: 14px; line-height: 1.6; color: var(--text-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.dl-score-slot { flex: 0 0 62px; display: flex; justify-content: center; }
.dl-score {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700;
  color: var(--lizzy); background: var(--lizzy-light);
  border: 1px solid var(--lizzy-border); border-radius: 14px; padding: 3px 10px;
}
.dl-date { flex: 0 0 90px; font-size: 14px; line-height: 26px; color: var(--text-muted); text-align: end; font-variant-numeric: tabular-nums; }

/* most-cited page: a title in place of a total, and the case number under each name */
.cd-hero { gap: 4px; }
/* same size and weight as the other pages' total (.ct-hero-number), and its label below */
.cd-title { margin: 0; font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; color: var(--text); }
.cd-sub { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.cd-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-case { font-size: 14px; font-weight: 500; color: var(--accent-dark); }
/* under the name: case number · court · date, then the start of the facts summary */
.cd-meta { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 14px; color: var(--text-muted); }
.cd-excerpt {
  margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--text-muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

/* ranked index lists (judges, parties, most-cited): one card, a row per entry */
.pt-rows {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.pt-row {
  min-height: 76px; box-sizing: border-box; padding: 12px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.pt-row:last-child { border-bottom: 0; }
.pt-row:hover { background: var(--accent-light); text-decoration: none; }
.pt-main { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-name { font-size: 17px; font-weight: 500; }
.pt-sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-count { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pt-count-line { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--text-muted); }
.pt-number { font-size: 24px; font-weight: 700; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .ct-hero-number, .ct-hero-number.big { font-size: 36px; }
  .cd-title { font-size: 30px; }
  .en-name { font-size: 32px; }
  .ct-stat-value { font-size: 28px; }
  .ct-card-number { font-size: 40px; }
  .ct-find, .ct-find input[type="search"] { width: 100%; }
  .lw-controls input[type="search"] { flex: 1 1 160px; width: auto; }
  .ct-find label { flex: none; }
  .ct-coverage-name { flex-basis: 100%; }
  .ct-bars { min-width: 900px; }   /* room for the year under each bar */
}

/* ---------- doc cards ---------- */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none; color: inherit; display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(58, 74, 142, 0.06);
  text-decoration: none;
}
.doc-card .head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.doc-card .case-desc { color: var(--accent); font-weight: 600; font-size: 13px; }
.doc-card .doc-type {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface-2); padding: 1px 8px; border-radius: 3px;
}
.doc-card .doc-mat {
  font-size: 10px; color: var(--gold);
  background: var(--gold-light); border: 1px solid var(--gold);
  padding: 1px 6px; border-radius: 3px; font-weight: 600;
}
.doc-card .doc-date {
  margin-inline-start: auto;
  font-size: 12px; color: var(--text-dim);
}
.doc-card h3 {
  font-size: 15px; font-weight: 500;
  margin: 0 0 6px; color: var(--text); line-height: 1.4;
}
.doc-card .court { font-size: 12px; color: var(--text-muted); }
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 14px;
}

/* ---------- entity grid (Courts index; future Judges/Lawyers) ---------- */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.entity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.entity-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(58, 74, 142, 0.06);
  text-decoration: none;
}
.entity-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.entity-icon.judge  { background: var(--gold-light);    color: var(--gold); }
.entity-icon.party  { background: #e8f4ed;              color: #2d7d4f; }
.entity-icon.topic  { background: var(--accent-light);  color: var(--accent); }
.entity-icon.court  { background: var(--lizzy-light);   color: var(--lizzy); }
.entity-body { flex: 1; min-width: 0; }
.entity-name {
  font-weight: 500; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.entity-count { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ---------- big topic cloud (Topics index) ---------- */
.topic-cloud-large {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.topic-cloud-large a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
}
.topic-cloud-large a:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}
.topic-cloud-large .topic-num { color: var(--text-dim); font-size: 11px; }
.topic-cloud-large a:hover .topic-num { color: rgba(255,255,255,0.8); }

/* ---------- enriched entity list (Judges / Parties index pages) ----------
   Two-line card per row: name + count on top, year range + latest-case
   summary below. Stacks vertically (not a pill cloud) because the second
   line needs horizontal room for the case desc + case name. */
.entity-rich-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.entity-rich-list > li { margin: 0; }
.entity-rich-list > li > a {
  display: block;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.entity-rich-list > li > a:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.04);
  text-decoration: none;
}

.erow-main {
  display: flex; align-items: baseline; gap: 10px;
}
.erow-name {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entity-rich-list > li > a:hover .erow-name { color: var(--accent); }
.erow-count {
  flex-shrink: 0;
  font-size: 12px; font-weight: 500; color: var(--accent);
  background: var(--accent-light); border: 1px solid var(--accent-soft);
  padding: 2px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.erow-sub {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
  font-size: 12.5px; color: var(--text-muted);
  line-height: 1.45;
}
.erow-years {
  font-variant-numeric: tabular-nums;
  font-weight: 500; color: var(--text-muted);
}
.erow-sep { color: var(--text-dim); }
.erow-latest { min-width: 0; }
.erow-latest-label { color: var(--text-dim); font-weight: 500; }
.erow-latest-desc {
  color: var(--accent); font-weight: 600;
  margin: 0 4px;
}
.erow-latest-name { color: var(--text-muted); }

/* Phone — tighter padding + a tad smaller. */
@media (max-width: 640px) {
  .entity-rich-list > li > a { padding: 10px 12px; border-radius: 8px; }
  .erow-name { font-size: 14px; }
  .erow-sub { font-size: 12px; }
}

/* ---------- shared browse-index tabs (Topics / Judges / Courts) ---------- */
.browse-tabs {
  display: flex; gap: 4px;
  margin: 18px 0 14px;
  border-bottom: 1px solid var(--border);
}
.browse-tab {
  padding: 8px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.browse-tab:hover { color: var(--text); text-decoration: none; }
.browse-tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
}

/* ---------- filter input above topic-cloud / judges-cloud ---------- */
.browse-filter {
  display: flex; align-items: center; gap: 12px;
  margin: 6px 0 16px; flex-wrap: wrap;
}
.browse-filter input[type="search"] {
  flex: 1; max-width: 360px;
  padding: 8px 12px;
  font: inherit; font-size: 14px;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.browse-filter input[type="search"]::placeholder { color: var(--text-dim); }
.browse-filter input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.browse-filter-submit {
  padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: #fff; background: var(--accent);
  border: 1px solid var(--accent); border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.browse-filter-submit:hover { background: var(--accent-dark, var(--accent)); }
.browse-filter-clear {
  font-size: 12px; color: var(--text-muted);
  padding: 4px 8px; border-radius: 6px;
  text-decoration: none;
}
.browse-filter-clear:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.browse-filter-count {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap;
}
.browse-filter-count strong { color: var(--text); font-weight: 600; }

/* ---------- cited-cases section (lawyer / party detail pages) ----------
   Compact two-line rows: case_desc + case_name on the right, citation count
   pill on the left. <details> hides rows past the first 50 until expanded. */
.cited-cases { margin-top: 28px; }
.cited-cases h2 {
  font-family: var(--font-body, "Noto Sans Hebrew", sans-serif);
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 0 0 12px; letter-spacing: -0.2px;
}
.cited-cases h2 .count { font-weight: 400; color: var(--text-muted); font-size: 14px; }

.cited-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.cited-row { list-style: none; }
/* The whole row is one link, in fixed columns so the rows line up (RTL: number on the
   right, then the name, the court, the count on the left). */
.cited-row-link {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr) 9.5em 3.2em;
  align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text); text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}
.cited-row-link:hover { border-color: var(--accent-soft, #71C6FF); background: var(--accent-light, #E9F6FF); text-decoration: none; }
.cited-desc {
  color: var(--accent); font-weight: 600;
  font-family: var(--font-body, "Noto Sans Hebrew", sans-serif);
  font-size: 13.5px; white-space: nowrap;
}
.cited-name {
  color: var(--text); font-weight: 400; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.cited-court {
  color: var(--text-dim); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cited-count {
  justify-self: end;
  background: var(--accent-light, #E9F6FF);
  color: var(--accent);
  border: 1px solid var(--accent-soft, #71C6FF);
  font-size: 11.5px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Not in the corpus: grey, still a link (to a search for the number). */
.cited-row-link.is-missing .cited-desc { color: var(--text-muted); font-weight: 500; }
.cited-row-link.is-missing .cited-court { font-style: italic; }
.cited-row-link.is-missing .cited-count { background: var(--surface-2, #f5f5f5); color: var(--text-muted); border-color: var(--border); }
.cited-row-link.is-missing:hover .cited-desc { color: var(--accent-dark); }

@media (max-width: 560px) {
  .cited-row-link { grid-template-columns: 7em minmax(0, 1fr) 3.2em; }
  .cited-court { display: none; }
}

/* "Show more" expander — native <details>. No JS needed. */
.cited-more { margin-top: 8px; }
.cited-more > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent); font-size: 13px; font-weight: 600;
  user-select: none;
  transition: background 0.12s, border-color 0.12s;
}
.cited-more > summary::-webkit-details-marker { display: none; }
.cited-more > summary:hover {
  background: var(--accent-light, #E9F6FF);
  border-color: var(--accent-soft, #71C6FF);
}
.cited-more[open] > summary { display: none; }   /* hide once expanded */
.cited-list-tail { margin-top: 4px; }

/* ---------- ruling hover card (js/ruling-preview.js) ----------
   On links to a ruling we have: number, date, court, materiality, name, the start of the
   facts summary and the first ratio rules. */
#rp-pop {
  position: fixed; z-index: 1002; top: 0; left: 0;
  width: 420px; max-width: calc(100vw - 16px);
  padding: 14px 16px 12px;
  background: var(--surface, #fff); color: var(--text, #0E1013);
  border: 1px solid var(--border, #E7E7E7); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 13px; line-height: 1.6; text-align: start;
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#rp-pop { overflow-y: auto; }
#rp-pop.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
[data-theme="dark"] #rp-pop { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35); }
.rp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-muted, #616368); }
.rp-desc { font-weight: 700; color: var(--accent, #25A7FF); }
.rp-mat { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; }
.rp-mat i { display: inline-block; width: 4px; height: 11px; border-radius: 2px; background: var(--border, #E7E7E7); margin-inline-start: 2px; }
.rp-mat i.on { background: var(--text, #0E1013); }
.rp-name { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 6px 0 8px; }
.rp-label { font-size: 11.5px; font-weight: 700; color: var(--text, #0E1013); margin: 8px 0 2px; }
.rp-facts { color: var(--text-muted, #616368); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rp-ratio { margin: 0; padding-inline-start: 18px; }
.rp-ratio li { margin: 0 0 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rp-foot { margin-top: 8px; font-size: 11.5px; color: var(--text-dim, #ABABAC); }
.rp-loading { color: var(--text-muted, #616368); }
@media (prefers-reduced-motion: reduce) { #rp-pop { transition: none; transform: none; } }
