.puzzle-home-view {
  min-height: calc(100vh - var(--header-height, 56px));
  padding: 0;
  margin-top: 0;
  background: #ffffff;
  color: #071126;
}
/* Puzzle Select can return from a full-screen puzzle that locked page scrolling. */
html:has(#view-puzzle-home.active),body:has(#view-puzzle-home.active){height:auto!important;min-height:100%!important;overflow-y:auto!important}body:has(#view-puzzle-home.active) #main-content,body:has(#view-puzzle-home.active) #view-puzzle-home{height:auto!important;max-height:none!important;min-height:calc(100vh - var(--header-height,56px))!important;overflow:visible!important}

/* Keep long puzzle menus reachable on classroom touch displays. */
body:has(#view-puzzle-home.active) .cat-dropdown.open {
  max-height: calc(100vh - var(--header-height, 56px) - 16px) !important;
  max-height: calc(100dvh - var(--header-height, 56px) - 16px) !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}


.pzh-page {
  background: #ffffff;
}

.pzh-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 78px 24px 64px;
  color: #ffffff;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 35%, rgba(75, 113, 255, .28), transparent 34rem),
    linear-gradient(135deg, #10182e 0%, #17274d 100%);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.pzh-hero-inner {
  width: min(980px, 100%);
  text-align: center;
}

.pzh-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
  padding: 7px 16px;
  border: 1px solid rgba(121, 149, 255, .6);
  border-radius: 999px;
  background: rgba(37, 99, 235, .22);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.pzh-hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.07;
  letter-spacing: 0;
  font-weight: 1000;
}

.pzh-hero h1 span {
  color: #8fb1ff;
}

.pzh-hero-copy {
  max-width: 620px;
  margin: 28px auto 0;
  color: #b8c3d9;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 800;
  word-break: keep-all;
}

.pzh-hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.pzh-feedback-link {
  border-color: rgba(251, 191, 36, .72) !important;
  color: #fef3c7 !important;
  background: rgba(180, 83, 9, .24) !important;
}

.pzh-beta-cards {
  width: min(900px, 100%);
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pzh-beta-cards article {
  min-height: 118px;
  padding: 16px 16px 15px;
  border: 1px solid rgba(199, 210, 254, .22);
  border-radius: 8px;
  background: rgba(15, 23, 42, .42);
  box-shadow: 0 16px 32px rgba(0,0,0,.16);
  text-align: left;
  backdrop-filter: blur(10px);
}

.pzh-beta-cards strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 1000;
}

.pzh-beta-cards span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
  word-break: keep-all;
}

.pzh-role-switch {
  width: fit-content;
  margin: 16px auto 0;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, .32);
  box-shadow: 0 16px 34px rgba(0,0,0,.16);
  backdrop-filter: blur(12px);
}

.pzh-role-switch span {
  padding: 0 8px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 900;
}

.pzh-role-switch button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}

.pzh-role-switch button.active {
  background: #ffffff;
  color: #3730a3;
}

