/* Legal DB — landing page (RTL). Palette + typography per docs/legal-db-style-guide.md. */

:root {
  /* Backgrounds */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;

  /* Text — three tiers per the guide */
  --text: #0E1013;          /* H1, titles, logo */
  --text-muted: #616368;    /* subtitle, secondary labels */
  --text-dim: #ABABAC;      /* placeholders, counts, metadata */

  /* Borders */
  --border: #E7E7E7;        /* search bar, sort button, panels */
  --border-light: #F0F0F0;

  /* Primary blue */
  --accent: #25A7FF;        /* חפש button, case numbers, active tab, links */
  --accent-light: #E9F6FF;  /* icon badge fill, hover bg */
  --accent-dark: #1991DC;   /* hover-state darker blue */
  --accent-soft: #71C6FF;   /* icon badge border, lighter ring */

  /* Purple — Lizzy / rating pills / "בקרוב" */
  --lizzy: #8A21C4;
  --lizzy-light: #F3E9F9;
  --lizzy-dark: #6b1599;
  --lizzy-border: #D0A6E7;

  /* Legacy alias — rating pills now use lizzy per the guide, but some
     pre-existing rules still reference --gold; keep them mapped so nothing
     visually disappears until each call site is migrated. */
  --gold: var(--lizzy);
  --gold-light: var(--lizzy-light);

  --header-h: 56px;

  /* Single font family per the guide — no separate display font. */
  --font-body: "Noto Sans Hebrew", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  --font-display: var(--font-body);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--bg); color: var(--text);
  line-height: 1.6; font-size: 15px;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
.dim { color: var(--text-dim); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }

/* ---------- header ---------- */
header.site-header {
  position: sticky; top: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  font-size: 13px;
}
/* Header layout (RTL flow):
   - First DOM child = visual RIGHT (start): cluster containing Lizzy logo,
     "Legal DB" wordmark, and topic-area nav links (right → left within the cluster).
   - Second DOM child = visual LEFT (end): filter button.
   space-between (default justify behavior is fine since flex-grow on items below)
   keeps them at opposite edges. */
header.site-header { position: relative; }
.header-cluster {
  display: inline-flex; align-items: center; gap: 22px;
  flex-shrink: 0;
}
.header-cluster.header-cluster-right {
  /* No special margin needed — flex space-between handles separation when
     this is the FIRST child and the filter button is the LAST. */
}

.header-lizzy {
  display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0;
}
.header-lizzy:hover { text-decoration: none; opacity: 0.92; }
.header-lizzy-logo { height: 22px; width: auto; display: block; }

.brand.brand-legal-db {
  display: inline-flex; align-items: center;
  font-weight: 700; color: var(--text); font-size: 18px;
  text-decoration: none; letter-spacing: -0.2px;
}
.brand.brand-legal-db:hover { text-decoration: none; }
/* "BETA" next to the wordmark: small, outlined, part of the same link. */
.brand-beta {
  margin-inline-start: 8px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: 0.06em;
  color: var(--accent-dark); border: 1px solid var(--accent); border-radius: 5px;
}

/* Tighten the gap between the Lizzy logo and the "Legal DB" wordmark in the
   header-cluster — they read as one composite brand mark, so the spacing
   between them should be smaller than the gap to the rest of the nav. */
.header-cluster { gap: 8px; }
.header-cluster .top-nav { margin-inline-end: 16px; }

nav.top-nav {
    margin-inline-start: 0;
    padding-right: 20px;
    display: flex; gap: 20px; font-size: 13px;
}
nav.top-nav a { color: var(--text-muted); }
nav.top-nav a:hover { color: var(--accent); }
/* the section the page belongs to */
nav.top-nav a.current { color: var(--accent-dark); font-weight: 600; }

/* ---------- hero — per style guide: 720px column, 22px stack gap ---------- */
.hero {
  max-width: 720px; margin: 0 auto;
  padding: 20px 24px 36px; text-align: center;
  display: flex; flex-direction: column; gap: 22px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 600;
  margin: 0; line-height: 48px;
  letter-spacing: -0.5px; color: var(--text);
}
.hero-lede {
  font-size: 16px; color: var(--text-muted); margin: 0;
  line-height: 25px; font-weight: 400;
}
.hero-lede strong { color: var(--text); font-weight: 600; }
.coverage-note {
  font-size: 12.5px; color: var(--text-dim); margin: 0 auto;
  max-width: 600px; line-height: 19px; font-weight: 400;
}

