body.hub .grain { display: none; }
body.hub .top {
  background: var(--hub-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--hub-line);
}
body.hub .top__logo { width: 108px; height: auto; filter: grayscale(1); }
body.hub .top__home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  min-height: 44px;
  font-size: 11px;
  line-height: 1.2;
}
body.hub .top__back { white-space: nowrap; font-size: 12px; }
body.hub .top__back:disabled { opacity: .4; cursor: default; }
body.hub .top__menu, body.hub .top__bell, body.hub .top__back {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hub-fg);
}
body.hub .top__acct { display: none; }
body.hub .top__label { font-size: 11px; }
body.hub .bell__dot { background: var(--hub-fg); }
body.hub .top__right, body.hub .top__left { gap: 6px; }
body.hub .tabs {
  height: calc(var(--hub-nav-height) + env(safe-area-inset-bottom));
  padding: 0 0 env(safe-area-inset-bottom);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(var(--hub-nav-rows), var(--hub-nav-row));
  background: var(--hub-bg);
  color: var(--hub-fg);
  border-top: 1px solid var(--hub-fg);
}
body.hub .tabs__item {
  min-width: 0;
  min-height: var(--hub-nav-row);
  border-right: 1px solid var(--hub-line);
  border-bottom: 1px solid var(--hub-line);
  transition: background 140ms ease, color 140ms ease;
}
body.hub .tabs__item.is-active { background: var(--hub-fg); color: var(--hub-bg); }
body.hub .tabs__item.is-active::after { display: none; }
body.hub .tabs__word {
  font-family: var(--hub-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  padding: 0 6px;
}
body.hub :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
body.hub .tabs__item:focus-visible { outline-offset: -5px; z-index: 1; }
/* Native keyboard focus scrolling must leave room for the fixed shell. */
body.hub #view :is(a, button, input, select, textarea, [tabindex]) {
  scroll-margin-top: calc(var(--top-h) + env(safe-area-inset-top) + 12px);
  scroll-margin-bottom: calc(var(--hub-nav-height) + env(safe-area-inset-bottom) + 12px);
}
body.hub #view:focus { outline: none; }
body.hub .view { padding-top: calc(var(--top-h) + env(safe-area-inset-top) + 28px); }
body.hub .view.view--home, body.hub .view.view--hub { max-width: 1280px; }
body.hub-entry .day__title, body.hub[data-hub-section="learn"] .day__title {
  font-family: var(--hub-display);
  font-size: clamp(52px, 10vw, 112px);
  line-height: .98;
  letter-spacing: -.02em;
  margin: 16px 0 18px;
  overflow-wrap: anywhere;
}
.hub-intro {
  color: var(--hub-muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 60ch;
  margin: 0 0 32px;
  line-height: 1.5;
}
body.hub .view--home .dashgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
body.hub .view--home .dashcard {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--hub-fg);
  border-radius: 0;
  height: 100%;
  min-width: 0;
}
body.hub .view--home .dashcard--wide { grid-column: 1 / -1; }
body.hub .view--home .dashcard--ink { --red: #fff; }
body.hub .view--home .dashcard__title,
body.hub .view--home .dashgrid .dashcard--ink .dashcard__title {
  font-size: clamp(36px, 5.8vw, 68px);
  line-height: 1.02;
  margin: 20px 0 12px;
  max-width: 18ch;
  overflow-wrap: anywhere;
}
body.hub .view--home .dashcard__sub {
  font-family: var(--hub-body);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  max-width: 62ch;
}
body.hub .view--home .dashcard__arrow { color: inherit; font-size: 24px; }
body.hub .view--home .dashcard__done { color: inherit; }
.hub-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-top: 1px solid var(--hub-fg);
  padding-top: 14px;
  margin-top: 40px;
}
.hub-section-head h2 { margin: 0; }
.hub-section-head > span { color: var(--hub-muted); text-align: right; }
.hub-links { display: grid; grid-template-columns: minmax(0, 1fr); }
.hub-link {
  min-width: 0;
  min-height: 88px;
  border-bottom: 1px solid var(--hub-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
}
.hub-link strong {
  display: block;
  font-family: var(--hub-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}
.hub-link__description { display: block; color: var(--hub-muted); font-size: 14px; margin-top: 6px; }
.hub-arrow { flex: 0 0 auto; font-size: 26px; }
.hub-links--large .hub-link { min-height: 160px; }
.hub-links--large .hub-link strong { font-size: clamp(36px, 6vw, 64px); }
.hub-module-list { border-top: 1px solid var(--hub-fg); }
.hub-module {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: clamp(12px, 3vw, 32px);
  border-bottom: 1px solid var(--hub-line);
  padding: 28px 0;
  align-items: start;
}
.hub-module__number { font-family: var(--hub-mono); font-size: 12px; color: var(--hub-muted); padding-top: 8px; }
.hub-module h2 { font-family: var(--hub-display); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1.12; margin: 0; text-transform: uppercase; }
.hub-module p { margin: 12px 0; color: var(--hub-muted); }
.hub-status { display: inline-block; font-family: var(--hub-mono); font-size: 11px; line-height: 1.5; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.hub-module .hub-arrow { padding-top: 8px; }
.learn-feature {
  display: block;
  background: var(--hub-fg);
  color: var(--hub-bg);
  padding: clamp(24px, 5vw, 56px);
}
.learn-feature:focus-visible { outline-offset: 5px; }
.learn-feature__label { font-family: var(--hub-mono); font-size: 11px; line-height: 1.7; }
.learn-feature h2 {
  font-family: var(--hub-display);
  font-weight: 400;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 24px 0 20px;
  overflow-wrap: anywhere;
}
.learn-feature p { max-width: 48ch; line-height: 1.6; margin: 0 0 28px; }
.learn-feature__action { display: flex; gap: 24px; align-items: center; min-height: 44px; font-weight: 500; }
.learn-feature__action > span { font-size: 26px; }
.learn-back { margin: 0 0 24px; }
.learn-practices { border-top: 1px solid var(--hub-fg); }
.learn-practice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: clamp(12px, 3vw, 36px);
  padding: clamp(24px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--hub-line);
}
.learn-practice__number { font-family: var(--hub-mono); font-size: 12px; padding-top: 8px; color: var(--hub-muted); }
.learn-practice h2 { font-family: var(--hub-display); font-size: clamp(30px, 5vw, 48px); font-weight: 400; line-height: 1.12; text-transform: uppercase; margin: 0 0 14px; overflow-wrap: anywhere; }
.learn-practice p { max-width: 60ch; margin: 0; line-height: 1.65; color: var(--hub-muted); }
.learn-practice__links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.learn-practice__links .hub-text-link { margin-top: 14px; font-size: 14px; }
.learn-footnote { color: var(--hub-muted); font-size: 14px; line-height: 1.6; margin: 28px 0 0; }
.hub-reserved { background: var(--hub-fg); color: var(--hub-bg); padding: clamp(24px, 5vw, 64px); }
.hub-reserved h2 { font-family: var(--hub-display); font-size: clamp(36px, 6vw, 76px); font-weight: 400; line-height: 1.06; margin: 40px 0 24px; text-transform: uppercase; }
.hub-reserved p { max-width: 46ch; line-height: 1.6; }
.learn-coming__status, .network-coming__status, .cipher-fold__status { font-family: var(--hub-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.learn-coming h2, .network-coming h2, .cipher-fold h2 { margin: 24px 0 20px; overflow-wrap: anywhere; }
.learn-coming .hub-text-link, .network-coming .hub-text-link, .cipher-fold .hub-text-link { margin-top: 16px; }
.cipher-fold { margin-top: 32px; }
.cipher-fold__links { display: flex; flex-wrap: wrap; column-gap: 32px; }
.cipher-reply-context { display: block; width: 100%; padding: 10px 12px; margin-bottom: 4px; border: 0; border-left: 2px solid currentColor; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.cipher-reply-context span, .cipher-reply-draft__text span { display: block; }
.cipher-reply-context span + span, .cipher-reply-draft__text span + span { margin-top: 4px; font-size: 13px; opacity: .75; }
.cipher-reply-unavailable { cursor: default; font-size: 12px; }
.cipher-reply-draft { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hub-line); }
.cipher-reply-draft[hidden] { display: none; }
.cipher-reply-draft__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cipher-reply-draft .qghost { flex-shrink: 0; }
.cipher-reply-context:focus-visible, .msg:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.cipher-thread { border: 1px solid var(--hub-fg); padding: 20px; margin: 20px 0; }
.cipher-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cipher-thread-parent, .cipher-thread-message { overflow-wrap: anywhere; line-height: 1.5; }
.cipher-thread-message { border-top: 1px solid var(--hub-line); padding: 18px 0; }
.cipher-thread-message p { white-space: normal; }
.cipher-handle { background: transparent; border: 0; padding: 4px; color: inherit; text-decoration: underline; cursor: pointer; }
.cipher-handle:focus-visible { outline: 2px solid currentColor; }
.cipher-mention { font-weight: 700; }
.cipher-mention-help { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.cipher-mention-help p { color: var(--hub-muted); font-size: 13px; line-height: 1.5; }
.cipher-mention-help .qghost { flex-shrink: 0; min-width: 44px; min-height: 44px; }
@media (max-width: 480px) { .cipher-reply-draft { align-items: flex-start; flex-direction: column; gap: 10px; } }
.academy-status { font-family: var(--hub-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.academy-access h2 { margin: 24px 0 20px; overflow-wrap: anywhere; }
.academy-courses h2 { overflow-wrap: anywhere; }
.academy-access .hub-text-link { margin-top: 16px; }
.academy-billing-note { font-size: 14px; }
.academy-player { border: 1px solid var(--hub-fg); padding: 24px; margin-top: 24px; min-height: 180px; display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.academy-lessons { display: grid; gap: 1px; margin: 0; max-height: min(52vh, 480px); overflow: auto; }
.academy-lessons:empty, .academy-video:empty, .academy-player-actions:empty { display: none; }
.academy-lesson { min-height: 48px; padding: 14px 16px; border: 1px solid var(--hub-line); background: var(--hub-bg); color: var(--hub-fg); text-align: left; font: inherit; overflow-wrap: anywhere; cursor: pointer; }
.academy-lesson[aria-pressed="true"] { background: var(--hub-fg); color: var(--hub-bg); }
.academy-lesson:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.academy-video { aspect-ratio: 16 / 9; width: 100%; background: #000; position: sticky; top: 0; z-index: 1; }
.academy-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.academy-player-actions { margin-top: 0; }
@media (min-width: 801px) {
  .academy-player[data-player-state="ready"],
  .academy-player[data-player-state="checking"],
  .academy-player[data-player-state="expired"] {
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.55fr);
    grid-template-areas: "status status" "lessons media" "actions actions";
  }
  .academy-player[data-player-state="ready"] > [role="status"],
  .academy-player[data-player-state="checking"] > [role="status"],
  .academy-player[data-player-state="expired"] > [role="status"] { grid-area: status; }
  .academy-player[data-player-state="ready"] > .academy-lessons,
  .academy-player[data-player-state="checking"] > .academy-lessons,
  .academy-player[data-player-state="expired"] > .academy-lessons { grid-area: lessons; max-height: min(70vh, 640px); }
  .academy-player[data-player-state="ready"] > .academy-video,
  .academy-player[data-player-state="checking"] > .academy-video,
  .academy-player[data-player-state="expired"] > .academy-video { grid-area: media; position: sticky; top: 12px; }
  .academy-player[data-player-state="ready"] > .academy-player-actions,
  .academy-player[data-player-state="checking"] > .academy-player-actions,
  .academy-player[data-player-state="expired"] > .academy-player-actions { grid-area: actions; }
}
@media (max-width: 480px) { .academy-player { padding: 16px; } }
.academy-outline { margin-top: 32px; }
.academy-outline-note { color: var(--hub-muted); line-height: 1.6; }
.academy-outline ol { padding-left: 26px; }
.academy-outline li { padding: 14px 8px; border-bottom: 1px solid var(--hub-line); line-height: 1.5; overflow-wrap: anywhere; }
.academy-duration { display: block; font-family: var(--hub-mono); font-size: 12px; color: var(--hub-muted); margin-top: 6px; }

#rafiq-root .hub-reserved .qghost { display: block; min-height: 44px; margin-top: 20px; color: var(--hub-fg); background: var(--hub-bg); border-color: var(--hub-bg); }
#rafiq-root .hub-reserved :focus-visible { outline-color: var(--hub-bg); }
.hub-text-link { display: inline-flex; align-items: center; gap: 24px; min-height: 48px; margin-top: 24px; text-decoration: underline; text-underline-offset: 5px; }
body.hub .drawer { background: var(--hub-bg); --red: #000; }
body.hub .drawer__x { min-width: 44px; min-height: 44px; }
body.hub .ditem { min-height: 48px; }
body.hub .ditem__name { overflow-wrap: anywhere; }
body.hub-entry :is(.qghost, .closeday, .saylock, .photo-card, .avrow, .qin) { border-radius: 0; }
@media (max-width: 639px) {
  body.hub .top__label { display: none; }
  body.hub .tabs__item:nth-child(3n) { border-right: 0; }
  body.hub .day__kicker { align-items: start; }
  body.hub .day__kicker > :last-child { text-align: right; }
  .hub-module { grid-template-columns: 24px minmax(0, 1fr) auto; }
}
@media (min-width: 640px) {
  body.hub .tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.hub .tabs__item:last-child { border-right: 0; }
  body.hub .view--home .dashgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}
@media (min-width: 1000px) {
  body.hub .view--home .dashgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.hub .view--home .dashcard--wide { grid-column: span 2; }
  body.hub .view--home .dashcard--wide:first-child:nth-last-child(3) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  body.hub *, body.hub *::before, body.hub *::after { transition: none !important; scroll-behavior: auto !important; }
}
