/* Approved B homepage layer. Original activity styles and application logic are unchanged. */
@property --game-border-opacity {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 34%;
}

.hub-home-refresh{width:100%;max-width:var(--hub-content-max,1180px);padding:25px var(--hub-page-gutter,22px) 35px}.hub-home-refresh .home-brand{margin:0 2px 20px}.hub-home-refresh>.site-header{text-align:center;background:#fff;border:1px solid var(--line);border-radius:22px;padding:28px 24px 25px;margin:0 0 24px;box-shadow:0 8px 30px #18203305}.hub-home-refresh>.site-header .brandTitle{justify-content:center;gap:15px;font-size:clamp(38px,4.8vw,60px);font-weight:800;letter-spacing:-2.5px;line-height:1.07}.hub-home-refresh>.site-header .brandTitle img{width:43px;height:43px}.hub-home-refresh .hub-word{color:var(--purple);background:linear-gradient(115deg,#117a70,#7040ca 48%,#a833b5);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.hub-home-refresh>.site-header .subtitle{font-size:14px;letter-spacing:.035em;margin-top:12px}.home-gradient{height:2px;background:linear-gradient(90deg,var(--cyan),var(--purple),var(--pink));margin:18px 20px 25px;border-radius:3px}.hub-home-refresh #coursesView{background:linear-gradient(125deg,#fff 52%,#35d8c210);border:1px solid var(--line);border-radius:22px;padding:28px}.hub-home-refresh .classroom-games{background:linear-gradient(125deg,#fff 48%,#8b5cf610);border:1px solid var(--line);border-radius:22px;padding:28px;margin-top:24px}.hub-home-refresh #coursesView>.section-head,.hub-home-refresh .classroom-games>.section-head{margin-bottom:23px}.hub-home-refresh #coursesView>.section-head .breadcrumb,.hub-home-refresh .classroom-games>.section-head .breadcrumb{font-size:10px;font-weight:750;letter-spacing:2px;color:var(--muted);margin:0 0 11px}.hub-home-refresh #learnHeading,.hub-home-refresh #classroomGamesTitle{font-size:clamp(26px,2.6vw,32px);font-weight:800;line-height:1.12;letter-spacing:-.8px;margin:0}.hub-home-refresh #learnHeading span,.hub-home-refresh #classroomGamesTitle span{color:#6847b4}.hub-home-refresh #courses{gap:14px}.hub-home-refresh .course-card,.hub-home-refresh .games-grid .quizloop-feature{border:1px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(125deg,#35d8c266,#8b5cf688,#d05adf66) border-box;border-radius:15px;box-shadow:none;transition:transform .2s ease,box-shadow .2s ease}.hub-home-refresh .course-card{min-height:125px;padding:20px}.hub-home-refresh .course-card h3{font-size:20px;letter-spacing:-.4px;margin:10px 0 12px}.hub-home-refresh .course-card .tag{font-size:10px;letter-spacing:1.1px;color:#6847b4}.hub-home-refresh .course-card .status{font-size:12px;margin-top:0}.hub-home-refresh .course-card:hover:not(:disabled),.hub-home-refresh .course-card:focus-visible,.hub-home-refresh .quizloop-feature:hover,.hub-home-refresh .quizloop-feature:focus-within{transform:translateY(-2px);box-shadow:-4px 3px 18px #35d8c21a,5px 3px 18px #8b5cf61f}.hub-home-refresh .games-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.hub-home-refresh .games-grid .quizloop-feature{padding:20px;gap:18px;min-height:193px}.hub-home-refresh .games-grid .quizloop-feature .tag{display:none}.hub-home-refresh .games-grid .gameBrand{font-size:23px;letter-spacing:-.5px;gap:10px;margin:0}.hub-home-refresh .games-grid .gameBrand img{width:29px;height:29px;border-radius:0}.hub-home-refresh .games-grid .quizloop-feature p{font-size:14px;line-height:1.55;margin-top:12px}.hub-home-refresh .games-grid .quizloop-feature .btn{align-self:flex-start;width:auto;min-height:44px;background:white;color:#6847b4;border:1px solid #dfd5ed;border-radius:10px;padding:11px 14px;font-size:12px;box-shadow:none}.hub-home-refresh .games-grid .quizloop-feature .btn:hover{background:#6847b4;color:#fff;border-color:#6847b4}.hub-home-refresh .hub-tools{border-top:1px solid var(--line);padding:15px 3px 0;margin-top:22px}.hub-home-refresh #teacherToggle{border:0;background:none;padding:10px 0;color:#657080;font-size:11px;letter-spacing:1px;min-height:44px}.hub-home-refresh #teacherToggle:after{content:' +';margin-left:12px}.hub-home-refresh #teacherToggle[aria-expanded=true]:after{content:' −'}.hub-home-refresh .xtart-footer{margin:18px 0 0;font-size:10px}.hub-home-refresh a:focus-visible,.hub-home-refresh button:focus-visible{outline:3px solid #28b6ca;outline-offset:4px}@media(max-width:950px){.hub-home-refresh .games-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.hub-home-refresh{padding:18px 12px 65px}.hub-home-refresh>.site-header{padding:25px 18px 23px;border-radius:19px}.hub-home-refresh>.site-header .brandTitle{font-size:38px;letter-spacing:-1.8px;gap:11px}.hub-home-refresh>.site-header .brandTitle img{width:34px;height:34px}.hub-home-refresh #coursesView,.hub-home-refresh .classroom-games{padding:23px 18px;border-radius:19px}.hub-home-refresh .classroom-games{margin-top:20px}.hub-home-refresh #learnHeading,.hub-home-refresh #classroomGamesTitle{font-size:27px}.hub-home-refresh .games-grid{grid-template-columns:1fr}.hub-home-refresh .course-card{min-height:116px}.home-gradient{margin:15px 15px 20px}.hub-home-refresh .games-grid .quizloop-feature{min-height:0}}@media(prefers-reduced-motion:reduce){.hub-home-refresh *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){.hub-home-refresh .hub-word{background:none;color:CanvasText;-webkit-text-fill-color:CanvasText}}

/* Continue the approved identity through courses and units. */
.hub-home-refresh:not(:has(#coursesView.active))>.home-gradient,.hub-home-refresh:not(:has(#coursesView.active))>.classroom-games{display:none}
.hub-home-refresh #unitsView,.hub-home-refresh #activitiesView{background:linear-gradient(125deg,#fff 52%,#35d8c210);border:1px solid var(--line);border-radius:22px;padding:28px}
.hub-home-refresh .view>.page-header{background:none;border:0;border-radius:0;box-shadow:none;padding:0 0 22px;margin:0;border-bottom:1px solid var(--line)}
.hub-home-refresh .view>.page-header .site-logo-row{display:none}
.hub-home-refresh .view>.page-header h1{font-size:clamp(28px,3.4vw,40px);line-height:1.15;letter-spacing:-1px;margin:10px 0 0}
.hub-home-refresh .view .unit-label{font-size:11px;letter-spacing:1.4px;color:var(--hub-action)}
.hub-home-refresh .view>.page-header .gradient{display:none}
.hub-home-refresh #units,.hub-home-refresh #activities{gap:18px}
.hub-home-refresh .unit-card,.hub-home-refresh .activity-card{border:1px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(125deg,#35d8c266,#8b5cf688,#d05adf66) border-box;border-radius:15px;box-shadow:none;padding:20px;min-width:0}
.hub-home-refresh #activities .activity-card {
  --game-accent: #27b6e3;
  --game-glow: color-mix(in srgb, var(--game-accent) 22%, transparent);
  --game-surface-start: color-mix(in srgb, var(--game-accent) 14%, white);
  --game-surface-end: color-mix(in srgb, var(--game-accent) 5%, white);
  --game-dark-start: color-mix(in srgb, var(--game-accent) 31%, #131a29);
  --game-dark-end: color-mix(in srgb, var(--game-accent) 8%, #131a29);
  --game-border-opacity: 34%;
  border-width: 2px;
  background:
    linear-gradient(135deg, var(--game-surface-start), var(--game-surface-end)) padding-box,
    linear-gradient(125deg, var(--game-glow), color-mix(in srgb, var(--game-accent) var(--game-border-opacity), transparent) 72%) border-box;
  transition: transform .2s ease, box-shadow .2s ease, --game-border-opacity .2s ease;
}
.hub-home-refresh #activities .activity-card:nth-child(5n + 1) { --game-accent: #27b6e3; }
.hub-home-refresh #activities .activity-card:nth-child(5n + 2) { --game-accent: #4f74e8; }
.hub-home-refresh #activities .activity-card:nth-child(5n + 3) { --game-accent: #8b5cf6; }
.hub-home-refresh #activities .activity-card:nth-child(5n + 4) { --game-accent: #a34ce0; }
.hub-home-refresh #activities .activity-card:nth-child(5n + 5) { --game-accent: #d05adf; }
.hub-home-refresh #units .unit-card {
  --game-accent: #27b6e3;
  --game-glow: color-mix(in srgb, var(--game-accent) 22%, transparent);
  --game-surface-start: color-mix(in srgb, var(--game-accent) 14%, white);
  --game-surface-end: color-mix(in srgb, var(--game-accent) 5%, white);
  --game-dark-start: color-mix(in srgb, var(--game-accent) 31%, #131a29);
  --game-dark-end: color-mix(in srgb, var(--game-accent) 8%, #131a29);
  --game-border-opacity: 34%;
  border-width: 2px;
  background:
    linear-gradient(135deg, var(--game-surface-start), var(--game-surface-end)) padding-box,
    linear-gradient(125deg, var(--game-glow), color-mix(in srgb, var(--game-accent) var(--game-border-opacity), transparent) 72%) border-box;
  transition: transform .2s ease, box-shadow .2s ease, --game-border-opacity .2s ease;
}
.hub-home-refresh #units .unit-card:nth-child(5n + 1) { --game-accent: #27b6e3; }
.hub-home-refresh #units .unit-card:nth-child(5n + 2) { --game-accent: #4f74e8; }
.hub-home-refresh #units .unit-card:nth-child(5n + 3) { --game-accent: #8b5cf6; }
.hub-home-refresh #units .unit-card:nth-child(5n + 4) { --game-accent: #a34ce0; }
.hub-home-refresh #units .unit-card:nth-child(5n + 5) { --game-accent: #d05adf; }
.hub-home-refresh #activities .activity-card:hover,
.hub-home-refresh #activities .activity-card:focus-within,
.hub-home-refresh #units .unit-card:hover:not(:disabled),
.hub-home-refresh #units .unit-card:focus-visible {
  --game-border-opacity: 100%;
}
.hub-home-refresh .unit-card h3,.hub-home-refresh .activity-card h3{font-size:20px;line-height:1.3;letter-spacing:-.4px;margin:10px 0 12px}
.hub-home-refresh .activity-card,.hub-home-refresh .games-grid .quizloop-feature{display:flex;flex-direction:column;align-items:stretch}
.hub-home-refresh .activity-card>.status,.hub-home-refresh .games-grid .quizloop-feature>.btn{margin-top:auto;align-self:flex-start}
.hub-home-refresh a:focus-visible,.hub-home-refresh button:focus-visible{outline-color:var(--hub-action)}
@media(hover:hover){.hub-home-refresh .unit-card:hover:not(:disabled),.hub-home-refresh .activity-card:hover{transform:translateY(-2px);box-shadow:-4px 3px 18px #35d8c21a,5px 3px 18px #8b5cf61f}}
@media(max-width:600px){.hub-home-refresh #unitsView,.hub-home-refresh #activitiesView{padding:23px 18px;border-radius:19px}.hub-home-refresh .view>.page-header{padding-bottom:18px}.hub-home-refresh .unit-card,.hub-home-refresh .activity-card{padding:18px}}

/* Approved preview details only: header and unit-count badge. */
.hub-home-refresh>.site-header{position:relative;overflow:hidden;padding:36px 24px 32px;border-color:#e4e4ed;background:radial-gradient(ellipse at 8% 0%,#35d8c218,transparent 48%),radial-gradient(ellipse at 96% 100%,#8b5cf615,transparent 48%),#fff;box-shadow:none}
.hub-home-refresh>.site-header:before{content:'';position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--cyan),var(--purple),var(--pink))}
.hub-home-refresh>.site-header .brandTitle{font-size:clamp(38px,4.8vw,58px);letter-spacing:-2.4px;gap:14px}
.hub-home-refresh>.site-header .subtitle{font-size:15px;color:#586274;letter-spacing:.03em}
.hub-home-refresh .course-card .status{background:#f3f1f8;color:#564477;font-size:12px;letter-spacing:.3px}
@media(max-width:600px){.hub-home-refresh>.site-header{padding:29px 16px 25px}.hub-home-refresh>.site-header .brandTitle{font-size:38px;letter-spacing:-1.7px}}


/* Course/unit headers use the same rounded surface system as hub cards. */
.hub-home-refresh .view > .page-header {
  position: relative;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--hub-surface, #fff) 55%, #35d8c20a);
  box-shadow: 0 8px 24px #18203308;
}
.hub-home-refresh .view > .page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
}
.hub-home-refresh .view > .page-header .hub-route { margin-top: 0; }
.hub-home-refresh .view > .page-header .unit-label { margin-top: 14px; }
.hub-home-refresh .site-home-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.hub-home-refresh .site-home-link::after {
  position: absolute;
  inset: -36px -24px -32px;
  content: "";
}
.hub-home-refresh .site-home-link:focus-visible {
  border-radius: 12px;
  outline: 3px solid #28b6ca;
  outline-offset: 6px;
}
.hub-home-refresh > .site-header::before { pointer-events: none; }
@media (max-width: 600px) {
  .hub-home-refresh .view > .page-header { margin-bottom: 18px; padding: 18px 16px; border-radius: 16px; }
  .hub-home-refresh .view > .page-header::before { border-radius: 16px 16px 0 0; }
  .hub-home-refresh .site-home-link::after { inset: -29px -16px -25px; }
}


/* Full-width category toolbar on the unit activity view. */
.hub-home-refresh #activitiesView > .unit-category-filters {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100% !important;
  max-width: none;
  gap: 8px;
}
.hub-home-refresh #activitiesView > .unit-category-filter {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  flex: none;
  text-align: center;
}
@media (max-width: 600px) {
  .hub-home-refresh #activitiesView > .unit-category-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep the route controls secondary to the course or unit heading. */
.hub-home-refresh .view > .page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas: "copy route";
  align-items: start;
  column-gap: 24px;
}
.hub-home-refresh .view > .page-header > .hub-route {
  grid-area: route;
  justify-self: end;
  align-self: start;
  width: fit-content;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--hub-surface-soft, #f8f9fc);
}
.hub-home-refresh .view > .page-header > .page-header-copy {
  grid-area: copy;
  min-width: 0;
  align-self: end;
}
.hub-home-refresh .view > .page-header-copy .unit-label {
  margin-top: 0;
}
.hub-home-refresh .view > .page-header > .gradient {
  display: none;
}
.hub-home-refresh #unitsView > .course-page-header,
.hub-home-refresh #activitiesView > .unit-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas: "copy route";
  align-items: start;
  gap: 0 24px;
}
.hub-home-refresh #unitsView > .course-page-header > .course-breadcrumb,
.hub-home-refresh #activitiesView > .unit-page-header > .unit-breadcrumb {
  grid-area: route;
  justify-self: end;
  align-self: start;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--hub-surface-soft, #f8f9fc);
}
.hub-home-refresh #unitsView > .course-page-header > .page-header-copy,
.hub-home-refresh #activitiesView > .unit-page-header > .page-header-copy {
  grid-area: copy;
  align-self: end;
  min-width: 0;
}
.hub-home-refresh #unitsView > .course-page-header > .page-header-copy .unit-label,
.hub-home-refresh #activitiesView > .unit-page-header > .page-header-copy .unit-label {
  margin-top: 0;
}
.hub-home-refresh .utility-page-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas: "copy route";
  align-items: start;
  gap: 0 24px;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--hub-surface, #fff) 55%, #35d8c20a);
}
.hub-home-refresh .utility-page-header::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
}
.hub-home-refresh .utility-page-header > .hub-route {
  grid-area: route;
  justify-self: end;
  width: fit-content;
  max-width: 100%;
  margin: 0;
}
.hub-home-refresh .utility-page-header > .activity-header-copy {
  grid-area: copy;
  align-self: end;
}
.hub-home-refresh .utility-page-header .unit-label {
  margin-top: 0;
}
.hub-home-refresh .utility-page-header h1 {
  margin: 8px 0;
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -1px;
}
@media (max-width: 600px) {
  .hub-home-refresh .view > .page-header,
  .hub-home-refresh .utility-page-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "route" "copy";
    row-gap: 16px;
  }
  .hub-home-refresh .view > .page-header > .hub-route,
  .hub-home-refresh .utility-page-header > .hub-route {
    justify-self: end;
  }
  .hub-home-refresh #unitsView > .course-page-header,
  .hub-home-refresh #activitiesView > .unit-page-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "route" "copy";
    row-gap: 16px;
  }
  .hub-home-refresh #unitsView > .course-page-header > .course-breadcrumb,
  .hub-home-refresh #activitiesView > .unit-page-header > .unit-breadcrumb {
    justify-self: end;
  }
  .hub-home-refresh .utility-page-header {
    margin-bottom: 18px;
    padding: 20px 18px;
  }
}