/* ---------- search bar — 58px tall, 16px radius, subtle drop-shadow ---------- */
.search {
  /* The field is a textarea that grows with a multi-line question: the box has a minimum
     height, not a fixed one, and the icon and button stay at the bottom line. */
  display: flex; align-items: flex-end;
  min-height: 58px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 8px 15px 8px 10px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04), 0 0 0 4px var(--accent-light);
}
.search-icon { color: var(--text-dim); flex-shrink: 0; margin-inline-end: 12px; margin-bottom: 10px; }
.search-field {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font: inherit; font-size: 15px; line-height: 20px;
  padding: 0; outline: 0; color: var(--text);
}
/* One line tall until the text needs more (search-progress.js sets the height), then up to
   ten lines, then it scrolls. 10px above and below centres one line in the 40px row. */
textarea.search-field {
  display: block; resize: none; overflow-y: auto;
  height: 40px; max-height: 220px; padding: 10px 0;
  box-sizing: border-box; white-space: pre-wrap;
}
.search-field::placeholder { color: var(--text-dim); font-weight: 400; }
.search-field:disabled { cursor: not-allowed; }
/* Strip the browser-native clear "×" that <input type="search"> renders inside
   the field. WebKit/Blink (Chrome, Edge, Safari) draws ::-webkit-search-cancel-button;
   older Edge/IE draws ::-ms-clear. Both look out of place against our custom
   rounded pill UI, so we hide them and let the user clear via Ctrl/Cmd-A + Delete
   or by just typing over the value. */
.search-field::-webkit-search-cancel-button,
.search-field::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-field::-ms-clear { display: none; width: 0; height: 0; }
.search-go {
  flex-shrink: 0; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  height: 40px; padding: 0 22px; border-radius: 10px;
  font-family: inherit; font-size: 14px; line-height: 19px; font-weight: 700;
  transition: background 0.15s;
}
.search-go:hover:not(:disabled) { background: var(--accent-dark); }
.search-go:disabled { background: var(--text-dim); opacity: 0.7; cursor: not-allowed; }

/* "Ask Lizzy" pill — pixel-perfect per spec.
   Single pill containing (in RTL visual order, right → left):
     · Lizzy icon (24px circular badge)
     · "שאל את Lizzy בשפה חופשית" text (Lizzy emphasized)
     · "בקרוב" badge (solid purple pill, white text). */
.search-alt {
  margin: 0; text-align: center;
}
.lizzy-link {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lizzy-light);
  border: 1px solid var(--lizzy-border);
  border-radius: 999px;
  padding-block: 6px; padding-inline: 6px 14px;   /* icon side 6px, text side 14px, in either direction */
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px; line-height: 19px; font-weight: 600;
  color: var(--lizzy);
}
.lizzy-link:hover { text-decoration: none; opacity: 0.92; }
.lizzy-link-icon {
  width: 24px; height: 24px; display: block; flex-shrink: 0;
}
.lizzy-link-text { color: var(--lizzy); }
.lizzy-link-text strong { font-weight: 700; color: var(--lizzy); }
/* "בקרוב" — bigger, more readable than the prior 2px inline span; matches
   the badge dimensions in the style-guide reference. */
.soon-badge {
  display: inline-flex; align-items: center;
  background: var(--lizzy); color: #fff;
  border-radius: 999px; padding: 2px 10px;
  font-family: var(--font-body);
  font-size: 12px; line-height: 16px; font-weight: 600;
  flex-shrink: 0;
}

/* ---------- main / results layout ---------- */
.main { max-width: 1120px; margin: 0 auto; padding: 0 24px 96px; }

.error-box {
  background: #fde0e0; border: 1px solid #f5b1b1;
  padding: 12px 16px; border-radius: 8px;
  margin: 24px 0; font-size: 13px;
}

/* Per style guide: two columns `320px 1fr`, gap 32px (sidebar is fixed-width). */
.results-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 32px; margin-top: 2px; align-items: start;
}
@media (max-width: 768px) {
  .results-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- results column ---- */
.results-bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.results-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; margin: 0; color: var(--text);
  letter-spacing: -0.3px; line-height: 1.25;
}
.results-count { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--text-dim); }
.sort { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sort-label { font-size: 12.5px; color: var(--text-dim); }
.sort select {
  font: inherit; font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; padding-inline-end: 30px; cursor: pointer;
  /* Own arrow, with room around it. The browser's arrow sat against the box's edge and,
     in RTL, against the text. Same arrow as the filter panel's selects. */
  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;
}
.sort select:focus { outline: 0; border-color: var(--accent); }
/* The results header's "מיון" (search page, shared page). */
.sr-sort-control .sort-label { font-size: 13px; color: var(--text-muted); }

/* ---------- filter button + popover (header-cluster, visual LEFT) ----------
   Button toggles the popover open/closed; click-outside / Escape close it.
   The popover IS the form — submitting reloads with the new filter query.
   When any non-default filter is active, a small purple dot decorates the button. */
.filter-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-family: var(--font-body);
  font-size: 12.5px; font-weight: 600; color: var(--lizzy);
  background: var(--lizzy-light);
  border: 1px solid var(--lizzy-border);
  border-radius: 999px; padding: 6px 14px;
  cursor: pointer;
  transition: box-shadow 120ms ease, background 120ms ease;
  position: relative;
}
.filter-toggle:hover  { box-shadow: 0 0 0 3px var(--lizzy-light); }
.filter-toggle:focus  { outline: 0; box-shadow: 0 0 0 3px var(--lizzy-light); }
.filter-toggle svg { color: currentColor; }
/* Pages with nothing to filter (index lists, the case page) show the button disabled. */
.filter-toggle:disabled {
  color: var(--text-dim); background: var(--surface-2); border-color: var(--border);
  cursor: default; box-shadow: none;
}
.filter-toggle-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lizzy); display: inline-block;
  margin-inline-start: 2px;
}

