/* למה דמוקרטים? · צבעי הדמוקרטים בלבד. גוונים בהירים = אותם צבעים עם שקיפות */
:root {
  --logo: #2A38D6;   /* כחול לוגו */
  --navy: #283871;   /* כחול רקע */
  --red: #D92631;    /* אדום */
  --sky: #8FD9F8;    /* תכלת */
  --white: #FFFFFF;

  --muted: rgba(40, 56, 113, .74);
  --line: rgba(40, 56, 113, .16);
  --line-strong: rgba(40, 56, 113, .4);
  --sky-soft: rgba(143, 217, 248, .2);
  --sky-mid: rgba(143, 217, 248, .45);
  --logo-soft: rgba(42, 56, 214, .08);
  --logo-ring: rgba(42, 56, 214, .22);
  --shadow: 0 1px 2px rgba(40, 56, 113, .08), 0 10px 26px -18px rgba(40, 56, 113, .55);

  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px;
  --max: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--navy);
  background: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--logo); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--logo); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 8px; }
mark { background: var(--sky-mid); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- סרגל עליון ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: var(--white);
  padding: 12px var(--gutter); padding-top: max(12px, env(safe-area-inset-top));
  font-size: 14.5px; font-weight: 700;
}
.topbar a { color: var(--white); text-decoration: none; }
.topbar-brand { opacity: .92; }
.topbar-link { border: 1.5px solid rgba(255, 255, 255, .35); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.topbar a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  padding: 22px var(--gutter) 18px;
  background:
    radial-gradient(110% 70% at 100% 0%, rgba(42, 56, 214, .75), transparent 62%),
    radial-gradient(60% 50% at 0% 100%, rgba(143, 217, 248, .14), transparent 70%),
    var(--navy);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .035) 0 16px, transparent 16px 44px);
}
.hero > * { position: relative; max-width: var(--max); margin-inline: auto; }
.wordmark { margin: 0 auto; font-weight: 900; font-size: clamp(38px, 11vw, 92px); line-height: 1; letter-spacing: -.02em; }
.wordmark > span { display: inline-block; padding: 10px 0 8px; border-top: 6px solid currentColor; border-bottom: 6px solid currentColor; }
.q { color: var(--red); }
.tagline { margin: 18px auto 10px; }
.paint {
  display: inline-block; color: var(--navy); font-weight: 800; font-size: clamp(18px, 5vw, 26px); line-height: 1.2;
  padding: 7px 18px 10px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 84' preserveAspectRatio='none'><path fill='%238FD9F8' d='M10 20C70 9 150 13 215 9C280 5 345 7 390 13C398 22 395 33 393 41C397 50 397 61 389 68C320 75 220 74 140 73C90 72 45 75 14 70C5 62 7 51 9 42C4 34 5 26 10 20Z'/></svg>") no-repeat center / 100% 100%;
  clip-path: inset(0 0 0 100%);
  animation: paint .8s .2s cubic-bezier(.65, 0, .25, 1) forwards;
}
@keyframes paint { to { clip-path: inset(-8px); } }
.lead { margin: 0 auto 10px; max-width: 46ch; color: rgba(255, 255, 255, .9); font-size: 17px; }
.stats { margin: 0 auto; font-size: 15px; font-weight: 700; color: var(--sky); min-height: 1.5em; }

/* ---------- חיפוש ---------- */
.search-sticky {
  position: sticky; top: 0; z-index: 30; background: var(--navy);
  padding: 10px var(--gutter) 12px;
}
.search {
  position: relative; display: flex; align-items: center; gap: 8px; max-width: var(--max); margin: 0 auto;
  background: var(--white); border-radius: 18px; padding: 6px; padding-inline-start: 50px;
  box-shadow: 0 0 0 3px transparent; transition: box-shadow .2s;
}
.search:focus-within { box-shadow: 0 0 0 3px var(--sky); }
.search-icon { position: absolute; inset-inline-start: 16px; width: 24px; height: 24px; color: var(--logo); pointer-events: none; }
.search input {
  flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; font-size: 19px; font-weight: 500;
  color: var(--navy); outline: none; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: rgba(40, 56, 113, .5); }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--logo-soft); color: var(--navy); }
.filter-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; flex: none;
  border: 0; border-radius: 13px; background: var(--logo); color: var(--white); font-weight: 700; font-size: 15.5px; cursor: pointer;
}
.filter-toggle svg { width: 20px; height: 20px; }
.filter-toggle[aria-expanded="true"] { background: var(--navy); }
.badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: var(--white); font-size: 12px; font-weight: 800; }
@media (max-width: 420px) { .filter-label { display: none; } .filter-toggle { padding: 0 12px; } }

