/* Season band above the site header (lib/season-inject.js). */
#rb-season{
  --rbs-bg:#fbf6ea; --rbs-fg:#7e022b; --rbs-sub:#8a6a2a; --rbs-line:#e6d6b8;
  --rbs-strip:linear-gradient(90deg,#7e022b,#a8334f,#7e022b); --rbs-strip-h:3px;
  position:relative; z-index:5; direction:rtl; text-align:center;
  background:var(--rbs-bg); color:var(--rbs-fg);
  font-family:inherit; margin:0; padding:0;
}
#rb-season *{box-sizing:border-box}

/* ── one quiet line: a fast, Rosh Chodesh, the tikkun week, a hilula ── */
#rb-season .rb-season-strip{display:block;height:var(--rbs-strip-h);background:var(--rbs-strip);background-size:200% 100%}
#rb-season .rb-season-line{
  padding:7px 14px 8px; font-size:14.5px; line-height:1.45; font-weight:500;
  border-bottom:1px solid var(--rbs-line); text-wrap:balance; overflow-wrap:anywhere;
}
#rb-season .rb-season-txt{color:inherit;text-decoration:none}
#rb-season .rbs-t{font-weight:800}
#rb-season .rbs-s{color:var(--rbs-sub);font-weight:600}
#rb-season .rbs-arr{font-weight:700}
#rb-season a.rb-season-txt:hover .rbs-s,#rb-season a.rb-season-txt:focus-visible .rbs-s{text-decoration:underline}
#rb-season a.rb-season-txt:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:4px}

/* Rosh Chodesh: cream, burgundy and a slow gold shimmer on the line */
body[data-rb-season-kind="rosh-chodesh"] #rb-season{
  --rbs-strip:linear-gradient(90deg,#b8862b 0%,#f6dd92 25%,#b8862b 50%,#f6dd92 75%,#b8862b 100%);
}
body[data-rb-season-kind="rosh-chodesh"] #rb-season .rb-season-strip{animation:rbs-shimmer 9s linear infinite}

/* the tikkun week and a hilula: cream with a thin burgundy line */
body[data-rb-season-kind="tikun"] #rb-season,
body[data-rb-season-kind="hilula"] #rb-season{--rbs-sub:#7e022b}
body[data-rb-season-kind="tikun"] #rb-season .rbs-s{
  display:inline-block;margin-inline-start:2px;padding:1px 10px;border-radius:999px;
  background:#7e022b;color:#fff8ec;font-size:13px;font-weight:700;white-space:nowrap
}
body[data-rb-season-kind="tikun"] #rb-season .rbs-dot,
body[data-rb-season-kind="tikun"] #rb-season .rbs-arr{display:none}

/* a fast: plain grey-blue, no decoration, no motion */
body[data-rb-season-kind="fast"] #rb-season{
  --rbs-bg:#eef2f6; --rbs-fg:#2f4256; --rbs-sub:#4f6378; --rbs-line:#cdd6df; --rbs-strip:none; --rbs-strip-h:0;
}