/* Popover panel — absolute under the cluster, anchored to the header. */
.filter-popover {
  position: absolute; top: calc(var(--header-h) - 4px); left: 20px;
  z-index: 200;
  min-width: 280px; max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.10);
  padding: 16px;
}
.filter-popover[hidden] { display: none; }

.filter-form {
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--font-body);
}
.filter-section { display: flex; flex-direction: column; gap: 6px; }
.filter-section-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  text-align: right;
}
.filter-year-range {
  display: flex; align-items: center; gap: 8px;
}
.filter-year-range input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
  text-align: center;
  appearance: textfield; -moz-appearance: textfield;
}
.filter-year-range input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.filter-year-range input::-webkit-outer-spin-button,
.filter-year-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-year-range input::placeholder { color: var(--text-dim); }
.filter-year-sep { color: var(--text-dim); font-size: 14px; }

.filter-min-select {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; padding-inline-end: 28px;
  cursor: pointer;
  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 10px center;
}
.filter-min-select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.filter-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px; padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
.filter-clear {
  font: inherit; font-size: 13px; color: var(--text-muted);
  text-decoration: none;
}
.filter-clear:hover { color: var(--text); text-decoration: underline; }
.filter-apply {
  font: inherit; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--accent); border: 0;
  border-radius: 8px; padding: 8px 18px; cursor: pointer;
  transition: background 120ms ease;
}
.filter-apply:hover { background: var(--accent-dark); }

@media (max-width: 540px) {
  .filter-popover { left: 12px; right: 12px; min-width: 0; }
  .header-cluster { gap: 12px; }
  .header-cluster .top-nav { display: none; }
}

.result-cards { list-style: none; margin: 0; padding: 0; }
.result-item { margin: 0 0 10px; }
.result-card {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.result-card:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.04);
}
/* Bookmark icon — currently hidden site-wide. Markup + JS + localStorage
   wiring stay in place so re-enabling is a one-line revert (remove the
   `display: none` below). Removed visually because the bookmark feature
   isn't ready to ship yet. */
.rc-bookmark { display: none !important; }

/* (Kept for future re-enable.) Bookmark icon — at the LEFT edge of the card
   (visually left in RTL). Interactive toggle wired by wwwroot/js/bookmarks.js. */
.rc-bookmark {
  flex-shrink: 0; width: 18px; height: 22px;
  color: var(--text-dim); opacity: 0.7;
  display: inline-flex; align-items: center; justify-content: center;
  order: 2; /* push to LEFT in RTL row order — body is order 1 (default) */
  cursor: pointer;
  /* Touch target — pad invisibly so the icon is comfortable to tap without
     enlarging the visible glyph. */
  padding: 6px;
  margin: -6px;
  border-radius: 6px;
  transition: color 120ms ease, opacity 120ms ease, background 120ms ease;
}
.result-card:hover .rc-bookmark { color: var(--accent); opacity: 1; }
.rc-bookmark:hover { background: rgba(138, 33, 196, 0.08); }   /* faint purple */
.rc-bookmark:focus-visible {
  outline: 2px solid var(--lizzy);
  outline-offset: 2px;
}
/* Selected state — filled bookmark in Lizzy purple, never dim. */
.rc-bookmark.bookmarked {
  color: var(--lizzy);
  opacity: 1;
}
.rc-bookmark.bookmarked path { fill: currentColor; }
.rc-body { flex: 1; min-width: 0; }
.rc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
/* Case identifier — never let the flex container shrink it; keep it on a
   single line. Without these guards, the rating pill (margin-inline-start:
   auto) can collapse the case_desc to its first few visible chars on
   narrow viewports. */
