/* DAIV Hub — light theme, shared nav, news/dots overlays */

:root {
  --hub-nav-h: 60px;
  --hub-sub-h: 0px;
  --hub-stack-h: var(--hub-nav-h);
  --hub-sbw: 0px;
  --hub-max: 1040px;
  --hub-pad: 22px;
  --hub-bg: #f5f5f7;
  --hub-elev: #ffffff;
  --hub-card: #ffffff;
  --hub-card-hover: #fffdf9;
  --hub-text: #1d1d1f;
  --hub-muted: #6e6e73;
  --hub-faint: #8e8e93;
  --hub-line: rgba(60, 60, 67, 0.10);
  --hub-line-strong: rgba(60, 60, 67, 0.18);
  --hub-accent: #e8782c;
  --hub-accent-bright: #ff8a3d;
  --hub-accent-soft: rgba(232, 120, 44, 0.14);
  --hub-glow: rgba(255, 138, 61, 0.28);
  --hub-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --hub-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.08);
  --hub-radius: 18px;
  --hub-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hub-t: 0.22s;
  --hub-font: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}


/* -------------------------------------------------------------------------- */
/* Shared top navigation                                                         */
/* -------------------------------------------------------------------------- */

#hub-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--hub-nav-h);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  margin: 0;
  font-family: var(--hub-font);
  font-size: 14px;
  line-height: 1.4;
  color: var(--hub-text);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hub-line);
  box-shadow: 0 0 0 transparent;
  transition: box-shadow var(--hub-t) var(--hub-ease), border-color var(--hub-t) var(--hub-ease);
  -webkit-font-smoothing: antialiased;
}

#hub-nav.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-bottom-color: transparent;
}


#hub-nav *,
#hub-nav *::before,
#hub-nav *::after { box-sizing: border-box; }

#hub-nav a {
  color: var(--hub-muted);
  text-decoration: none;
}

#hub-nav a:hover {
  color: var(--hub-text);
  text-decoration: none;
}

#hub-nav .hub-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1002;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--hub-text);
  box-shadow: var(--hub-shadow);
}
#hub-nav .hub-skip:focus {
  top: 10px;
}

#hub-nav .hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--hub-text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 10px;
}
#hub-nav .hub-brand:hover { color: var(--hub-text); }

#hub-nav .hub-brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  color: var(--hub-accent-bright);
  filter: drop-shadow(0 2px 5px var(--hub-glow));
  flex: 0 0 28px;
}

#hub-nav .hub-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto;
  list-style: none;
  padding: 0;
}

#hub-nav .hub-links > li { list-style: none; margin: 0; padding: 0; }

#hub-nav .hub-links a,
#hub-nav .hub-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 560;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--hub-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--hub-t) var(--hub-ease), color var(--hub-t) var(--hub-ease);
}

#hub-nav .hub-links a:hover,
#hub-nav .hub-dd-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--hub-text);
}

#hub-nav .hub-links a:active,
#hub-nav .hub-dd-btn:active {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(0.98);
}

#hub-nav .hub-links a.is-current,
#hub-nav .hub-links a[aria-current="page"],
#hub-nav .hub-dd-btn.is-current {
  color: var(--hub-accent);
  background: var(--hub-accent-soft);
}

#hub-nav .hub-dd { position: relative; }
#hub-nav .hub-dd-btn::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.7;
  transition: transform var(--hub-t) var(--hub-ease);
}
#hub-nav .hub-dd.is-open .hub-dd-btn::after { transform: rotate(180deg); }

#hub-nav .hub-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--hub-line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--hub-t) var(--hub-ease), transform var(--hub-t) var(--hub-ease), visibility var(--hub-t);
  z-index: 1002;
}
#hub-nav .hub-dd-menu a {
  display: flex;
  width: 100%;
  border-radius: 10px;
  padding: 8px 12px;
}
#hub-nav .hub-dd-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
#hub-nav .hub-dd.is-open .hub-dd-menu,
#hub-nav .hub-dd:hover .hub-dd-menu,
#hub-nav .hub-dd:focus-within .hub-dd-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

#hub-nav .hub-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hub-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background var(--hub-t) var(--hub-ease);
}
#hub-nav .hub-toggle:hover { background: rgba(0, 0, 0, 0.05); }

