:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16191d;
  --muted: #5b6470;
  --line: #e3e6ea;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fb;
  --official: #1d6b47;
  --official-soft: #e5f3ec;
  --computed: #8a5a00;
  --computed-soft: #fdf3df;
  --past: #8b939d;
  --warn-soft: #fff4e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111418; --card: #1a1e24; --ink: #e9ecef; --muted: #a2abb6; --line: #2b313a;
    --accent: #6ea5ff; --accent-ink: #0b1220; --accent-soft: #1d2a3d;
    --official: #6fd3a2; --official-soft: #173327; --computed: #f2c062; --computed-soft: #3a2e15;
    --past: #7b8490; --warn-soft: #3a2e15; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111418; --card: #1a1e24; --ink: #e9ecef; --muted: #a2abb6; --line: #2b313a;
  --accent: #6ea5ff; --accent-ink: #0b1220; --accent-soft: #1d2a3d;
  --official: #6fd3a2; --official-soft: #173327; --computed: #f2c062; --computed-soft: #3a2e15;
  --past: #7b8490; --warn-soft: #3a2e15; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 8px; top: 8px; background: var(--card); padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.top { padding: 22px 0 10px; }
.top h1 { font-size: 1.6rem; letter-spacing: -.01em; }
.sub { margin: 0; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px; margin: 14px 0;
}

/* status card */
.status .phase { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.status .holder { font-size: 1.55rem; margin: 0 0 2px; }
.status .party { font-size: 1rem; font-weight: 500; color: var(--muted); margin-inline-start: 6px; }
.dayline { font-size: 1.05rem; margin: 10px 0 6px; }
.dayline b { font-size: 1.6rem; }
.progress { height: 10px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.progress .ext { background: repeating-linear-gradient(-45deg, var(--computed) 0 4px, transparent 4px 8px); opacity: .5; }
.progress-wrap { position: relative; }
.facts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 0; }
.facts div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: .82rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts dd small { font-weight: 400; color: var(--muted); }
.next { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.next .label { font-size: .82rem; color: var(--muted); }
.next .what { font-weight: 600; }
.countdown { font-size: 1.35rem; font-weight: 700; margin-top: 2px; direction: rtl; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }

/* subscribe */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
details ol { margin: 8px 0; padding-inline-start: 22px; }
details li { margin: 4px 0; }
.scn { margin: 12px 0 0; font-size: .92rem; }

/* badges */
.legend { font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px;
  vertical-align: 1px; white-space: nowrap;
}
.badge.official { background: var(--official-soft); color: var(--official); }
.badge.computed { background: var(--computed-soft); color: var(--computed); border: 1px dashed currentColor; }
.badge.cat { background: var(--bg); color: var(--muted); font-weight: 600; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  position: relative; padding: 0 22px 16px 0; border-inline-start: 2px solid var(--line); margin-inline-start: 6px;
}
.timeline > li::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--accent);
}
.timeline > li.past::before { border-color: var(--past); background: var(--past); }
.timeline > li.deadline::before { border-radius: 2px; }
.timeline > li.past .t-title { color: var(--muted); }
.timeline > li.now-marker { padding-bottom: 14px; }
.timeline > li.now-marker::before { background: var(--accent); width: 14px; height: 14px; inset-inline-start: -8px; }
.now-marker span { font-weight: 700; color: var(--accent); font-size: .9rem; }
.t-date { font-size: .85rem; color: var(--muted); }
.t-date b { color: var(--ink); font-weight: 600; }
.timeline > li.past .t-date b { color: var(--muted); }
.t-title { font-weight: 600; margin: 2px 0 4px; }
.t-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.t-body { font-size: .92rem; color: var(--muted); }
.t-body p { margin: 2px 0; }
.t-links { font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }

/* scenario tree */
.tree ul { list-style: none; margin: 0; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.tree > ul { padding-inline-start: 0; border: 0; }
.tree li { margin: 8px 0; }
.node { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.node .n-title { font-weight: 600; }
.node .n-date { font-size: .85rem; color: var(--muted); }
.node .n-note { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.tree details { border: 0; padding: 0; }
.tree summary { list-style: none; display: block; min-height: 0; font-weight: inherit; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary { cursor: pointer; }
.tree summary .n-title::before { content: "▾ "; color: var(--muted); }
.tree details:not([open]) > summary .n-title::before { content: "◂ "; }
.tree .root { font-weight: 700; margin-bottom: 6px; }

/* news */
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news a { font-weight: 600; text-decoration: none; color: var(--ink); }
.news a:hover { text-decoration: underline; }
.news .meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }

.warn { background: var(--warn-soft); }
.foot { color: var(--muted); font-size: .85rem; padding-bottom: 40px; }
.foot p { margin: 8px 0; }
.loading { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
