/* ───────────────────────── התפריט הראשי — "אבני שהם" ─────────────────────────
   A dial of circles: the Torah fixed in the middle, the other apps on a ring
   around it that turns like a combination lock. Navy and gold, over the faint Samaritan page the entry splash is written on.
   Everything here is scoped to #hub / .hub-* so it can be removed without a trace. */

#hub{
  --ink-night:#0a1733; --ink-abyss:#04081a; --lapis:#173a72;
  --gold:#c8a456; --gold-bright:#eccd84; --parchment:#efe6cc;
  --D:min(92vw, max(300px, min(540px, calc(100dvh - 404px))));   /* the dial's side; the circles are fractions of it */
  /* ten circles round the ring: each one's width and how far out its middle stands, as
     fractions of --D. The two go together — R + S/2 = .5 keeps the ring inside the dial,
     and 2·R·sin(180°/10) − S is the gap between neighbours (nine stood at .23 and .385). */
  --S:.212; --R:.394;
  position:fixed; inset:0; z-index:3500; overflow-x:hidden; overflow-y:auto;
  /* the same ground the answer page stands on, so the two are one place: the
     menu used to run down to near-black, and the answer beside it looked lit
     from another room */
  background:radial-gradient(130% 92% at 50% 16%, #2a5aa8 0%, #1a3c79 48%, #112a56 100%);
  font-family:'Heebo',system-ui,sans-serif; color:var(--parchment);
  -webkit-overflow-scrolling:touch;
  padding:max(14px, env(safe-area-inset-top)) 0 max(14px, env(safe-area-inset-bottom));
  display:flex; flex-direction:column; align-items:center;
}
#hub.hidden{ display:none !important; }
#hub[lang=ar]{ font-family:'Arabic','Heebo',system-ui,sans-serif; }

/* the faint Samaritan page behind everything: horizontal lines, right to left,
   covering the whole screen */
#hub .hub-pages{
  position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0;
  font-family:'Samaritan',serif; font-size:var(--pf,24px); line-height:1.95;
  letter-spacing:.14em; color:var(--gold); opacity:.085; direction:rtl;
  user-select:none; -webkit-user-select:none;
}
#hub .hub-pages .row{ white-space:nowrap; overflow:hidden; height:1.95em; }
#hub::after{                       /* vignette */
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:radial-gradient(130% 95% at 50% 38%, transparent 52%, rgba(4,8,26,.78) 100%);
}
#hub > *{ position:relative; z-index:1; }
#hub > .hub-pages{ position:fixed; z-index:0; }

/* heading: the name in spaced gold, then today's date beneath it */
.hub-title{
  margin:clamp(34px,6vh,50px) 0 0; text-align:center;
  font-family:'Frank Ruhl Libre',serif; font-weight:500;
  font-size:clamp(22px,4.6vw,38px); letter-spacing:.62em; padding-inline-start:.62em;
  color:var(--gold); text-shadow:0 2px 24px rgba(0,0,0,.5);
}
.hub-title::before, .hub-title::after{
  content:""; display:inline-block; vertical-align:middle;
  width:clamp(22px,7vw,64px); height:1px; margin:0 .7em;
  background:linear-gradient(90deg,transparent,var(--gold)); opacity:.7;
}
.hub-title::after{ transform:scaleX(-1); }
.hub-date{
  margin:8px 14px 0; text-align:center; max-width:96vw; line-height:1.5;
  font-family:inherit; font-weight:300; font-size:clamp(13px,2.4vw,17px);
  letter-spacing:.06em; color:rgba(236,205,132,.92); min-height:1.5em;   /* the gold dimmed by its own alpha, so the white values can be pure white */
  flex:0 0 auto;                      /* never squeezed: the dial is what gives way */
}
.hub-hl{ color:#fff; font-weight:500; }   /* the figures picked out in white: day, month, year, times */
#hub[lang=ar] .hub-date, #hub[lang=ar] .hub-hint, #hub[lang=ar] .hub-pop .hub-tag, #hub[lang=ar] .hub-copy{ letter-spacing:0; }
.hub-date #hubDateHe:not(:empty){ font-size:.8em; opacity:.75; margin-top:2px; font-family:'Heebo',sans-serif; letter-spacing:.04em; }
/* the year in the other reckonings */
.hub-date #hubYears:not(:empty){
  display:flex; justify-content:center; flex-wrap:wrap; column-gap:clamp(8px,1.8vw,18px);
  font-size:.8em; letter-spacing:.02em; line-height:1.45; color:rgba(236,205,132,.78); margin-top:1px;
}
#hubYears span + span{ position:relative; }
#hubYears span + span::before{ content:"·"; position:absolute; inset-inline-start:calc(clamp(8px,1.8vw,18px) / -2 - .15em); }
/* the next occasion and the week's reading, directly under the date */
.hub-date #hubNext:not(:empty){
  display:flex; justify-content:center; align-items:center; width:min(94vw, 760px); margin:3px auto 0;
  font-size:.88em; font-weight:400; color:var(--parchment); line-height:1.4; letter-spacing:.02em; opacity:.92;
}
.hub-next-cell{ flex:0 1 auto; min-width:0; padding:0 clamp(8px,1.6vw,18px); }
.hub-next-cell + .hub-next-cell{ border-inline-start:1px solid rgba(200,164,86,.55); }   /* the two, side by side */
@media (max-width:480px){                 /* a narrow phone: smaller, so the two stay side by side in two lines */
  .hub-date #hubNext:not(:empty){ font-size:.8em; line-height:1.32; letter-spacing:0; }
  .hub-next-cell{ padding:0 6px; }
  #hubDateMain{ letter-spacing:0; font-size:min(1em, 3.35vw); }   /* the date, with the kind of year, on one line */
}
#hubNext bdi{ color:var(--gold-bright); font-weight:700; }