#hub-nav .hub-toggle-bars {
  width: 18px;
  height: 12px;
  display: block;
  position: relative;
}
#hub-nav .hub-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s var(--hub-ease), opacity 0.22s var(--hub-ease), top 0.22s var(--hub-ease);
}
#hub-nav .hub-toggle-bars span:nth-child(1) { top: 0; }
#hub-nav .hub-toggle-bars span:nth-child(2) { top: 5px; }
#hub-nav .hub-toggle-bars span:nth-child(3) { top: 10px; }
#hub-nav.is-open .hub-toggle-bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
#hub-nav.is-open .hub-toggle-bars span:nth-child(2) { opacity: 0; }
#hub-nav.is-open .hub-toggle-bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Leftover news sub-row from older nav.js — always hide */
.hub-news-sub { display: none !important; }

#hub-nav .hub-dd-label-default { display: none; }
#hub-nav .hub-dd-label-current { display: inline; }

@media (max-width: 880px) {
  #hub-nav .hub-dd-label-default { display: inline; }
  #hub-nav .hub-dd-label-current { display: none; }

  #hub-nav .hub-toggle { display: inline-flex; }
  #hub-nav .hub-links {
    display: flex;
    position: absolute;
    top: var(--hub-nav-h);
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 14px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #ffffff;
    border-bottom: 1px solid var(--hub-line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s var(--hub-ease), transform 0.22s var(--hub-ease), visibility 0.22s;
    max-height: calc(100vh - var(--hub-nav-h));
    overflow: auto;
  }
  #hub-nav.is-open .hub-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  #hub-nav .hub-links a,
  #hub-nav .hub-dd-btn {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 12px;
  }
  #hub-nav .hub-dd-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 6px 12px;
    min-width: 0;
    transition: none;
  }
  #hub-nav .hub-dd-btn {
    pointer-events: none;
    font-weight: 700;
    color: var(--hub-text);
    background: transparent;
  }
  #hub-nav .hub-dd-btn.is-current { background: transparent; color: var(--hub-text); }
  #hub-nav .hub-dd-btn::after { display: none; }
  #hub-nav .hub-dd-menu a { font-size: 15px; }
}

html.hub-has-nav { scroll-padding-top: var(--hub-stack-h); }

@media (max-width: 880px) {
  html.hub-nav-lock {
    overflow: hidden;
    padding-right: var(--hub-sbw, 0px);
  }
}

#hub-nav a:focus-visible,
#hub-nav button:focus-visible,
html.hub-theme a:focus-visible,
html.hub-theme button:focus-visible,
html.hub-page-news a:focus-visible,
html.hub-page-news button:focus-visible,
html.hub-page-dots a:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* News unification                                                              */
/* -------------------------------------------------------------------------- */

.sitebar,
header.topbar,
a.hub-back { display: none !important; }

.sidebar { display: none !important; }

.tabbar:not(:has([data-nav])) { display: none !important; }

html.hub-page-news {
  color-scheme: light;
  --bg: #f5f5f7;
  --elevated: #ffffff;
  --grouped: #efeff4;
  --label: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --separator: rgba(60, 60, 67, 0.10);
  --accent: #e8782c;
  --accent-soft: rgba(232, 120, 44, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --sitebar-h: 0px;
  --tabbar-h: 0px;
}

html.hub-page-news,
html.hub-page-news body {
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: var(--hub-font);
}

html.hub-page-news .app {
  padding-top: 0;
  min-height: 0;
}

html.hub-page-news .content {
  margin-left: 0 !important;
  margin-right: auto;
  max-width: var(--hub-max);
  width: 100%;
  margin-inline: auto !important;
  padding: 32px var(--hub-pad) 72px;
  box-sizing: border-box;
}

html.hub-page-news .display { letter-spacing: -0.03em; }

html.hub-page-news .feature-card,
html.hub-page-news a.feature-card,
html.hub-page-news .card,
html.hub-page-news .archive-row,
html.hub-page-news .stat {
  border-radius: var(--hub-radius);
  box-shadow: var(--hub-shadow);
}

html.hub-page-news .feature-card,
html.hub-page-news a.feature-card,
html.hub-page-news .card,
html.hub-page-news .archive-row {
  border: 1px solid var(--hub-line);
}

html.hub-page-news a.feature-card,
html.hub-page-news a.archive-row,
html.hub-page-news a.platform-tile,
html.hub-page-news .subtab,
html.hub-page-news a.chip {
  transition: transform var(--hub-t) var(--hub-ease), box-shadow var(--hub-t) var(--hub-ease), background var(--hub-t) var(--hub-ease), color var(--hub-t) var(--hub-ease);
}

html.hub-page-news a.feature-card:hover,
html.hub-page-news a.archive-row:hover,
html.hub-page-news a.platform-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--hub-shadow-hover);
  text-decoration: none;
}

