:root {
  --paper: #fbfaf7;
  --ink: #1d1d1b;
  --muted: #64625e;
  --line: #d8d1c6;
  --accent: #2f6f73;
  --accent-dark: #1f4d50;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-main {
  padding: clamp(28px, 5vw, 64px) 18px;
}

.content {
  width: min(980px, 100%);
  margin: 0 auto;
}

.page-header {
  max-width: 760px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.2;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 58px);
}

h2 {
  margin-top: 36px;
  font-size: 28px;
}

.dek {
  color: var(--muted);
  font-size: 21px;
}

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eee8dc;
  font-size: 13px;
  text-transform: uppercase;
}

td p {
  margin: 6px 0 0;
  color: var(--muted);
}

td a {
  display: inline-block;
  margin-right: 10px;
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: #f4f1eb;
  color: var(--accent-dark);
}

/* Evidence scan thumbnails */
.ev-thumb {
  width: 128px;
}

.table-wrap td.ev-thumb a + a {
  margin-top: 10px;
}

.ev-thumb a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 148px;
  margin: 0;
  background: #f4f1eb;
  border: 1px solid var(--line);
}

.ev-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* On narrow screens the evidence tables become stacked cards, with
   date/category/amount/quality in one dense 4-column strip */
@media (max-width: 720px) {
  .table-wrap {
    border: none;
    background: none;
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap tbody {
    display: block;
    width: auto;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    background: var(--panel);
    margin: 0 0 16px;
  }

  .table-wrap td {
    display: block;
    width: auto;
    padding: 10px 14px;
  }

  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 4px;
  }

  .table-wrap td.ev-thumb {
    grid-column: 1 / -1;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td.ev-thumb a {
    width: 100%;
    height: 180px;
  }

  .table-wrap td.ev-title {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td.ev-date,
  .table-wrap td.ev-cat,
  .table-wrap td.ev-amt,
  .table-wrap td.ev-q {
    padding: 8px 6px;
    text-align: center;
    font-size: 14px;
  }

  .table-wrap td.ev-cat,
  .table-wrap td.ev-amt,
  .table-wrap td.ev-q {
    border-inline-start: 1px solid var(--line);
  }

  .table-wrap table.ev-noamt tr {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-wrap td.ev-date[data-label]::before,
  .table-wrap td.ev-cat[data-label]::before,
  .table-wrap td.ev-amt[data-label]::before,
  .table-wrap td.ev-q[data-label]::before {
    font-size: 11px;
  }
}

/* Very narrow phones: 2x2 meta grid instead of 4 columns */
@media (max-width: 360px) {
  .table-wrap tr {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-wrap table.ev-noamt tr {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-wrap td.ev-amt {
    border-inline-start: none;
  }

  .table-wrap td.ev-date,
  .table-wrap td.ev-cat {
    border-bottom: 1px solid var(--line);
  }
}

.page-list article {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 24px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

/* ---- Hebrew (RTL) language support ---- */
html[dir="rtl"] body {
  font-family: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
}

/* Keep numbers, amounts and dates left-to-right inside RTL text */
.ltr, bdi {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] table {
  direction: rtl;
}

html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

html[dir="rtl"] td .ltr,
html[dir="rtl"] th .ltr {
  display: inline-block;
}

/* Language switcher in the header */
.lang-switch {
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}

.lang-switch a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
}

/* Automated-translation notice shown on Hebrew pages. */
.translation-notice {
  font-size: 15px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 16px;
  margin: 12px clamp(18px, 4vw, 48px) 0;
}
.translation-notice a { color: var(--link); }