.course-card {
  cursor: default;
}
.continue-banner {
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
}
.continue-banner:focus-visible {
  outline: 3px solid var(--hub-action);
  outline-offset: 3px;
}

/* Keep the search action beside the course heading without pushing the cards down. */
.hub-home-refresh #coursesView > .home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.hub-home-refresh #coursesView > .home-section-heading .compact-search {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  overflow: visible;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hub-home-refresh #coursesView > .home-section-heading .compact-search > summary {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  width: 96px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #dcd5e8;
  border-radius: 10px;
  background: #fff;
  color: #564477;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.hub-home-refresh #coursesView > .home-section-heading .compact-search > summary::after {
  display: none;
  content: none;
}
.hub-home-refresh #coursesView > .home-section-heading .compact-search .search-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 48px));
  max-height: min(70vh, 640px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 42px #18203324;
}
.hub-home-refresh #coursesView > .home-section-heading .compact-search .search-content > input {
  box-sizing: border-box;
  min-height: 46px;
}

/* Course choices should read as the main action, not small utility tiles. */
.hub-home-refresh #courses {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.hub-home-refresh .course-card,
.hub-home-refresh .games-grid a.quizloop-feature[data-game],
.hub-home-refresh #tesEquipment .tes-game-card[data-game] {
  border-width: 2px;
}
.hub-home-refresh .course-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border: 2px solid transparent;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  --game-accent: #35d8c2;
  --game-glow: color-mix(in srgb, var(--game-accent) 22%, transparent);
  --game-surface-start: color-mix(in srgb, var(--game-accent) 14%, white);
  --game-surface-end: color-mix(in srgb, var(--game-accent) 5%, white);
  --game-dark-start: color-mix(in srgb, var(--game-accent) 31%, #131a29);
  --game-dark-end: color-mix(in srgb, var(--game-accent) 8%, #131a29);
  --game-border-opacity: 34%;
  background:
    linear-gradient(135deg, var(--game-surface-start), var(--game-surface-end)) padding-box,
    linear-gradient(125deg, var(--game-glow), color-mix(in srgb, var(--game-accent) var(--game-border-opacity), transparent) 72%) border-box;
}
.hub-home-refresh .course-card[data-course="grado-superior"] {
  --game-accent: #27b6e3;
}
.hub-home-refresh .course-card[data-course="2-grado-superior"] {
  --game-accent: #8b5cf6;
}
.hub-home-refresh .course-card[data-course="2-grado-medio"] {
  --game-accent: #d05adf;
}
.hub-home-refresh .course-card h3 {
  margin: 13px 0 18px;
  font-size: clamp(22px, 2.2vw, 27px);
  line-height: 1.18;
}
.hub-home-refresh .course-card .status {
  margin-top: auto;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
}
.hub-home-refresh .course-card.unavailable {
  cursor: not-allowed;
}
.hub-home-refresh .games-grid .quizloop-feature {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.hub-home-refresh .games-grid .quizloop-feature > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hub-home-refresh .activity-card {
  position: relative;
}
.hub-home-refresh .activity-card-main-link {
  color: inherit;
  text-decoration: none;
}
.hub-home-refresh .activity-card-main-link::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
}
.hub-home-refresh .activity-card-main-link:focus-visible {
  outline: none;
}
.hub-home-refresh .activity-card-main-link:focus-visible::after {
  outline: 3px solid var(--hub-action);
  outline-offset: 3px;
}
.hub-home-refresh .activity-card .completeToggleBtn {
  position: relative;
  z-index: 2;
}

/* Give each game its own color identity and a faded, right-aligned logo watermark. */
.hub-home-refresh .games-grid a.quizloop-feature[data-game] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid transparent;
  --game-accent: #35d8c2;
  --game-glow: color-mix(in srgb, var(--game-accent) 22%, transparent);
  --game-surface-start: color-mix(in srgb, var(--game-accent) 14%, white);
  --game-surface-end: color-mix(in srgb, var(--game-accent) 5%, white);
  --game-dark-start: color-mix(in srgb, var(--game-accent) 31%, #131a29);
  --game-dark-end: color-mix(in srgb, var(--game-accent) 8%, #131a29);
  --game-border-opacity: 34%;
  background:
    linear-gradient(135deg, var(--game-surface-start), var(--game-surface-end)) padding-box,
    linear-gradient(125deg, var(--game-glow), color-mix(in srgb, var(--game-accent) var(--game-border-opacity), transparent) 72%) border-box;
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  width: 100%;
  max-width: 620px;
  min-height: 193px;
  margin: 0;
  padding: 20px;
  border: 2px solid transparent;
  border-radius: 15px;
  text-decoration: none;
  color: inherit;
  --game-accent: #d05adf;
  --game-glow: color-mix(in srgb, var(--game-accent) 22%, transparent);
  --game-surface-start: color-mix(in srgb, var(--game-accent) 14%, white);
  --game-surface-end: color-mix(in srgb, var(--game-accent) 5%, white);
  --game-dark-start: color-mix(in srgb, var(--game-accent) 31%, #131a29);
  --game-dark-end: color-mix(in srgb, var(--game-accent) 8%, #131a29);
  --game-border-opacity: 34%;
  background:
    linear-gradient(135deg, var(--game-surface-start), var(--game-surface-end)) padding-box,
    linear-gradient(125deg, var(--game-glow), color-mix(in srgb, var(--game-accent) var(--game-border-opacity), transparent) 72%) border-box;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game]::before,
.hub-home-refresh .games-grid a.quizloop-feature[data-game]::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game]::before,
.hub-home-refresh #tesEquipment .tes-game-card[data-game]::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game]::before {
  display: block;
  left: auto;
  top: 50%;
  right: 3%;
  bottom: auto;
  width: min(58%, 200px);
  aspect-ratio: 1;
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.09;
  transform: translateY(-50%) rotate(7deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game]::before {
  left: auto;
  top: 50%;
  right: 3%;
  bottom: auto;
  width: min(58%, 200px);
  aspect-ratio: 1;
  background: url("/assets/ambulance-logo.svg") right center / contain no-repeat;
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.09;
  transform: translateY(-50%) rotate(7deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game]::after {
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, var(--game-glow), transparent 68%);
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game]::after {
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, var(--game-glow), transparent 68%);
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="quizloop"] {
  --game-accent: #27b6e3;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="quizloop"]::before {
  background-image: url("/assets/quizloop-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="quizboard"] {
  --game-accent: #4f74e8;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="quizboard"]::before {
  background-image: url("/assets/quizboard-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="sketchquiz"] {
  --game-accent: #8b5cf6;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="sketchquiz"]::before {
  background-image: url("/assets/drawloop-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="imposter"] {
  --game-accent: #a34ce0;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="imposter"]::before {
  background-image: url("/assets/imposter-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="auction"] {
  --game-accent: #d05adf;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="auction"]::before {
  background-image: url("/assets/auction-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="hot-potato"] {
  --game-accent: #7650df;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="hot-potato"]::before {
  background-image: url("/assets/hot-potato-logo.svg?v=hotpotato5");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="rescue"] {
  --game-accent: #d05adf;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game="rescue"]::before {
  background-image: url("/assets/rescue-logo.svg");
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game] > div {
  position: relative;
  z-index: 1;
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game] > div {
  position: relative;
  z-index: 1;
}
.hub-home-refresh #tesEquipment .tes-game-card .gameBrand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.5px;
}
.hub-home-refresh #tesEquipment .tes-game-card .gameBrand img {
  width: 29px;
  height: 29px;
  border-radius: 0;
}
.hub-home-refresh #tesEquipment .tes-game-card p {
  max-width: 48ch;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game],
.hub-home-refresh #tesEquipment .tes-game-card[data-game] {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game] > div,
.hub-home-refresh #tesEquipment .tes-game-card[data-game] > div {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game] .gameBrand,
.hub-home-refresh #tesEquipment .tes-game-card[data-game] .gameBrand {
  justify-content: center;
  font-size: clamp(24px, 2.4vw, 28px);
  line-height: 1.18;
}
.hub-home-refresh .games-grid a.quizloop-feature[data-game] p,
.hub-home-refresh #tesEquipment .tes-game-card[data-game] p {
  width: min(100%, 38ch);
  margin: 14px auto 0;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}
.hub-home-refresh #tesEquipment .tes-game-card:hover,
.hub-home-refresh #tesEquipment .tes-game-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: -4px 3px 18px #35d8c21a, 5px 3px 18px #8b5cf61f;
}
@media (max-width: 600px) {
  .hub-home-refresh .games-grid a.quizloop-feature[data-game]::before {
    width: min(48%, 170px);
    opacity: 0.065;
  }
  .hub-home-refresh #tesEquipment .tes-game-card[data-game]::before {
    width: min(48%, 170px);
    opacity: 0.065;
  }
  .hub-home-refresh .games-grid a.quizloop-feature[data-game],
  .hub-home-refresh #tesEquipment .tes-game-card[data-game] {
    min-height: 205px;
  }
}
@media (max-width: 820px) {
  .hub-home-refresh #courses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .hub-home-refresh #coursesView > .home-section-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .hub-home-refresh #coursesView > .home-section-heading > div:first-child {
    flex: 1 1 0;
    min-width: 0;
  }
  .hub-home-refresh #coursesView > .home-section-heading .compact-search[open] {
    flex: 1 0 100%;
    margin-left: 0;
  }
  .hub-home-refresh #coursesView > .home-section-heading .compact-search[open] > summary {
    display: flex;
    margin-left: auto;
  }
  .hub-home-refresh #coursesView > .home-section-heading .compact-search .search-content {
    position: static;
    width: 100%;
    max-height: min(60vh, 560px);
    margin-top: 10px;
  }
  .hub-home-refresh #courses {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hub-home-refresh .course-card {
    min-height: 160px;
    padding: 21px;
  }
}

