/* allnews.co.il - public site */

:root {
  --ground:      #f5f3ee;
  --surface:     #fffefb;
  --surface-2:   #efece3;
  --ink:         #1c1a17;
  --ink-soft:    #4b4741;
  --ink-faint:   #7a746b;
  --rule:        #ddd8cc;
  --rule-soft:   #e8e4d9;
  --accent:      #1f5673;
  --accent-ink:  #163d52;
  --live:        #b8560f;
  --focus:       #1f5673;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:     #16151a;
    --surface:    #1e1d23;
    --surface-2:  #26242c;
    --ink:        #ece8e1;
    --ink-soft:   #b7b1a6;
    --ink-faint:  #857e72;
    --rule:       #322f39;
    --rule-soft:  #2a2831;
    --accent:     #7fbcd8;
    --accent-ink: #a9d4e9;
    --live:       #e0894a;
    --focus:      #7fbcd8;
  }
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  direction: rtl;
  font-family: "Assistant", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---- header ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; display: block; }
.brand__name {
  font-family: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}
.brand__tag {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-inline-start: auto;
}
@media (max-width: 460px) { .brand__tag { display: none; } }

/* ---- filter banner ---- */
.filterbar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0 2px;
  font-size: 0.95rem;
}
.filterbar strong { font-weight: 700; }
.filterbar .clear { color: var(--accent-ink); }

/* ---- stream ---- */
.stream {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
}
.item {
  padding: 15px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.item:first-child { padding-top: 6px; }

.item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 5px;
}
.item__source {
  color: var(--ink-soft);
  font-weight: 600;
}
.item__source:hover { color: var(--accent-ink); }
.item__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex: none; }
.item__meta time { font-variant-numeric: tabular-nums; }
.item__paywall {
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0 5px;
  font-size: 0.72rem;
}

.item__title {
  margin: 0;
  font-family: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.42;
  text-wrap: balance;
}
/* LVHA order: :visited must precede :hover, otherwise it wins on equal
   specificity and a visited headline never turns blue on hover. */
.item__title a { color: var(--ink); }
.item__title a:visited { color: var(--ink-soft); }
.item__title a:hover,
.item__title a:visited:hover { color: var(--accent-ink); text-decoration: none; }

.item__ext {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-inline-start: 5px;
  white-space: nowrap;
}

.item__cats {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.item__cats a {
  font-size: 0.75rem;
  color: var(--ink-faint);
  background: var(--surface-2);
  padding: 1px 8px;
  border-radius: 999px;
}
.item__cats a:hover { color: var(--accent-ink); text-decoration: none; }

/* ---- load more ---- */
.loadmore {
  text-align: center;
  padding: 26px 0 40px;
}
.loadmore a, .loadmore button {
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 9px 26px;
  cursor: pointer;
}
.loadmore a:hover, .loadmore button:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.loadmore button[disabled] { opacity: 0.55; cursor: default; }
.loadmore .end { color: var(--ink-faint); font-size: 0.9rem; }

/* ---- empty ---- */
.empty {
  padding: 60px 0;
  text-align: center;
  color: var(--ink-faint);
}

/* ---- footer ---- */
.sitefoot {
  border-top: 1px solid var(--rule);
  margin-top: 10px;
  padding: 22px 0 40px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.sitefoot a { color: var(--ink-soft); }
.sitefoot .spacer { margin-inline-start: auto; }

/* ---- breadcrumbs + page heads ---- */
.crumbs {
  padding: 14px 0 2px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: var(--rule); }
.crumbs a { color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink-faint); }

.page-title {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 800;
  font-size: 1.6rem;
  margin: 12px 0 4px;
  text-wrap: balance;
}
.page-intro {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---- search ---- */
.topsearch {
  display: flex;
  gap: 6px;
  margin-inline-start: auto;
  min-width: 0;
}
.topsearch input {
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 14px;
  width: 11rem;
  max-width: 40vw;
  min-width: 0;
}
.topsearch input:focus { border-color: var(--accent); }
.topsearch button {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: none;
  border: 0;
  padding: 0 4px;
  cursor: pointer;
}
.topsearch button:hover { text-decoration: underline; }
@media (max-width: 400px) { .topsearch button { display: none; } }

.bigsearch { display: flex; gap: 8px; margin: 14px 0 18px; }
.bigsearch input {
  font: inherit;
  flex: 1;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 10px 18px;
}
.bigsearch input:focus { border-color: var(--accent); }
.bigsearch { flex-wrap: wrap; align-items: center; }
.bigsearch button {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 10px 24px;
  cursor: pointer;
}
.bigsearch__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .bigsearch button { color: #10222c; } }

/* ---- archive ---- */
.pill {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.9rem;
}
.pill:hover { border-color: var(--accent); text-decoration: none; }
.arch-shortcuts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; }

.archyear { margin-bottom: 26px; }
.archyear h2 {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.archyear h2 small { font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); margin-inline-start: 8px; }

.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.month {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}
.month:hover { border-color: var(--accent); text-decoration: none; }
.month__n { font-weight: 600; font-size: 0.92rem; }
.month__c { font-size: 0.82rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.month--empty { color: var(--ink-faint); }
.month--future { opacity: 0.4; border-style: dashed; }

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.cal__h {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding-bottom: 2px;
}
.cal__pad { visibility: hidden; }
.cal__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 54px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cal__day:hover { border-color: var(--accent); text-decoration: none; }
.cal__day b { font-size: 1rem; font-weight: 700; }
.cal__day span { font-size: 0.74rem; color: var(--ink-faint); }
.cal__day--empty { color: var(--ink-faint); background: transparent; }
.cal__day--future { opacity: 0.35; border-style: dashed; }

.archnav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 4px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* ---- article page ---- */
.article {
  padding: 6px 0 10px;
  max-width: 42rem;
}
.article__title {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.28;
  margin: 12px 0 10px;
  text-wrap: balance;
}
.article__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.article__meta a { color: var(--ink-soft); font-weight: 600; }

.article__img {
  margin: 0 0 18px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.article__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article__body {
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--ink);
}
.article__body p { margin: 0 0 1em; }

.article__more { margin: 22px 0 10px; }

/* Static prose pages (/about). Reuses .article for width and title, and adds
   only the elements a summary never contains: sub-headings, a list, and a
   term/description table. */
.prose { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.prose p { margin: 0 0 1em; }
.prose__lead { font-size: 1.12rem; color: var(--ink-soft); }
.prose h2 {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-size: 1.24rem;
  margin: 1.8em 0 0.6em;
  padding-top: 0.9em;
  border-top: 1px solid var(--rule-soft);
}
.prose__list { margin: 0 0 1em; padding-inline-start: 1.2em; }
.prose__list li { margin-bottom: 0.4em; }
.prose__dl { margin: 0; display: grid; gap: 4px 18px; }
.prose__dl dt {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.9em;
}
.prose__dl dd { margin: 0; }
/* The user-agent string is long and must not push the page sideways. */
.prose code {
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .prose__dl { grid-template-columns: 8.5rem 1fr; }
  .prose__dl dt { margin-top: 0; }
}
.btn {
  display: inline-block;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 10px 22px;
}
.btn:hover { background: var(--accent-ink); text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .btn { color: #10222c; }
}

.article__cats { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