/* ── Chanukah: a night band with the lamp and tonight's flames ── */
#rb-season.rbs-ch{
  background:#101b3b url(/v2/season/band-m.jpg?v=20261129) center 78%/cover no-repeat;
  color:#f6ead2;
  border-top:1px solid rgba(214,175,90,.55);
  border-bottom:1px solid rgba(214,175,90,.75);
  box-shadow:inset 0 -18px 30px -24px rgba(255,190,90,.35);
  overflow:hidden;
}
#rb-season.rbs-ch::before{                /* a soft vignette so the words read on any part of the picture */
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse 70% 120% at 72% 50%,rgba(9,15,36,.55),rgba(9,15,36,0) 70%);
}
#rb-season .rbs-band{
  position:relative; display:flex; align-items:center; justify-content:center; gap:8px;
  min-height:118px; max-width:1040px; margin:0 auto; padding:10px 12px 10px 8px;
  color:inherit; text-decoration:none;
}
#rb-season .rbs-copy{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  flex:1 1 0; min-width:0; text-align:center;
}
#rb-season .rbs-title{
  display:block; font-size:25px; line-height:1.12; font-weight:800; letter-spacing:.01em;
  color:#f3d27a;
  background:linear-gradient(180deg,#fff6d2 0%,#f6dd92 38%,#d9ab45 72%,#b8862b 100%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 1px 5px rgba(255,196,100,.35));
}
#rb-season .rbs-sub{display:block;font-size:14px;line-height:1.38;font-weight:600;color:#f6ead2;text-wrap:balance}
#rb-season .rbs-more{
  display:inline-block; margin-top:5px; padding:3px 13px 4px; border-radius:999px;
  font-size:12.5px; line-height:1.3; font-weight:800; color:#2a1a04;
  background:linear-gradient(180deg,#f8e3a2,#d6aa4a); box-shadow:0 1px 6px rgba(0,0,0,.3);
}
#rb-season a.rbs-band:hover .rbs-more,#rb-season a.rbs-band:focus-visible .rbs-more{background:linear-gradient(180deg,#fff0c4,#e2b95a)}
#rb-season a.rbs-band:focus-visible{outline:2px solid #f6dd92;outline-offset:-4px;border-radius:6px}
/* draft-view review bar (never on the live site) */
#rb-season .rbs-pv{position:relative;z-index:2;display:flex;align-items:center;gap:8px;padding:6px 10px;background:#5a0420;color:#fff;font-size:12px;line-height:1.3;text-align:right}
#rb-season .rbs-pv-d{flex:0 0 auto;font-weight:800;white-space:nowrap}
#rb-season .rbs-pv-n{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:2px 0}
#rb-season .rbs-pv-n::-webkit-scrollbar{display:none}
#rb-season .rbs-pv-n a{flex:0 0 auto;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.14);color:#fff;text-decoration:none;font-weight:700;white-space:nowrap}
#rb-season .rbs-pv-n a[aria-current]{background:#f6dd92;color:#3a0716}
@media (max-width:640px){#rb-season .rbs-pv{flex-direction:column;align-items:stretch;gap:4px}#rb-season .rbs-pv-d{text-align:center}}

/* the lamp: the picture's black falls away against the band (lighten), the flames sit on the wicks */
#rb-season .rbs-lamp{
  --fw:3.7%;
  position:relative; display:block; flex:0 0 auto; width:49%; max-width:205px; aspect-ratio:800/360;
}
#rb-season .rbs-img{
  display:block; width:100%; max-width:none !important; height:auto; mix-blend-mode:lighten;
  -webkit-mask-image:radial-gradient(ellipse 58% 64% at 50% 52%,#000 72%,transparent 100%);
          mask-image:radial-gradient(ellipse 58% 64% at 50% 52%,#000 72%,transparent 100%);
}
#rb-season .rbs-lamp::before{               /* warm light on the lamp, growing with the candles */
  content:""; position:absolute; left:-8%; right:-8%; top:-30%; bottom:20%; pointer-events:none;
  background:radial-gradient(ellipse 55% 60% at 60% 45%,rgba(255,196,96,calc(.06 + var(--n,0) * .028)),rgba(255,160,60,0) 72%);
  mix-blend-mode:screen;
  animation:rbs-warm 1.2s ease-out calc(.4s + var(--n,0) * .42s) both;
}