/* the dial */
.hub-stage{ position:relative; width:var(--D); flex:0 0 auto; margin-top:clamp(36px,5.6vh,58px); }
.hub-dial{
  position:relative; width:var(--D); height:var(--D);
  touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab;
}
.hub-dial.dragging{ cursor:grabbing; }
/* the track the circles ride on */
.hub-dial::before{
  content:""; position:absolute; left:50%; top:50%;
  width:calc(var(--D) * .77); height:calc(var(--D) * .77); transform:translate(-50%,-50%);
  border-radius:50%; border:1px solid rgba(200,164,86,.26);
  box-shadow:0 0 0 calc(var(--D) * .05) rgba(200,164,86,.03);
  pointer-events:none;
}
/* a small notch at the top: the position the dial reads from */
.hub-dial::after{
  content:""; position:absolute; left:50%; top:calc(var(--D) * -.066); z-index:8; width:0; height:0;
  transform:translateX(-50%); border-left:7px solid transparent; border-right:7px solid transparent;
  border-top:10px solid var(--gold-bright, #eccd84); opacity:1; pointer-events:none;
}

/* every circle */
.hub-c{
  position:absolute; left:50%; top:50%; border-radius:50%; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.2em;
  text-align:center; color:var(--parchment); font-family:'Frank Ruhl Libre',serif; font-weight:700;
  background:radial-gradient(circle at 34% 28%, #2a56a0 0%, var(--lapis) 46%, #0c2147 100%);
  border:2px solid var(--gold);
  box-shadow:0 10px 28px rgba(0,0,0,.5), inset 0 0 0 4px rgba(10,23,51,.55), inset 0 0 22px rgba(200,164,86,.16);
  -webkit-tap-highlight-color:transparent; padding:0;
  transition:box-shadow .35s ease, border-color .35s ease, filter .35s ease;
}
#hub[lang=ar] .hub-c{ font-family:'Arabic','Frank Ruhl Libre',serif; }
.hub-c:focus-visible{ outline:2px solid var(--gold-bright); outline-offset:4px; }
.hub-c .hub-ico{ width:30%; height:30%; color:var(--gold-bright); flex:0 0 auto; }
.hub-c .hub-name{ font-size:calc(var(--D) * .032); line-height:1.12; padding:0 6%; }

/* the middle one: the Torah */
.hub-center{
  width:calc(var(--D) * .38); height:calc(var(--D) * .38);
  margin:calc(var(--D) * -.19) 0 0 calc(var(--D) * -.19);
  background:radial-gradient(circle at 36% 26%, #31609f 0%, #1a438a 40%, #0b1f45 100%);
  border-width:3px; border-color:var(--gold-bright); gap:.15em;
  box-shadow:0 14px 40px rgba(0,0,0,.55), 0 0 0 calc(var(--D) * .012) rgba(200,164,86,.22),
             inset 0 0 0 5px rgba(10,23,51,.5), inset 0 0 40px rgba(236,205,132,.2);
}
.hub-center img{ width:auto; height:34%; filter:drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.hub-center .hub-name{ font-size:calc(var(--D) * .036); line-height:1.08; color:var(--gold-bright); padding:0 13%; }
.hub-center:hover{ filter:brightness(1.12); }

/* the ring: each satellite sits at --a degrees from the top, kept upright.
   Set out a little further from the middle. */
.hub-sat{
  width:calc(var(--D) * var(--S)); height:calc(var(--D) * var(--S));
  margin:calc(var(--D) * var(--S) / -2) 0 0 calc(var(--D) * var(--S) / -2);
  transform:rotate(var(--a)) translateY(calc(var(--D) * var(--R) * -1)) rotate(calc(var(--a) * -1));
  transition:transform .55s cubic-bezier(.22,.8,.26,1), box-shadow .35s ease, border-color .35s ease, filter .35s ease;
}
.hub-dial.dragging .hub-sat{ transition:box-shadow .35s ease, border-color .35s ease; }
.hub-sat{ filter:brightness(calc(.82 + var(--g, 0) * .5)) saturate(calc(.9 + var(--g, 0) * .3)); }   /* the one at the pointer is the brightest */
.hub-sat.top{
  border-color:var(--gold-bright);
  box-shadow:0 12px 34px rgba(0,0,0,.55), 0 0 0 4px rgba(236,205,132,.18),
             0 0 44px rgba(236,205,132,.6), inset 0 0 0 4px rgba(10,23,51,.5), inset 0 0 30px rgba(236,205,132,.34);
}
.hub-sat:hover{ filter:brightness(1.12); }

/* ── the circle whose app is not open yet ──────────────────────────────────────
   It breathes: it lights up well beyond the others and dims again, at a middling
   pace, so the eye is drawn to it and told there is something coming. The glow
   is animated on the box-shadow and on a halo of its own, never on `filter` —
   that one is already spoken for by --g, which brightens whichever circle stands
   at the pointer, and an animation there would take that away from this one. */
.hub-sat.soon{
  animation:hubSoonBreathe 2.2s ease-in-out infinite;
  z-index:2;                               /* its halo lies over its neighbours, not under them */
}
.hub-sat.soon::after{
  content:''; position:absolute; inset:-9%; border-radius:50%; pointer-events:none;
  border:1px solid rgba(236,205,132,.75);
  animation:hubSoonHalo 2.2s ease-in-out infinite;
}
.hub-sat.soon .hub-soon{ animation:hubSoonCaption 2.2s ease-in-out infinite; }
@keyframes hubSoonBreathe{
  0%, 100%{ border-color:var(--gold);
            box-shadow:0 10px 28px rgba(0,0,0,.5), 0 0 16px rgba(236,205,132,.22),
                       inset 0 0 0 4px rgba(10,23,51,.55), inset 0 0 22px rgba(200,164,86,.16); }
  50%     { border-color:#fbe6b4;
            box-shadow:0 12px 34px rgba(0,0,0,.55), 0 0 0 5px rgba(236,205,132,.3),
                       0 0 60px 10px rgba(236,205,132,.85),
                       inset 0 0 0 4px rgba(10,23,51,.4), inset 0 0 38px rgba(236,205,132,.6); }
}
@keyframes hubSoonHalo{
  0%, 100%{ opacity:0; transform:scale(.97); }
  50%     { opacity:.9; transform:scale(1.07); }
}
@keyframes hubSoonCaption{ 0%, 100%{ opacity:.7; } 50%{ opacity:1; } }
.hub-hint{
  margin:14px 12px 0; text-align:center; font-weight:300; font-size:13px; letter-spacing:.14em;
  color:var(--gold); opacity:.7;
}

/* the pop-up: what the app on top gives, and how it is made */
.hub-pop{
  position:absolute; width:min(310px, 86vw); box-sizing:border-box; padding:14px 16px 14px;
  border:1px solid rgba(200,164,86,.55); border-radius:14px;
  background:linear-gradient(180deg, rgba(23,58,114,.92), rgba(10,23,51,.94));
  box-shadow:0 14px 40px rgba(0,0,0,.55); color:var(--parchment);
  opacity:1; transition:opacity .28s ease, transform .28s ease;
}
.hub-pop:empty{ display:none; }
.hub-pop.swap{ opacity:0; transform:translateY(6px); }
.hub-pop h2{ margin:0 0 2px; font-family:'Frank Ruhl Libre',serif; font-weight:700; font-size:19px; color:var(--gold-bright); }
#hub[lang=ar] .hub-pop h2{ font-family:'Arabic','Frank Ruhl Libre',serif; }
.hub-pop .hub-tag{ margin:0 0 8px; font-size:13px; color:var(--gold); font-weight:300; letter-spacing:.04em; }
.hub-pop ul{ margin:0 0 10px; padding:0; padding-inline-start:18px; font-size:14px; line-height:1.55; }
.hub-pop li{ margin:2px 0; }
.hub-pop li::marker{ color:var(--gold); }
.hub-pop .hub-go{
  display:inline-block; border:1px solid var(--gold); background:rgba(200,164,86,.14); color:var(--gold-bright);
  border-radius:20px; padding:6px 18px; font:inherit; font-weight:700; font-size:14px; cursor:pointer;
}
.hub-pop .hub-go:hover{ background:rgba(200,164,86,.28); }

/* wide screens: at the right of the dial, joined to the top circle by a hairline */
@media (min-width:1100px){
  #hub{ --D:min(92vw, calc(100dvh - 278px), 620px); }
  .hub-pop{ left:calc(100% + 26px); top:0; }
  .hub-pop::before{
    content:""; position:absolute; right:100%; top:calc(var(--D) * (.5 - var(--R))); height:1px;
    width:calc(26px + var(--D) * (.5 - var(--S) / 2)); background:linear-gradient(270deg, var(--gold), rgba(200,164,86,.15));
  }
}
/* narrow screens: a card under the dial, with a pointer up to it */
@media (max-width:1099px){
  .hub-pop{ position:relative; margin:22px auto 0; width:min(420px, 92vw); }
  .hub-pop::before{
    content:""; position:absolute; left:50%; top:-8px; width:14px; height:14px;
    transform:translateX(-50%) rotate(45deg); background:rgb(23,58,114);
    border-top:1px solid rgba(200,164,86,.55); border-left:1px solid rgba(200,164,86,.55);
  }
  .hub-stage{ display:flex; flex-direction:column; align-items:center; width:100%; }
  .hub-dial{ flex:0 0 auto; }
}

/* the foot of the page: the site's address, then the rights line */
.hub-foot{ margin:auto 12px 0; padding-top:16px; text-align:center; }
.hub-site{
  display:inline-block; direction:ltr; font-family:'Heebo',sans-serif; font-weight:400;
  font-size:14px; letter-spacing:.1em; color:var(--gold-bright); text-decoration:none;
  border-bottom:1px solid rgba(236,205,132,.4); padding-bottom:1px;
}
.hub-site:hover{ color:#fff; border-bottom-color:#fff; }
.hub-copy{ margin-top:8px; font-weight:300; font-size:11px; letter-spacing:.05em; color:var(--gold); opacity:.6; }

/* the language switch, at the right */
#hub > .hub-lang{
  position:fixed; top:max(10px, env(safe-area-inset-top)); right:max(10px, env(safe-area-inset-right));
  z-index:3; display:flex; gap:5px; direction:ltr;
}
.hub-lang button{
  min-width:28px; height:28px; padding:0 6px; border-radius:14px; cursor:pointer;
  border:1px solid rgba(200,164,86,.6); background:rgba(10,23,51,.55); color:var(--gold-bright);
  font:inherit; font-size:12px; font-weight:700; line-height:1;
}
.hub-lang button:hover{ background:rgba(200,164,86,.22); }
.hub-lang button.on{ background:var(--gold); color:#0a1733; border-color:var(--gold-bright); }

/* "keep this language?" in the hub's own colours */
#hub > .hub-confirm{
  position:fixed; inset:0; z-index:6; display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,26,.62); padding:16px;
}
.hub-confirm-box{
  width:min(340px,100%); box-sizing:border-box; padding:18px 18px 16px; text-align:center;
  border:1px solid rgba(200,164,86,.6); border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.6);
  background:linear-gradient(180deg, #1c4690, #0c2147);
}
.hub-confirm-box h3{ margin:0 0 6px; font-family:'Frank Ruhl Libre',serif; font-size:18px; color:var(--gold-bright); }
.hub-confirm-box p{ margin:0 0 14px; font-size:14px; line-height:1.5; }
.hub-confirm-box button{
  display:block; width:100%; margin-top:8px; padding:9px 12px; border-radius:20px; cursor:pointer;
  font:inherit; font-weight:700; font-size:14px;
}
.hub-confirm-box .hub-yes{ border:1px solid var(--gold-bright); background:var(--gold); color:#0a1733; }
.hub-confirm-box .hub-no{ border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright); }

@media (prefers-reduced-motion:reduce){
  .hub-sat, .hub-pop{ transition:none; }
  .hub-star svg{ animation:none; }
  /* a reader who asked for stillness is given the bright state, held — the
     circle still stands out, it simply does not breathe */
  .hub-sat.soon, .hub-sat.soon::after, .hub-sat.soon .hub-soon{ animation:none; }
  .hub-sat.soon{ border-color:#fbe6b4;
    box-shadow:0 12px 34px rgba(0,0,0,.55), 0 0 0 5px rgba(236,205,132,.3),
               0 0 48px 8px rgba(236,205,132,.6),
               inset 0 0 0 4px rgba(10,23,51,.4), inset 0 0 34px rgba(236,205,132,.5); }
  .hub-sat.soon::after{ opacity:.8; }
}

/* ── how a unit's own bar answers to the hub ───────────────────────────────────
   X always goes back to the main menu. The "↩ התורה" link is kept only for a unit
   that was reached from the Torah's own hamburger menu. */
body.from-hub .rd-totorah, body.from-hub .unit-totorah{ display:none !important; }
.hub-x{
  flex:0 0 auto; width:34px; height:34px; border-radius:9px; cursor:pointer; line-height:1;
  font-family:inherit; font-size:21px; padding:0;
  border:1px solid var(--navy); background:#fff; color:var(--navy);
}
.hub-x:hover{ background:var(--navy); color:#fff; }
/* it carries an arrow now, not an ✕ — the way back to wherever the reader came
   from — and an arrow glyph sits high in its line box, so it is centred by hand */
.hub-x, #hdr .torah-x, .unit-wrap > .unit-x{
  display:flex; align-items:center; justify-content:center;
}
/* in the app's own dark unit bar the X is the white one it has always been (.unit-x) */
.unit-bar .hub-x{ border:1px solid rgba(255,255,255,.38); background:rgba(255,255,255,.14); color:#fff; width:38px; height:38px; }
.unit-totorah{
  flex:0 0 auto; border:1px solid rgba(255,255,255,.38); background:rgba(255,255,255,.14); color:#fff;
  border-radius:9px; padding:7px 12px; font-family:inherit; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap;
}
.unit-totorah:hover{ background:rgba(255,255,255,.28); }
/* the title in a unit bar was centred with room for ONE button; give it the room for two */
.unit-bar .unit-bar-title{ padding-inline-end:0; }

/* the dictionary entered straight from the main menu was never on the library's shelf:
   it has no shelf to go back to */
#dictModal[data-direct] .rd-tolib{ display:none !important; }

/* version beside the language switch */
.hub-ver{ align-self:center; margin-inline-end:4px; font-family:'Heebo',sans-serif; font-size:11px; font-weight:400;
  letter-spacing:.04em; color:var(--gold); opacity:.85; white-space:nowrap; direction:ltr; }
/* the language buttons, with today's date under them */
#hub > .hub-lang > .hub-ver{ align-self:flex-start; line-height:28px; }
.hub-vd{ display:flex; flex-direction:column; align-items:center; gap:3px; }
.hub-lbtns{ display:flex; gap:5px; }
/* sunrise and sunset under the civil date, at the right. They hang below the buttons
   and take no width of the row, which on a phone has none to give */
.hub-vd .hub-today{ position:absolute; top:31px; right:0; margin:0; }
.hub-vd .hub-sun{ position:absolute; top:47px; right:0; margin:0; display:flex; gap:8px; }
.hub-vd .hub-sun[dir=rtl]{ direction:rtl; }
.hub-vd .hub-sun{ opacity:1; color:rgba(200,164,86,.85); }   /* the letter in gold, the time in pure white */

/* the left side: hamburger, and under it a blinking gold star for what is new */
#hub > .hub-side{
  position:fixed; top:max(10px, env(safe-area-inset-top)); left:max(10px, env(safe-area-inset-left));
  z-index:3; display:flex; flex-direction:row; align-items:flex-start; gap:8px; direction:ltr;
}
.hub-menu{
  width:28px; height:28px; border-radius:50%; cursor:pointer; padding:0; display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(200,164,86,.6); background:rgba(10,23,51,.55); color:var(--gold-bright);
}
.hub-menu svg{ width:15px; height:15px; }
.hub-menu:hover{ background:rgba(200,164,86,.22); }
.hub-star{
  min-width:38px; padding:0; cursor:pointer; background:none; border:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:1px;
  -webkit-tap-highlight-color:transparent;
}
.hub-star-cap{ font-family:'Heebo',sans-serif; font-size:9px; font-weight:400; letter-spacing:.03em; line-height:1.1;
  color:var(--gold-bright); opacity:.9; white-space:nowrap; direction:rtl; }
#hub[lang=ar] .hub-star-cap{ font-family:'Arabic','Heebo',sans-serif; }
.hub-star svg{ width:21px; height:21px; fill:var(--gold-bright); stroke:var(--gold); stroke-width:.8; stroke-linejoin:round;
  filter:drop-shadow(0 0 5px rgba(236,205,132,.85)); animation:hubTwinkle 1.7s ease-in-out infinite; }
.hub-star:hover svg{ fill:#fff3c8; }
.hub-star.seen svg{ animation:none; }                    /* looked at: it stops blinking */
/* the download button beside it: the same gold, a still picture */
.hub-dl svg{ width:21px; height:21px; fill:none; stroke:var(--gold-bright); stroke-width:2.2; animation:none; filter:drop-shadow(0 0 4px rgba(236,205,132,.45)); }
.hub-dl:hover svg{ fill:none; stroke:#fff3c8; }
@keyframes hubTwinkle{
  0%,100%{ opacity:1; transform:scale(1) rotate(0deg); }
  50%{ opacity:.3; transform:scale(.82) rotate(8deg); }
}

/* what is new: the newest version and two before it, scrolling */
#hub > .hub-news{
  position:fixed; inset:0; z-index:6; display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,26,.62); padding:16px;
}
.hub-news-box{
  width:min(520px,100%); max-height:min(80vh, 640px); box-sizing:border-box; display:flex; flex-direction:column;
  border:1px solid rgba(200,164,86,.6); border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.6);
  background:linear-gradient(180deg, #1c4690, #0c2147); color:var(--parchment); overflow:hidden;
}
.hub-news-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px;
  border-bottom:1px solid rgba(200,164,86,.35); }
.hub-news-head h2{ margin:0; font-family:'Frank Ruhl Libre',serif; font-size:19px; color:var(--gold-bright); }
.hub-news-x{ width:34px; height:34px; border-radius:50%; cursor:pointer; line-height:1; font-size:22px; padding:0;
  border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright); }
.hub-news-x:hover{ background:rgba(200,164,86,.22); }
.hub-news-body{ overflow-y:auto; -webkit-overflow-scrolling:touch; padding:6px 16px 14px; font-size:14.5px; line-height:1.6; }
.hub-news-page{ padding:10px 0; }
.hub-news-page + .hub-news-page{ border-top:1px dashed rgba(200,164,86,.35); }
.hub-news-page p{ margin:.2em 0 .4em; }
.hub-news-page p b:first-child{ color:var(--gold-bright); font-size:1.05em; }
.hub-news-page ul{ margin:0 0 .4em; padding:0; padding-inline-start:20px; }
.hub-news-page li{ margin:.25em 0; }
.hub-news-page li::marker{ color:var(--gold); }

/* while the main menu is up the app's own dialogs and its drawer rise above it: the
   hamburger there is the very same menu, and what it opens must be seen. The drawer
   comes in from the left here, where its button is. */
body.hub-open .modal{ z-index:3700; }
body.hub-open .menu-overlay{ z-index:3600; }
body.hub-open .menu-drawer{ z-index:3601; right:auto; left:0; box-shadow:4px 0 20px rgba(0,0,0,.35); animation-name:drawerInL; }
@keyframes drawerInL{ from{ transform:translateX(-100%); } to{ transform:translateX(0); } }

/* on a phone the title sits a little lower, clear of the corner buttons */
@media (max-width:480px){
  .hub-title{ margin-top:42px; }
}

/* the Torah's own close: in its navy header, like the X of every other app, back to the main menu */
#hdr .torah-x{
  flex:0 0 auto; width:30px; height:30px; border-radius:9px; cursor:pointer; padding:0; line-height:1;
  font-family:inherit; font-size:20px; color:#fff;
  border:1px solid rgba(255,255,255,.38); background:rgba(255,255,255,.14);
}
#hdr .torah-x:hover{ background:rgba(255,255,255,.28); }
/* "exit to the main menu" in the hamburger: pointless while the main menu is itself showing */
body.hub-open .menu-item[data-act="hub"]{ display:none; }

