/* ═══════════════════════════════════════════════════════════════════════
   styles/hub-soft.css — Mithlayn · Soft hub (v208)
   ─────────────────────────────────────────────────────────────────────
   The Soft hub: centered single-column, italic Cormorant display,
   hairline rules, generous whitespace. Theme-aware — uses --ms-*
   tokens so it follows the current palette (light or dark).

   Scoped under `html[data-hub-style="soft"]` so the cosmic hub stays
   intact when the user toggles back via Settings → Appearance.

   LOAD ORDER: after manuscript.css (so token cascade resolves).
   ═══════════════════════════════════════════════════════════════════════ */

/* Only one hub visible at a time */
html[data-hub-style="soft"]   .hub-cosmic { display:none !important; }
html[data-hub-style="cosmic"] .hub-soft   { display:none !important; }
html[data-hub-style="cosmic"] .hs-stars   { display:none !important; }

/* Soft hub layout — scoped under data-hub-style so it cannot leak.
   v212-isk5 · `overflow:hidden` removed — was blocking the page scroll
   when hub content (head + 5 entries) exceeded viewport height.
   The .hs-stars child has its own overflow:hidden to clip absolute-
   positioned star points, so we don't need it here. */
html[data-hub-style="soft"] #view-hub {
  padding: 48px 32px 96px;
  background: transparent;
  position: relative;
  isolation: isolate;
}

.hub-soft {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ms-ink, #E8DDD0);
  font-family: 'Manrope', system-ui, sans-serif;
  position: relative;
  z-index: 1;
}

/* ── Page-wide starscape ───────────────────────────────────────── */
.hs-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hs-stars span {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,.5);
}
.hs-stars .cy { background: #7ec7d4; box-shadow: 0 0 6px rgba(126,199,212,.6); }
.hs-stars .go { background: #e7b035; box-shadow: 0 0 6px rgba(231,176,53,.6); }
.hs-stars .pe { background: #f5c1a0; box-shadow: 0 0 6px rgba(245,193,160,.6); }
.hs-stars .sm { width: 1px;   height: 1px;   opacity: .55; }
.hs-stars .md { width: 2px;   height: 2px;   opacity: .8; }
.hs-stars .lg { width: 3px;   height: 3px;   opacity: 1; }
.hs-stars .xl { width: 4px;   height: 4px;   opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,.7); }

/* ── Head · stamp + hello + arabic + dek ───────────────────────── */
.hs-head {
  text-align: center;
  margin-bottom: 128px;
  position: relative;
  isolation: isolate;
}
/* Hairline drop-rule bridging the head → first entry gap. */
.hs-head::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -72px;
  translate: -50% 0;
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--ms-hair-3, rgba(232,221,208,.18)), transparent);
}
/* Soft halo behind the welcome line. Two layered radials — mint as the
   brand glow + gold undertone — heavily blurred so it reads as a soft
   light source rather than a graphic. Tinted from --ms-mint and --ms-gold
   so it follows the theme.  */