html.hub-page-news a.feature-card:active,
html.hub-page-news a.archive-row:active {
  transform: translateY(0);
}

html.hub-page-news .page-note a:hover { color: #c45e10; }

/* Daily in-page tabbar is replaced by the left sidebar */
html.hub-page-daily .tabbar { display: none !important; }

html.hub-page-news .view.is-active {
  animation: hub-view-in 0.28s var(--hub-ease) both;
}

html.hub-page-news .content {
  animation: hub-enter 0.32s var(--hub-ease) both;
}

/* -------------------------------------------------------------------------- */
/* /dots/ task board                                                             */
/* -------------------------------------------------------------------------- */

html.hub-page-dots {
  color-scheme: light;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.12);
  --acc: #e8782c;
  --warn-bg: #fff6e8;
  --warn-border: #f0c48a;
  --warn-text: #9a5b00;
  --pill-accent-bg: #e8f3ff;
  --pill-accent: #0a6cbc;
  --pill-warning-bg: #fff3dc;
  --pill-warning: #9a5b00;
  --pill-success-bg: #e6f7ed;
  --pill-success: #1a7f46;
  --pill-neutral-bg: #f0f0f3;
  --pill-neutral: #5c5c66;
}

html.hub-page-dots,
html.hub-page-dots body {
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: var(--hub-font);
}

html.hub-page-dots main {
  max-width: var(--hub-max);
  padding: 32px var(--hub-pad) 80px;
  animation: hub-enter 0.32s var(--hub-ease) both;
}

html.hub-page-dots p.back { display: none; }

html.hub-page-dots .metric,
html.hub-page-dots .card {
  box-shadow: var(--hub-shadow);
  transition: transform var(--hub-t) var(--hub-ease), box-shadow var(--hub-t) var(--hub-ease);
}

html.hub-page-dots .metric:hover,
html.hub-page-dots .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hub-shadow-hover);
}

html.hub-page-dots .metric:active,
html.hub-page-dots .card:active { transform: translateY(0); }

/* -------------------------------------------------------------------------- */
/* Hub-owned pages (home, videos)                                                */
/* -------------------------------------------------------------------------- */

html.hub-theme { color-scheme: light; }

html.hub-theme,
html.hub-theme body {
  margin: 0;
  min-height: 100%;
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: var(--hub-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.hub-theme body {
  background-image:
    radial-gradient(900px 480px at 82% -10%, rgba(255, 138, 61, 0.10), transparent 60%),
    radial-gradient(700px 420px at -10% 8%, rgba(167, 139, 250, 0.07), transparent 55%);
  background-attachment: fixed;
}

html.hub-theme a { color: var(--hub-accent); text-decoration: none; }
html.hub-theme a:hover { text-decoration: underline; text-underline-offset: 3px; }
html.hub-theme a.hub-card,
html.hub-theme a.hub-card:hover {
  color: inherit;
  text-decoration: none;
}
html.hub-theme a.hub-card:hover .hub-card-title { color: var(--hub-accent); }

html.hub-theme img,
html.hub-theme svg,
html.hub-theme video { max-width: 100%; }

.hub-main {
  max-width: var(--hub-max);
  margin: 0 auto;
  padding: 32px var(--hub-pad) 80px;
  animation: hub-enter 0.32s var(--hub-ease) both;
}

@keyframes hub-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hub-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hub-line);
  border-radius: 28px;
  background:
    radial-gradient(520px 240px at 88% 20%, rgba(255, 138, 61, 0.16), transparent 62%),
    radial-gradient(380px 200px at 10% 90%, rgba(77, 163, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f7fa 100%);
  padding: 44px 36px 40px;
  margin-bottom: 36px;
  box-shadow: var(--hub-shadow);
}

.hub-hero-copy { position: relative; z-index: 1; max-width: 34em; }

.hub-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hub-accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hub-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 750;
  color: var(--hub-text);
}