/* the Torah in the middle is a dome standing out of the page: a gloss high on one side, light on the
   near edge and shade on the far one, and a shadow cast beneath. When its stop comes round it swells
   from the middle to fill the whole dial, and goes back again as the dial turns on. */
.hub-center{
  overflow:hidden; z-index:2;
  background:
    radial-gradient(ellipse 58% 40% at 38% 19%, rgba(255,255,255,.55) 0, rgba(255,255,255,.16) 58%, transparent 100%),
    radial-gradient(circle at 40% 34%, #5d94db 0, #2f63b3 32%, #16427f 60%, #0a2250 82%, #061638 100%);
  border-width:3px; border-color:#f3d98e;
  box-shadow:
    0 calc(var(--D) * .035) calc(var(--D) * .07) rgba(0,0,0,.62),
    0 0 calc(var(--D) * .05) rgba(255,226,140,.32),
    inset calc(var(--D) * -.03) calc(var(--D) * -.04) calc(var(--D) * .07) rgba(0,8,30,.72),
    inset calc(var(--D) * .02) calc(var(--D) * .025) calc(var(--D) * .05) rgba(150,190,255,.42);
  transform:scale(calc(1 + var(--e, 0) * 1.03));          /* 1 → out to the middle of the circles round it (.77 / .38), covering only half of each */
  transition:transform .55s cubic-bezier(.22,.8,.26,1), filter .35s ease;
}
.hub-dial.dragging .hub-center{ transition:filter .35s ease; }
.hub-center > *{ position:relative; z-index:2; }
.hub-center img{ transform:scaleX(1.28); }                  /* the scroll, drawn wider */
.hub-sat{ opacity:calc(1 - var(--e, 0) * .3); transition:transform .55s cubic-bezier(.22,.8,.26,1), box-shadow .35s ease, border-color .35s ease, filter .35s ease, opacity .55s ease; }
.hub-dial.dragging .hub-sat{ transition:box-shadow .35s ease, border-color .35s ease; }
/* the glint: a four-pointed flash, thin and white, at whatever point the script gives it (--gx, --gy) */
.hub-center::before{
  content:""; position:absolute; left:var(--gx, 30%); top:var(--gy, 25%); width:30%; height:30%; pointer-events:none; z-index:3;
  transform:translate(-50%,-50%) scale(.1); opacity:0;
  background:
    radial-gradient(circle, #fff 0, rgba(255,255,255,.9) 6%, rgba(255,244,200,.35) 16%, transparent 34%),
    linear-gradient(90deg, transparent 0, rgba(255,255,255,.95) 50%, transparent 100%) center / 100% 2px no-repeat,
    linear-gradient(0deg, transparent 0, rgba(255,255,255,.95) 50%, transparent 100%) center / 2px 100% no-repeat;
}
.hub-center.glint::before{ animation:hubGlint 1.5s ease-out 1 both; }
@keyframes hubGlint{
  0%{ opacity:0; transform:translate(-50%,-50%) scale(.1) rotate(0deg); }
  30%{ opacity:1; transform:translate(-50%,-50%) scale(1) rotate(14deg); }
  62%{ opacity:.85; transform:translate(-50%,-50%) scale(.7) rotate(28deg); }
  100%{ opacity:0; transform:translate(-50%,-50%) scale(.2) rotate(44deg); }
}
@media (prefers-reduced-motion:reduce){
  .hub-center.glint::before{ animation-name:hubGlintSoft; transform:translate(-50%,-50%) scale(1); }
}
@keyframes hubGlintSoft{ 0%{ opacity:0; } 35%{ opacity:1; } 100%{ opacity:0; } }

/* the dictionary is an app of its own: it takes the whole window, with no Torah showing behind it */
#dictModal{ align-items:stretch; justify-content:stretch; padding:0; background:#fff; }
#dictModal .modal-box.dict-app{ max-width:none; width:100%; height:100%; max-height:100%; border-radius:0; padding:14px; box-sizing:border-box; }

/* in English the name is set in capitals, so it takes less letter-spacing to fit */
#hub[lang=en] .hub-title{ letter-spacing:.34em; padding-inline-start:.34em; font-size:clamp(20px,4vw,32px); }

/* the card: its text, and under it "enter" with the screenshots button beside it */
.hub-pop{ width:min(370px, 90vw); }
.hub-pop-txt{ min-width:0; }
.hub-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.hub-shotbtn{
  display:inline-flex; align-items:center; gap:6px; border:1px solid rgba(200,164,86,.55); background:transparent; color:var(--gold-bright);
  border-radius:20px; padding:6px 13px; font:inherit; font-weight:600; font-size:13px; cursor:pointer;
}
.hub-shotbtn:hover{ background:rgba(200,164,86,.2); }
@media (max-width:1099px){ .hub-pop{ width:min(430px, 92vw); } }

/* the window of screenshots: it opens out of the button and scrolls sideways */
#hub > .hub-shots{
  position:fixed; inset:0; z-index:7; display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,26,.72); padding:14px; animation:hubFadeIn .25s ease both;
}
.hub-shots.closing{ animation:hubFadeOut .26s ease both; }
.hub-shots-box{
  width:min(560px,100%); max-height:94vh; box-sizing:border-box; display:flex; flex-direction:column;
  border:1px solid rgba(200,164,86,.6); border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.65);
  background:linear-gradient(180deg, #1c4690, #0c2147); color:var(--parchment); overflow:hidden;
  animation:hubShotsIn .42s cubic-bezier(.2,.9,.25,1) both;
}
.hub-shots.closing .hub-shots-box{ animation:hubShotsOut .26s ease-in both; }
.hub-shots-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-bottom:1px solid rgba(200,164,86,.35); }
.hub-shots-head h2{ margin:0; font-family:'Frank Ruhl Libre',serif; font-size:18px; color:var(--gold-bright); }
.hub-cf{
  position:relative; height:min(66vh, 600px); overflow:hidden; outline:none; touch-action:pan-y; cursor:grab;
  user-select:none; -webkit-user-select:none; margin:6px 0 2px;
}
.hub-cf.drag{ cursor:grabbing; }
.hub-cf-item{
  position:absolute; left:50%; top:50%; display:block; max-width:none; border-radius:12px; border:1px solid rgba(200,164,86,.55);
  background:#fff; box-shadow:0 10px 28px rgba(0,0,0,.55); will-change:transform, opacity, filter;
  transition:transform .5s cubic-bezier(.22,.8,.26,1), opacity .5s ease, filter .5s ease;
}
.hub-cf.drag .hub-cf-item{ transition:none; }
.hub-cf-item:not(.front){ cursor:pointer; }
.hub-cf-nav{
  position:absolute; top:50%; z-index:20; width:34px; height:34px; margin-top:-17px; border-radius:50%; padding:0; line-height:1;
  border:1px solid rgba(200,164,86,.7); background:rgba(10,23,51,.7); color:var(--gold-bright); font-size:22px; cursor:pointer;
}
.hub-cf-nav:hover{ background:rgba(200,164,86,.3); }
.hub-cf-prev{ left:8px; } .hub-cf-next{ right:8px; }
.hub-shots-dots{ display:flex; justify-content:center; gap:7px; padding:0 0 12px; }
.hub-shots-dots i{ width:8px; height:8px; border-radius:50%; background:rgba(200,164,86,.35); transition:background .2s, transform .2s; }
.hub-shots-dots i.on{ background:var(--gold-bright); transform:scale(1.25); }
@keyframes hubShotsIn{ from{ opacity:0; transform:scale(.12); } to{ opacity:1; transform:scale(1); } }
@keyframes hubShotsOut{ from{ opacity:1; transform:scale(1); } to{ opacity:0; transform:scale(.12); } }
@keyframes hubFadeIn{ from{ opacity:0; } to{ opacity:1; } }
@keyframes hubFadeOut{ from{ opacity:1; } to{ opacity:0; } }
@media (prefers-reduced-motion:reduce){
  .hub-shots-box, .hub-shots.closing .hub-shots-box{ animation:none; }
  .hub-cf-item{ transition-duration:.01ms; }
}