.rc-case {
  font-size: 13px; font-weight: 500; color: var(--accent); letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
}
/* Rating pill — light purple bg + purple text per the guide; 999px (full) radius. */
.rc-relevance {
  margin-inline-start: auto;
  font-size: 11px; font-weight: 600; color: var(--lizzy);
  background: var(--lizzy-light); border: 1px solid var(--lizzy-border);
  padding-block: 2px; padding-inline: 3px 10px; border-radius: 999px; white-space: nowrap;
}
/* Citation-count pill (most-referenced section). Same shape as .rc-relevance
   but in the blue palette to differentiate from the materiality rating. */
.rc-cite-count {
  margin-inline-start: auto;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); border: 1px solid var(--accent-soft);
  padding-block: 2px; padding-inline: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.most-referenced { margin-top: 32px; }
.rc-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text);
}
.result-card:hover .rc-title { color: var(--accent); }
.rc-meta { font-size: 13px; color: var(--text-dim); margin-top: 5px; font-weight: 400; }

.results-more { text-align: center; margin-top: 18px; }
.load-more {
  font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--accent); background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 28px; cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.load-more:hover { background: var(--accent-light); border-color: var(--accent); }
.load-more[hidden] { display: none; }

.empty-state { color: var(--text-dim); font-size: 13.5px; margin: 8px 0; }
.empty-state.sm { font-size: 12.5px; }

/* ---- sidebar (filter box + topics) ---- */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); }

/* ---- filter panel (CSS-only tabs) — matches legal-db-style-guide.md ---- */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-sizing: border-box;
}
.ftab-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Tab strip — white background, 4 equal-width tabs. The visual line under the
   row comes from the active tab's 2px blue underline; inactive tabs use a
   transparent border-bottom of the same height so the baselines line up. */
.ftabs {
  display: flex; flex-direction: row;
  justify-content: center; align-items: stretch;
  padding: 4px 8px 0;
  gap: 2px;
  background: var(--surface);
}
.ftab {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 8px;
  cursor: pointer; white-space: nowrap; text-align: center;
  font-family: var(--font-body);
  font-size: 12.5px; line-height: 17px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.ftab:hover { color: var(--text); }

.fpanels { padding: 8px; }
.fpanel { display: none; }

/* active tab + matching panel + matching footer link */
#ft-judges:checked  ~ .ftabs label[for="ft-judges"],
#ft-parties:checked ~ .ftabs label[for="ft-parties"],
#ft-lawyers:checked ~ .ftabs label[for="ft-lawyers"],
#ft-courts:checked  ~ .ftabs label[for="ft-courts"],
#ft-cited:checked   ~ .ftabs label[for="ft-cited"] {
  color: var(--accent); font-weight: 700;
  border-bottom-color: var(--accent);
}
#ft-judges:checked  ~ .fpanels #p-judges,
#ft-parties:checked ~ .fpanels #p-parties,
#ft-lawyers:checked ~ .fpanels #p-lawyers,
#ft-courts:checked  ~ .fpanels #p-courts,
#ft-cited:checked   ~ .fpanels #p-cited { display: block; }
/* No "Show all" page for the cited list — hide the footer when this tab is active. */
#ft-cited:checked   ~ .ffoot { display: none; }

/* Entity rows — no per-row dividers (spec uses clean rows + hover background).
   Name on the right, count on the left, both flex-aligned with a 10px gap. */
.entity-list { list-style: none; margin: 0; padding: 0; }
.entity-list li { /* clean rows, no border */ }
.entity-list a {
  display: flex; flex-direction: row; align-items: center;
  padding: 8px 10px; gap: 10px;
  border-radius: 5px;
  text-decoration: none; color: var(--text);
  transition: background 0.12s;
}
.entity-list a:hover { background: var(--accent-light); }
.entity-name {
  flex: 1;
  font-family: var(--font-body);
  font-size: 13px; line-height: 18px; font-weight: 400;
  color: var(--text); text-align: right;
}
.entity-list a:hover .entity-name { color: var(--accent); }
.entity-count {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 11.5px; line-height: 16px; font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums; text-align: right;
}
/* Cited-cases tab — two-line row: case_desc (accent) above the case name (text).
   Same .entity-list row shell; entity-name becomes a stacked container. */
