/* Approved homepage: white page, frosted nav, crisp gradient edge, 16:10 cards. */

:root {
  --hub-glow: conic-gradient(from 210deg, #5ac8fa, #7d5cff, #ff5fa2, #ff9f43, #5ac8fa);
  --hub-ink: #1d1d1f;
  --hub-sub: #6e6e73;
  --hub-line: rgba(0, 0, 0, 0.08);
}

body.page-home,
body.page-games { background: #fff; color: var(--hub-ink); }
body.page-home::before,
body.page-games::before { display: none; }

.page-home .nav,
.page-games .nav {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hub-line);
}
.page-home .nav__inner,
.page-games .nav__inner { height: 56px; gap: 32px; justify-content: flex-start; }
.page-home .nav__logo,
.page-games .nav__logo { margin-right: auto; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; gap: 0; }
.page-home .nav__logo-text span,
.page-games .nav__logo-text span {
  background: var(--hub-glow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-home .nav__links,
.page-games .nav__links { gap: 32px; }
.page-home .nav__links a,
.page-games .nav__links a {
  padding: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 400; color: #424245;
}
.page-home .nav__links a:hover,
.page-games .nav__links a:hover,
.page-home .nav__links a.active,
.page-games .nav__links a.active { color: var(--hub-ink); background: none; font-weight: 400; }

.hub-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.hub-head { padding: 48px 0 0; }
.hub-eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--hub-sub); }
.hub-head h1,
.page-games .gh-hero__title {
  max-width: 760px; margin: 0; font-size: 64px; line-height: 1.03;
  letter-spacing: -0.035em; font-weight: 700; color: var(--hub-ink);
}

.hub-hero {
  display: block; position: relative; margin: 32px 0 0; border-radius: 28px; padding: 2px;
  background: var(--hub-glow); text-decoration: none; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 28px -6px rgba(125,92,255,.45), 0 24px 60px -24px rgba(255,95,162,.5);
}
.hub-hero:hover { text-decoration: none; }
.hub-hero__in { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 16 / 7.2; background: #0b1a12; }
.hub-hero__in picture, .hub-hero__in img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.hub-hero__copy {
  position: absolute; left: 0; right: 0; bottom: 0; height: 45%; padding: 28px 44px 36px; color: #fff;
  background: linear-gradient(to top,
    rgba(0,0,0,0.94) 0%,
    rgba(0,0,0,0.86) 38%,
    rgba(0,0,0,0.55) 72%,
    rgba(0,0,0,0) 100%);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.hub-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 12px;
  border-radius: 99px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.hub-badge i { width: 7px; height: 7px; border-radius: 50%; background: #ffd60a; box-shadow: 0 0 8px #ffd60a; }
.hub-hero h2 { margin: 0; font-size: 48px; letter-spacing: -0.03em; line-height: 1; color: #fff; font-weight: 700; }
.hub-hero p {
  margin: 10px 0 0; font-size: 18px; line-height: 1.35; max-width: 520px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.hub-play {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px 28px; border-radius: 99px;
  background: #fff; color: var(--hub-ink); font-weight: 600; font-size: 16px; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.hub-hero:hover .hub-play { transform: scale(1.04); }

.hub-row { padding: 96px 0 0; }
.hub-row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.hub-row__head h3,
.page-games .gh-section-label {
  margin: 0; font-size: 40px; letter-spacing: -0.03em; font-weight: 700; color: var(--hub-ink);
  text-transform: none; line-height: 1.05;
}
.hub-row__head p { margin: 6px 0 0; color: var(--hub-sub); font-size: 17px; line-height: 1.35; }
.hub-row__head a { color: #0066cc; font-size: 15px; white-space: nowrap; text-decoration: none; }
.hub-row__head a:hover { text-decoration: underline; }
.hub-row__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.hub-row__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hub-row__grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.hub-card { display: block; color: inherit; text-decoration: none; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.hub-card:hover { text-decoration: none; transform: translateY(-6px); }
.hub-thumb {
  position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; background: #111;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px -12px rgba(0,0,0,.25);
}
.hub-thumb img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.hub-thumb::after,
.page-games .gh-card__thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1.5px; background: var(--hub-glow);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none;
}
.hub-card:hover .hub-thumb::after { opacity: 1; }
.hub-card:hover .hub-thumb img { transform: scale(1.04); }
.hub-ext-icon {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.92); color: #1a1a1a;
  font-size: 15px; font-weight: 700; line-height: 28px; text-align: center;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.hub-meta { padding: 16px 4px 0; }
.hub-tag, .page-games .gh-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7d5cff;
  background: none; border: 0; padding: 0; border-radius: 0;
}
.hub-meta h4, .hub-card h4 { margin: 4px 0; font-size: 20px; letter-spacing: -0.015em; font-weight: 700; color: var(--hub-ink); line-height: 1.2; }
.hub-meta p { margin: 0; font-size: 15px; color: var(--hub-sub); line-height: 1.4; }
.hub-card:focus-visible, .hub-hero:focus-visible, .page-games .gh-card:focus-within { outline: 2px solid #0071e3; outline-offset: 4px; }

.hub-foot { margin-top: 120px; border-top: 1px solid var(--hub-line); background: #fff; }
.hub-foot .hub-wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; font-size: 13px; color: var(--hub-sub); }
.hub-foot nav { display: flex; gap: 24px; background: none; border: 0; position: static; backdrop-filter: none; padding: 0; height: auto; }
.hub-foot a { color: var(--hub-sub); text-decoration: none; }
.hub-foot a:hover { color: var(--hub-ink); text-decoration: underline; }

.page-games .gh-hero { max-width: 1200px; margin: 0 auto; padding: 48px 32px 0; text-align: left; border: 0; background: none; overflow: visible; }
.page-games .gh-hero::before { display: none; }
.page-games .gh-hero__eyebrow { justify-content: flex-start; color: var(--hub-sub); letter-spacing: .02em; text-transform: none; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.page-games .gh-hero__eyebrow .live-dot { display: none; }
.page-games .gh-hero__title { text-align: left; padding: 0; }
.page-games .gh-hero__sub { margin: 12px 0 22px; max-width: 640px; color: var(--hub-sub); font-size: 17px; text-align: left; }
.page-games .gh-search { display: block; width: min(420px, 100%); margin: 0 0 16px; background: #f5f5f7; border: 1px solid var(--hub-line); color: var(--hub-ink); border-radius: 12px; }
.page-games .gh-search:focus { border-color: #0071e3; }
.page-games .gh-toolbar, .page-games .gh-filters, .page-games .gh-sort { align-items: flex-start; justify-content: flex-start; }
.page-games .gh-filter, .page-games .gh-sort-btn { border: 0; background: rgba(0,0,0,.05); color: var(--hub-ink); border-radius: 99px; }
.page-games .gh-filter.active, .page-games .gh-filter:hover, .page-games .gh-sort-btn.active, .page-games .gh-sort-btn:hover { background: var(--hub-ink); color: #fff; border-color: transparent; }
.page-games .gh-filter-count { background: rgba(255,255,255,.16); color: inherit; }
.page-games .gh-stats { max-width: 1200px; margin: 28px auto 0; background: transparent; border-color: var(--hub-line); }
.page-games .gh-stat { border-color: var(--hub-line); }
.page-games .gh-stat__num, .page-games .gh-stat__num span { color: var(--hub-ink); }
.page-games .gh-stat__label, .page-games .gh-stats-empty { color: var(--hub-sub); }
.page-games .gh-stats-empty { max-width: 1200px; margin: 0 auto; background: transparent; border-color: var(--hub-line); text-align: left; padding-left: 32px; padding-right: 32px; }
.page-games .gh-main { max-width: 1200px; margin: 0 auto; padding: 28px 32px 0; }
.page-games .gh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; margin: 0; }
.page-games .gh-grid > .gh-section-label { grid-column: 1 / -1; display: block; margin: 68px 0 0; }
.page-games .gh-grid > .gh-section-label:first-child { margin-top: 8px; }
.page-games .gh-section-label::after, .page-games .gh-section-label .sl-accent { display: none; }
.page-games .gh-card { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.page-games .gh-card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: none; }
.page-games .gh-card__thumb { height: auto; aspect-ratio: 16/10; border-radius: 20px; background: #111; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px -12px rgba(0,0,0,.25); }
.page-games .gh-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.page-games .gh-card:hover .gh-card__img { transform: scale(1.04); }
.page-games .gh-card:hover .gh-card__thumb::after { opacity: 1; }
.page-games .gh-card:hover .gh-card__play-overlay { background: transparent; }
.page-games .gh-card__play-overlay, .page-games .gh-card__play, .page-games .gh-card__badge, .page-games .gh-card__meta, .page-games .gh-card__device { display: none; }
/* Partner card only: keep a visible outbound pill. Do not unhide badges/play on other cards. */
.page-games .gh-card--external .gh-card__badge--partner {
  display: inline-flex;
  align-items: center;
  z-index: 2;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #6d4aff;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.page-games .gh-card--external .gh-tag.gt-partner,
.hub-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(109,74,255,.12) !important;
  color: #6d4aff !important;
  border: 0 !important;
}
.hub-pill--thumb {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  pointer-events: none;
}
.page-games .gh-card__body { padding: 16px 4px 0; }
.page-games .gh-card__tags { margin: 0 0 4px; }
.page-games .gh-card__title { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.015em; font-weight: 700; color: var(--hub-ink); }
.page-games .gh-card__title:hover { color: var(--hub-ink); text-decoration: none; }
.page-games .gh-card__desc { margin: 0; font-size: 15px; line-height: 1.4; color: var(--hub-sub); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.page-games .gh-lab-note { color: var(--hub-sub); font-size: 15px; }
.page-games .gh-lab-note a { color: #0066cc; font-weight: 600; }
.page-games .gh-empty { color: var(--hub-sub); }

@media (max-width: 1100px) {
  .hub-row__grid, .page-games .gh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hub-row__grid, .hub-row__grid--3, .page-games .gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-row__grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hub-wrap { padding: 0 20px; }
  .page-home .nav__inner, .page-games .nav__inner { gap: 18px; }
  .page-home .nav__links, .page-games .nav__links {
    display: flex !important; position: static !important; flex-direction: row !important;
    background: none !important; border: 0 !important; padding: 0 !important; gap: 18px !important;
    max-height: none !important; overflow: visible !important; animation: none !important;
  }
  .page-home .nav__links a[href="/guides"], .page-games .nav__links a[href="/guides"] { display: none !important; }
  .page-home .nav__links a, .page-games .nav__links a { padding: 0 !important; min-height: 0 !important; width: auto !important; font-size: 14px !important; background: none !important; }
  .page-home .nav__search-btn, .page-games .nav__search-btn { background: #f5f5f7 !important; width: 34px !important; }
  .page-home .nav__hamburger, .page-games .nav__hamburger { display: none !important; }
  .hub-head, .page-games .gh-hero { padding: 28px 20px 0; }
  .hub-head h1, .page-games .gh-hero__title { font-size: 40px; }
  .hub-hero { border-radius: 24px; margin-top: 22px; }
  .hub-hero__in { border-radius: 22px; aspect-ratio: 4 / 5; }
  .hub-hero__copy { flex-direction: column; align-items: flex-start; height: auto; min-height: 52%; padding: 24px; }
  .hub-hero h2 { font-size: 34px; }
  .hub-hero p { font-size: 16px; }
  .hub-row { padding: 64px 0 0; }
  .hub-row__head { margin-bottom: 18px; }
  .hub-row__head h3, .page-games .gh-section-label, .page-games .gh-grid > .gh-section-label { font-size: 28px; }
  .hub-row__head p { font-size: 15px; }
  .hub-row__grid, .hub-row__grid--3, .page-games .gh-grid {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 -20px; padding: 0 20px 12px; scrollbar-width: none; grid-template-columns: none;
  }
  .hub-card, .page-games .gh-card { flex: 0 0 78%; scroll-snap-align: start; }
  .page-games .gh-grid > .gh-section-label { flex: 0 0 auto; width: auto; margin: 28px 0 0; align-self: flex-end; }
  .page-games .gh-main { padding: 20px 0 0; }
  .hub-foot { margin-top: 72px; }
  .hub-foot .hub-wrap { flex-direction: column; justify-content: center; gap: 8px; height: auto; padding-top: 20px; padding-bottom: 20px; }
  .hub-foot nav { flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
  .hub-foot a { white-space: nowrap; }
}
/* Today's puzzles: tap-to-play dailies beside (desktop) / under (phone) the hero. Filled by daily-kit.js. */
.hub-stage { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 24px; margin-top: 32px; align-items: stretch; }
.hub-stage .hub-hero { margin: 0; display: flex; }
.hub-stage .hub-hero__in { flex: 1; aspect-ratio: auto; min-height: 420px; }
.hub-stage .hub-hero__copy { padding: 28px 32px 32px; height: auto; min-height: 45%; }
.hub-today {
  min-width: 0; padding: 16px; border-radius: 28px; background: #fff; border: 1px solid var(--hub-line);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 44px -24px rgba(0,0,0,.28); display: flex; flex-direction: column; gap: 10px;
}
.hub-today__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hub-today__head h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 700; color: var(--hub-ink); line-height: 1.15; }
.hub-today__stats { display: flex; gap: 10px; font-size: 14px; font-weight: 700; color: var(--hub-sub); }
.hub-today__streak { color: #c2410c; }
.hub-today__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 99px;
  background: var(--hub-ink); color: #fff; font-weight: 600; font-size: 16px; text-align: center; text-decoration: none; line-height: 1.2;
}
.hub-today__cta:hover { text-decoration: none; background: #000; }
.hub-today__alldone { text-align: center; font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--hub-ink); }
.hub-today__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hub-today__tile {
  display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 6px 10px; border-radius: 16px; min-width: 0;
  background: #f5f5f7; color: var(--hub-ink); text-decoration: none; border: 1px solid transparent;
}
.hub-today__tile:hover { text-decoration: none; background: #ececf0; }
.hub-today__tile.is-done { background: #f1faf4; border-color: rgba(52,199,89,.28); }
.hub-today__ico { flex: 0 0 auto; font-size: 20px; line-height: 1; width: 24px; text-align: center; }
.hub-today__name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: break-word; }
.hub-today__name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--hub-sub); }
.hub-today__chk {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.2); box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff;
}
.hub-today__tile.is-done .hub-today__chk { background: #34c759; border-color: #34c759; }
.hub-today a:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
@media (max-width: 1100px) { .hub-stage { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 860px) { .hub-stage { grid-template-columns: minmax(0, 1fr); } .hub-stage .hub-hero__in { min-height: 0; } }
@media (max-width: 760px) {
  .hub-stage { gap: 16px; margin-top: 22px; }
  .hub-stage .hub-hero__in { aspect-ratio: 4 / 5; }
  .hub-stage .hub-hero__copy { padding: 24px; min-height: 52%; }
  .hub-today { padding: 12px; border-radius: 24px; }
  .hub-today__tile { position: relative; gap: 8px; padding: 8px; }
  .hub-today__name { font-size: 13.5px; padding-right: 10px; }
  .hub-today__chk { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-card, .hub-thumb img, .hub-play, .page-games .gh-card, .page-games .gh-card__img { transition: none; }
  .hub-hero:hover .hub-play, .hub-card:hover, .hub-card:hover .hub-thumb img, .page-games .gh-card:hover, .page-games .gh-card:hover .gh-card__img { transform: none; }
}

/* Very small phones (360px): logo + Games + Daily + search overflowed the bar by ~10px. */
@media (max-width: 400px) {
  .page-home .nav__inner, .page-games .nav__inner { gap: 12px; }
  .page-home .nav__logo, .page-games .nav__logo { font-size: 17px; }
  .page-home .nav__links, .page-games .nav__links { gap: 14px !important; }
}