/* the way in: the circles come out of the middle, all together, and the ring turns half a round;
   --k is how far out they are (0 = in the Torah, 1 = in place), driven by the script */
.hub-sat{ transform:rotate(var(--a)) translateY(calc(var(--D) * var(--R) * -1 * var(--k, 1))) rotate(calc(var(--a) * -1)) scale(calc(1 + var(--g, 0) * .26));
  opacity:calc((1 - var(--e, 0) * .3) * min(1, var(--k, 1) * 3)); }
.hub-sat.top{ z-index:1; }
.hub-dial.intro{ pointer-events:none; }
.hub-dial.intro .hub-sat{ transition:none; }
#hub.hub-intro .hub-pop{ opacity:0; }

/* the names are sized by the script to fit inside the round edge; these are only the starting sizes */
.hub-c .hub-name{ padding:0 4%; max-width:100%; box-sizing:border-box; }
.hub-center .hub-name{ padding:0 8%; }

/* the dotted lines of the way in: from the Torah's rim to each circle as it comes out, then they fade */
.hub-dial{ isolation:isolate; }
.hub-spoke{
  position:absolute; left:50%; top:50%; width:0; z-index:-1; pointer-events:none; transform-origin:0 0;
  height:calc(max(0px, (var(--k, 1) * var(--R) - .19) * var(--D)));
  border-left:3px dotted rgba(236,205,132,.9);
  transform:rotate(calc(var(--a) + 180deg)) translateY(calc(var(--D) * .19));
  transition:opacity .6s ease;
}
.hub-spoke.gone{ opacity:0; }