.hub-hero .hub-lead {
  margin: 0;
  color: var(--hub-muted);
  font-size: clamp(15px, 2vw, 18px);
  max-width: 28em;
}

.hub-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hub-blob {
  position: absolute;
  color: var(--hub-blob-c, #ff8a3d);
  width: var(--hub-blob-s, 88px);
  height: var(--hub-blob-s, 88px);
  transform: rotate(var(--hub-blob-r, 0deg));
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
  animation: hub-blob-float 7.5s ease-in-out infinite;
  animation-delay: var(--hub-blob-d, 0s);
}

.hub-blob svg { width: 100%; height: 100%; display: block; overflow: visible; }

@keyframes hub-blob-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

.hub-section { margin: 0 0 40px; }

.hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hub-line);
}

.hub-section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hub-text);
}

.hub-section-head a.hub-more {
  color: var(--hub-muted);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
  transition: color var(--hub-t) var(--hub-ease);
}
.hub-section-head a.hub-more:hover { color: var(--hub-accent); }

.hub-ico {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 22px;
  filter: drop-shadow(0 2px 4px var(--hub-glow));
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hub-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hub-card {
  background: var(--hub-card);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--hub-shadow);
  transition: border-color var(--hub-t) var(--hub-ease), transform var(--hub-t) var(--hub-ease), background var(--hub-t) var(--hub-ease), box-shadow var(--hub-t) var(--hub-ease);
  min-width: 0;
}

a.hub-card { color: inherit; text-decoration: none; }

a.hub-card:hover,
.hub-card:hover {
  border-color: var(--hub-line-strong);
  background: var(--hub-card-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--hub-shadow-hover);
}

a.hub-card:active,
.hub-card:active {
  transform: translateY(0);
  box-shadow: var(--hub-shadow);
}

.hub-card-title {
  font-weight: 680;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--hub-text);
  transition: color var(--hub-t) var(--hub-ease);
}

.hub-card-meta {
  color: var(--hub-muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.hub-card-desc {
  color: var(--hub-muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.hub-video-page .hub-actions { justify-content: flex-start; }


.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--hub-t) var(--hub-ease), color var(--hub-t) var(--hub-ease), transform var(--hub-t) var(--hub-ease);
}

.hub-btn:hover {
  text-decoration: none;
  background: rgba(232, 120, 44, 0.22);
  color: #c45e10;
}

.hub-btn:active { transform: scale(0.97); }

.hub-btn-ghost {
  background: transparent;
  border-color: var(--hub-line-strong);
  color: var(--hub-muted);
}

.hub-btn-ghost:hover {
  color: var(--hub-text);
  background: rgba(0, 0, 0, 0.04);
}

.hub-feature {
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.hub-feature .hub-card-title { font-size: 20px; margin-top: 8px; }
.hub-feature .hub-card-desc { margin-top: auto; padding-top: 16px; }

.hub-footer {
  max-width: var(--hub-max);
  margin: 8px auto 0;
  padding: 24px var(--hub-pad) 48px;
  color: var(--hub-faint);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--hub-line);
}

.hub-footer .hub-ico { width: 18px; height: 18px; filter: none; opacity: 0.9; }

@media (max-width: 900px) {
  .hub-grid,
  .hub-grid-2 { grid-template-columns: 1fr; }
  .hub-hero { padding: 32px 22px 88px; }
  .hub-main { padding: 20px 16px 64px; }
}

@media (max-width: 560px) {
  .hub-hero h1 { font-size: 30px; }
  #hub-nav { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-blob,
  .hub-main,
  html.hub-page-news .content,
  html.hub-page-dots main { animation: none; }

  #hub-nav,
  #hub-nav .hub-links,
  #hub-nav .hub-links a,
  #hub-nav .hub-dd-btn,
  #hub-nav .hub-dd-menu,
  #hub-nav .hub-toggle-bars span,
  .hub-card,
  a.hub-card,
  .hub-btn,
  html.hub-page-news a.feature-card,
  html.hub-page-news a.archive-row,
  html.hub-page-dots .card,
  html.hub-page-dots .metric {
    transition: none !important;
  }

  .hub-card:hover,
  a.hub-card:hover,
  html.hub-page-news a.feature-card:hover,
  html.hub-page-dots .card:hover,
  html.hub-page-dots .metric:hover {
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Compact custom video cards + lightbox                                       */
/* -------------------------------------------------------------------------- */

.hub-vgrid {
  align-items: stretch;
}

.hub-vcard {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.hub-vcard-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 250px;
  margin: 0;
  padding: 0;
  border: 0;
  background: #ececef;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--hub-radius) var(--hub-radius) 0 0;
}

@media (max-width: 900px) {
  .hub-vcard-thumb { height: 280px; }
}

.hub-vcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  transform: scale(1.02);
  transition: transform 0.32s var(--hub-ease);
}

.hub-vcard:hover .hub-vcard-thumb img { transform: scale(1.06); }

.hub-play-fab {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform var(--hub-t) var(--hub-ease), background var(--hub-t) var(--hub-ease);
}

.hub-play-fab::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 18px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--hub-accent);
}

.hub-vcard-thumb:hover .hub-play-fab,
.hub-vcard-thumb:focus-visible .hub-play-fab {
  transform: scale(1.08);
  background: #fff;
}

.hub-vcard-dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hub-vcard-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hub-vcard-body .hub-card-title { margin-bottom: 2px; }
.hub-vcard-body .hub-card-meta { margin-bottom: 12px; }
.hub-vcard-body .hub-actions { margin-top: auto; }

/* Lightbox player */
html.hub-lb-open { overflow: hidden; }

.hub-lb {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--hub-ease), visibility 0.22s;
}