/* Course cards share the game cards' quiet watermark and generous type. */
.hub-home-refresh #courses .course-card {
  justify-content: center;
  min-height: 220px;
  padding: 20px;
  text-align: left;
}
.hub-home-refresh #courses .course-card::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 3%;
  bottom: auto;
  left: auto;
  width: min(58%, 200px);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  background: url("/assets/course-book.svg") right center / contain no-repeat;
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.09;
  transform: translateY(-50%) rotate(7deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}
.hub-home-refresh #courses .course-card::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, var(--game-glow), transparent 68%);
}
.hub-home-refresh #courses .course-card h3 {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 140px);
  margin: 0;
  font-size: clamp(25px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.65px;
  text-wrap: balance;
}
.hub-home-refresh #courses .course-card[data-course="grado-superior"] {
  --course-icon-color: #168fb8;
}
.hub-home-refresh #courses .course-card[data-course="2-grado-superior"] {
  --course-icon-color: #8b5cf6;
}
.hub-home-refresh #courses .course-card[data-course="2-grado-medio"] {
  --course-icon-color: #c653d3;
}
.hub-home-refresh #courses .course-card .status {
  position: relative;
  z-index: 1;
  margin-top: 12px;
}
.hub-home-refresh #coursesView {
  margin-top: 0;
}

