/* =====================================================================
   Our Money — styling for the LAW SECTION's own pages: index.html (main)
   and laws.html (the list). votes/ and court/ keep their own styles.
   Shared tokens, .subnav and components live in style.css.
   ===================================================================== */

/* ---------- a highlight: two rows, then "show all" ----------
   A row = the name + ONE quiet line. ▸ opens details in place; the link to
   the full record sits inside, never on the name (Mercy: no blue names). */
/* a block's title: a coloured bar at its start (Mercy chose option ב), a
   different colour per block, and the card a stronger border. The colours
   are the dataviz categorical slots in page order — never green/red (the
   site's for/against), checked by the palette validator in both modes; the
   title text stays ink (the bar is identity, the words are the label). */
.card:has(> h2.hh) { border: 1.5px solid var(--baseline); }
.card > h2.hh { font-size: 20px; font-weight: 700; margin: 0 0 12px;
  border-inline-start: 4px solid var(--acc, var(--series-1)); padding-inline-start: 10px; }
.acc1 { --acc: #2a78d6; } .acc2 { --acc: #eb6834; } .acc3 { --acc: #4a3aa7; }
.acc4 { --acc: #eda100; } .acc5 { --acc: #e87ba4; }
@media (prefers-color-scheme: dark) {
  .acc1 { --acc: #3987e5; } .acc2 { --acc: #d95926; } .acc3 { --acc: #9085e9; }
  .acc4 { --acc: #c98500; } .acc5 { --acc: #d55181; }
}
.hl { list-style: none; margin: 0; padding: 0; }
.hl > li { border-bottom: 1px solid var(--grid); }
.hl > li:last-child { border-bottom: 0; }
/* ראשי: a line above the first law and below the last too — every law sits
   in its own box of lines (Mercy) */
.hl:not(.plain) > li:first-child { border-top: 1px solid var(--grid); }
.hl:not(.plain) > li:last-child { border-bottom: 1px solid var(--grid); }
.it > button.head { all: unset; box-sizing: border-box; display: block; width: 100%;
  cursor: pointer; padding: 12px 2px; }
.it > button.head:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.it .nm { display: block; font-size: 15.5px; font-weight: 400; color: var(--ink-1); }   /* regular: the title leads */
.it > button.head:hover .nm { color: var(--accent-ink); }
.it .chev { display: inline-block; width: 16px; color: var(--ink-2); font-size: 13px; }
.it .nm .lbadge { margin-inline-end: 6px; vertical-align: 1px; }
.it .line { display: block; font-size: 13px; color: var(--ink-2); margin-top: 3px;
  padding-inline-start: 16px; }
.it .det { padding: 0 18px 14px; font-size: 13.5px; color: var(--ink-2); }
.it .det p { margin: 4px 0; }
.it .det ul { margin: 4px 0; padding-inline-start: 18px; }
.morebtn { border: 0; background: none; color: var(--accent-ink); cursor: pointer;
  font-size: 13.5px; padding: 8px 0 0; }
.morebtn:hover { text-decoration: underline; }
.srcnote { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.srcnote a { color: var(--accent-ink); }

/* a name in two voices (law.data.js splitName): what it is about, bold;
   the amendment number / brackets / Hebrew year in the same ink, regular,
   one step smaller (Mercy's option ב) — never cut */
.it .chev { font-size: 16px; width: 20px; }
.it .line { padding-inline-start: 20px; }
/* the laws list opens in place too: the same ▸ */
.lawrow .chev { display: inline-block; width: 20px; color: var(--ink-2); font-size: 16px; }
.lawrow .meta { padding-inline-start: 20px; }

/* an opened row: "label: value" lines — the label bold, the value regular */

/* ---------- badges: words first; colour never carries an opinion ---------- */
.lbadge { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px;
  font-weight: 600; white-space: nowrap; border: 1px solid var(--border); color: var(--ink-2);
  background: var(--page); }
.lbadge.court { border-color: var(--ink-2); color: var(--ink-1); }
.lbadge.soft { font-weight: 500; }
.doclink { color: var(--accent-ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
.doclink:hover { text-decoration: underline; }

/* ---------- the laws list ---------- */
.lawctl { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.lawctl select { background: var(--page); color: var(--ink-1); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 14px; max-width: 100%; }
details.adv { margin: 4px 0 10px; font-size: 13.5px; color: var(--ink-2); }
details.adv summary { cursor: pointer; color: var(--accent-ink); }
details.adv .advin { display: flex; flex-direction: column; gap: 6px; padding: 8px 2px 2px; }
details.adv label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.statline { color: var(--ink-2); font-size: 13.5px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.statline .hid { color: var(--ink-3); }

.lawrow { border-bottom: 1px solid var(--grid); }
.lawrow > button.head { all: unset; box-sizing: border-box; display: block; width: 100%;
  cursor: pointer; padding: 11px 2px; }
.lawrow > button.head:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.lawrow .nm { font-size: 15px; color: var(--ink-1); }
.lawrow > button.head:hover .nm { color: var(--accent-ink); }
.lawrow .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.lawrow .det { display: none; padding: 2px 2px 16px; font-size: 14px; }
.lawrow.open .det { display: block; }
.lawrow.open { background: color-mix(in srgb, var(--series-1) 4%, transparent); }
.det h3 { font-size: 13.5px; color: var(--ink-2); margin: 12px 0 4px; font-weight: 600; }
.det p { margin: 3px 0; }
.det ul { margin: 3px 0; padding-inline-start: 18px; }
.det .srcs a { display: inline-block; margin-inline-end: 14px; }
.notadvice { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

@media (max-width: 640px) {
  .it .nm, .lawrow .nm { font-size: 15px; }
  .card > h2.hh { font-size: 19px; margin-bottom: 10px; }
  .lawctl select { font-size: 16px; }   /* no iPhone zoom */
}

/* the "?" button lives in style.css; .info boxes are its hidden sources */
.info[hidden] { display: none; }

/* ---------- one law's page (law/page.html, filled by worker/pages.js) ---------- */
.lawhead .crumbs { margin: 0 0 6px; font-size: 13px; }
.lawhead .crumbs a { color: var(--accent-ink); text-decoration: none; }
.lawhead .crumbs a::before { content: "→ "; }
h1.lawname { font-size: clamp(21px, 3vw, 27px); line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.01em; }
.lawhead .chips { margin: 0 0 8px; }
.lawhead .facts, .card .facts { font-size: 13.5px; color: var(--ink-2); margin: 4px 0; }
.lawhead .facts.knesset { color: var(--ink-3); font-size: 12.5px; }
.card .note { color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.hl.plain > li { padding: 10px 2px; }
.hl.plain .nm { font-size: 15px; font-weight: 500; }
.hl.plain .line { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
details.more { margin-top: 8px; }
details.more > summary, details.sum > summary { cursor: pointer; color: var(--accent-ink); font-size: 13.5px; }
details.sum { margin-top: 4px; }
details.sum p { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 0; }
.srcs a { display: inline-block; margin-inline-end: 14px; }
/* a law's links (what it replaced, what replaced it) wrap like words — a
   list of 17 old ordinances must not push the page sideways on a phone */
.lawhead .facts .doclink, .hl.plain .doclink { white-space: normal; }