.hub-lb.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hub-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 22, 0.55);
}

.hub-lb-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--hub-elev);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s var(--hub-ease);
  outline: none;
}

.hub-lb.is-open .hub-lb-dialog { transform: none; }

.hub-lb-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--hub-text);
  font-size: 13px;
  font-weight: 650;
  font-family: var(--hub-font);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background var(--hub-t) var(--hub-ease), transform var(--hub-t) var(--hub-ease);
}

.hub-lb-x:hover { background: #fff; }
.hub-lb-x:active { transform: scale(0.97); }

.hub-lb-stage {
  position: relative;
  background: #111113;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-lb-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #111113;
}

.hub-lb-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.22s var(--hub-ease), transform 0.22s var(--hub-ease);
}

.hub-lb-bigplay::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 21px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--hub-accent);
}

.hub-lb.is-playing .hub-lb-bigplay {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.hub-lb-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(20, 20, 22, 0.72);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hub-lb-toggle,
.hub-lb-mute,
.hub-lb-full {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
}

.hub-lb-toggle::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
}

.hub-lb.is-playing .hub-lb-toggle::before {
  left: 8px;
  top: 7px;
  width: 4px;
  height: 14px;
  border: 0;
  background: #fff;
  box-shadow: 7px 0 0 #fff;
}

.hub-lb-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.hub-lb-buf,
.hub-lb-prog {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  width: 0;
  pointer-events: none;
}

.hub-lb-buf { background: rgba(255, 255, 255, 0.28); }
.hub-lb-prog { background: var(--hub-accent-bright); }

.hub-lb-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.9;
}

.hub-lb-mute::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 8px;
  height: 10px;
  background: #fff;
  clip-path: polygon(0 25%, 50% 25%, 100% 0, 100% 100%, 50% 75%, 0 75%);
}

.hub-lb-mute::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 8px;
  width: 6px;
  height: 12px;
  border: 2px solid #fff;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.hub-lb.is-muted .hub-lb-mute::after {
  border: 0;
  width: 12px;
  height: 2px;
  top: 13px;
  left: 15px;
  background: #fff;
  transform: rotate(-32deg);
  border-radius: 0;
}

.hub-lb-full::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 2px;
}

.hub-lb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
}

.hub-lb-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--hub-text);
}

@media (max-width: 560px) {
  .hub-lb { padding: 12px 10px; }
  .hub-lb-dialog { width: min(100%, 420px); border-radius: 18px; }
  .hub-lb-video { max-height: min(68vh, 640px); }
}

/* -------------------------------------------------------------------------- */
/* Daily news: left sidebar + center content, no covering reader               */
/* -------------------------------------------------------------------------- */

html.hub-page-daily .app {
  --hub-side-w: 280px;
}

