/* ICS Cyber News — local prototype. Light news layout.
   Brand tokens from ilanshaya.com themes.css (control-room accent, ink)
   but a white page, as a black background is not suitable for this section. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Hebrew";
  src: url("../fonts/IBMPlexSansHebrew-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Hebrew";
  src: url("../fonts/IBMPlexSansHebrew-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Hebrew";
  src: url("../fonts/IBMPlexSansHebrew-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Hebrew";
  src: url("../fonts/IBMPlexSansHebrew-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --ink: #141414;
  --muted: #5a5a55;
  --line: #e2e0d8;
  --line-strong: #c9c6bb;
  --accent: #ffb020;
  --accent-ink: #0d1117;
  --accent-text: #8a6508;
  --dark: #0d1117;
  --dark-2: #151b23;
  --alarm: #c8102e;
  --tag: #f1efe8;
  --radius: 0;
  --max: 72rem;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-he: "IBM Plex Sans Hebrew", "IBM Plex Sans", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
html[lang="he"] body, html[lang="he"] { font-family: var(--font-he); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Breaking ticker */
.ticker {
  background: var(--dark);
  color: #f3f3f0;
  display: flex;
  align-items: stretch;
  min-height: 2.4rem;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.8125rem;
}
.ticker__label {
  flex: none;
  background: var(--alarm);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  display: flex;
  align-items: center;
}
.ticker__track-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 2rem), transparent);
}
html[dir="rtl"] .ticker__track-wrap {
  mask-image: linear-gradient(to left, #000 0, #000 calc(100% - 2rem), transparent);
}
.ticker__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: ticker 48s linear 2s infinite;
  padding-inline: 1rem;
}
html[dir="rtl"] .ticker__track { animation-name: ticker-rtl; animation-delay: 2s; }
.ticker__track a { color: #f3f3f0; text-decoration: none; white-space: nowrap; }
.ticker__track a:hover { color: var(--accent); }
.ticker__dot { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; flex-wrap: wrap; width: auto; white-space: normal; }
  .ticker__track-wrap { mask-image: none; overflow: hidden; max-width: 100%; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes ticker-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* Masthead */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.masthead__bar a { text-decoration: none; }
.masthead__bar a:hover { color: var(--ink); }
.lang-switch { display: flex; gap: 0.65rem; align-items: center; }
.lang-switch a[aria-current="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }

.masthead__main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.mark { flex: none; display: block; }
.wordmark__text { display: flex; flex-direction: column; }
.wordmark__name {
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.wordmark__tag {
  margin-top: 0.28rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a { text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }

.dateline {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.4rem 1.25rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Filters */
.filters {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.filter-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.is-active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}
.home-grid {
  display: grid;
  grid-template-columns: 1fr 19rem;
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 52rem) {
  .home-grid { grid-template-columns: 1fr; }
  .masthead__main { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
}

/* Lead */
.lead {
  background: var(--paper);
  border: 1px solid var(--line);
}
.lead__img { margin: 0; background: transparent; }
.lead__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; display: block; }
.lead__body { padding: 1.15rem 1.2rem 1.3rem; }
.kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.45rem;
}
.lead h2, .lead h1 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 0.6rem; }
.lead h2 a, .card h3 a, .flash a { text-decoration: none; }
.lead h2 a:hover, .card h3 a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.dek { margin: 0 0 0.85rem; font-size: 1.0625rem; }
.meta { font-size: 0.8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.meta a { color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--tag);
  border: 1px solid var(--line);
  padding: 0.08rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 40rem) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card__img { margin: 0; }
.card__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; display: block; }
.card__body { padding: 0.8rem 0.9rem 1rem; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.05rem; line-height: 1.28; letter-spacing: -0.02em; font-weight: 600; margin: 0.35rem 0 0.45rem; }
.card .dek { font-size: 0.9375rem; color: var(--ink); flex: 1; }
.card.is-hidden, .lead.is-hidden, .flash.is-hidden, .empty.is-hidden { display: none; }
.page-title { letter-spacing: -0.03em; margin: 0 0 1rem; font-size: clamp(1.6rem, 3vw, 2rem); }
.mivzak { list-style: none; margin: 0; padding: 0; max-width: 42rem; }
.mivzak li { padding: 0.7rem 0; border-top: 1px solid var(--line); min-width: 0; }
.mivzak li:first-child { border-top: 0; }
.mivzak__when { margin: 0 0 0.15rem; font-size: 0.75rem; color: var(--muted); }
.mivzak a { display: block; max-width: 100%; font-weight: 700; text-decoration: none; letter-spacing: -0.02em; line-height: 1.3; overflow-wrap: anywhere; }
.mivzak a:hover { text-decoration: underline; text-underline-offset: 0.12em; }
.mivzak__sum { margin: 0.2rem 0 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 0.95rem; }

/* Sidebar */
.sidebar { background: var(--paper); border: 1px solid var(--line); padding: 0.9rem 1rem 0.6rem; }
.sidebar h2 { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.7rem; font-weight: 600; }
.flash { padding: 0.65rem 0; border-top: 1px solid var(--line); }
.flash:first-of-type { border-top: 0; }
.flash a { font-weight: 500; font-size: 0.9375rem; line-height: 1.3; display: block; }
.flash .meta { margin-top: 0.25rem; }

/* Opinion */
.opinion {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--dark);
}
.opinion__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.opinion__head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.opinion__head a { font-size: 0.875rem; }
.opinion-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; }
@media (max-width: 48rem) { .opinion-grid { grid-template-columns: 1fr; } }
.opinion-card { background: var(--paper); border: 1px solid var(--line); padding: 1rem; }
.opinion-card.is-placeholder { background: #f3f2ec; color: var(--muted); }
.placeholder-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* Archive list */
.archive-list { display: flex; flex-direction: column; gap: 0; background: var(--paper); border: 1px solid var(--line); }
.archive-item {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.archive-item:first-child { border-top: 0; }
.archive-item:hover { background: #faf9f5; }
.archive-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; }
.archive-item h2 { font-size: 1.125rem; margin: 0.25rem 0 0.35rem; letter-spacing: -0.02em; }
@media (max-width: 40rem) {
  .archive-item { grid-template-columns: 1fr; }
}

/* Story page */
.story { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; overflow-wrap: break-word; }
.story__hero { margin: 0 -1.25rem 1.25rem; }
@media (min-width: 52rem) {
  .story { max-width: 48rem; padding-top: 1.75rem; }
  .story__hero { margin: 0 0 1.35rem; }
}
.story__hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #ddd; }
.story figcaption, .img-cap {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}
.story h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.lead-line {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 1rem;
}
.story .meta { margin-bottom: 1.1rem; }
.keyfact {
  background: #fff8e6;
  border-inline-start: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  margin: 1.1rem 0 1.35rem;
  font-size: 1.05rem;
}
html[dir="rtl"] .keyfact { border-inline-start: 0; border-inline-end: 4px solid var(--accent); }
.keyfact strong { font-weight: 600; }
.pullquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-inline-start: 3px solid var(--dark);
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 500;
}
html[dir="rtl"] .pullquote { padding-inline-start: 0; padding-inline-end: 1rem; }
.pullquote cite { display: block; margin-top: 0.4rem; font-size: 0.8rem; font-style: normal; color: var(--muted); font-weight: 400; }
.story h2 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 1.6rem 0 0.55rem;
  font-weight: 600;
}
.story p { margin: 0 0 0.85rem; }
.story p + p { }
.source-box {
  margin-top: 2.2rem;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
}
.source-box h2 { margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.source-box p { margin: 0.2rem 0; }
.source-box a { font-weight: 500; color: var(--accent-text); overflow-wrap: anywhere; }

/* Footer */
.footer {
  background: var(--dark);
  color: #e8edf2;
  margin-top: auto;
}
.footer a { color: #fff; }
.footer__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.3rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9375rem;
}
.footer__cta { font-size: 1.05rem; font-weight: 500; }
.footer__phone { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
.footer__phone a { text-decoration: none; }
.footer__note { opacity: 0.7; font-size: 0.8rem; margin-top: 0.6rem; }

.empty { padding: 1rem; color: var(--muted); font-size: 0.95rem; }

.badge-preprint {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 0.1rem 0.4rem;
  color: var(--muted);
}

.tag { text-decoration: none; }
a.tag:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
a.tag[aria-current="true"] { background: var(--dark); color: #fff; border-color: var(--dark); }

.img-cap, .lead__img figcaption, .card__img figcaption, .story figcaption, .archive-item figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.35rem 0.9rem 0;
  font-style: normal;
}
.lead__img figcaption { margin: 0.35rem 1.2rem 0; }
.story__hero { margin: 0 0 1.25rem; }
.story__hero figcaption { margin: 0.35rem 0 0; }
.archive-item figure { margin: 0; }
.archive-item figcaption { margin: 0.3rem 0 0; }

.explore {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.explore h2, .tag-cloud h2, .story-tags h2 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  font-weight: 600;
}
.tag-cloud { margin-top: 1.25rem; }
.tag-cloud__list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.story-tags {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.site-search-wrap { position: relative; margin: 0 0 1rem; }
.site-search {
  display: flex;
  gap: 0.4rem;
  max-width: 32rem;
}
.site-search input[type="search"] {
  flex: 1;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  min-width: 0;
}
.site-search button {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border: 0;
  background: var(--dark);
  color: #fff;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}
.site-search button:hover { background: #000; }

.footer .site-search-wrap { margin: 0 0 1.2rem; max-width: 32rem; }
.footer .site-search input[type="search"] {
  background: #151b23;
  border-color: #3a4149;
  color: #e8edf2;
}
.footer .site-search button { background: var(--accent); color: var(--accent-ink); }
.footer .site-search button:hover { background: #ffc24d; }
.footer .search-results {
  background: #151b23;
  border-color: #3a4149;
}
.footer .search-results__item { color: #e8edf2; }
.footer .search-results__empty { color: #95a1af; }

.search-results {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% - 0.35rem);
  z-index: 5;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  max-width: 32rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.search-results__item {
  display: block;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.3;
}
.search-results__item:first-child { border-top: 0; }
.search-results__item:hover { background: #faf9f5; }
.search-results__empty { margin: 0; padding: 0.7rem 0.75rem; font-size: 0.9rem; color: var(--muted); }

.wordmark__text { display: flex; flex-direction: column; justify-content: center; }

.masthead__search { flex: 1 1 16rem; min-width: 12rem; max-width: 26rem; }
.masthead__search .site-search-wrap { margin: 0; }
.masthead__search .site-search { max-width: none; width: 100%; }
@media (max-width: 52rem) {
  .masthead__search { max-width: none; width: 100%; order: 3; flex: none; min-width: 0; }
}

.consent { position: fixed; z-index: 80; inset-inline: 1rem; bottom: 1rem; width: min(100% - 2rem, 36rem); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 0.85rem 1rem; background: #fff; color: #0d1117; border: 1px solid rgba(13, 17, 23, 0.18); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); font-size: 0.9375rem; line-height: 1.4; }
.consent p { margin: 0; flex: 1 1 14rem; }
.consent__actions { display: flex; gap: 0.5rem; }
.consent button { min-height: 2.5rem; padding: 0 0.9rem; font: inherit; cursor: pointer; }
.consent [data-consent="granted"] { background: #0d1117; color: #fff; }
.consent [data-consent="denied"] { background: transparent; color: inherit; border: 1px solid currentColor; }
html[data-consent="set"] .consent { display: none; }

.story .ai-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.highlight { background: #fff8e6; border-inline-start: 4px solid var(--accent); padding: 0.85rem 1rem; margin: 1.1rem 0 1.35rem; font-size: 1.05rem; }
html[dir="rtl"] .highlight { border-inline-start: 0; border-inline-end: 4px solid var(--accent); }
.expert { margin: 1.5rem 0; padding: 0.85rem 1rem; background: #fffdf6; border: 1px solid var(--line-strong); border-inline-start: 3px solid #8a6508; }
.expert h2 { margin: 0 0 0.4rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.expert p { margin: 0.35rem 0 0; }

.nl { margin: 1.75rem 0 0; padding: 1rem 1rem 1.1rem; background: #fffdf6; border: 1px solid var(--line-strong); max-width: 100%; }
.nl h2 { margin: 0 0 0.35rem; font-size: 1.15rem; letter-spacing: -0.02em; }
.nl > p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.95rem; }
.nl fieldset { border: 0; margin: 0 0 0.75rem; padding: 0; min-width: 0; }
.nl legend { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.35rem; }
.nl label { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: flex-start; margin: 0.2rem 0; font-size: 0.95rem; }
.nl input[type="email"], .nl input[type="password"] { width: 100%; max-width: 24rem; font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--line-strong); background: #fff; }
.nl button { font: inherit; background: var(--dark); color: #fff; border: 0; padding: 0.5rem 0.9rem; cursor: pointer; }
.nl button + button { margin-inline-start: 0.5rem; background: transparent; color: var(--dark); border: 1px solid var(--line-strong); }
.nl .nl-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 1rem; }
@media (max-width: 40rem) { .nl .nl-topics { grid-template-columns: 1fr; } }
.nl-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.footer__links { margin-top: 0.45rem; }