.drips {
  height: 46px; margin-top: -1px; pointer-events: none; position: relative; z-index: 1;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 70'><g fill='%23283871'><path d='M0 0H420V14L396 14Q391 14 391 19V28A6 6 0 0 1 379 28V19Q379 14 374 14L338 14Q333 14 333 19V51A15 15 0 0 1 303 51V19Q303 14 298 14L280 14Q275 14 275 19V33A7 7 0 0 1 261 33V19Q261 14 256 14L221 14Q216 14 216 19V45A11 11 0 0 1 194 45V19Q194 14 189 14L161 14Q156 14 156 19V24A6 6 0 0 1 144 24V19Q144 14 139 14L113 14Q108 14 108 19V49A13 13 0 0 1 82 49V19Q82 14 77 14L51 14Q46 14 46 19V38A8 8 0 0 1 30 38V19Q30 14 25 14L0 14Z'/><circle cx='150' cy='42' r='4'/><circle cx='268' cy='53' r='3.5'/></g></svg>") repeat-x top right / 276px 46px;
}

/* ---------- סינון ---------- */
.list-body { background: var(--sky-soft); margin-top: -46px; padding: 52px 0 48px; min-height: 60vh; }
.facets, .toolbar, .notice, .results { max-width: var(--max); margin-inline: auto; }
.facets { display: grid; gap: 12px; padding-bottom: 6px; }
.topics {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--gutter) 8px; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
}
.topics::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .topics { flex-wrap: wrap; overflow: visible; } }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 44px; padding: 0 15px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--navy);
  font-weight: 700; font-size: 15.5px; cursor: pointer; white-space: nowrap; scroll-snap-align: start;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--logo); }
.chip .n { font-weight: 600; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--logo); border-color: var(--logo); color: var(--white); }
.chip[aria-pressed="true"] .n { color: rgba(255, 255, 255, .85); }
.chip:disabled { opacity: .45; cursor: default; }
.chip.small { min-height: 38px; font-size: 14.5px; padding: 0 13px; font-weight: 600; }
.more-panel, .quick { padding: 0 var(--gutter); display: grid; gap: 10px; }
.quick { padding: 0; }
.quick .facet-label { padding: 0 var(--gutter); }
.quick .chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.quick .chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .quick .chips { flex-wrap: wrap; } }
.facet-group { display: grid; gap: 6px; }
.facet-label { font-size: 13.5px; font-weight: 800; color: var(--muted); letter-spacing: .01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px var(--gutter) 12px; flex-wrap: wrap; }
.count { margin: 0; font-weight: 700; font-size: 15.5px; }
.count .sub { font-weight: 500; color: var(--muted); }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.sort select {
  height: 40px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--white); color: var(--navy);
  padding: 0 12px 0 34px; font-weight: 700; font-size: 14.5px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283871' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: left 10px center; background-size: 16px;
}
.reset { height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--logo); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.notice {
  margin: 0 var(--gutter) 14px; padding: 14px 16px; border-radius: 16px; background: var(--white);
  border-inline-start: 5px solid var(--red); box-shadow: var(--shadow);
}
@media (min-width: 1112px) { .notice { margin-inline: auto; } }
.notice h2 { margin: 0 0 4px; font-size: 17px; }
.notice p { margin: 0 0 10px; color: var(--muted); }
.notice .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- תוצאות ---------- */
.results { list-style: none; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 12px; }
@media (min-width: 760px) { .results { grid-template-columns: 1fr 1fr; } }
.results > li { min-width: 0; }
.card {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px 16px 14px; border-radius: 18px;
  background: var(--white); border: 1.5px solid transparent; box-shadow: var(--shadow); color: var(--navy); text-decoration: none;
  transition: border-color .15s, transform .15s var(--ease);
}
.card:hover { border-color: var(--logo); }
.card:active { transform: scale(.99); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--sky-mid); color: var(--navy); font-weight: 700; font-size: 13px; line-height: 1.5; }
.card-title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.3; text-wrap: balance; }
.card-summary { margin: 0; font-size: 15.5px; color: var(--muted); line-height: 1.5; }
.card-quote { margin: 0; font-size: 14.5px; line-height: 1.5; padding: 8px 12px; border-radius: 12px; background: var(--logo-soft); }
.card-quote b { font-weight: 700; font-size: 12.5px; display: block; color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; padding-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item svg { width: 15px; height: 15px; }
.tags-inline { display: flex; flex-wrap: wrap; gap: 4px 8px; font-weight: 500; }
.weak-divider { list-style: none; padding: 14px 4px 2px; font-weight: 800; font-size: 15px; color: var(--muted); grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.weak-divider::after { content: ""; flex: 1; height: 1.5px; background: var(--line-strong); }
.results li.weak .card { box-shadow: none; border-color: var(--line); background: rgba(255, 255, 255, .7); }

.skeleton { height: 190px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.6) 25%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.6) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 13px; border: 1.5px solid var(--logo); background: var(--logo); color: var(--white);
  font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: var(--white); color: var(--logo); }