.pzh-start,
.pzh-curriculum {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 28px;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.pzh-start {
  background: linear-gradient(135deg, #4f6ef7, #695cff);
  box-shadow: 0 18px 36px rgba(79, 110, 247, .36);
}

.pzh-signup-cta {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.pzh-curriculum {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
}

.pzh-start:hover,
.pzh-curriculum:hover {
  transform: translateY(-2px);
}

.pzh-stats {
  width: min(720px, 100%);
  margin: 58px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.09);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.pzh-stats div {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid rgba(255,255,255,.08);
}

.pzh-stats div:last-child {
  border-right: 0;
}

.pzh-stats strong {
  color: #8fb1ff;
  font-size: 30px;
  line-height: 1;
  font-weight: 1000;
}

.pzh-stats span {
  color: #99a8c7;
  font-size: 12px;
  font-weight: 900;
}

.pzh-features,
.pzh-catalog-intro,
.pzh-sections,
.pzh-filter {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.pzh-features {
  padding: 70px 0 40px;
}

.pzh-section-title {
  margin-bottom: 44px;
}

.pzh-section-title p {
  margin: 0 0 12px;
  color: #5266ff;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .34em;
}

.pzh-section-title h2 {
  margin: 0;
  color: #071126;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 1000;
}

.pzh-section-title span {
  display: block;
  max-width: 760px;
  margin-top: 20px;
  color: #475569;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

.pzh-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.pzh-feature-grid article {
  position: relative;
  min-height: 280px;
  padding: 34px 32px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  overflow: hidden;
}

.pzh-feature-grid article:nth-child(2) {
  border-color: #f5d66c;
  background: #fffdf6;
}

.pzh-feature-grid article:nth-child(3) {
  border-color: #b8f0d5;
  background: #f8fffb;
}

.pzh-feature-grid i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #eef4ff;
  color: #071126;
  font-size: 21px;
  margin-bottom: 28px;
}

.pzh-feature-grid article:nth-child(2) i {
  background: #fff7d6;
}

.pzh-feature-grid article:nth-child(3) i {
  background: #eafaf1;
}

.pzh-feature-grid em {
  position: absolute;
  top: 20px;
  right: 26px;
  color: #e3e8f2;
  font-size: 56px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
}

.pzh-feature-grid article:nth-child(2) em {
  color: #f5dc79;
}

.pzh-feature-grid article:nth-child(3) em {
  color: #9cebc2;
}

.pzh-feature-grid h3 {
  margin: 0;
  color: #071126;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 1000;
  letter-spacing: 0;
}

.pzh-feature-grid p {
  margin: 18px 0 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
}

.pzh-feature-grid article > span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #4f6ef7;
  font-size: 12px;
  font-weight: 1000;
}

.pzh-catalog-intro {
  padding: 34px 0 24px;
}

.pzh-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pzh-summary-card {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid #dbe4ee;
  border-top: 5px solid #6c4bf4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pzh-summary-card:hover,
.pzh-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
  outline: none;
}

.pzh-summary-card.pzh-teal {
  border-top-color: #2f7d80;
}

.pzh-summary-card.pzh-rose {
  border-top-color: #c12c72;
}

.pzh-summary-card.pzh-amber {
  border-top-color: #2f7d80;
}

.pzh-summary-card.pzh-blue {
  border-top-color: #2563eb;
}

.pzh-summary-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.pzh-summary-top > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  align-items: center;
}

.pzh-summary-top i {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eef2ff;
  color: #2837b8;
  font-size: 17px;
}

.pzh-summary-top strong {
  color: #071126;
  font-size: 20px;
  font-weight: 1000;
}

.pzh-summary-top small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.pzh-summary-top > span {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  color: #475569;
  font-size: 12px;
  font-weight: 1000;
}

.pzh-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pzh-chip-row a,
.pzh-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #334155;
  border: 1px solid #dbe4ee;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.pzh-chip-row a:hover {
  color: #3730a3;
  border-color: #c7d2fe;
  background: #eef2ff;
}

.pzh-chip-row span {
  cursor: default;
}

.pzh-summary-guide {
  margin: -4px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.pzh-service-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.pzh-service-guide span {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.pzh-service-guide b {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 1000;
}

@media (max-width: 860px) {
  .pzh-service-guide {
    grid-template-columns: 1fr;
  }
}

.pzh-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 26px;
  margin-top: -2px;
  background: transparent;
}

.pzh-filter button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 1000;
  font-family: inherit;
  cursor: pointer;
}

.pzh-filter button.active {
  background: #5365f6;
  border-color: #5365f6;
  color: #ffffff;
}

.pzh-filter span {
  font-size: 11px;
  opacity: .78;
}

.pzh-sections {
  display: grid;
  gap: 36px;
  padding: 6px 0 80px;
}

.pzh-puzzle-section {
  scroll-margin-top: calc(var(--header-height, 56px) + 18px);
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
}

.pzh-puzzle-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #6f42e8, #5365f6);
}