html.hub-page-daily .sidebar:has([data-nav]) {
  display: flex !important;
  flex-direction: column;
  position: relative;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto;
  z-index: 2;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

html.hub-page-daily .sidebar .brand {
  margin: 0 0 8px;
  padding: 0 4px;
}

html.hub-page-daily .sidebar .brand h1,
html.hub-page-daily .sidebar .brand-kicker { display: none; }

.hub-side-kicker {
  margin: 0 0 6px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-faint);
}

html.hub-page-daily .sidebar .nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 16px;
}

html.hub-page-daily .sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--hub-muted);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  transition: background var(--hub-t) var(--hub-ease), color var(--hub-t) var(--hub-ease);
}

html.hub-page-daily .sidebar .nav-item .icon {
  width: 16px;
  height: 16px;
  flex: none;
}

html.hub-page-daily .sidebar .nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--hub-text);
  text-decoration: none;
}

html.hub-page-daily .sidebar .nav-item.is-active {
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
}

.hub-plat-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.hub-plat-wrap[hidden] { display: none !important; }

.hub-plat-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 12px;
}

@media (min-width: 900px) {
  html.hub-page-daily .sidebar:has([data-nav]) {
    overflow: hidden;
  }
  .hub-plat-wrap {
    overflow: hidden;
  }
  .hub-plat-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 10px;
  }
  .hub-plat-item {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .hub-plat-list {
    flex: 1;
    overflow: auto;
  }
}

.hub-plat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--hub-text);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
  transition: background var(--hub-t) var(--hub-ease), color var(--hub-t) var(--hub-ease);
}

.hub-plat-item .chip {
  margin: 0;
  padding: 0;
  background: transparent;
  gap: 8px;
  font-size: 13px;
  color: inherit;
}

.hub-plat-item:hover {
  background: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.hub-plat-item.is-active {
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
}

.hub-plat-list {
  min-height: 0;
  overflow: auto;
  padding-bottom: 16px;
}

.hub-plat-list .top-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-plat-list .top-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 10px;
  border: 0;
  background: transparent;
}

.hub-plat-list .top-row:hover { background: rgba(0, 0, 0, 0.04); }

.hub-plat-list .top-rank {
  flex: none;
  width: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hub-faint);
  text-align: center;
  padding-top: 1px;
}

.hub-plat-list .top-title { flex: 1; min-width: 0; }

.hub-plat-list .top-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--hub-text);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
}

.hub-plat-list .top-title a:hover { color: var(--hub-accent); }
.hub-plat-list .top-title a.is-current { color: var(--hub-accent); font-weight: 700; }

.hub-stage-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 32px 24px;
  border: 1px dashed var(--hub-line-strong);
  border-radius: var(--hub-radius);
  background: rgba(255, 255, 255, 0.6);
}

.hub-stage-msg {
  margin: 0;
  color: var(--hub-muted);
  font-size: 15px;
  text-align: center;
  max-width: 22em;
}

/* Hide the original platform tile grid; platforms live in the sidebar. */
html.hub-daily-layout [data-platform-home] { display: none !important; }

/* Reader becomes an in-flow center pane — never a covering drawer */
html.hub-page-daily #reader.reader,
html.hub-daily-layout #reader.reader {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: calc(100vh - var(--hub-nav-h) - 48px) !important;
  min-height: 420px;
  z-index: 1 !important;
  border: 1px solid var(--hub-line) !important;
  border-radius: var(--hub-radius) !important;
  box-shadow: var(--hub-shadow) !important;
  background: var(--hub-elev) !important;
  overflow: hidden;
  margin: 0 0 24px !important;
  animation: hub-view-in 0.28s var(--hub-ease) both;
}

html.hub-page-daily .app.is-reading .content {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

html.hub-page-daily .reader-resizer { display: none !important; }

html.hub-page-daily .reader-bar {
  background: var(--hub-elev);
  border-bottom: 1px solid var(--hub-line);
  color: var(--hub-text);
  padding: 10px 14px;
  gap: 10px;
}

html.hub-page-daily .reader-heading {
  color: var(--hub-text);
  font-weight: 700;
}

html.hub-page-daily .reader-open,
html.hub-page-daily .reader-close {
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 650;
  font-size: 13px;
  border: 1px solid var(--hub-line-strong);
  background: transparent;
  color: var(--hub-muted);
  text-decoration: none;
  cursor: pointer;
}

html.hub-page-daily .reader-close:hover,
html.hub-page-daily .reader-open:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--hub-text);
  text-decoration: none;
}