.btn.quiet { background: transparent; border-color: var(--line-strong); color: var(--navy); }
.btn:hover { filter: brightness(1.06); }

/* ---------- עמוד סרטון ---------- */
.view-inner { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 48px; }
.backbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 16px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--white); color: var(--navy); font-weight: 700; cursor: pointer; text-decoration: none;
}
.back svg { width: 18px; height: 18px; }
.video-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .video-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; } .player-col { position: sticky; top: 16px; } }
.video-head { margin-bottom: 4px; }
.video-title { margin: 8px 0 6px; font-size: clamp(26px, 6.6vw, 38px); font-weight: 900; line-height: 1.15; text-wrap: balance; }
.video-title:focus { outline: none; }
.video-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.pill-link { text-decoration: none; }
.pill-link:hover .pill { background: var(--sky); }

.player {
  position: relative; width: 100%; margin-inline: auto; border-radius: 20px; overflow: hidden; background: var(--navy);
  box-shadow: 0 18px 40px -22px rgba(40, 56, 113, .8);
}
.player.portrait { aspect-ratio: 9 / 16; width: min(100%, calc(64vh * 9 / 16)); }
.player.landscape { aspect-ratio: 16 / 9; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--navy); }
.player-start {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; width: 100%;
  border: 0; cursor: pointer; color: var(--white); text-align: center; padding: 20px;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(42, 56, 214, .8), transparent 70%),
    repeating-linear-gradient(-55deg, rgba(255, 255, 255, .04) 0 14px, transparent 14px 40px),
    var(--navy);
}
.player-start .play { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--white); color: var(--logo); box-shadow: 0 0 0 10px rgba(143, 217, 248, .3); transition: transform .2s var(--ease); }
.player-start:hover .play { transform: scale(1.06); }
.player-start .play svg { width: 34px; height: 34px; margin-inline-start: 4px; }
.player-start strong { font-size: 19px; font-weight: 800; }
.player-start span.sub { font-size: 14px; opacity: .85; }

.sources { margin-top: 14px; display: grid; gap: 10px; }
.source-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.source-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14.5px; font-weight: 600; }
.source-links a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.source-links svg { width: 14px; height: 14px; }
.player-help { margin: 0; font-size: 14px; color: var(--muted); }

.section-h { margin: 22px 0 8px; font-size: 18px; font-weight: 800; }
.summary { margin: 0; font-size: 17.5px; line-height: 1.65; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--sky-soft); border: 1.5px solid var(--sky-mid); color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.tag-list a:hover { border-color: var(--logo); }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.copy-fallback { margin-top: 8px; display: grid; gap: 4px; font-size: 14px; }
.copy-fallback input { width: 100%; height: 44px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 0 10px; direction: ltr; text-align: left; }

.transcript { margin-top: 24px; padding: 16px; border-radius: 18px; background: var(--sky-soft); }
.transcript .section-h { margin-top: 0; }
.transcript-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.transcript-text {
  margin-top: 12px; padding: 16px; border-radius: 14px; background: var(--white); white-space: pre-line;
  font-size: 16.5px; line-height: 1.8; max-height: 70vh; overflow: auto; user-select: text; overscroll-behavior: contain;
}
.more-topic { margin-top: 22px; }

/* ---------- אודות / מצבים ---------- */
.prose { max-width: 680px; }
.prose h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 900; margin: 6px 0 12px; line-height: 1.15; }
.prose h1:focus { outline: none; }
.prose h2 { font-size: 19px; margin: 24px 0 6px; }
.prose p, .prose li { font-size: 17px; }
.facts { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.facts li { padding: 12px 14px; border-radius: 14px; background: var(--sky-soft); }
.facts b { display: block; font-size: 13.5px; color: var(--muted); }
.state { text-align: center; padding: 40px 0; }
.state .prose { margin-inline: auto; }
.state .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------- פוטר ---------- */
.footer { background: var(--navy); color: var(--white); text-align: center; padding: 34px var(--gutter) calc(34px + env(safe-area-inset-bottom)); font-size: 14.5px; }
.footer p { margin: 4px 0; opacity: .9; }
.footer a { color: var(--sky); }
.footer-mark { font-size: 24px; font-weight: 900; opacity: 1 !important; }

.toast {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline: 0; margin: 0 auto; width: max-content; max-width: calc(100% - 32px);
  z-index: 60; background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow);
}
.noscript { padding: 16px; text-align: center; font-weight: 700; }

@media (min-width: 900px) {
  :root { --gutter: 24px; }
  .hero { padding-top: 34px; padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton { animation: none; }
}