/* one flame: the outer element is placed on the wick and lights up; the inner one flickers */
#rb-season .rbs-f{
  position:absolute; left:var(--x); top:var(--y); z-index:1;
  width:var(--fw); aspect-ratio:10/24;
  margin-left:calc(var(--fw) / -2);
  margin-top:calc(var(--fw) * -2.18);          /* percentages of the lamp width: the base sits on the wick */
  transform-origin:50% 92%;
  animation:rbs-ignite .6s cubic-bezier(.2,.9,.3,1.25) calc(.4s + var(--o) * .42s) both;
}
#rb-season .rbs-f b{
  position:absolute; inset:0; display:block; transform-origin:50% 95%;
  background:
    radial-gradient(ellipse 34% 12% at 50% 95%,rgba(110,150,255,.85),rgba(110,150,255,0) 100%),
    radial-gradient(ellipse 48% 38% at 50% 74%,#fff 0%,#fffbe0 26%,#ffe08a 48%,#ffb43c 70%,#ff7a14 88%,#e8500a 100%);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 48'%3E%3Cpath d='M10 0C11.6 7 19 17 19 32.5 19 42 15.2 48 10 48S1 42 1 32.5C1 17 8.4 7 10 0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 48'%3E%3Cpath d='M10 0C11.6 7 19 17 19 32.5 19 42 15.2 48 10 48S1 42 1 32.5C1 17 8.4 7 10 0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  filter:drop-shadow(0 0 1px rgba(255,220,140,.9));
  animation:rbs-flick 2.3s ease-in-out calc(var(--o) * -.37s) infinite;
}
#rb-season .rbs-f::after{                    /* the halo */
  content:""; position:absolute; left:50%; top:64%; width:640%; aspect-ratio:1; z-index:-1;
  transform:translate(-50%,-50%); border-radius:50%; pointer-events:none;
  background:radial-gradient(circle,rgba(255,220,140,.78) 0%,rgba(255,180,76,.3) 26%,rgba(255,140,40,0) 62%);
  animation:rbs-glow 1.9s ease-in-out calc(var(--o) * -.29s) infinite alternate;
}
#rb-season .rbs-sh{--fw:3.4%}

@keyframes rbs-ignite{
  0%{opacity:0;transform:scale(.05)}
  45%{opacity:1;transform:scale(1.3)}
  70%{transform:scale(.94)}
  100%{opacity:1;transform:scale(1)}
}
@keyframes rbs-flick{
  0%{transform:scale(1,1) skewX(0)}
  14%{transform:scale(.95,1.07) skewX(-2.5deg)}
  29%{transform:scale(1.04,.95) skewX(1.5deg)}
  45%{transform:scale(.97,1.09) skewX(-1deg)}
  61%{transform:scale(1.03,.96) skewX(2.2deg)}
  78%{transform:scale(.96,1.05) skewX(-1.6deg)}
  100%{transform:scale(1,1) skewX(0)}
}
@keyframes rbs-glow{from{opacity:.72}to{opacity:1}}
@keyframes rbs-warm{from{opacity:0}to{opacity:1}}
@keyframes rbs-shimmer{from{background-position:0 0}to{background-position:-200% 0}}

/* a later page of the visit, and Shabbat: the flames already burn, nothing is lit in front of the reader */
#rb-season.rbs-quiet .rbs-f,#rb-season.rbs-quiet .rbs-lamp::before{animation:none}

@media (min-width:480px){
  #rb-season .rbs-lamp{max-width:230px}
  #rb-season .rbs-title{font-size:27px}
}
@media (min-width:768px){
  #rb-season .rb-season-line{font-size:15.5px;padding:8px 16px 9px}
  #rb-season.rbs-ch{background-image:url(/v2/season/band.jpg?v=20261129);background-position:center 70%}
  #rb-season .rbs-band{min-height:132px;gap:34px;padding:10px 24px}
  #rb-season .rbs-copy{flex:0 1 auto}
  #rb-season .rbs-lamp{width:300px;max-width:300px}
  #rb-season .rbs-title{font-size:38px}
  #rb-season .rbs-sub{font-size:18px}
  #rb-season .rbs-more{font-size:14px;padding:4px 16px 5px}
}
@media (min-width:1200px){
  #rb-season .rbs-band{min-height:140px}
  #rb-season .rbs-lamp{width:330px;max-width:330px}
}

@media (prefers-reduced-motion:reduce){
  #rb-season .rbs-f,#rb-season .rbs-f b,#rb-season .rbs-f::after,#rb-season .rbs-lamp::before,
  #rb-season .rb-season-strip{animation:none !important}
}
@media print{#rb-season{display:none}}