html.hub-page-daily .reader-body,
html.hub-page-daily .reader-frame {
  background: var(--hub-bg);
}

@keyframes hub-view-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

html.hub-page-daily .app.is-reading .content { display: none !important; }

html.hub-page-daily #reader.reader {
  display: flex;
  flex-direction: column;
}
html.hub-page-daily #reader.reader[hidden] { display: none !important; }

html.hub-page-daily .reader-fallback.is-visible { display: block !important; }
html.hub-page-daily .reader-frame.is-hidden { display: none !important; }
html.hub-page-daily #fallback-angle-wrap:has(#fallback-angle:empty) {
  display: none !important;
}

html.hub-page-daily .fallback-card {
  max-width: 520px;
  margin: 8px auto 0;
  padding: 24px !important;
  border-radius: var(--hub-radius);
  background: var(--hub-elev);
  border: 1px solid var(--hub-line);
  box-shadow: var(--hub-shadow);
}

@media (min-width: 900px) {
  html.hub-page-daily .app {
    display: grid !important;
    grid-template-columns: var(--hub-side-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - var(--hub-nav-h));
  }

  html.hub-page-daily .sidebar:has([data-nav]) {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: var(--hub-nav-h);
    height: calc(100vh - var(--hub-nav-h));
    overflow: auto;
    width: 100% !important;
    padding: 22px 14px 32px 22px;
    border-right: 1px solid var(--hub-line);
    background: rgba(255, 255, 255, 0.55);
  }

  html.hub-page-daily .content {
    grid-column: 2;
    grid-row: 1;
    max-width: none !important;
    width: 100%;
    margin: 0 !important;
    padding: 28px 28px 72px;
  }

  html.hub-page-daily #reader.reader {
    grid-column: 2;
    grid-row: 1;
  }

  html.hub-page-daily .app.is-reading .content { display: none !important; }

  html.hub-page-daily .app.is-platforms .platform-page { display: none !important; }
}

@media (max-width: 899px) {
  html.hub-page-daily .app {
    display: flex;
    flex-direction: column;
  }

  html.hub-page-daily .sidebar:has([data-nav]) {
    position: sticky;
    top: var(--hub-nav-h);
    z-index: 30;
    width: 100% !important;
    height: auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--hub-line);
    padding: 8px 12px 10px;
  }

  html.hub-page-daily .sidebar .brand { display: none; }

  html.hub-page-daily .sidebar .nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 0;
    padding-bottom: 2px;
  }

  html.hub-page-daily .sidebar .nav-item {
    flex: none;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.04);
  }

  html.hub-page-daily .sidebar .nav-item .icon { display: none; }

  .hub-plat-wrap { margin-top: 8px; }

  .hub-plat-wrap > .hub-side-kicker { display: none; }

  .hub-plat-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin: 0;
  }

  .hub-plat-item {
    flex: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    white-space: nowrap;
  }

  /* On mobile the Top 5 stays in the center, not a second cramped list in the chip row */
  html.hub-page-daily .hub-plat-list { display: none !important; }

  html.hub-page-daily .content {
    padding: 20px 16px 64px;
    max-width: none !important;
    margin: 0 !important;
  }

  html.hub-page-daily .app.has-platform:not(.is-reading) .hub-stage-empty { display: none !important; }

  html.hub-page-daily .app.is-reading .view,
  html.hub-page-daily .app.is-reading [data-platform-home],
  html.hub-page-daily .app.is-reading .platform-page { display: none !important; }

  html.hub-page-daily #reader.reader {
    height: calc(100vh - var(--hub-nav-h) - 140px) !important;
    min-height: 360px;
    margin: 16px 16px 32px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-vcard-thumb img,
  .hub-play-fab,
  .hub-lb,
  .hub-lb-dialog,
  .hub-lb-bigplay,
  html.hub-page-news .view.is-active,
  html.hub-page-daily #reader.reader {
    animation: none !important;
    transition: none !important;
  }
  .hub-vcard:hover .hub-vcard-thumb img,
  .hub-lb.is-open .hub-lb-dialog { transform: none; }
}