.pzh-puzzle-section.pzh-teal header {
  background: linear-gradient(135deg, #297873, #43a4df);
}

.pzh-puzzle-section.pzh-rose header {
  background: linear-gradient(135deg, #b1256d, #ef5a86);
}

.pzh-puzzle-section.pzh-amber header {
  background: linear-gradient(135deg, #b7791f, #f59e0b);
}

.pzh-puzzle-section.pzh-blue header {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.pzh-puzzle-section header > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 12px;
}

.pzh-puzzle-section header i {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.18);
}

.pzh-puzzle-section h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 0;
}

.pzh-puzzle-section p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
}

.pzh-puzzle-section header > span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  font-size: 13px;
  font-weight: 1000;
}

.pzh-puzzle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.pzh-violet .pzh-public-card {
  background: #f3efff;
  border-color: #c4b5fd;
}

.pzh-teal .pzh-public-card {
  background: #ecfdf8;
  border-color: #99e3d2;
}

.pzh-rose .pzh-public-card {
  background: #fff1f5;
  border-color: #f5b8cf;
}

.pzh-violet .pzh-public-card .pzh-puzzle-symbol {
  background: #e9e2ff;
  color: #5b21b6;
}

.pzh-teal .pzh-public-card .pzh-puzzle-symbol {
  background: #d8f7ef;
  color: #0f766e;
}

.pzh-rose .pzh-public-card .pzh-puzzle-symbol {
  background: #ffe0ea;
  color: #be185d;
}

.pzh-ready-group {
  margin: 0 20px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f1f5f9;
}

.pzh-ready-group > summary {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: #475569;
  cursor: pointer;
  list-style: none;
}

.pzh-ready-group > summary::-webkit-details-marker {
  display: none;
}

.pzh-ready-group > summary span,
.pzh-ready-group > summary b {
  font-size: 13px;
  font-weight: 1000;
}

.pzh-ready-group > summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pzh-ready-group > summary small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.pzh-ready-grid {
  padding-top: 4px;
  border-top: 1px solid #dbe4ee;
}

.pzh-ready-card {
  background: #ffffff;
  border-color: #cbd5e1;
}

.pzh-puzzle-card {
  position: relative;
  min-height: 218px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #ffffff;
  color: #071126;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.pzh-puzzle-card:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 14px 26px rgba(15, 23, 42, .09);
}

.pzh-puzzle-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 1000;
}

.pzh-puzzle-card strong {
  color: #071126;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.25;
}

.pzh-level {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #5365f6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 1000;
}

.pzh-puzzle-card small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
  word-break: keep-all;
}

.pzh-bridge-tags {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.pzh-bridge-tags span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.35;
  word-break: keep-all;
}

.pzh-bridge-tags b {
  flex: 0 0 auto;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 1000;
}

.pzh-new {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 1000;
}

@media (max-width: 1080px) {
  .pzh-feature-grid,
  .pzh-summary-grid {
    grid-template-columns: 1fr;
  }

  .pzh-puzzle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pzh-hero {
    min-height: 460px;
    padding: 62px 16px 44px;
  }

  .pzh-hero h1 {
    font-size: 40px;
  }

  .pzh-hero-copy {
    font-size: 15px;
  }

  .pzh-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .pzh-stats div:nth-child(2) {
    border-right: 0;
  }

  .pzh-stats div:nth-child(1),
  .pzh-stats div:nth-child(2) {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .pzh-beta-cards {
    grid-template-columns: 1fr;
  }

  .pzh-beta-cards article {
    min-height: auto;
  }

  .pzh-features,
  .pzh-catalog-intro,
  .pzh-sections,
  .pzh-filter {
    width: min(100% - 24px, 620px);
  }

  .pzh-section-title h2 {
    font-size: 31px;
  }

  .pzh-puzzle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }
}

@media (max-width: 460px) {
  .pzh-hero h1 {
    font-size: 34px;
  }

  .pzh-start,
  .pzh-curriculum {
    width: 100%;
  }

  .pzh-feature-grid article {
    padding: 26px 22px;
  }

  .pzh-puzzle-grid {
    grid-template-columns: 1fr;
  }
}