.hub-home-refresh .course-card,
.hub-home-refresh .games-grid a.quizloop-feature[data-game],
.hub-home-refresh #tesEquipment .tes-game-card[data-game] {
  transition: transform .2s ease, box-shadow .2s ease, --game-border-opacity .2s ease;
}
.hub-home-refresh .course-card:hover:not(:disabled),
.hub-home-refresh .course-card:focus-visible,
.hub-home-refresh .games-grid a.quizloop-feature[data-game]:hover,
.hub-home-refresh .games-grid a.quizloop-feature[data-game]:focus-visible,
.hub-home-refresh #tesEquipment .tes-game-card[data-game]:hover,
.hub-home-refresh #tesEquipment .tes-game-card[data-game]:focus-visible {
  --game-border-opacity: 100%;
}

@media (max-width: 600px) {
  .hub-home-refresh #coursesView {
    margin-top: 0;
  }

    .hub-home-refresh #courses .course-card {
      min-height: 205px;
      padding: 20px;
  }
  .hub-home-refresh #courses .course-card::before {
    width: min(48%, 170px);
    opacity: 0.065;
  }
  .hub-home-refresh #courses .course-card h3 {
    max-width: calc(100% - 125px);
    font-size: clamp(25px, 7vw, 29px);
  }
}