.hs-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  translate: -50% -50%;
  width: 680px;
  height: 360px;
  max-width: 120vw;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 38% 52% at 50% 50%,
      color-mix(in srgb, var(--ms-mint, #5FB594) 24%, transparent) 0%,
      color-mix(in srgb, var(--ms-mint, #5FB594) 10%, transparent) 38%,
      color-mix(in srgb, var(--ms-mint, #5FB594) 3%,  transparent) 68%,
      transparent 92%),
    radial-gradient(ellipse 52% 64% at 52% 60%,
      color-mix(in srgb, var(--ms-gold, #D4AF37) 12%, transparent) 0%,
      color-mix(in srgb, var(--ms-gold, #D4AF37) 5%,  transparent) 42%,
      transparent 88%),
    radial-gradient(ellipse 30% 40% at 42% 38%,
      color-mix(in srgb, var(--ms-mint, #5FB594) 8%, transparent) 0%,
      transparent 80%);
  filter: blur(56px);
  opacity: .92;
}
.hs-head .hs-stamp {
  font: 500 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .40em; text-transform: uppercase;
  color: var(--ms-ink-3, #7A8D99);
  margin-bottom: 26px;
}
.hs-head .hs-stamp::before,
.hs-head .hs-stamp::after { content: "———"; margin: 0 14px; opacity: .4; }

.hs-head h1 {
  font: 200 64px/1.04 'Manrope', system-ui, sans-serif;
  letter-spacing: -.035em;
  margin: 0 0 14px;
  color: var(--ms-ink, #E8DDD0);
}
.hs-head h1 em { font-style: normal; color: var(--ms-mint, #5FB594); font-weight: 300; }

.hs-head .hs-ar {
  font: 400 24px/1 'Amiri Quran', serif;
  color: var(--ms-ink-3, #7A8D99);
  margin-bottom: 18px;
  direction: rtl;
}
.hs-head .hs-dek {
  font: 400 13px/1.65 'Manrope', system-ui, sans-serif;
  letter-spacing: .005em;
  color: var(--ms-ink-3, #7A8D99);
  max-width: 46ch; margin: 0 auto;
}

/* ── Stack of entries ──────────────────────────────────────────── */
.hs-stack { display: flex; flex-direction: column; }

.hs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--ms-hair-2, rgba(232,221,208,.10));
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: padding-left .35s cubic-bezier(.2,.6,.2,1),
              color .35s ease,
              background .25s ease;
}
.hs-row:last-child { border-bottom: 1px solid var(--ms-hair-2, rgba(232,221,208,.10)); }
.hs-row:hover { padding-left: 18px; }
.hs-row:hover .hs-kicker { color: var(--ms-mint, #5FB594); }
.hs-row:hover .hs-mark { opacity: 1; transform: translateX(0); }

.hs-row .hs-kicker {
  font: 600 9px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .36em; text-transform: uppercase;
  color: var(--ms-ink-3, #7A8D99);
  transition: color .3s ease;
}

.hs-row .hs-body { display: flex; flex-direction: column; gap: 8px; }
.hs-row .hs-body h3 {
  font: 200 36px/1.0 'Manrope', system-ui, sans-serif;
  letter-spacing: -.025em;
  margin: 0;
  color: var(--ms-ink, #E8DDD0);
  display: inline-block;
}
.hs-row .hs-body h3 em {
  font-style: normal;
  color: var(--ms-mint, #5FB594);
  font-weight: 400;
  position: relative;
}
/* Mint underline gradient on the highlighted root word's tail.
   Sits flush under the italic; scales up to full width on hover. */
.hs-row .hs-body h3 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .06em;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent,
    var(--ms-mint, #5FB594) 30%,
    var(--ms-mint, #5FB594) 70%,
    transparent);
  border-radius: 1px;
  transform: scaleX(.8);
  transform-origin: left;
  transition: transform .35s ease;
}
.hs-row:hover .hs-body h3 em::after { transform: scaleX(1); }
.hs-row .hs-body .hs-sub {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.hs-row .hs-body .hs-ar {
  font: 400 19px/1 'Amiri Quran', serif;
  color: var(--ms-ink-3, #7A8D99);
  direction: rtl;
}
.hs-row .hs-body .hs-dek {
  font: 400 13px/1.5 'Manrope', system-ui, sans-serif;
  color: var(--ms-ink-3, #7A8D99);
  opacity: .85;
}

.hs-row .hs-stat {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font: 500 9px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .20em; text-transform: uppercase;
  color: var(--ms-ink-3, #7A8D99);
}
.hs-row .hs-stat b {
  font: 200 28px/1 'Manrope', system-ui, sans-serif;
  font-style: normal;
  letter-spacing: -.02em;
  color: var(--ms-ink, #E8DDD0);
  font-variant-numeric: tabular-nums;
}
.hs-row .hs-mark {
  display: inline-block;
  margin-top: 6px;
  font: 300 14px/1 'Manrope', system-ui, sans-serif;
  color: var(--ms-mint, #5FB594);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .35s ease, transform .35s ease;
  letter-spacing: 0;
}

.hs-foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--ms-hair-2, rgba(232,221,208,.10));
  text-align: center;
  font: 400 12px/1.5 'Manrope', system-ui, sans-serif;
  letter-spacing: .005em;
  color: var(--ms-ink-3, #7A8D99);
  opacity: .8;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  html[data-hub-style="soft"] #view-hub { padding: 36px 20px 64px; }
  .hs-head h1 { font-size: 46px; }
  .hs-head .hs-stamp { letter-spacing: .26em; }
  .hs-row { gap: 16px; padding: 22px 0; }
  .hs-row .hs-body h3 { font-size: 28px; }
  .hs-row .hs-stat b { font-size: 22px; }
}
@media (max-width: 480px) {
  .hs-row .hs-body .hs-dek { display: none; }
}