.entity-name.cited-name {
  display: flex; flex-direction: column; gap: 1px;
  line-height: 17px; min-width: 0;
}
.cited-desc { color: var(--accent); font-weight: 600; font-size: 12.5px; }
.cited-title {
  color: var(--text); font-weight: 400; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Footer: thin top border + "Show all" link per tab (only the active one
   renders; same CSS-only-radio pattern as the panels). */
.ffoot {
  border-top: 1px solid var(--border);
  padding: 10px 16px 14px;
  display: flex; justify-content: flex-start;
}
.ffoot-link {
  display: none; align-items: center; gap: 4px;
  font-family: var(--font-body);
  font-size: 12.5px; line-height: 15px; font-weight: 500;
  color: var(--accent); text-decoration: none;
}
.ffoot-link:hover { text-decoration: underline; }
.ffoot-link .arrow { font-size: 14px; line-height: 1; }
#ft-judges:checked  ~ .ffoot .ffoot-link[data-tab="judges"],
#ft-parties:checked ~ .ffoot .ffoot-link[data-tab="parties"],
#ft-lawyers:checked ~ .ffoot .ffoot-link[data-tab="lawyers"],
#ft-courts:checked  ~ .ffoot .ffoot-link[data-tab="courts"] { display: inline-flex; }
/* ---- topics block (below the filter box) ---- */
.topics-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin-top: 16px;
}
.block-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 500; margin: 0 0 12px; color: var(--text);
}
.block-count { font-family: var(--font-body); font-size: 12px; font-weight: 400; color: var(--text-dim); }

/* ---------- /psak/search (NL→SQL simple search) ---------- */
.search-hero { max-width: 760px; margin: 8px auto 28px; }
.search-h1 {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; margin: 0 0 18px; color: var(--text);
}
.search-hint { font-size: 13px; color: var(--text-dim); margin: 12px 2px 0; line-height: 1.6; }
.search-hint .hint-lizzy { color: var(--lizzy-dark); font-weight: 500; }

/* Filter-chip row under the search input — surfaces the active filter so the
   user understands why their results are narrowed and lets them drop one
   filter (or all) without diving back to the home page. */