.hub-home-refresh #activitiesView > .unit-category-filters {
  margin-top: 0;
}
.hub-home-refresh #tesEquipment {
  display: block;
  margin-top: 32px;
}
.hub-home-refresh #tesEquipment .tes-game-card[data-game] {
  width: 100%;
  max-width: none;
}

/* Give the account, theme, projector and help controls one shared language. */
.hub-home-refresh .home-brand .top-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.hub-home-refresh .home-brand .top-controls > .account-pill,
.hub-home-refresh .home-brand .top-controls > .theme-toggle-btn,
.hub-home-refresh .home-brand .top-controls > .pwa-install-btn,
.hub-home-refresh .home-brand .top-controls > .readingToggle,
.hub-home-refresh .home-brand .top-controls > .displayOptions > summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d7dce3;
  border-radius: 12px;
  background: #fff;
  color: #252b37;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.hub-home-refresh .home-brand .top-controls > .account-pill {
  gap: 6px;
}
.hub-home-refresh .home-brand .top-controls > .account-pill > span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 12px;
  font-weight: 700;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions > summary {
  list-style: none;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions > summary::-webkit-details-marker {
  display: none;
}
.hub-home-refresh .home-brand .top-controls > .account-pill:hover,
.hub-home-refresh .home-brand .top-controls > .theme-toggle-btn:hover,
.hub-home-refresh .home-brand .top-controls > .pwa-install-btn:hover,
.hub-home-refresh .home-brand .top-controls > .readingToggle:hover,
.hub-home-refresh .home-brand .top-controls > .displayOptions > summary:hover {
  transform: none;
  border-color: #8b5cf6;
  background: #f7f3ff;
  color: #56339f;
  box-shadow: none;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions[open] {
  padding: 0;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions[open] > summary {
  border-color: #8b5cf6;
  background: #f7f3ff;
  color: #56339f;
}
.hub-home-refresh .home-brand .top-controls > .displayOptions[open] > p,
.hub-home-refresh .home-brand .top-controls > .displayOptions[open] > label {
  white-space: normal;
}
.hub-home-refresh .home-brand .top-controls > .account-pill:focus-visible,
.hub-home-refresh .home-brand .top-controls > .theme-toggle-btn:focus-visible,
.hub-home-refresh .home-brand .top-controls > .pwa-install-btn:focus-visible,
.hub-home-refresh .home-brand .top-controls > .readingToggle:focus-visible,
.hub-home-refresh .home-brand .top-controls > .displayOptions > summary:focus-visible {
  outline: 3px solid #8b5cf6;
  outline-offset: 3px;
}

/* Give the English Hub masthead a clearer, left-aligned composition. */
.hub-home-refresh > .site-header {
  display: flex;
  align-items: center;
  min-height: 156px;
  padding: 29px clamp(22px, 4vw, 42px);
  text-align: left;
  box-shadow: 0 10px 28px #1820330a;
}
.hub-home-refresh > .site-header::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--pink));
}
.hub-home-refresh > .site-header .site-home-link {
  text-align: left;
}
.hub-home-refresh > .site-header .brandTitle {
  justify-content: flex-start;
  gap: 16px;
  font-size: clamp(36px, 4.8vw, 56px);
  letter-spacing: -2px;
  line-height: 1.08;
}
.hub-home-refresh > .site-header .brandTitle img {
  width: 54px;
  height: 54px;
  padding: 7px;
  border-radius: 14px;
  background: #f0edf9;
}
.hub-home-refresh > .site-header .subtitle {
  margin: 8px 0 0 70px;
  font-size: 15px;
  letter-spacing: .01em;
  text-align: left;
}

@media (max-width: 600px) {
  .hub-home-refresh > .site-header {
    min-height: 128px;
    padding: 23px 17px 22px 21px;
  }
  .hub-home-refresh > .site-header::before {
    border-radius: 19px 0 0 19px;
  }
  .hub-home-refresh > .site-header .brandTitle {
    justify-content: flex-start;
    gap: 12px;
    font-size: clamp(32px, 8vw, 39px);
    letter-spacing: -1.5px;
  }
  .hub-home-refresh > .site-header .brandTitle img {
    width: 44px;
    height: 44px;
    padding: 6px;
  }
  .hub-home-refresh > .site-header .subtitle {
    margin: 7px 0 0 56px;
    font-size: 14px;
  }
}