/* the card's type scales with --pz, which the script sets so the whole card is seen at once */
.hub-pop{ font-size:calc(14px * var(--pz, 1)); }
.hub-pop h2{ font-size:1.36em; }
.hub-pop .hub-tag{ font-size:.93em; }
.hub-pop ul{ font-size:1em; }
.hub-pop .hub-go{ font-size:1em; }
.hub-shotbtn{ font-size:.93em; }

/* the little blinking star of what is new, at the upper left of a circle. It sits on the rim and
   outside it, clear of the picture and the name inside, so it hides none of them. */
.hub-nb{
  position:absolute; left:-12%; top:-12%; width:32%; height:32%; min-width:22px; min-height:22px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:5;
  -webkit-tap-highlight-color:transparent; outline:none;
}
.hub-nb svg{
  position:absolute; inset:0; width:100%; height:100%; fill:var(--gold-bright); stroke:var(--gold); stroke-width:.7; stroke-linejoin:round;
  filter:drop-shadow(0 0 4px rgba(236,205,132,.9)); animation:hubNb 1.5s ease-in-out infinite;
}
.hub-nb b{
  position:relative; font-family:'Heebo',sans-serif; font-weight:800; font-size:max(10px, calc(var(--D) * .03)); line-height:1;
  color:#0a1733; margin-top:6%;
}
.hub-nb:hover svg, .hub-nb:focus-visible svg{ fill:#fff3c8; }
@keyframes hubNb{
  0%,100%{ transform:scale(1); filter:drop-shadow(0 0 3px rgba(236,205,132,.8)); opacity:1; }
  50%{ transform:scale(.86); filter:drop-shadow(0 0 9px rgba(255,236,170,1)); opacity:.78; }
}
/* the week's reading: a greenish star ON the rim of the Torah's circle, at its right and halfway up,
   carrying the words "פרשת השבוע" and leading to פירוש הפרשה. It is a neighbour of the circle in the
   dial, not its child (the circle clips what is outside it), and is pushed out by the circle's own
   radius — .19 of the dial, times the swell — so it stays on the rim when the Torah's turn comes. On
   the physical right in every language. It breathes slowly, in brightness and not in opacity, so the
   words on it are as readable at the bottom of the breath as at the top. */
.hub-wk{
  position:absolute; left:50%; top:50%; z-index:6;
  width:calc(var(--D) * .168); height:calc(var(--D) * .168); min-width:62px; min-height:62px;
  transform:translate(calc(var(--D) * .19 * (1 + var(--e, 0) * 1.03) - 50%), -50%);
  transition:transform .55s cubic-bezier(.22,.8,.26,1);
  display:flex; align-items:center; justify-content:center; cursor:pointer; outline:none;
  opacity:var(--k, 1); -webkit-tap-highlight-color:transparent;
}
.hub-dial.dragging .hub-wk{ transition:none; }
.hub-wk svg{
  position:absolute; inset:0; width:100%; height:100%; fill:#93e8aa; stroke:#1f7a45; stroke-width:.55;
  stroke-linejoin:round; animation:hubWk 4.2s ease-in-out infinite;
}
.hub-wk b{
  position:relative; margin-top:5%; white-space:pre-line; text-align:center; pointer-events:none;
  font-family:'Heebo',sans-serif; font-weight:800; font-size:max(9px, calc(var(--D) * .0205)); line-height:1.04;
  letter-spacing:0; color:#08351b;
}
#hub[lang=ar] .hub-wk b{ font-family:'Arabic','Heebo',sans-serif; font-size:max(9.5px, calc(var(--D) * .022)); }
#hub[lang=en] .hub-wk b{ font-size:max(8.5px, calc(var(--D) * .0185)); }
.hub-wk:hover svg, .hub-wk:focus-visible svg{ fill:#cdf8d8; }
.hub-wk:focus-visible{ outline:2px solid #cdf8d8; outline-offset:2px; border-radius:50%; }
@keyframes hubWk{
  0%,100%{ filter:brightness(1.06) drop-shadow(0 0 7px rgba(160,245,185,.95)); }
  50%{ filter:brightness(.8) drop-shadow(0 0 1px rgba(143,230,166,.35)); }
}
/* (a breath of light, with nothing moving: it is kept under "reduce motion" too, as the gold stars are) */
.hub-news-date{ margin:0 0 .3em !important; font-size:.82em; color:var(--gold); opacity:.85; }
.hub-news-txt{ margin:0 0 .4em !important; }

/* the main menu's own hamburger: a drawer from the left with ten entries */
#hub > .hub-drawer-wrap{ position:fixed; inset:0; z-index:8; pointer-events:none; }
.hub-drawer-wrap.open{ pointer-events:auto; }
.hub-drawer-ov{ position:absolute; inset:0; background:rgba(4,8,26,.58); opacity:0; transition:opacity .25s ease; }
.hub-drawer-wrap.open .hub-drawer-ov{ opacity:1; }
.hub-drawer{
  position:absolute; top:0; bottom:0; left:0; width:min(330px, 86%); overflow-y:auto; -webkit-overflow-scrolling:touch;
  background:linear-gradient(180deg, #17407f, #0a1733); border-right:1px solid rgba(200,164,86,.55);
  box-shadow:6px 0 26px rgba(0,0,0,.55); transform:translateX(-104%); transition:transform .28s cubic-bezier(.22,.8,.26,1);
  padding-bottom:env(safe-area-inset-bottom); direction:inherit;
}
.hub-drawer-wrap.open .hub-drawer{ transform:none; }
.hub-drawer-head{
  padding:16px 18px; font-family:'Frank Ruhl Libre',serif; font-weight:700; font-size:20px; color:var(--gold-bright);
  border-bottom:1px solid rgba(200,164,86,.4); letter-spacing:.04em;
}
.hub-di{
  display:flex; align-items:center; gap:13px; width:100%; padding:13px 18px; background:none; border:0;
  border-bottom:1px solid rgba(200,164,86,.13); color:var(--parchment); font:inherit; font-size:16px; text-align:start; cursor:pointer;
}
.hub-di:hover, .hub-di:focus-visible{ background:rgba(200,164,86,.16); outline:none; }
.hub-di svg{ width:22px; height:22px; flex:0 0 auto; color:var(--gold-bright); }
.hub-confirm-box .hub-yes.cur{ background:var(--gold-bright); }
@media (prefers-reduced-motion:reduce){ .hub-drawer, .hub-drawer-ov{ transition:none; } }

/* the framed sites are scaled for a larger accessibility type by hub.js (fitForeign), in pixels.
   One that carries the way back in its own header (it says so when it loads) needs no arrow over it. */
.unit-wrap.back-own > .unit-x{ display:none; }

/* ── phone: the dial has the screen, the card is small, the instructions sit low ── */
#hub{ touch-action:pan-y; }                                   /* no pinch, no double-tap zoom on the main menu */
.hub-hint{ margin-top:auto; padding-top:8px; }                /* the instructions, down toward the foot */
.hub-foot{ margin-top:4px; padding-top:4px; }
@media (max-width:1099px){
  #hub{ --D:min(97vw, max(300px, calc(100dvh - 348px))); }
  .hub-title{ margin-top:34px; }
  .hub-date{ margin-top:6px; }
  .hub-stage{ margin-top:max(30px, calc(var(--D) * .085)); }
  .hub-pop{ padding:9px 12px 10px; margin-top:12px; border-radius:12px; }
  .hub-pop .hub-tag{ display:none; }                          /* the heading says it; the card is for the points */
  .hub-pop h2{ font-size:1.18em; margin-bottom:4px; }
  .hub-pop ul{ line-height:1.36; margin-bottom:7px; }
  .hub-pop li{ margin:1px 0; }
  .hub-pop .hub-go{ padding:4px 13px; }
  .hub-shotbtn{ padding:4px 10px; }
  .hub-foot .hub-copy{ display:none; }
}

/* the drawer, once open, takes the touches: the rule above (#hub > …, for position) outranked
   `.hub-drawer-wrap.open`, so an open drawer let every tap fall through to the circles beneath it */
#hub > .hub-drawer-wrap.open{ pointer-events:auto; }
.hub-drawer-head{ display:flex; align-items:center; gap:10px; }
.hub-drawer-back{
  flex:0 0 auto; width:34px; height:34px; border-radius:50%; cursor:pointer; padding:0; line-height:1; font-size:20px;
  border:1px solid rgba(200,164,86,.6); background:rgba(10,23,51,.55); color:var(--gold-bright);
}
.hub-drawer-back:hover{ background:rgba(200,164,86,.25); }
/* the lettering above the dial always stays in front of the circle that swells at the pointer */
.hub-title, .hub-date{ position:relative; z-index:6; }

/* ── חיפוש אחד על פני כל הבית ────────────────────────────────────────────────
   A magnifier at the right of the download button; it opens one line across the
   middle of the main menu, with the apps to look in behind a small window of its
   own, and answers on a page in the menu's own colours. */
.hub-find-btn svg{ width:21px; height:21px; fill:none; stroke:var(--gold-bright); stroke-width:2.2;
  animation:none; filter:drop-shadow(0 0 4px rgba(236,205,132,.45)); }
.hub-find-btn:hover svg{ stroke:#fff3c8; }

#hub > .hub-find{
  position:fixed; inset:0; z-index:7; display:flex; align-items:center; justify-content:center;
  background:rgba(4,8,26,.72); padding:16px;
}
.hub-find-wrap{ width:min(760px, 100%); }
.hub-find-barwrap{ position:relative; }
.hub-find-bar{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px; border-radius:16px;
  border:1px solid rgba(200,164,86,.6); background:linear-gradient(180deg, #1c4690, #0c2147);
  box-shadow:0 18px 50px rgba(0,0,0,.6);
}
.hub-find-in{
  flex:1 1 240px; min-width:0; padding:12px 14px; border-radius:11px; font:inherit; font-size:16px;
  border:1px solid rgba(200,164,86,.45); background:rgba(4,8,26,.5); color:var(--parchment);
}
.hub-find-in::placeholder{ color:rgba(239,230,204,.52); font-size:13px; }
.hub-find-in:focus{ outline:2px solid var(--gold-bright); outline-offset:1px; }
.hub-find-go{
  flex:1 1 auto; padding:11px 20px; border-radius:11px; cursor:pointer; font:inherit; font-size:15px;
  font-weight:700; border:1px solid var(--gold-bright); background:var(--gold); color:#0a1733;
}
.hub-find-go:hover{ background:var(--gold-bright); }
.hub-find-filter{
  flex:0 0 auto; padding:11px 14px; border-radius:11px; cursor:pointer; font:inherit; font-size:14px;
  border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright); white-space:nowrap;
}
.hub-find-filter:hover{ background:rgba(200,164,86,.2); }
.hub-find-filter.on{ background:rgba(200,164,86,.26); border-color:var(--gold-bright); }
.hub-find-x{
  flex:0 0 auto; width:38px; height:38px; border-radius:50%; cursor:pointer; line-height:1; font-size:22px;
  padding:0; border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright);
}
.hub-find-x:hover{ background:rgba(200,164,86,.22); }
.hub-find-note{ margin-top:10px; min-height:1.3em; text-align:center; font-size:13.5px; color:var(--gold-bright); }

/* the little window: which apps to look in. It hangs under the filter button,
   inside the overlay, so nothing can clip it and nothing of the bar is hidden. */
.hub-find-pop{
  position:absolute; top:calc(100% + 8px); inset-inline-end:6px; z-index:3;
  width:min(320px, calc(100vw - 36px)); max-height:min(58vh, 380px); overflow-y:auto;
  border-radius:13px; border:1px solid rgba(200,164,86,.6); box-shadow:0 16px 40px rgba(0,0,0,.6);
  background:linear-gradient(180deg, #1c4690, #0c2147); color:var(--parchment);
}
.hub-find-pop.hidden{ display:none; }
.hub-find-pop-h{
  position:sticky; top:0; display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:10px 12px; background:#14346f;
  border-bottom:1px solid rgba(200,164,86,.35);
}
.hub-find-pop-h b{ font-family:'Frank Ruhl Libre',serif; font-size:15.5px; color:var(--gold-bright); }
.hub-find-pop-x{
  width:28px; height:28px; border-radius:50%; cursor:pointer; line-height:1; font-size:18px; padding:0;
  border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright);
}
.hub-find-pop-b{ padding:6px 10px 10px; }
.hub-find-opt{
  display:flex; align-items:center; gap:9px; padding:7px 4px; cursor:pointer; font-size:14px;
  border-bottom:1px solid rgba(200,164,86,.14);
}
.hub-find-opt:last-child{ border-bottom:0; }
.hub-find-opt input{ width:17px; height:17px; flex:0 0 auto; accent-color:var(--gold); }
.hub-find-opt.off{ cursor:default; opacity:.55; }
.hub-find-all{ font-weight:700; color:var(--gold-bright); }

/* The answer: a page of its own, in the main menu's colours but lighter than
   the menu — a list is read, where the dial is only looked at, and gold on
   near-black is handsome at a glance and tiring by the twentieth line. */
#hub > .hub-res{
  position:fixed; inset:0; z-index:8; display:flex; flex-direction:column;
  background:radial-gradient(130% 92% at 50% 16%, #2a5aa8 0%, #1a3c79 48%, #112a56 100%);
}
.hub-res-head{
  flex:0 0 auto; display:flex; align-items:center; gap:10px;
  padding:max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom:1px solid rgba(200,164,86,.35);
}
.hub-res-head h2{ margin:0; font-family:'Frank Ruhl Libre',serif; font-size:19px; color:var(--gold-bright); white-space:nowrap; }
.hub-res-q{ flex:1 1 auto; min-width:0; font-size:14px; color:#f0dcab; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hub-res-x{
  flex:0 0 auto; width:34px; height:34px; border-radius:50%; cursor:pointer; line-height:1; font-size:22px;
  padding:0; border:1px solid rgba(200,164,86,.6); background:transparent; color:var(--gold-bright);
}
.hub-res-x:hover{ background:rgba(200,164,86,.22); }
/* an X that is a way back: the arrow is drawn a little smaller than the cross
   was, and the button glows faintly so the change is seen and not only read */
.hub-x.to-find, #hdr .torah-x.to-find{ font-size:19px; }
.hub-x.to-find{ background:rgba(236,205,132,.22); border-color:rgba(236,205,132,.75); }
.hub-res-body{
  flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:10px 14px max(18px, env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:8px;
}
.hub-res-row{
  display:block; width:100%; text-align:start; cursor:pointer; padding:11px 13px; border-radius:12px;
  border:1px solid rgba(232,205,142,.34); background:rgba(28,64,124,.62); color:#f8f3e6; font:inherit;
}
.hub-res-row:hover{ background:rgba(200,164,86,.22); border-color:rgba(236,205,132,.8); }
.hub-res-line{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:3px; }
.hub-res-app{ font-size:11.5px; font-weight:700; letter-spacing:.03em; padding:2px 9px; border-radius:999px;
  background:var(--gold); color:#0a1733; }
.hub-res-kind{ font-size:12px; padding:2px 9px; border-radius:999px; color:#ffe9b8;
  border:1px solid rgba(236,205,132,.7); }
.hub-res-unit{ font-size:12px; color:#edd9a6; }
.hub-res-ref{ font-size:16px; font-weight:700; line-height:1.4; color:#ffe6ad; }
.hub-res-txt{ font-size:14.5px; line-height:1.62; color:#f4edda; }
.hub-res-none{ padding:44px 12px; text-align:center; color:#f0dcab; font-size:15.5px; }

/* a circle whose app is not open yet: its name, and under it a smaller "coming soon" */
.hub-soon{ display:block; margin-top:.28em; font-size:.66em; font-weight:400; letter-spacing:.02em; color:var(--gold-bright); opacity:.85; }

/* a circle whose app is closed for now: dimmed and greyed in its place on the ring,
   and no button — the pointer stays an arrow over it and nothing lights up. It still
   comes round to the top like the others, where its card says it is not available.
   The opacity keeps the way-in's fade (--k) and only lowers what it arrives at. */
.hub-sat.off, .hub-sat.off:hover{
  cursor:default;
  filter:grayscale(.85) brightness(calc(.56 + var(--g, 0) * .16));
  opacity:calc(.62 * min(1, var(--k, 1) * 3));
  border-color:rgba(200,164,86,.45);
}
.hub-sat.off.top{
  border-color:rgba(200,164,86,.6);
  box-shadow:0 10px 28px rgba(0,0,0,.5), inset 0 0 0 4px rgba(10,23,51,.55);
}
/* its card's first line, on every width (the tag line is hidden on narrow screens; this one is not a tag) */
.hub-pop .hub-closed{ margin:0 0 8px; font-size:.93em; font-weight:700; color:var(--gold-bright); }
#hub[lang=ar] .hub-pop .hub-closed{ letter-spacing:0; }

/* ── the folding card ───────────────────────────────────────────────────────
   Folded it is only its name. On a narrow screen it takes only the height of
   that bar; opened, it rises over the lower part of the dial, and what the bar
   saves lets the dial sit lower and larger. */
@media (max-width:640px){ .hub-title{ margin-top:58px; } }   /* clear of the date and the sun's times under the language buttons */
.hub-pop .hub-pop-txt{ padding-inline-end:30px; }
.hub-fold{
  display:flex; align-items:center; justify-content:center; position:absolute; top:6px; inset-inline-end:8px;
  width:28px; height:28px; padding:0; border-radius:50%; cursor:pointer;
  border:1px solid rgba(200,164,86,.6); background:rgba(10,23,51,.55); color:var(--gold-bright);
}
.hub-fold svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; transform:rotate(180deg); }
.hub-pop.min{ width:max-content; max-width:92vw; padding:5px 14px; border-radius:22px; cursor:pointer; }
.hub-pop.min .hub-pop-txt{ padding-inline-end:36px; }
.hub-pop.min h2{ margin:0; line-height:28px; white-space:nowrap; }
.hub-pop.min .hub-pop-txt > :not(h2){ display:none; }
.hub-pop.min .hub-fold{ top:50%; transform:translateY(-50%); }
.hub-pop.min .hub-fold svg{ transform:none; }
@media (min-width:1100px){             /* beside the dial, the folded name sits on the hairline to the top circle */
  .hub-pop.min{ top:calc(var(--D) * (.5 - var(--R)) - 20px); }
  .hub-pop.min::before{ top:19px; }
}
@media (max-width:1099px){
  .hub-date{ margin-bottom:max(30px, calc(var(--D) * .085)); }   /* room for the circle that swells at the pointer */
  .hub-stage{ margin-top:auto; padding-bottom:48px; }
  .hub-pop{ position:absolute; left:0; right:0; bottom:0; margin:0 auto; z-index:12; }
  .hub-pop::before{ display:none; }
  /* see-through, so the circles it lies over are still there; a slight blur keeps
     their lettering from competing with the card's, and the shadow carries the words */
  .hub-pop{
    background:linear-gradient(180deg, rgba(23,58,114,.5), rgba(10,23,51,.6));
    -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
    text-shadow:0 1px 3px rgba(4,8,26,.95), 0 0 6px rgba(4,8,26,.8);
  }
}