.search-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 14px 2px 0; font-size: 13px;
}
.search-filters-label {
  color: var(--text-muted); font-weight: 600;
}
.search-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--accent-light);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  max-width: 100%;
}
.search-filter-chip:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent-dark);
  text-decoration: none;
}
.search-filter-chip-x {
  font-size: 16px; line-height: 1; font-weight: 700;
  opacity: 0.7;
}
.search-filter-chip:hover .search-filter-chip-x { opacity: 1; }
.search-filters-clear {
  margin-inline-start: auto;
  color: var(--text-muted); text-decoration: underline;
  font-size: 12.5px;
}
.search-filters-clear:hover { color: var(--text); }
.search-count { font-size: 13px; color: var(--text-muted); margin: 0 2px 14px; }
.search-msg {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; color: var(--text-muted); font-size: 14px;
}
.search-msg.error { background: #fdf3f3; border-color: #f0c9c9; color: #8a2a2a; }

/* ---------- search results page (/psak/search) ----------
   Sidebar of the legal issues found in the question (a filter for the list) + result cards:
   badge and materiality, the case name as the heading, the matching passage with the matched
   words marked, and the issues the ruling was found for. In RTL the sidebar, first in the
   markup, sits on the right. */
.sr-layout { display: block; }
.sr-layout.has-issues {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start;
}
.sr-issues { position: sticky; top: calc(var(--header-h) + 16px); }
.sr-issues-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 4px 0 6px; }
.sr-issues-hint { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.5; }
.sr-issue {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  margin: 0 0 8px; padding: 11px 12px; text-align: start; cursor: pointer;
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.sr-issue:hover:not(:disabled) { border-color: var(--accent-soft); }
.sr-issue.is-active { border-color: var(--accent); background: var(--accent-light); }
.sr-issue:disabled { cursor: default; opacity: 0.55; }
.sr-issue:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-issue-all { font-size: 13.5px; font-weight: 500; }
.sr-issue-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sr-issue-name { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.sr-issue-context { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.sr-issue-count { font-size: 12px; color: var(--text-muted); flex-shrink: 0; padding-top: 2px; font-variant-numeric: tabular-nums; }
.sr-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}

.sr-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 2px 2px 12px;
}
/* "שאל את Lizzy" and "שיתוף": one group at the far end of the row. As a group they move to
   the next line together on a narrow screen, instead of one of them dropping alone. */
.sr-actions { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.sr-count { font-size: 15px; color: var(--text); }
.sr-count strong { font-size: 20px; font-weight: 700; }
.sr-sort { font-size: 13px; color: var(--text-muted); }
.sr-head-filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 2px 14px; font-size: 13px;
}
.sr-head-filters .search-filters-clear { margin-inline-start: 4px; }
/* Share: at the far end of the header row (after the filter chips when there are any). */
.sr-share {
  display: inline-flex; align-items: center; gap: 6px; align-self: center;
  height: 32px; padding: 0 12px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  transition: border-color 0.15s, color 0.15s;
}
.sr-share:hover { border-color: var(--accent); color: var(--accent); }
.sr-share:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.sr-share { text-decoration: none; }

/* ---------- share window ----------
   From the "חלון שיתוף" design: its sizes, spacing, radii and shadow, in this site's own
   colours and font (the design's blue and serif heading are placeholders for the product's). */
.share-dialog {
  width: 520px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 24px 28px 28px; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px rgba(20, 33, 61, 0.35);
}
.share-dialog[open] { display: flex; flex-direction: column; gap: 20px; }
.share-dialog::backdrop { background: rgba(20, 33, 61, 0.55); }
.share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.share-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.3; }
.share-summary { margin-top: 4px; font-size: 14px; color: var(--text-muted); }
.share-close {
  flex: none; width: 44px; height: 44px; margin-inline-end: -10px; margin-top: -6px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text); background: transparent; border: 0; border-radius: 8px;
}
.share-close:hover { background: var(--surface-2); }
.share-field { display: flex; flex-direction: column; gap: 8px; }
.share-field label, .share-field-label { font-size: 14px; font-weight: 500; }
.share-link-row { display: flex; gap: 8px; }
.share-link-row input {
  flex: 1 1 0; min-width: 0; height: 48px; box-sizing: border-box; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--text); text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
}
.share-copy {
  flex: none; height: 48px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  color: #fff; background: var(--accent); border: 0; border-radius: 8px;
}
.share-copy:hover:not(:disabled) { background: var(--accent-dark); }
.share-copy:disabled { opacity: 0.6; cursor: default; }
.share-error { margin: 0; font-size: 13px; color: #b3261e; }
.share-option {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer;
  background: var(--surface-2); border-radius: 10px;
}
.share-option input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.share-option > span { display: flex; flex-direction: column; gap: 2px; }
.share-option-title { font-size: 15px; font-weight: 500; }
.share-option-hint { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.share-send { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.share-send-btn {
  min-height: 48px; padding: 0 14px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.share-send-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.share-send-btn.is-disabled { opacity: 0.5; pointer-events: none; }
.share-note {
  display: flex; gap: 8px; align-items: flex-start; padding-top: 16px;
  border-top: 1px solid var(--border-light); font-size: 13px; line-height: 1.5; color: var(--text-muted);
}
.share-note svg { flex: none; margin-top: 2px; }
.share-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A shared results page (/psak/share/{id}). */
.share-meta { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0 2px; }
.share-question {
  margin-top: 14px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
}
.share-question-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.share-question-text { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.sr-rewritten {
  font-size: 13px; color: var(--text-muted); line-height: 1.55; margin: 0 2px 14px;
}
.sr-rewritten span { color: var(--text-dim); }

.sr-cards { list-style: none; margin: 0; padding: 0; }
.sr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin: 0 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sr-card[hidden] { display: none; }
.sr-card:hover { border-color: var(--accent-soft); box-shadow: 0 2px 8px rgba(17, 17, 17, 0.04); }
.sr-card-top { display: flex; align-items: center; gap: 10px; min-height: 20px; margin-bottom: 6px; }
.sr-badge {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px;
  background: var(--sr-mark-bg); color: var(--sr-badge-text); cursor: default;
}
.sr-mat { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.sr-mat-label { font-size: 12px; color: var(--text-muted); }
.sr-mat-bars { display: inline-flex; gap: 2px; }
.sr-mat-bars i { width: 5px; height: 13px; border-radius: 2px; background: var(--border); }
.sr-mat-bars i.on { background: var(--text); }
.sr-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.35; margin: 0; }
.sr-title a { color: var(--text); text-decoration: none; }
.sr-title a:hover { color: var(--accent); }
.sr-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.sr-snippet { font-size: 14px; line-height: 1.65; color: var(--text); margin: 10px 0 0; }
.sr-snippet mark { background: var(--sr-mark-bg); color: inherit; padding: 1px 2px; border-radius: 3px; }

/* The ruling's ratio and facts paragraph on a card, one box: about six lines, the rest behind one "הצג עוד"
   (search-ratio.js adds .clipped when there is more, .open when it is shown). */
.sr-ratio { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: var(--text); }
/* The closed box also scrolls inside, with no scrollbar drawn: the wheel, a drag on a touch
   screen or the arrow keys move through the text without opening it. */
.sr-ratio-body {
  max-height: calc(1.65em * 6); overflow-y: auto; position: relative;
  scrollbar-width: none; -ms-overflow-style: none;
}
.sr-ratio-body::-webkit-scrollbar { display: none; }
.sr-ratio.open .sr-ratio-body { max-height: none; }
/* The fade over the last line: sticky, so it stays at the bottom edge while the text
   scrolls under it, and gone once the end is reached (.at-end, search-ratio.js). */
.sr-ratio.clipped:not(.open) .sr-ratio-body::after {
  content: ""; display: block; position: sticky; bottom: 0; height: 1.65em; margin-top: -1.65em;
  background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none;
}
.sr-ratio.clipped:not(.open) .sr-ratio-body.at-end::after { opacity: 0; }
.sr-ratio-body p { margin: 0; }
.sr-ratio-body ul { margin: 0; padding: 0; padding-inline-start: 18px; }
.sr-ratio-body li { margin: 0 0 4px; }
.sr-ratio-body li:last-child { margin-bottom: 0; }
.sr-ratio-more {
  margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent);
}
.sr-ratio-more:hover { color: var(--accent-dark); text-decoration: underline; }
.sr-ratio-more[hidden] { display: none; }
/* The facts paragraph, inside the same box after the ratio: named, quieter text. */
.sr-facts { margin-top: 10px; color: var(--text-muted); }
.sr-facts:first-child { margin-top: 0; }
.sr-facts-label { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; }

/* Reference pills and their paragraph tooltip, as on the ruling page (document.css). */
.sr-ratio .par-ref {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; padding: 1px 6px; margin: 0 2px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  background: var(--ref-bg, var(--lizzy-light)); color: var(--ref-text, var(--lizzy));
  border-radius: 3px; cursor: pointer; user-select: none; white-space: nowrap;
  vertical-align: baseline; transition: background 0.15s, color 0.15s;
}
.sr-ratio .par-ref:hover, .sr-ratio .par-ref:focus-visible {
  background: var(--ref-bg-hover, var(--lizzy-border)); color: var(--ref-active, var(--lizzy-dark)); outline: none;
}
#par-popover {
  position: fixed; z-index: 1000; top: 0; left: 0;
  max-width: 380px; min-width: 240px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 13px; line-height: 1.6; color: var(--text);
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
#par-popover.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#par-popover .pop-body { padding: 12px 14px; max-height: 280px; overflow-y: auto; }
@media (max-width: 480px) { #par-popover { max-width: calc(100vw - 16px); } }
.sr-foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light);
}
.sr-why { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; font-size: 12.5px; }
.sr-why-label { color: var(--text-muted); }
.sr-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding-block: 2px; padding-inline: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-weight: 500;
}
.sr-chip .sr-num { width: 19px; height: 19px; font-size: 11px; }
.sr-similar { color: var(--text-muted); }
.sr-open {
  flex-shrink: 0; display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border-radius: 9px; background: var(--accent); color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 700; transition: background 0.15s;
}
.sr-open:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
/* "שאל את Lizzy": a link into the Lizzy app, in Lizzy's own purple so it reads as leaving
   for another product. In the results header (.sr-ask-main) it sits beside the share button. */
.sr-ask {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding-block: 0; padding-inline: 10px 12px; border-radius: 9px; text-decoration: none;
  font-size: 13px; font-weight: 500; color: var(--lizzy);
  background: var(--lizzy-light); border: 1px solid var(--lizzy-border);
  transition: opacity 0.15s;
}
.sr-ask:hover { opacity: 0.85; color: var(--lizzy); text-decoration: none; }
.sr-ask strong { font-weight: 700; }
.sr-ask img { display: block; }
.sr-ask-main { height: 32px; }
.sr-none { color: var(--text-muted); font-size: 14px; margin: 8px 2px; }

:root { --sr-mark-bg: #FDF0C2; --sr-badge-text: #7A5A00; }
[data-theme="dark"] { --sr-mark-bg: rgba(250, 204, 21, 0.22); --sr-badge-text: #F5D776; }

@media (max-width: 860px) {
  /* The sidebar becomes a strip above the results; each issue stays a full row so its
     title is readable. */
  .sr-layout.has-issues { display: block; }
  .sr-issues { position: static; margin-bottom: 18px; }
  .sr-card { padding: 14px 14px; }
  .sr-title { font-size: 16.5px; }
}

/* Older result markup (still used for the "same number, other year" list). */
.search-issues {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; margin: 0 0 14px; font-size: 13px; color: var(--text-muted);
}
.search-issues-title { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.search-issues ul { margin: 0; padding-inline-start: 18px; }
.search-issues li { margin: 3px 0; line-height: 1.5; }
.rc-why { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; margin-top: 8px; font-size: 12px; }
.rc-why-label { color: var(--text-dim); }
.rc-why-chip {
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px;
  color: var(--text-muted); background: var(--surface); line-height: 1.5;
}
.rc-why-facts { border-style: dashed; }
.rc-why-named { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.rc-snippet {
  margin-top: 7px; padding-inline-start: 10px; border-inline-start: 2px solid var(--border);
  font-size: 13px; line-height: 1.55; color: var(--text-muted); font-weight: 400;
}

.search-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.search-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.search-table th, .search-table td {
  text-align: start; padding: 9px 14px; border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.search-table th { background: var(--surface-2); font-weight: 500; color: var(--text-muted); position: sticky; top: 0; }
.search-table tbody tr:last-child td { border-bottom: 0; }
.search-table tbody tr:hover td { background: var(--accent-light); }

.search-sql { margin-top: 18px; font-size: 12px; color: var(--text-dim); }
.search-sql summary { cursor: pointer; user-select: none; }
.search-sql pre {
  margin: 8px 0 0; padding: 12px 14px; overflow-x: auto;
  background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text-muted);
}

ul.topic-cloud {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
ul.topic-cloud a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 12px;
  font-size: 12px; text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
ul.topic-cloud a:hover { background: var(--accent); color: #fff; }
ul.topic-cloud .topic-num { opacity: 0.6; font-size: 11px; }

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
}
footer.site-footer a { color: var(--text-muted); }
footer.site-footer a:hover { color: var(--accent); text-decoration: underline; }
footer.site-footer .footer-links {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 4px;
}

/* ---------- full-page busy overlay ----------
   Shown when the filter form submits (or the Clear link navigates). Sits above
   everything (z-index 9999) and gates pointer input so the user can't double-fire
   while the next page loads. The next page's HTML doesn't include this div, so
   the overlay disappears naturally once navigation completes. */
.page-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 16, 19, 0.55);     /* slightly darker — search overlay is meant to read as "stop, working" */
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 18px;
  cursor: progress;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.page-overlay[hidden] { display: none; }
.page-overlay-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: page-overlay-spin 0.8s linear infinite;
}
.page-overlay-label {
  color: #fff;
  font-family: var(--font-body);
  font-size: 17px; font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.page-overlay-label[hidden] { display: none; }
@keyframes page-overlay-spin { to { transform: rotate(360deg); } }

/* ---------- search in progress: skeleton of the results ----------
   While a search runs (search-progress.js), the page under the search box is replaced by
   grey placeholder rows in the shape of the results list, instead of a dark overlay over
   the whole page. The search box stays visible with the text that was typed. */
.sk-hidden { display: none !important; }
.search-skeleton {
  max-width: 1120px; margin: 0 auto; padding: 4px 0 64px; box-sizing: border-box;
}
/* On the home page the search box sits outside <main>, so the skeleton needs main's gutters. */
.hero + .search-skeleton { padding-inline: 24px; }
.search-skeleton-status {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.sk-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin: 0 0 12px;
}
.sk-bar {
  height: 14px; border-radius: 6px; margin: 0 0 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border-light) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk-bar:last-child { margin-bottom: 0; }
.sk-bar.sk-count { width: 120px; height: 20px; margin: 2px 2px 16px; }
.sk-bar.sk-title { width: 34%; height: 18px; }
.sk-bar.sk-meta  { width: 22%; height: 12px; }
.sk-bar.sk-short { width: 62%; }
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk-bar { animation: none; } }

/* ---------- citation counts ("אזכורים") ----------
   Search result cards (_CitationLines): "אזכורים: 497 (29 בשנה האחרונה)" and on its own
   line "מהותיות 3/5". List rows (_DocTableRows): one small line. The citing-rulings page
   (/psak/cited-by/{id}): its page links. */
.cite-lines { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.cite-line { cursor: default; }
.cite-label { color: var(--text-muted); }
.cite-count { font-weight: 700; color: var(--text); }
a.cite-count { color: var(--accent); text-decoration: none; }
a.cite-count:hover { text-decoration: underline; }
.cite-recent { color: var(--text-muted); }
.dl-cite { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.cite-pages { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 18px 0 28px; font-size: 14px; color: var(--text-muted); }
.cite-pages a { color: var(--accent); font-weight: 600; text-decoration: none; }
.cite-pages a:hover { text-decoration: underline; }

/* The cited ruling's case name under its number in the header of /psak/cited-by/{id}. */
.cb-case-name { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--text-muted); line-height: 1.4; }

/* "אזכורים" in the top row of a result card, just before the materiality bars (both pushed
   to the far end of the row; the bars keep their place at the edge). */
.sr-cite { margin-inline-start: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sr-cite + .sr-mat { margin-inline-start: 14px; }
.sr-cite-count { font-weight: 700; color: var(--accent); text-decoration: none; }
.sr-cite-count:hover { text-decoration: underline; }
.sr-cite-recent { color: var(--text-muted); }

/* The query is the name of several people: links to their pages above the results. */
.sr-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; }
.sr-people-label { color: var(--text-muted); }
.sr-person { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.sr-person:hover { border-color: var(--accent-soft); background: var(--accent-light); }
.sr-person-kind { color: var(--text-muted); font-size: 12px; }
.sr-person-name { font-weight: 700; }
.sr-person-count { color: var(--text-muted); font-size: 12px; }
